我才刚刚开始学习Three.js。我想创建一个空的/透明的场景,并通过名为updateLocation
的函数来更新其位置得到更新的平面。
function initView() {
// Initialize empty scene and plane
}
function updateLocation(projection, camera) {
// Update location of plane (projection) relative to camera.
}
projection
的数据是具有16个数据点的Float数组。看起来像这样:
[-0.05798465,-0.9944902,-0.08733259,0.0,-0.99826366,0.0586676,-0.005271297,0.0,-0.0103658475,-0.086875305,0.9961653,0.0,-0.22195134,-0.06647219,-2.5755005,1.0]
camera
的数据采用相同的格式,但没有改变,这基本上是我的全部观点。看起来像这样:
[0.0,-1.7,0.0,0.0,3.0222223,0.0,0.0,0.0,0.0,0.0,-1.0008004, -1.0,0.0,0.0,-0.40016007,0.0]
任何朝着正确方向的推动都会受到赞赏。