嗨,我正在尝试根据官方的 THREE.js 制作一个。
JSFiddle运行,但它似乎没有使用原始文件中的URL加载/应用sprite映像:-
//... URL's as in the Original file
var mapA = THREE.ImageUtils.loadTexture ("textures/sprite0.png", undefined, createHUDSprites );
var mapB = THREE.ImageUtils.loadTexture ("textures/sprite1.jpg" );
map
我试图重复这个代码上的图像--我使用three.js,用照片覆盖一个球体。照片是非常延伸和像素化。我能做什么?
moonSurface = new THREE.Mesh(
new THREE.SphereGeometry(moonRadius -.1, 50, 50),
new THREE.MeshPhongMaterial({
map: THREE.ImageUtils.loadTexture('https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSfk7ndy7wriATp4pCx3fq4
使用<@>和earth_distance查看不同的值
with points as (
select
'(1,1)'::point as p1
,'(2,2)'::point as p2
)
select
((p1 <@> p2) * 1609.34::double precision) as d1
,(earth_distance(ll_to_earth(p1[1], p1[0]), ll_to_earth(p2[1], p2[0]))) as d2
from points
结果是:
157224.717