2
0

CSS2DRenderer.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <h1>[name]</h1>
  12. <p class="desc">[name] is a simplified version of [page:CSS3DRenderer]. The only transformation that is supported is translation.<br /><br />
  13. The renderer is very useful if you want to combine HTML based labels with 3D objects. Here too, the respective DOM elements are wrapped into an instance of *CSS2DObject* and added to the scene graph.<br />
  14. </p>
  15. <h2>Examples</h2>
  16. <p>
  17. [example:css2d_label]<br>
  18. [example:webgl_loader_pdb molecules]
  19. </p>
  20. <h2>Constructor</h2>
  21. <h3>[name]()</h3>
  22. <h2>Methods</h2>
  23. <h3>[method:Object getSize]()</h3>
  24. <p>
  25. Returns an object containing the width and height of the renderer.
  26. </p>
  27. <h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
  28. <p>
  29. Renders a [page:Scene scene] using a [page:Camera camera].<br />
  30. </p>
  31. <h3>[method:null setSize]([param:Number width], [param:Number height])</h3>
  32. <p>
  33. Resizes the renderer to (width, height).
  34. </p>
  35. <h2>Source</h2>
  36. <p>
  37. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS2DRenderer.js examples/jsm/renderers/CSS2DRenderer.js]
  38. </p>
  39. </body>
  40. </html>