最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

autodesk

IT圈 admin 11浏览 0评论

autodesk

源码部分,不晓得咋调

 var that = this;(function animate() {if (that.recordTime) {requestAnimationFrame(animate);}// Is there an assumption here about the order of animation frame callbacks?var now = Date.now();deltaTime = now - startTime;startTime = now;})();

自己实现方法

setInterval("zizhuan()",100)function zizhuan() {const nav = this.viewer.navigationconst up = nav.getCameraUpVector()const pos = nav.getPosition()const axis = new THREE.Vector3(0, 0, -1)const speed = 5.0 * Math.PI / 180const dt = getElapsedMs() * 0.001const matrix = new THREE.Matrix4().makeRotationAxis(axis, speed * dt)pos.applyMatrix4(matrix)up.applyMatrix4(matrix)nav.setView(pos, new THREE.Vector3(0, 0, 0))nav.setCameraUpVector(up)
}
var _lastTime = performance.now()function getElapsedMs () {var time = performance.now()var elapsedMs = time - this._lastTimethis._lastTime = timereturn elapsedMs
}

autodesk

源码部分,不晓得咋调

 var that = this;(function animate() {if (that.recordTime) {requestAnimationFrame(animate);}// Is there an assumption here about the order of animation frame callbacks?var now = Date.now();deltaTime = now - startTime;startTime = now;})();

自己实现方法

setInterval("zizhuan()",100)function zizhuan() {const nav = this.viewer.navigationconst up = nav.getCameraUpVector()const pos = nav.getPosition()const axis = new THREE.Vector3(0, 0, -1)const speed = 5.0 * Math.PI / 180const dt = getElapsedMs() * 0.001const matrix = new THREE.Matrix4().makeRotationAxis(axis, speed * dt)pos.applyMatrix4(matrix)up.applyMatrix4(matrix)nav.setView(pos, new THREE.Vector3(0, 0, 0))nav.setCameraUpVector(up)
}
var _lastTime = performance.now()function getElapsedMs () {var time = performance.now()var elapsedMs = time - this._lastTimethis._lastTime = timereturn elapsedMs
}
发布评论

评论列表 (0)

  1. 暂无评论