Gyroscope.html 885 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">An Object3d that rotates independently of its parent objects, but keeps the position and scale.</div>
  14. <code>
  15. var root = new THREE.Group();
  16. var gyro = new THREE.Gyroscope();
  17. var cube = new THREE.Mesh( geometry, material );
  18. root.add( gyro )
  19. gyro.add( cube )
  20. cube.position.x = 10;
  21. root.rotation.y = Math.PI;
  22. // The cube will have changed its position but maintained its orientation
  23. </code>
  24. <h2>Constructor</h2>
  25. <h3>[name]()</h3>
  26. <h2>Source</h2>
  27. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  28. </body>
  29. </html>