Font.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. Create a set of [page:Shape Shapes] representing a font loaded in JSON format.<br /><br />
  14. This is used internally by the [page:FontLoader].
  15. </div>
  16. <h2>Examples</h2>
  17. <div>
  18. [example:webgl_geometry_text_shapes geometry / text / shapes ]<br/>
  19. [example:webgl_shaders_vector vector / text ]<br/>
  20. </div>
  21. <h2>Constructor</h2>
  22. <h3>[name]( data )</h3>
  23. <div>
  24. data -- JSON data representing the font.<br /><br />
  25. This constructor creates a new [name], which is an array of [page:Shape Shapes].
  26. </div>
  27. <h2>Properties</h2>
  28. <h3>[property:array data]</h3>
  29. <div>The JSON data passed in the constructor.</div>
  30. <h3>[property:Boolean isFont]</h3>
  31. <div>
  32. Used to check whether this or derived classes are fonts. Default is *true*.<br /><br />
  33. You should not change this, as it used internally by the renderer for optimisation.
  34. </div>
  35. <h2>Methods</h2>
  36. <h3>[method:null generateShapes]( [page:String text], [page:Float size], [page:Integer divisions] )</h3>
  37. <div>
  38. [page:String text] -- string of text.<br />
  39. [page:Float size] -- (optional) scale for the [page:Shape Shapes]. Default is *100*.<br />
  40. [page:Integer divisions] -- (optional) fineness of the [page:Shape Shapes]. Default is *4*.<br />
  41. Creates an array of [page:Shape Shapes] representing the text in the font.
  42. </div>
  43. <h2>Source</h2>
  44. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  45. </body>
  46. </html>