Sprite.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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">A sprite is a plane in an 3d scene which faces always towards the camera.<br /><br />Sprites do not cast shadows, setting <code>castShadow = true</code> will have no effect.</div>
  14. <h2>Example</h2>
  15. <code>
  16. var map = new THREE.TextureLoader().load( "sprite.png" );
  17. var material = new THREE.SpriteMaterial( { map: map, color: 0xffffff, fog: true } );
  18. var sprite = new THREE.Sprite( material );
  19. scene.add( sprite );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]( [page:Material material] )</h3>
  23. <div>
  24. material — An instance of [page:Material] (optional).
  25. </div>
  26. <div>
  27. This creates a new sprite with an specific material.
  28. </div>
  29. <h2>Properties</h2>
  30. <div>See the base [page:Object3D] class for common properties.</div>
  31. <h3>[property:SpriteMaterial material]</h3>
  32. <div>
  33. An instance of [page:Material], defining the object's appearance. Default is a [page:SpriteMaterial] which is a white plane.
  34. </div>
  35. <h2>Methods</h2>
  36. <div>See the base [page:Object3D] class for common methods.</div>
  37. <h3>[method:Sprite clone]()</h3>
  38. <div>
  39. Returns a clone of this Sprite object and its descendants.
  40. </div>
  41. <h2>Source</h2>
  42. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  43. </body>
  44. </html>