CSS2DRenderer.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">[name] is a simplified version of [page:CSS3DRenderer]. The only transformation that is supported is translation.<br /><br />
  12. 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 />
  13. </p>
  14. <h2>Examples</h2>
  15. <p>
  16. [example:css2d_label]<br>
  17. [example:webgl_loader_pdb molecules]
  18. </p>
  19. <h2>Constructor</h2>
  20. <h3>[name]()</h3>
  21. <h2>Methods</h2>
  22. <h3>[method:Object getSize]()</h3>
  23. <p>
  24. Returns an object containing the width and height of the renderer.
  25. </p>
  26. <h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
  27. <p>
  28. Renders a [page:Scene scene] using a [page:Camera camera].<br />
  29. </p>
  30. <h3>[method:null setSize]([param:Number width], [param:Number height])</h3>
  31. <p>
  32. Resizes the renderer to (width, height).
  33. </p>
  34. <h2>Source</h2>
  35. <p>
  36. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS2DRenderer.js examples/jsm/renderers/CSS2DRenderer.js]
  37. </p>
  38. </body>
  39. </html>