SVGRenderer.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. <div class="desc">
  13. <p>
  14. [name] can be used to render geometric data using SVG. The produced vector graphics are particular useful in the following use cases:
  15. </p>
  16. <ul>
  17. <li>Animated logos or icons</li>
  18. <li>Interactive 2D/3D diagrams or graphs</li>
  19. <li>Interactive maps</li>
  20. <li>Complex or animated user interfaces</li>
  21. </ul>
  22. <p>
  23. [name] has various advantages. It produces crystal-clear and sharp output which is independent of the actual viewport resolution.<br />
  24. SVG elements can be styled via CSS. And they have good accessibility since it's possible to add metadata like title or description (useful for search engines or screen readers).
  25. </p>
  26. <p>
  27. There are, however, some important limitations:
  28. </p>
  29. <ul>
  30. <li>No advanced shading</li>
  31. <li>No texture support</li>
  32. <li>No shadow support</li>
  33. </ul>
  34. </div>
  35. <h2>Examples</h2>
  36. <p>
  37. [example:svg_lines lines]<br />
  38. [example:svg_sandbox sandbox]
  39. </p>
  40. <h2>Constructor</h2>
  41. <h3>[name]()</h3>
  42. <h2>Properties</h2>
  43. <h3>[property:Number overdraw]</h3>
  44. <p>
  45. Number of fractional pixels to enlarge polygons in order to prevent anti-aliasing gaps. Range is [0..1]. Default is *0.5*.
  46. </p>
  47. <h2>Methods</h2>
  48. <h3>[method:null clear]()</h3>
  49. <p>
  50. Tells the renderer to clear its drawing surface.
  51. </p>
  52. <h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
  53. <p>
  54. Renders a [page:Scene scene] using a [page:Camera camera].
  55. </p>
  56. <h3>[method:null setClearColor]( [param:Color color], [param:number alpha] )</h3>
  57. <p>
  58. Sets the clearColor and the clearAlpha.
  59. </p>
  60. <h3>[method:null setPrecision]( [param:Number precision] )</h3>
  61. <p>
  62. Sets the precision of the data used to create a path.
  63. </p>
  64. <h3>[method:null setQuality]()</h3>
  65. <p>
  66. Sets the render quality. Possible values are *low* and *high* (default).
  67. </p>
  68. <h3>[method:null setSize]( [param:Number width], [param:Number height] )</h3>
  69. <p>
  70. Resizes the renderer to (width, height).
  71. </p>
  72. <h2>Source</h2>
  73. <p>
  74. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/SVGRenderer.js examples/jsm/renderers/SVGRenderer.js]
  75. </p>
  76. </body>
  77. </html>