ホーム » 3D » threejs requestAnimationFrame

2017年2月
 1234
567891011
12131415161718
19202122232425
262728  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,399 アクセス



threejs requestAnimationFrame

使い方が間違ってた?


  function three_start() {
    init() ;
    loop() ;
    }
  function loop() {
    controls.update();
    renderer.clear();
    renderer.render( scene, camera );
    requestAnimationFrame( loop );
    }


正しくは loader / babylon
  function init() {
    // …
    animate() ;
    // …
    }
  function animate() {
    requestAnimationFrame( animate );
    render();
    }
  function render() {
    controls.update();
    renderer.render( scene, camera );
    }
この方法でも,環境により CPU リソースが食われる.


一先ずここまで
本当は,完全にロードが終わったタイミングが取れれば良いのだが…

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

%d人のブロガーが「いいね」をつけました。