ShapePath.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!DOCTYPE html>
  2. <html lang="it">
  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. Questa classe viene utilizzata per convertire una serie di forme in un array di [page:Path], ad esempio una
  13. forma SVG in un path.
  14. </p>
  15. <h2>Costruttore</h2>
  16. <h3>[name]( )</h3>
  17. <p>
  18. Crea un nuovo ShapePath. Diversamente da un [page:Path], non vengono passati punti poiché lo ShapePath
  19. è progettato per essere generato dopo la creazione.
  20. </p>
  21. <h2>Proprietà</h2>
  22. <h3>[property:Array subPaths]</h3>
  23. <p>
  24. Un array di [page:Path].
  25. </p>
  26. <h3>[property:Array currentPath]</h3>
  27. <p>
  28. Il [page:Path] corrente che viene generato.
  29. </p>
  30. <h3>[property:Color color]</h3>
  31. <p>Il [page:Color Colore] della shape, da impostazione predefinita impostato su bianco (0xffffff).</p>
  32. <h2>Metodi</h2>
  33. <h3>[method:this moveTo]( [param:Float x], [param:Float y] )</h3>
  34. <p>
  35. Inizia un nuovo [page:Path] e chiama [page:Path.moveTo]( x, y ) su questo [page:Path].
  36. Punta anche [page:ShapePath.currentPath currentPath] a quel [page:Path].
  37. </p>
  38. <h3>[method:this lineTo]( [param:Float x], [param:Float y] )</h3>
  39. <p>
  40. Crea una linea dall'offset del [page:ShapePath.currentPath currentPath]
  41. a X e Y e aggiorna l'offset di X e Y.
  42. </p>
  43. <h3>[method:this quadraticCurveTo]( [param:Float cpX], [param:Float cpY], [param:Float x], [param:Float y] )</h3>
  44. <p>
  45. Crea una curva quadratica dall'offset del [page:ShapePath.currentPath currentPath] a x e y con cpX e cpY
  46. come punto di controllo e aggiorna l'offset del [page:ShapePath.currentPath currentPath] di x e y.
  47. </p>
  48. <h3>[method:this bezierCurveTo]( [param:Float cp1X], [param:Float cp1Y], [param:Float cp2X], [param:Float cp2Y], [param:Float x], [param:Float y] )</h3>
  49. <p>
  50. Crea una curva bazier dall'offset del [page:ShapePath.currentPath currentPath] a x e y con
  51. cp1X, cp1Y e cp2X, cp2Y come punti di controllo e aggiorna l'offset del [page:ShapePath.currentPath currentPath] a x e y.
  52. </p>
  53. <h3>[method:this splineThru] ( [param:Array points] ) </h3>
  54. <p>points - Un array di [page:Vector2]</p>
  55. <p>Collega una nuova [page:SplineCurve] al [page:ShapePath.currentPath currentPath].</p>
  56. <h3>[method:Array toShapes]( [param:Boolean isCCW] )</h3>
  57. <p>
  58. isCCW -- Modifica la modalità di generazione degli hole e dei solidi<br/>
  59. </p>
  60. <p>
  61. Converte l'array [page:ShapePath.subPaths subPaths] in un array di Shape. Per impostazione predefinita
  62. le forme solide sono definite in senso orario (CW) e i fori sono definiti in senso antiorario (CCW).
  63. Se isCCW è impostato su `true`, le forme sono capovolte.
  64. </p>
  65. <h2>Source</h2>
  66. <p>
  67. [link:https://github.com/mrdoob/three.js/blob/master/src/extras/core/ShapePath.js src/extras/core/ShapePath.js]
  68. </p>
  69. </body>
  70. </html>