Three.js 计算两点的距离
·
方法:
.distanceTo ( v : Vector3 ) : Float
计算该向量到所传入的v间的距离。
示例:
var pos1 = new THREE.Vector3( 0, 1, 0 );
var pos2 = new THREE.Vector3( 1, 1, 1);
var distance = pos1.distanceTo(pos2);
更多推荐
已为社区贡献6条内容
计算该向量到所传入的v间的距离。
var pos1 = new THREE.Vector3( 0, 1, 0 );
var pos2 = new THREE.Vector3( 1, 1, 1);
var distance = pos1.distanceTo(pos2);
更多推荐
所有评论(0)