|
@@ -308,7 +308,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-<h4 class="name" id="dashPattern"><span class="type-signature"></span>dashPattern<span class="type-signature"></span></h4>
|
|
|
+<h4 class="name" id="dashPattern"><span class="type-signature"></span>dashPattern<span class="type-signature"> :Array.<number></span></h4>
|
|
|
|
|
|
|
|
|
|
|
@@ -323,6 +323,16 @@ E.g if the dash pattern is [1, 2] we get 1 point with line, 2 without line repea
|
|
|
|
|
|
|
|
|
|
|
|
+ <h5>Type:</h5>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+
|
|
|
+<span class="param-type">Array.<number></span>
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -361,7 +371,7 @@ E.g if the dash pattern is [1, 2] we get 1 point with line, 2 without line repea
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line37">line 37</a>
|
|
|
+ <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line43">line 43</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -509,7 +519,7 @@ Should be implemented by underlying classes.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line435">line 435</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line474">line 474</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -527,7 +537,7 @@ Should be implemented by underlying classes.
|
|
|
|
|
|
|
|
|
|
|
|
-<h4 class="name" id="from"><span class="type-signature"></span>from<span class="type-signature"></span></h4>
|
|
|
+<h4 class="name" id="from"><span class="type-signature"></span>from<span class="type-signature"> :<a href="Vector2.html">Vector2</a></span></h4>
|
|
|
|
|
|
|
|
|
|
|
@@ -540,6 +550,16 @@ Can be equal to the position object of another object. Making it automatically f
|
|
|
|
|
|
|
|
|
|
|
|
+ <h5>Type:</h5>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+
|
|
|
+<span class="param-type"><a href="Vector2.html">Vector2</a></span>
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -578,7 +598,7 @@ Can be equal to the position object of another object. Making it automatically f
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line21">line 21</a>
|
|
|
+ <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line23">line 23</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1061,7 +1081,7 @@ The layer value is considered first.
|
|
|
|
|
|
|
|
|
|
|
|
-<h4 class="name" id="lineWidth"><span class="type-signature"></span>lineWidth<span class="type-signature"></span></h4>
|
|
|
+<h4 class="name" id="lineWidth"><span class="type-signature"></span>lineWidth<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
|
|
|
|
|
@@ -1072,6 +1092,16 @@ The layer value is considered first.
|
|
|
|
|
|
|
|
|
|
|
|
+ <h5>Type:</h5>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+
|
|
|
+<span class="param-type">number</span>
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1110,7 +1140,7 @@ The layer value is considered first.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line47">line 47</a>
|
|
|
+ <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line57">line 57</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1491,7 +1521,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line477">line 477</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line516">line 516</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1558,7 +1588,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line543">line 543</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line582">line 582</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1625,7 +1655,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line527">line 527</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line566">line 566</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1692,7 +1722,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line551">line 551</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line590">line 590</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1759,7 +1789,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line535">line 535</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line574">line 574</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1826,7 +1856,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line470">line 470</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line509">line 509</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1893,7 +1923,7 @@ The matrix is updated before rendering the object, after the matrix is updated t
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line462">line 462</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line501">line 501</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -1962,7 +1992,7 @@ It is not called while the pointer is inside of the object, just on the first ti
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line503">line 503</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line542">line 542</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -2029,7 +2059,7 @@ It is not called while the pointer is inside of the object, just on the first ti
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line511">line 511</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line550">line 550</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -2096,7 +2126,7 @@ It is not called while the pointer is inside of the object, just on the first ti
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line519">line 519</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line558">line 558</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -2163,7 +2193,7 @@ It is not called while the pointer is inside of the object, just on the first ti
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line484">line 484</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line523">line 523</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -2234,7 +2264,7 @@ This method is called for every object before rendering.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line493">line 493</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line532">line 532</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -2955,7 +2985,7 @@ The world scale of the object is affected by the parent transform.
|
|
|
|
|
|
|
|
|
|
|
|
-<h4 class="name" id="strokeStyle"><span class="type-signature"></span>strokeStyle<span class="type-signature"></span></h4>
|
|
|
+<h4 class="name" id="strokeStyle"><span class="type-signature"></span>strokeStyle<span class="type-signature"> :string</span></h4>
|
|
|
|
|
|
|
|
|
|
|
@@ -2966,6 +2996,16 @@ The world scale of the object is affected by the parent transform.
|
|
|
|
|
|
|
|
|
|
|
|
+ <h5>Type:</h5>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+
|
|
|
+<span class="param-type">string</span>
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -3004,7 +3044,7 @@ The world scale of the object is affected by the parent transform.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line42">line 42</a>
|
|
|
+ <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line50">line 50</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -3075,7 +3115,7 @@ Should be implemented by underlying classes.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line424">line 424</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line463">line 463</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -3093,7 +3133,7 @@ Should be implemented by underlying classes.
|
|
|
|
|
|
|
|
|
|
|
|
-<h4 class="name" id="to"><span class="type-signature"></span>to<span class="type-signature"></span></h4>
|
|
|
+<h4 class="name" id="to"><span class="type-signature"></span>to<span class="type-signature"> :<a href="Vector2.html">Vector2</a></span></h4>
|
|
|
|
|
|
|
|
|
|
|
@@ -3106,6 +3146,16 @@ Can be equal to the position object of another object. Making it automatically f
|
|
|
|
|
|
|
|
|
|
|
|
+ <h5>Type:</h5>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+
|
|
|
+<span class="param-type"><a href="Vector2.html">Vector2</a></span>
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -3144,7 +3194,7 @@ Can be equal to the position object of another object. Making it automatically f
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line28">line 28</a>
|
|
|
+ <a href="objects_Line.js.html">objects/Line.js</a>, <a href="objects_Line.js.html#line32">line 32</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -3234,6 +3284,87 @@ Can be equal to the position object of another object. Making it automatically f
|
|
|
|
|
|
|
|
|
|
|
|
+<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div class="description">
|
|
|
+ Type of the object, used for data serialization and/or checking the object type.
|
|
|
+
|
|
|
+The name used should match the object constructor name. But it is not required.
|
|
|
+
|
|
|
+If this type is from an external library you can add the library name to the object type name to prevent collisions.
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h5>Type:</h5>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+
|
|
|
+<span class="param-type">string</span>
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<dl class="details">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dt class="tag-overrides">Overrides:</dt>
|
|
|
+ <dd class="tag-overrides"><ul class="dummy"><li>
|
|
|
+ <a href="Line.html#type">Line#type</a>
|
|
|
+ </li></ul></dd>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dt class="tag-source">Source:</dt>
|
|
|
+ <dd class="tag-source"><ul class="dummy"><li>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line215">line 215</a>
|
|
|
+ </li></ul></dd>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</dl>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<h4 class="name" id="uuid"><span class="type-signature"></span>uuid<span class="type-signature"> :string</span></h4>
|
|
|
|
|
|
|
|
@@ -3501,7 +3632,7 @@ Helper objects are added to the parent of the curve object.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="objects_BezierCurve.js.html">objects/BezierCurve.js</a>, <a href="objects_BezierCurve.js.html#line41">line 41</a>
|
|
|
+ <a href="objects_BezierCurve.js.html">objects/BezierCurve.js</a>, <a href="objects_BezierCurve.js.html#line44">line 44</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -3645,7 +3776,7 @@ The object is set as children of this object and the transformations applied to
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line320">line 320</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line358">line 358</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -3738,7 +3869,7 @@ The object is set as children of this object and the transformations applied to
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line269">line 269</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line307">line 307</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -3880,7 +4011,7 @@ The object is set as children of this object and the transformations applied to
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line298">line 298</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line336">line 336</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -4067,7 +4198,7 @@ The object is set as children of this object and the transformations applied to
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line211">line 211</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line249">line 249</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -4235,7 +4366,7 @@ To check if a point in world coordinates intersects the object the inverseGlobal
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line373">line 373</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line411">line 411</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -4422,7 +4553,7 @@ To check if a point in world coordinates intersects the object the inverseGlobal
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line241">line 241</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line279">line 279</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -4661,7 +4792,176 @@ To detect when the object drag stops the onPointerDragEnd() method can be used.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line451">line 451</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line490">line 490</a>
|
|
|
+ </li></ul></dd>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</dl>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">(data, root)</span><span class="type-signature"></span></h4>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div class="description">
|
|
|
+ Parse serialized object data and fill the object attributes.
|
|
|
+
|
|
|
+Implementations of this method should only load the attributes added to the structure, the based method already loads common attributes.
|
|
|
+
|
|
|
+Dont forget to register object types using the Object2D.register() method.
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h5>Parameters:</h5>
|
|
|
+
|
|
|
+
|
|
|
+<table class="params">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+
|
|
|
+ <th>Name</th>
|
|
|
+
|
|
|
+
|
|
|
+ <th>Type</th>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <th class="last">Description</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+
|
|
|
+
|
|
|
+ <tr>
|
|
|
+
|
|
|
+ <td class="name"><code>data</code></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="type">
|
|
|
+
|
|
|
+
|
|
|
+<span class="param-type">Object</span>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </td>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <td class="description last">Object data loaded from JSON.</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <tr>
|
|
|
+
|
|
|
+ <td class="name"><code>root</code></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="type">
|
|
|
+
|
|
|
+
|
|
|
+<span class="param-type"><a href="Object2D.html">Object2D</a></span>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </td>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <td class="description last">Root object being loaded can be used to get references to other objects.</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+</table>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<dl class="details">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dt class="tag-overrides">Overrides:</dt>
|
|
|
+ <dd class="tag-overrides"><ul class="dummy"><li>
|
|
|
+ <a href="Line.html#parse">Line#parse</a>
|
|
|
+ </li></ul></dd>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dt class="tag-source">Source:</dt>
|
|
|
+ <dd class="tag-source"><ul class="dummy"><li>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line654">line 654</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -4803,7 +5103,7 @@ To detect when the object drag stops the onPointerDragEnd() method can be used.
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line341">line 341</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line379">line 379</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -4839,7 +5139,175 @@ To detect when the object drag stops the onPointerDragEnd() method can be used.
|
|
|
|
|
|
|
|
|
|
|
|
- <h4 class="name" id="transform"><span class="type-signature"></span>transform<span class="signature">(context, viewport)</span><span class="type-signature"></span></h4>
|
|
|
+ <h4 class="name" id="serialize"><span class="type-signature"></span>serialize<span class="signature">(recursive)</span><span class="type-signature"> → {Object}</span></h4>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div class="description">
|
|
|
+ Serialize the object data into a JSON object. That can be written into a file, sent using HTTP request etc.
|
|
|
+
|
|
|
+All required attributes to recreate the object in its current state should be stored. Relations between children should be stored by their UUID only.
|
|
|
+
|
|
|
+Data has to be parsed back into a usable object.
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h5>Parameters:</h5>
|
|
|
+
|
|
|
+
|
|
|
+<table class="params">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+
|
|
|
+ <th>Name</th>
|
|
|
+
|
|
|
+
|
|
|
+ <th>Type</th>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <th class="last">Description</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+
|
|
|
+
|
|
|
+ <tr>
|
|
|
+
|
|
|
+ <td class="name"><code>recursive</code></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="type">
|
|
|
+
|
|
|
+
|
|
|
+<span class="param-type">boolean</span>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </td>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <td class="description last">If set false the children list is not serialized, otherwise all children are serialized.</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+</table>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<dl class="details">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dt class="tag-overrides">Overrides:</dt>
|
|
|
+ <dd class="tag-overrides"><ul class="dummy"><li>
|
|
|
+ <a href="Line.html#serialize">Line#serialize</a>
|
|
|
+ </li></ul></dd>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dt class="tag-source">Source:</dt>
|
|
|
+ <dd class="tag-source"><ul class="dummy"><li>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line602">line 602</a>
|
|
|
+ </li></ul></dd>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</dl>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<h5>Returns:</h5>
|
|
|
+
|
|
|
+
|
|
|
+<div class="param-desc">
|
|
|
+ Serialized object data.
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<dl>
|
|
|
+ <dt>
|
|
|
+ Type
|
|
|
+ </dt>
|
|
|
+ <dd>
|
|
|
+
|
|
|
+<span class="param-type">Object</span>
|
|
|
+
|
|
|
+
|
|
|
+ </dd>
|
|
|
+</dl>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h4 class="name" id="transform"><span class="type-signature"></span>transform<span class="signature">(context, viewport, canvas)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
|
|
|
|
|
@@ -4928,6 +5396,29 @@ This is called before style() and draw(). It can also be used for some pre-rende
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
+
|
|
|
+ <tr>
|
|
|
+
|
|
|
+ <td class="name"><code>canvas</code></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="type">
|
|
|
+
|
|
|
+
|
|
|
+<span class="param-type">Element</span>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </td>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <td class="description last">DOM canvas element where the content is being drawn.</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
@@ -4970,7 +5461,7 @@ This is called before style() and draw(). It can also be used for some pre-rende
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line408">line 408</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line447">line 447</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -5112,7 +5603,7 @@ This is called before style() and draw(). It can also be used for some pre-rende
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line282">line 282</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line320">line 320</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -5254,7 +5745,7 @@ This is called before style() and draw(). It can also be used for some pre-rende
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
|
- <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line383">line 383</a>
|
|
|
+ <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line421">line 421</a>
|
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
@@ -5300,13 +5791,13 @@ This is called before style() and draw(). It can also be used for some pre-rende
|
|
|
</div>
|
|
|
|
|
|
<nav>
|
|
|
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCurve.html">BezierCurve</a></li><li><a href="Box.html">Box</a></li><li><a href="Box2.html">Box2</a></li><li><a href="BoxMask.html">BoxMask</a></li><li><a href="Circle.html">Circle</a></li><li><a href="DOM.html">DOM</a></li><li><a href="EventManager.html">EventManager</a></li><li><a href="Graph.html">Graph</a></li><li><a href="Helpers.html">Helpers</a></li><li><a href="Image.html">Image</a></li><li><a href="Key.html">Key</a></li><li><a href="Line.html">Line</a></li><li><a href="Mask.html">Mask</a></li><li><a href="Matrix.html">Matrix</a></li><li><a href="MultiLineText.html">MultiLineText</a></li><li><a href="Node.html">Node</a></li><li><a href="NodeConnector.html">NodeConnector</a></li><li><a href="NodeGraph.html">NodeGraph</a></li><li><a href="NodeSocket.html">NodeSocket</a></li><li><a href="Object2D.html">Object2D</a></li><li><a href="Pattern.html">Pattern</a></li><li><a href="Pointer.html">Pointer</a></li><li><a href="QuadraticCurve.html">QuadraticCurve</a></li><li><a href="Renderer.html">Renderer</a></li><li><a href="RoundedBox.html">RoundedBox</a></li><li><a href="Text.html">Text</a></li><li><a href="UUID.html">UUID</a></li><li><a href="Vector2.html">Vector2</a></li><li><a href="Viewport.html">Viewport</a></li><li><a href="ViewportControls.html">ViewportControls</a></li></ul><h3>Global</h3><ul><li><a href="global.html#connector">connector</a></li><li><a href="global.html#direction">direction</a></li><li><a href="global.html#inputs">inputs</a></li><li><a href="global.html#inputSocket">inputSocket</a></li><li><a href="global.html#name">name</a></li><li><a href="global.html#node">node</a></li><li><a href="global.html#outputs">outputs</a></li><li><a href="global.html#outputSocket">outputSocket</a></li><li><a href="global.html#text">text</a></li><li><a href="global.html#type">type</a></li></ul>
|
|
|
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCurve.html">BezierCurve</a></li><li><a href="Box.html">Box</a></li><li><a href="Box2.html">Box2</a></li><li><a href="BoxMask.html">BoxMask</a></li><li><a href="Circle.html">Circle</a></li><li><a href="DOM.html">DOM</a></li><li><a href="EventManager.html">EventManager</a></li><li><a href="FileUtils.html">FileUtils</a></li><li><a href="Graph.html">Graph</a></li><li><a href="Helpers.html">Helpers</a></li><li><a href="Image.html">Image</a></li><li><a href="Key.html">Key</a></li><li><a href="Line.html">Line</a></li><li><a href="Mask.html">Mask</a></li><li><a href="Matrix.html">Matrix</a></li><li><a href="MultiLineText.html">MultiLineText</a></li><li><a href="Node.html">Node</a></li><li><a href="NodeConnector.html">NodeConnector</a></li><li><a href="NodeGraph.html">NodeGraph</a></li><li><a href="NodeSocket.html">NodeSocket</a></li><li><a href="Object2D.html">Object2D</a></li><li><a href="Pattern.html">Pattern</a></li><li><a href="Pointer.html">Pointer</a></li><li><a href="QuadraticCurve.html">QuadraticCurve</a></li><li><a href="Renderer.html">Renderer</a></li><li><a href="RoundedBox.html">RoundedBox</a></li><li><a href="Text.html">Text</a></li><li><a href="UUID.html">UUID</a></li><li><a href="Vector2.html">Vector2</a></li><li><a href="Viewport.html">Viewport</a></li><li><a href="ViewportControls.html">ViewportControls</a></li></ul><h3>Global</h3><ul><li><a href="global.html#writeFile">writeFile</a></li></ul>
|
|
|
</nav>
|
|
|
|
|
|
<br class="clear">
|
|
|
|
|
|
<footer>
|
|
|
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Thu May 14 2020 18:22:31 GMT+0100 (Western European Summer Time)
|
|
|
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Mon May 18 2020 18:40:48 GMT+0100 (Western European Summer Time)
|
|
|
</footer>
|
|
|
|
|
|
<script> prettyPrint(); </script>
|