Skip to content

Commit 14786b9

Browse files
VTT-AI-Agentclaude
andcommitted
Line tutorial: move its stops onto the lines' stops property
The check-library validator flagged 25 unrecognized "linePosition" properties in the line tutorial: the previous commit made the line's "stops" list the only source of truth, which detached every stop in this tutorial and left one paragraph describing a property that no longer exists. Mechanical conversion of the tutorial added earlier in this same branch: each stop's linePosition moves into a { widget, position } entry on its line, ordered by position, and the paragraph now documents "stops". No geometry changes - all 25 stops land on exactly the same points. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d6a3303 commit 14786b9

1 file changed

Lines changed: 127 additions & 40 deletions

File tree

  • library/tutorials/Types - Line

library/tutorials/Types - Line/0.json

Lines changed: 127 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"css": {
9696
"font-size": "22px"
9797
},
98-
"html": "This line has a width of 0 so it is invisible. However, the holders that are attached to it follow the curve of the line. By default the stops are evenly spaced (<b>autoSpaceStops</b>:true) and will rotate (<b>rotateStops</b>:true) to follow the curve of the line. Move the end points, control points, and add and delete stops to see this in action. Stops on the line get <b>linePosition</b> and sometimes <b>lineOriginalRotation</b> properties that should be ignored and managed through the &quotEdit Widgets&quot tab.",
98+
"html": "This line has a width of 0 so it is invisible. However, the holders that are attached to it follow the curve of the line. By default the stops are evenly spaced (<b>autoSpaceStops</b>:true) and will rotate (<b>rotateStops</b>:true) to follow the curve of the line. Move the end points, control points, and add and delete stops to see this in action. The line lists its stops in its <b>stops</b> property (<b>[ { \"widget\": ..., \"position\": 0..1 }, ... ]</b>); stops sometimes also get a <b>lineOriginalRotation</b> property. Both should be ignored and managed through the &quotEdit Widgets&quot tab.",
9999
"layer": -3
100100
},
101101
"text4": {
@@ -158,7 +158,17 @@
158158
},
159159
"lineDash": "8 8",
160160
"lineWidth": 5,
161-
"lineColor": "#0000ff"
161+
"lineColor": "#0000ff",
162+
"stops": [
163+
{
164+
"widget": "line2S0",
165+
"position": 0
166+
},
167+
{
168+
"widget": "line2S1",
169+
"position": 1
170+
}
171+
]
162172
},
163173
"line2S0": {
164174
"type": "holder",
@@ -171,8 +181,7 @@
171181
},
172182
"inheritFrom": {
173183
"line1S0": "*"
174-
},
175-
"linePosition": 0
184+
}
176185
},
177186
"line2S1": {
178187
"type": "holder",
@@ -182,8 +191,7 @@
182191
"y": 60,
183192
"inheritFrom": {
184193
"line1S1": "*"
185-
},
186-
"linePosition": 1
194+
}
187195
},
188196
"line3": {
189197
"inheritFrom": {
@@ -214,7 +222,29 @@
214222
},
215223
"lineWidth": 0,
216224
"autoSpaceStops": true,
217-
"rotateStops": true
225+
"rotateStops": true,
226+
"stops": [
227+
{
228+
"widget": "line3S0",
229+
"position": 0
230+
},
231+
{
232+
"widget": "line3M0",
233+
"position": 0.26
234+
},
235+
{
236+
"widget": "line3M1",
237+
"position": 0.5
238+
},
239+
{
240+
"widget": "line3M2",
241+
"position": 0.74
242+
},
243+
{
244+
"widget": "line3S1",
245+
"position": 1
246+
}
247+
]
218248
},
219249
"line3S0": {
220250
"type": "holder",
@@ -228,16 +258,14 @@
228258
},
229259
"borderRadius": 8,
230260
"x": -10,
231-
"y": 127,
232-
"linePosition": 0
261+
"y": 127
233262
},
234263
"line3S1": {
235264
"type": "holder",
236265
"inheritFrom": "line3S0",
237266
"parent": "line3",
238267
"fixedParent": true,
239268
"movableInEdit": false,
240-
"linePosition": 1,
241269
"id": "line3S1",
242270
"x": 312,
243271
"y": 126
@@ -248,7 +276,6 @@
248276
"parent": "line3",
249277
"fixedParent": true,
250278
"movableInEdit": false,
251-
"linePosition": 0.26,
252279
"id": "line3M0",
253280
"x": 63,
254281
"y": 55
@@ -259,7 +286,6 @@
259286
"parent": "line3",
260287
"fixedParent": true,
261288
"movableInEdit": false,
262-
"linePosition": 0.5,
263289
"id": "line3M1",
264290
"x": 151,
265291
"y": 25
@@ -270,7 +296,6 @@
270296
"parent": "line3",
271297
"fixedParent": true,
272298
"movableInEdit": false,
273-
"linePosition": 0.74,
274299
"id": "line3M2",
275300
"x": 239,
276301
"y": 55
@@ -310,7 +335,29 @@
310335
"line": "point2",
311336
"position": 0.5,
312337
"offset": 0
313-
}
338+
},
339+
"stops": [
340+
{
341+
"widget": "line4S0",
342+
"position": 0
343+
},
344+
{
345+
"widget": "line4M0",
346+
"position": 0.251
347+
},
348+
{
349+
"widget": "line4M1",
350+
"position": 0.495
351+
},
352+
{
353+
"widget": "line4M2",
354+
"position": 0.739
355+
},
356+
{
357+
"widget": "line4S1",
358+
"position": 1
359+
}
360+
]
314361
},
315362
"line4S0": {
316363
"type": "holder",
@@ -327,7 +374,6 @@
327374
"dropTarget": {
328375
"type": false
329376
},
330-
"linePosition": 0,
331377
"classes": "transparent",
332378
"x": -9
333379
},
@@ -339,8 +385,7 @@
339385
"x": 237,
340386
"y": 189,
341387
"movableInEdit": false,
342-
"inheritFrom": "line4S0",
343-
"linePosition": 1
388+
"inheritFrom": "line4S0"
344389
},
345390
"point1": {
346391
"id": "point1",
@@ -384,7 +429,6 @@
384429
"value": 0,
385430
"explicit": false
386431
},
387-
"linePosition": 0.251,
388432
"dropTarget": {
389433
"type": null
390434
},
@@ -396,7 +440,6 @@
396440
"parent": "line4",
397441
"fixedParent": true,
398442
"movableInEdit": false,
399-
"linePosition": 0.495,
400443
"id": "line4M1",
401444
"x": 109,
402445
"y": 106,
@@ -412,7 +455,6 @@
412455
"parent": "line4",
413456
"fixedParent": true,
414457
"movableInEdit": false,
415-
"linePosition": 0.739,
416458
"id": "line4M2",
417459
"x": 170,
418460
"y": 152,
@@ -454,8 +496,7 @@
454496
"x": 195,
455497
"y": -5,
456498
"movableInEdit": false,
457-
"inheritFrom": "line1S0",
458-
"linePosition": 1
499+
"inheritFrom": "line1S0"
459500
},
460501
"line1S0": {
461502
"type": "holder",
@@ -472,8 +513,7 @@
472513
"dropOffsetY": 2,
473514
"dropTarget": {
474515
"type": null
475-
},
476-
"linePosition": 0
516+
}
477517
},
478518
"line1": {
479519
"type": "line",
@@ -490,7 +530,17 @@
490530
"x": 215,
491531
"y": 15
492532
},
493-
"z": 9734
533+
"z": 9734,
534+
"stops": [
535+
{
536+
"widget": "line1S0",
537+
"position": 0
538+
},
539+
{
540+
"widget": "line1S1",
541+
"position": 1
542+
}
543+
]
494544
},
495545
"line5": {
496546
"type": "line",
@@ -528,7 +578,33 @@
528578
"y": 118
529579
},
530580
"rotateStops": false,
531-
"height": 154
581+
"height": 154,
582+
"stops": [
583+
{
584+
"widget": "line5S0",
585+
"position": 0
586+
},
587+
{
588+
"widget": "line5M0",
589+
"position": 0.233
590+
},
591+
{
592+
"widget": "line5M1",
593+
"position": 0.463
594+
},
595+
{
596+
"widget": "line5M2",
597+
"position": 0.631
598+
},
599+
{
600+
"widget": "line5M3",
601+
"position": 0.785
602+
},
603+
{
604+
"widget": "line5S1",
605+
"position": 1
606+
}
607+
]
532608
},
533609
"line5S0": {
534610
"type": "holder",
@@ -546,7 +622,6 @@
546622
"dropTarget": {
547623
"type": false
548624
},
549-
"linePosition": 0,
550625
"classes": "transparent"
551626
},
552627
"line5S1": {
@@ -557,16 +632,14 @@
557632
"x": 24,
558633
"y": 123,
559634
"movableInEdit": false,
560-
"inheritFrom": "line5S0",
561-
"linePosition": 1
635+
"inheritFrom": "line5S0"
562636
},
563637
"line5M0": {
564638
"type": "holder",
565639
"inheritFrom": "line4M0",
566640
"parent": "line5",
567641
"fixedParent": true,
568642
"movableInEdit": false,
569-
"linePosition": 0.233,
570643
"id": "line5M0",
571644
"x": 140,
572645
"y": 14,
@@ -578,7 +651,6 @@
578651
"parent": "line5",
579652
"fixedParent": true,
580653
"movableInEdit": false,
581-
"linePosition": 0.463,
582654
"id": "line5M1",
583655
"x": 90,
584656
"y": 38,
@@ -590,7 +662,6 @@
590662
"parent": "line5",
591663
"fixedParent": true,
592664
"movableInEdit": false,
593-
"linePosition": 0.631,
594665
"id": "line5M2",
595666
"x": 73,
596667
"y": 74,
@@ -602,7 +673,6 @@
602673
"parent": "line5",
603674
"fixedParent": true,
604675
"movableInEdit": false,
605-
"linePosition": 0.785,
606676
"id": "line5M3",
607677
"x": 66,
608678
"y": 110,
@@ -636,7 +706,29 @@
636706
"offset": 0
637707
},
638708
"height": 268,
639-
"width": 238
709+
"width": 238,
710+
"stops": [
711+
{
712+
"widget": "line6S0",
713+
"position": 0
714+
},
715+
{
716+
"widget": "line6M0",
717+
"position": 0.1
718+
},
719+
{
720+
"widget": "line6M1",
721+
"position": 0.4
722+
},
723+
{
724+
"widget": "line6M2",
725+
"position": 0.8
726+
},
727+
{
728+
"widget": "line6S1",
729+
"position": 1
730+
}
731+
]
640732
},
641733
"line6S0": {
642734
"type": "holder",
@@ -652,7 +744,6 @@
652744
"dropTarget": {
653745
"type": false
654746
},
655-
"linePosition": 0,
656747
"classes": "transparent",
657748
"x": 207,
658749
"y": 237
@@ -665,15 +756,13 @@
665756
"x": -9,
666757
"y": -9,
667758
"movableInEdit": false,
668-
"inheritFrom": "line6S0",
669-
"linePosition": 1
759+
"inheritFrom": "line6S0"
670760
},
671761
"line6M0": {
672762
"type": "holder",
673763
"parent": "line6",
674764
"fixedParent": true,
675765
"movableInEdit": false,
676-
"linePosition": 0.1,
677766
"id": "line6M0",
678767
"icon": {
679768
"name": "star",
@@ -696,7 +785,6 @@
696785
"parent": "line6",
697786
"fixedParent": true,
698787
"movableInEdit": false,
699-
"linePosition": 0.4,
700788
"id": "line6M1",
701789
"x": 123,
702790
"y": 141
@@ -707,7 +795,6 @@
707795
"parent": "line6",
708796
"fixedParent": true,
709797
"movableInEdit": false,
710-
"linePosition": 0.8,
711798
"id": "line6M2",
712799
"x": 37,
713800
"y": 43

0 commit comments

Comments
 (0)