我刚开始学习Three.js和图形化编程。我所要做的就是顺利地将相机从一个位置转换到另一个位置。
我找到的一个解决方案使用了PathControls.js,它已经被删除了。
发布于 2015-06-26 18:01:26
这一职能应该有所帮助。需要tween.js,您可以在three.js的示例/js/libs文件夹中找到它
function setupCameraPositionTween( source, target, duration, delay, easing )
{
var l_delay = ( delay !== undefined ) ? delay : 0;
var l_easing = ( easing !== undefined ) ? easing : TWEEN.Easing.Linear.None;
new TWEEN.Tween( source )
.to( target, duration )
.delay( l_delay )
.easing( l_easing )
.onUpdate ( function()
{
// copy incoming position into camera position
camera.position.copy( source );
})
.start();
}https://stackoverflow.com/questions/31078942
复制相似问题