亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

three.js 中的 requestAnimationFrame

three.js 中的 requestAnimationFrame

郎朗坤 2018-11-09 14:11:00
http://www.ituring.com.cn/art... 我在上面這個網站上看到 這樣寫function draw() {mesh.rotation.y = (mesh.rotation.y + 0.01) % (Math.PI * 2); renderer.render(scene, camera); id = requestAnimationFrame(draw);}想問下 mesh 怎么來的 ,需要 var mesh = new THREE.Mesh( geometry, material ); 么;然后我在自己地方function render() {requestAnimationFrame(render);mesh.rotation.y += 0.01;renderer.render(scene, camera);}也沒定義 mesh ;瀏覽器報錯 mesh is not defined;但是動畫還是會進行;想請問下這個報錯怎么解決
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1053 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號