p5 2.2.1-rc.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/accessibility/color_namer.js +5 -6
  2. package/dist/accessibility/describe.js +4 -26
  3. package/dist/accessibility/index.js +5 -6
  4. package/dist/accessibility/outputs.js +6 -38
  5. package/dist/app.js +5 -6
  6. package/dist/color/color_conversion.js +5 -6
  7. package/dist/color/creating_reading.js +1 -1
  8. package/dist/color/index.js +2 -2
  9. package/dist/color/p5.Color.js +1 -1
  10. package/dist/color/setting.js +59 -357
  11. package/dist/{constants-DEJVKr9Z.js → constants-DQyACdzq.js} +11 -61
  12. package/dist/core/constants.js +1 -1
  13. package/dist/core/environment.js +26 -158
  14. package/dist/core/filterShaders.js +1 -1
  15. package/dist/core/friendly_errors/fes_core.js +1 -1
  16. package/dist/core/friendly_errors/file_errors.js +1 -1
  17. package/dist/core/friendly_errors/index.js +1 -1
  18. package/dist/core/friendly_errors/param_validator.js +1 -1
  19. package/dist/core/friendly_errors/sketch_verifier.js +1 -1
  20. package/dist/core/helpers.js +1 -1
  21. package/dist/core/init.js +5 -6
  22. package/dist/core/internationalization.js +1 -1
  23. package/dist/core/legacy.js +5 -6
  24. package/dist/core/main.js +5 -6
  25. package/dist/core/p5.Graphics.js +4 -5
  26. package/dist/core/p5.Renderer.js +3 -4
  27. package/dist/core/p5.Renderer2D.js +5 -6
  28. package/dist/core/p5.Renderer3D.js +4 -5
  29. package/dist/core/rendering.js +4 -5
  30. package/dist/core/structure.js +13 -52
  31. package/dist/core/transform.js +32 -176
  32. package/dist/{creating_reading-CgHCHxqN.js → creating_reading-ZXzcZEsb.js} +3 -196
  33. package/dist/data/local_storage.js +4 -30
  34. package/dist/dom/dom.js +24 -159
  35. package/dist/dom/index.js +2 -2
  36. package/dist/dom/p5.Element.js +31 -208
  37. package/dist/dom/p5.File.js +1 -32
  38. package/dist/dom/p5.MediaElement.js +10 -113
  39. package/dist/events/acceleration.js +11 -64
  40. package/dist/events/keyboard.js +13 -81
  41. package/dist/events/pointer.js +18 -160
  42. package/dist/image/const.js +1 -1
  43. package/dist/image/filterRenderer2D.js +4 -5
  44. package/dist/image/image.js +4 -5
  45. package/dist/image/index.js +4 -5
  46. package/dist/image/loading_displaying.js +4 -5
  47. package/dist/image/p5.Image.js +3 -4
  48. package/dist/image/pixels.js +17 -100
  49. package/dist/io/files.js +4 -5
  50. package/dist/io/index.js +4 -5
  51. package/dist/io/p5.Table.js +66 -158
  52. package/dist/io/p5.TableRow.js +48 -71
  53. package/dist/io/p5.XML.js +6 -99
  54. package/dist/io/utilities.js +8 -3
  55. package/dist/{main-_RXV5Lx8.js → main-DvN69W3f.js} +13 -42
  56. package/dist/math/Matrices/Matrix.js +87 -126
  57. package/dist/math/Matrices/MatrixNumjs.js +1 -5
  58. package/dist/math/calculation.js +10 -112
  59. package/dist/math/index.js +1 -1
  60. package/dist/math/math.js +2 -12
  61. package/dist/math/noise.js +5 -32
  62. package/dist/math/p5.Matrix.js +3 -3
  63. package/dist/math/p5.Vector.js +104 -345
  64. package/dist/math/random.js +5 -32
  65. package/dist/math/trigonometry.js +15 -105
  66. package/dist/{p5.Renderer-QoFcvj3f.js → p5.Renderer-D-5LdCRz.js} +25 -178
  67. package/dist/{rendering-CsICjEXA.js → rendering-h9unX5K0.js} +254 -1156
  68. package/dist/shape/2d_primitives.js +33 -194
  69. package/dist/shape/attributes.js +12 -73
  70. package/dist/shape/curves.js +30 -95
  71. package/dist/shape/custom_shapes.js +63 -144
  72. package/dist/shape/index.js +2 -2
  73. package/dist/shape/vertex.js +21 -106
  74. package/dist/strands/p5.strands.js +248 -46
  75. package/dist/type/index.js +3 -4
  76. package/dist/type/p5.Font.js +4 -49
  77. package/dist/type/textCore.js +5 -158
  78. package/dist/utilities/conversion.js +17 -104
  79. package/dist/utilities/time_date.js +3 -40
  80. package/dist/utilities/utility_functions.js +6 -48
  81. package/dist/webgl/3d_primitives.js +4 -5
  82. package/dist/webgl/GeometryBuilder.js +1 -2
  83. package/dist/webgl/ShapeBuilder.js +22 -2
  84. package/dist/webgl/enums.js +1 -1
  85. package/dist/webgl/index.js +4 -5
  86. package/dist/webgl/interaction.js +6 -33
  87. package/dist/webgl/light.js +4 -5
  88. package/dist/webgl/loading.js +12 -46
  89. package/dist/webgl/material.js +4 -5
  90. package/dist/webgl/p5.Camera.js +4 -5
  91. package/dist/webgl/p5.DataArray.js +0 -4
  92. package/dist/webgl/p5.Framebuffer.js +4 -5
  93. package/dist/webgl/p5.Geometry.js +12 -106
  94. package/dist/webgl/p5.Quat.js +1 -1
  95. package/dist/webgl/p5.RendererGL.js +7 -18
  96. package/dist/webgl/p5.Shader.js +12 -36
  97. package/dist/webgl/p5.Texture.js +4 -5
  98. package/dist/webgl/text.js +4 -5
  99. package/dist/webgl/utils.js +4 -5
  100. package/dist/webgpu/index.js +1 -1
  101. package/dist/webgpu/p5.RendererWebGPU.js +529 -208
  102. package/dist/webgpu/shaders/color.js +32 -17
  103. package/dist/webgpu/shaders/filters/base.js +18 -7
  104. package/dist/webgpu/shaders/font.js +52 -40
  105. package/dist/webgpu/shaders/line.js +50 -36
  106. package/dist/webgpu/shaders/material.js +90 -83
  107. package/dist/webgpu/strands_wgslBackend.js +5 -2
  108. package/lib/p5.esm.js +5576 -7811
  109. package/lib/p5.esm.min.js +1 -1
  110. package/lib/p5.js +5576 -7811
  111. package/lib/p5.min.js +1 -1
  112. package/lib/p5.webgpu.esm.js +786 -453
  113. package/lib/p5.webgpu.js +786 -453
  114. package/lib/p5.webgpu.min.js +1 -1
  115. package/package.json +13 -13
  116. package/types/global.d.ts +16905 -16783
  117. package/types/p5.d.ts +11142 -11081
@@ -60,8 +60,6 @@ function transform(p5, fn){
60
60
  * @chainable
61
61
  *
62
62
  * @example
63
- * <div>
64
- * <code>
65
63
  * function setup() {
66
64
  * createCanvas(100, 100);
67
65
  *
@@ -77,11 +75,8 @@ function transform(p5, fn){
77
75
  * // Draw the circle at coordinates (0, 0).
78
76
  * circle(0, 0, 40);
79
77
  * }
80
- * </code>
81
- * </div>
82
78
  *
83
- * <div>
84
- * <code>
79
+ * @example
85
80
  * function setup() {
86
81
  * createCanvas(100, 100);
87
82
  *
@@ -98,11 +93,8 @@ function transform(p5, fn){
98
93
  * // Draw the circle at coordinates (0, 0).
99
94
  * circle(0, 0, 40);
100
95
  * }
101
- * </code>
102
- * </div>
103
96
  *
104
- * <div>
105
- * <code>
97
+ * @example
106
98
  * function setup() {
107
99
  * createCanvas(100, 100);
108
100
  *
@@ -121,11 +113,8 @@ function transform(p5, fn){
121
113
  * // Draw a rectangle at coordinates (50, 0).
122
114
  * rect(50, 0, 40, 20);
123
115
  * }
124
- * </code>
125
- * </div>
126
116
  *
127
- * <div>
128
- * <code>
117
+ * @example
129
118
  * function setup() {
130
119
  * createCanvas(100, 100);
131
120
  *
@@ -147,11 +136,8 @@ function transform(p5, fn){
147
136
  * // It appears at (15, 10) after scaling.
148
137
  * square(30, 20, 40);
149
138
  * }
150
- * </code>
151
- * </div>
152
139
  *
153
- * <div>
154
- * <code>
140
+ * @example
155
141
  * function setup() {
156
142
  * createCanvas(100, 100);
157
143
  *
@@ -171,11 +157,8 @@ function transform(p5, fn){
171
157
  * // Draw the square.
172
158
  * square(0, 0, 50);
173
159
  * }
174
- * </code>
175
- * </div>
176
160
  *
177
- * <div>
178
- * <code>
161
+ * @example
179
162
  * // Click and drag the mouse to view the scene from different angles.
180
163
  *
181
164
  * function setup() {
@@ -199,8 +182,6 @@ function transform(p5, fn){
199
182
  * // Draw a box.
200
183
  * box();
201
184
  * }
202
- * </code>
203
- * </div>
204
185
  */
205
186
  /**
206
187
  * @method applyMatrix
@@ -249,8 +230,6 @@ function transform(p5, fn){
249
230
  * @chainable
250
231
  *
251
232
  * @example
252
- * <div>
253
- * <code>
254
233
  * function setup() {
255
234
  * createCanvas(100, 100);
256
235
  *
@@ -277,8 +256,6 @@ function transform(p5, fn){
277
256
  * fill('red');
278
257
  * circle(25, 25, 20);
279
258
  * }
280
- * </code>
281
- * </div>
282
259
  */
283
260
  fn.resetMatrix = function() {
284
261
  this._renderer.resetMatrix();
@@ -321,8 +298,6 @@ function transform(p5, fn){
321
298
  * @chainable
322
299
  *
323
300
  * @example
324
- * <div>
325
- * <code>
326
301
  * function setup() {
327
302
  * createCanvas(100, 100);
328
303
  *
@@ -340,11 +315,8 @@ function transform(p5, fn){
340
315
  * // Draw a rectangle at coordinates (50, 0).
341
316
  * rect(50, 0, 40, 20);
342
317
  * }
343
- * </code>
344
- * </div>
345
318
  *
346
- * <div>
347
- * <code>
319
+ * @example
348
320
  * function setup() {
349
321
  * createCanvas(100, 100);
350
322
  *
@@ -365,11 +337,8 @@ function transform(p5, fn){
365
337
  * // Draw a rectangle at coordinates (50, 0).
366
338
  * rect(50, 0, 40, 20);
367
339
  * }
368
- * </code>
369
- * </div>
370
340
  *
371
- * <div>
372
- * <code>
341
+ * @example
373
342
  * function setup() {
374
343
  * createCanvas(100, 100);
375
344
  *
@@ -390,11 +359,8 @@ function transform(p5, fn){
390
359
  * // Draw a rectangle at coordinates (50, 0).
391
360
  * rect(50, 0, 40, 20);
392
361
  * }
393
- * </code>
394
- * </div>
395
362
  *
396
- * <div>
397
- * <code>
363
+ * @example
398
364
  * function setup() {
399
365
  * createCanvas(100, 100);
400
366
  *
@@ -413,11 +379,8 @@ function transform(p5, fn){
413
379
  * // Draw a rectangle at coordinates (50, 0).
414
380
  * rect(50, 0, 40, 20);
415
381
  * }
416
- * </code>
417
- * </div>
418
382
  *
419
- * <div>
420
- * <code>
383
+ * @example
421
384
  * function setup() {
422
385
  * createCanvas(100, 100, WEBGL);
423
386
  *
@@ -435,11 +398,8 @@ function transform(p5, fn){
435
398
  * // Draw a box.
436
399
  * box();
437
400
  * }
438
- * </code>
439
- * </div>
440
401
  *
441
- * <div>
442
- * <code>
402
+ * @example
443
403
  * function setup() {
444
404
  * createCanvas(100, 100, WEBGL);
445
405
  *
@@ -457,8 +417,6 @@ function transform(p5, fn){
457
417
  * // Draw a box.
458
418
  * box();
459
419
  * }
460
- * </code>
461
- * </div>
462
420
  */
463
421
  fn.rotate = function(angle, axis) {
464
422
  // p5._validateParameters('rotate', arguments);
@@ -488,8 +446,6 @@ function transform(p5, fn){
488
446
  * @chainable
489
447
  *
490
448
  * @example
491
- * <div>
492
- * <code>
493
449
  * // Click and drag the mouse to view the scene from different angles.
494
450
  *
495
451
  * function setup() {
@@ -510,11 +466,8 @@ function transform(p5, fn){
510
466
  * // Draw a box.
511
467
  * box();
512
468
  * }
513
- * </code>
514
- * </div>
515
469
  *
516
- * <div>
517
- * <code>
470
+ * @example
518
471
  * // Click and drag the mouse to view the scene from different angles.
519
472
  *
520
473
  * function setup() {
@@ -538,11 +491,8 @@ function transform(p5, fn){
538
491
  * // Draw a box.
539
492
  * box();
540
493
  * }
541
- * </code>
542
- * </div>
543
494
  *
544
- * <div>
545
- * <code>
495
+ * @example
546
496
  * // Click and drag the mouse to view the scene from different angles.
547
497
  *
548
498
  * function setup() {
@@ -566,11 +516,8 @@ function transform(p5, fn){
566
516
  * // Draw a box.
567
517
  * box();
568
518
  * }
569
- * </code>
570
- * </div>
571
519
  *
572
- * <div>
573
- * <code>
520
+ * @example
574
521
  * // Click and drag the mouse to view the scene from different angles.
575
522
  *
576
523
  * function setup() {
@@ -592,8 +539,6 @@ function transform(p5, fn){
592
539
  * // Draw a box.
593
540
  * box();
594
541
  * }
595
- * </code>
596
- * </div>
597
542
  */
598
543
  fn.rotateX = function(angle) {
599
544
  this._assert3d('rotateX');
@@ -624,8 +569,6 @@ function transform(p5, fn){
624
569
  * @chainable
625
570
  *
626
571
  * @example
627
- * <div>
628
- * <code>
629
572
  * // Click and drag the mouse to view the scene from different angles.
630
573
  *
631
574
  * function setup() {
@@ -646,11 +589,8 @@ function transform(p5, fn){
646
589
  * // Draw a box.
647
590
  * box();
648
591
  * }
649
- * </code>
650
- * </div>
651
592
  *
652
- * <div>
653
- * <code>
593
+ * @example
654
594
  * // Click and drag the mouse to view the scene from different angles.
655
595
  *
656
596
  * function setup() {
@@ -674,11 +614,8 @@ function transform(p5, fn){
674
614
  * // Draw a box.
675
615
  * box();
676
616
  * }
677
- * </code>
678
- * </div>
679
617
  *
680
- * <div>
681
- * <code>
618
+ * @example
682
619
  * // Click and drag the mouse to view the scene from different angles.
683
620
  *
684
621
  * function setup() {
@@ -702,11 +639,8 @@ function transform(p5, fn){
702
639
  * // Draw a box.
703
640
  * box();
704
641
  * }
705
- * </code>
706
- * </div>
707
642
  *
708
- * <div>
709
- * <code>
643
+ * @example
710
644
  * // Click and drag the mouse to view the scene from different angles.
711
645
  *
712
646
  * function setup() {
@@ -728,8 +662,6 @@ function transform(p5, fn){
728
662
  * // Draw a box.
729
663
  * box();
730
664
  * }
731
- * </code>
732
- * </div>
733
665
  */
734
666
  fn.rotateY = function(angle) {
735
667
  this._assert3d('rotateY');
@@ -760,8 +692,6 @@ function transform(p5, fn){
760
692
  * @chainable
761
693
  *
762
694
  * @example
763
- * <div>
764
- * <code>
765
695
  * // Click and drag the mouse to view the scene from different angles.
766
696
  *
767
697
  * function setup() {
@@ -782,11 +712,8 @@ function transform(p5, fn){
782
712
  * // Draw a box.
783
713
  * box();
784
714
  * }
785
- * </code>
786
- * </div>
787
715
  *
788
- * <div>
789
- * <code>
716
+ * @example
790
717
  * // Click and drag the mouse to view the scene from different angles.
791
718
  *
792
719
  * function setup() {
@@ -810,11 +737,8 @@ function transform(p5, fn){
810
737
  * // Draw a box.
811
738
  * box();
812
739
  * }
813
- * </code>
814
- * </div>
815
740
  *
816
- * <div>
817
- * <code>
741
+ * @example
818
742
  * // Click and drag the mouse to view the scene from different angles.
819
743
  *
820
744
  * function setup() {
@@ -838,11 +762,8 @@ function transform(p5, fn){
838
762
  * // Draw a box.
839
763
  * box();
840
764
  * }
841
- * </code>
842
- * </div>
843
765
  *
844
- * <div>
845
- * <code>
766
+ * @example
846
767
  * // Click and drag the mouse to view the scene from different angles.
847
768
  *
848
769
  * function setup() {
@@ -864,8 +785,6 @@ function transform(p5, fn){
864
785
  * // Draw a box.
865
786
  * box();
866
787
  * }
867
- * </code>
868
- * </div>
869
788
  */
870
789
  fn.rotateZ = function(angle) {
871
790
  this._assert3d('rotateZ');
@@ -913,8 +832,6 @@ function transform(p5, fn){
913
832
  * @chainable
914
833
  *
915
834
  * @example
916
- * <div>
917
- * <code>
918
835
  * function setup() {
919
836
  * createCanvas(100, 100);
920
837
  *
@@ -936,11 +853,8 @@ function transform(p5, fn){
936
853
  * // It appears at (15, 10) after scaling.
937
854
  * square(30, 20, 40);
938
855
  * }
939
- * </code>
940
- * </div>
941
856
  *
942
- * <div>
943
- * <code>
857
+ * @example
944
858
  * function setup() {
945
859
  * createCanvas(100, 100);
946
860
  *
@@ -962,11 +876,8 @@ function transform(p5, fn){
962
876
  * // It appears as a rectangle at (15, 26) after scaling.
963
877
  * square(30, 20, 40);
964
878
  * }
965
- * </code>
966
- * </div>
967
879
  *
968
- * <div>
969
- * <code>
880
+ * @example
970
881
  * function setup() {
971
882
  * createCanvas(100, 100);
972
883
  *
@@ -991,11 +902,8 @@ function transform(p5, fn){
991
902
  * // It appears as a rectangle at (15, 26) after scaling.
992
903
  * square(30, 20, 40);
993
904
  * }
994
- * </code>
995
- * </div>
996
905
  *
997
- * <div>
998
- * <code>
906
+ * @example
999
907
  * // Click and drag the mouse to view the scene from different angles.
1000
908
  *
1001
909
  * function setup() {
@@ -1032,8 +940,6 @@ function transform(p5, fn){
1032
940
  * fill('blue');
1033
941
  * box();
1034
942
  * }
1035
- * </code>
1036
- * </div>
1037
943
  */
1038
944
  /**
1039
945
  * @method scale
@@ -1092,8 +998,6 @@ function transform(p5, fn){
1092
998
  * @chainable
1093
999
  *
1094
1000
  * @example
1095
- * <div>
1096
- * <code>
1097
1001
  * function setup() {
1098
1002
  * createCanvas(100, 100);
1099
1003
  *
@@ -1109,11 +1013,8 @@ function transform(p5, fn){
1109
1013
  * // Draw the square.
1110
1014
  * square(0, 0, 50);
1111
1015
  * }
1112
- * </code>
1113
- * </div>
1114
1016
  *
1115
- * <div>
1116
- * <code>
1017
+ * @example
1117
1018
  * function setup() {
1118
1019
  * createCanvas(100, 100);
1119
1020
  *
@@ -1132,8 +1033,6 @@ function transform(p5, fn){
1132
1033
  * // Draw the square.
1133
1034
  * square(0, 0, 50);
1134
1035
  * }
1135
- * </code>
1136
- * </div>
1137
1036
  */
1138
1037
  fn.shearX = function(angle) {
1139
1038
  // p5._validateParameters('shearX', arguments);
@@ -1169,8 +1068,6 @@ function transform(p5, fn){
1169
1068
  * @chainable
1170
1069
  *
1171
1070
  * @example
1172
- * <div>
1173
- * <code>
1174
1071
  * function setup() {
1175
1072
  * createCanvas(100, 100);
1176
1073
  *
@@ -1186,11 +1083,8 @@ function transform(p5, fn){
1186
1083
  * // Draw the square.
1187
1084
  * square(0, 0, 50);
1188
1085
  * }
1189
- * </code>
1190
- * </div>
1191
1086
  *
1192
- * <div>
1193
- * <code>
1087
+ * @example
1194
1088
  * function setup() {
1195
1089
  * createCanvas(100, 100);
1196
1090
  *
@@ -1209,8 +1103,6 @@ function transform(p5, fn){
1209
1103
  * // Draw the square.
1210
1104
  * square(0, 0, 50);
1211
1105
  * }
1212
- * </code>
1213
- * </div>
1214
1106
  */
1215
1107
  fn.shearY = function(angle) {
1216
1108
  // p5._validateParameters('shearY', arguments);
@@ -1261,8 +1153,6 @@ function transform(p5, fn){
1261
1153
  * @chainable
1262
1154
  *
1263
1155
  * @example
1264
- * <div>
1265
- * <code>
1266
1156
  * function setup() {
1267
1157
  * createCanvas(100, 100);
1268
1158
  *
@@ -1278,11 +1168,8 @@ function transform(p5, fn){
1278
1168
  * // Draw a circle at coordinates (0, 0).
1279
1169
  * circle(0, 0, 40);
1280
1170
  * }
1281
- * </code>
1282
- * </div>
1283
1171
  *
1284
- * <div>
1285
- * <code>
1172
+ * @example
1286
1173
  * function setup() {
1287
1174
  * createCanvas(100, 100);
1288
1175
  *
@@ -1308,11 +1195,8 @@ function transform(p5, fn){
1308
1195
  * fill('blue');
1309
1196
  * circle(0, 0, 40);
1310
1197
  * }
1311
- * </code>
1312
- * </div>
1313
1198
  *
1314
- * <div>
1315
- * <code>
1199
+ * @example
1316
1200
  * function setup() {
1317
1201
  * createCanvas(100, 100);
1318
1202
  *
@@ -1331,11 +1215,8 @@ function transform(p5, fn){
1331
1215
  * // Draw a circle at coordinates (0, 0).
1332
1216
  * circle(0, 0, 40);
1333
1217
  * }
1334
- * </code>
1335
- * </div>
1336
1218
  *
1337
- * <div>
1338
- * <code>
1219
+ * @example
1339
1220
  * function setup() {
1340
1221
  * createCanvas(100, 100);
1341
1222
  *
@@ -1354,11 +1235,8 @@ function transform(p5, fn){
1354
1235
  * // Draw a circle at coordinates (0, 0).
1355
1236
  * circle(0, 0, 40);
1356
1237
  * }
1357
- * </code>
1358
- * </div>
1359
1238
  *
1360
- * <div>
1361
- * <code>
1239
+ * @example
1362
1240
  * function setup() {
1363
1241
  * createCanvas(100, 100, WEBGL);
1364
1242
  *
@@ -1387,8 +1265,6 @@ function transform(p5, fn){
1387
1265
  * fill('blue');
1388
1266
  * sphere(10);
1389
1267
  * }
1390
- * </code>
1391
- * </div>
1392
1268
  */
1393
1269
  /**
1394
1270
  * @method translate
@@ -1548,8 +1424,6 @@ function transform(p5, fn){
1548
1424
  * @method push
1549
1425
  *
1550
1426
  * @example
1551
- * <div>
1552
- * <code>
1553
1427
  * function setup() {
1554
1428
  * createCanvas(100, 100);
1555
1429
  *
@@ -1582,11 +1456,8 @@ function transform(p5, fn){
1582
1456
  * 'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'
1583
1457
  * );
1584
1458
  * }
1585
- * </code>
1586
- * </div>
1587
1459
  *
1588
- * <div>
1589
- * <code>
1460
+ * @example
1590
1461
  * function setup() {
1591
1462
  * createCanvas(100, 100);
1592
1463
  *
@@ -1639,11 +1510,8 @@ function transform(p5, fn){
1639
1510
  * let y = random(0, 100);
1640
1511
  * text('🦟', x, y);
1641
1512
  * }
1642
- * </code>
1643
- * </div>
1644
1513
  *
1645
- * <div>
1646
- * <code>
1514
+ * @example
1647
1515
  * // Click and drag the mouse to view the scene from different angles.
1648
1516
  *
1649
1517
  * function setup() {
@@ -1677,8 +1545,6 @@ function transform(p5, fn){
1677
1545
  * sphere(20);
1678
1546
  * pop();
1679
1547
  * }
1680
- * </code>
1681
- * </div>
1682
1548
  */
1683
1549
  fn.push = function() {
1684
1550
  this._renderer.push();
@@ -1827,8 +1693,6 @@ function transform(p5, fn){
1827
1693
  * @method pop
1828
1694
  *
1829
1695
  * @example
1830
- * <div>
1831
- * <code>
1832
1696
  * function setup() {
1833
1697
  * createCanvas(100, 100);
1834
1698
  *
@@ -1861,11 +1725,8 @@ function transform(p5, fn){
1861
1725
  * 'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'
1862
1726
  * );
1863
1727
  * }
1864
- * </code>
1865
- * </div>
1866
1728
  *
1867
- * <div>
1868
- * <code>
1729
+ * @example
1869
1730
  * function setup() {
1870
1731
  * createCanvas(100, 100);
1871
1732
  *
@@ -1918,11 +1779,8 @@ function transform(p5, fn){
1918
1779
  * let y = random(0, 100);
1919
1780
  * text('🦟', x, y);
1920
1781
  * }
1921
- * </code>
1922
- * </div>
1923
1782
  *
1924
- * <div>
1925
- * <code>
1783
+ * @example
1926
1784
  * // Click and drag the mouse to view the scene from different angles.
1927
1785
  *
1928
1786
  * function setup() {
@@ -1956,8 +1814,6 @@ function transform(p5, fn){
1956
1814
  * sphere(20);
1957
1815
  * pop();
1958
1816
  * }
1959
- * </code>
1960
- * </div>
1961
1817
  */
1962
1818
  fn.pop = function() {
1963
1819
  this._renderer.pop();