LoginSignup
0
0

More than 1 year has passed since last update.

plunkerでa-frame その4

Last updated at Posted at 2021-07-11

概要

plnkerでa-frameやってみた。
boxをアニメーションで回して、もう一個は、そのローテーションを取得して回す。

サンプルコード


function run() {
    let sceneEl = document.querySelector('a-scene');
    let box1 = sceneEl.querySelector('#box1');
    let box2 = sceneEl.querySelector('#box2');
    box2.object3D.rotation.copy(box1.object3D.rotation);
    requestAnimationFrame(run);
}
run();  

成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0