Font.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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">
  12. 以JSON格式,创建一系列的[page:Shape Shape](形状)来表示一个字体。
  13. <br /><br />
  14. 该类在内部由[page:FontLoader]所使用。
  15. </p>
  16. <h2>例子</h2>
  17. <p>
  18. [example:webgl_geometry_text_shapes geometry / text / shapes ]
  19. </p>
  20. <h2>构造函数</h2>
  21. <h3>[name]( data )</h3>
  22. <p>
  23. data -- 表示字体的JSON数据。<br /><br />
  24. 这一构造函数创建一个新的[name],它是一个[page:Shape Shapes]数组。
  25. </p>
  26. <h2>属性</h2>
  27. <h3>[property:Array data]</h3>
  28. <p>传入到构造函数的JSON数据。</p>
  29. <h2>方法</h2>
  30. <h3>[method:null generateShapes]( [param:String text], [param:Float size] )</h3>
  31. <p>
  32. [page:String text] -- 文本字符串。<br />
  33. [page:Float size] -- (可选)[page:Shape Shapes]的缩放,默认值为*100*。<br />
  34. 创建一个[page:Shape Shapes]数组,表示使用字体的文本。
  35. </p>
  36. <h2>源代码</h2>
  37. <p>
  38. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  39. </p>
  40. </body>
  41. </html>