@swf2es/native 0.1.34 → 0.1.36

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.
@@ -239,6 +239,475 @@ implementers' names, of nelly2pcm.)
239
239
  ** this Software without prior written authorization from Silicon Graphics, Inc.
240
240
 
241
241
 
242
+ @swf2es/native/render: lyon, the crates it uses, and Rust's core and alloc
243
+ ==========================================================================
244
+
245
+ src/render/lyon/libswf2es_tessellate.a, linked into the render module, is
246
+ https://github.com/swf2es/tessellate's release v0.1.2, built by its CI. It holds
247
+ lyon's fill tessellator and the code below; the release's notices follow.
248
+
249
+ Third-party code compiled into libswf2es_tessellate.a, each notice
250
+ verbatim. The crate's own code is under the Apache License 2.0 (LICENSE).
251
+
252
+ Of the crates Cargo.lock names, autocfg runs only at build time and puts
253
+ nothing into the library, and of the dual-licensed ones below each is used
254
+ under the MIT license.
255
+
256
+ lyon_tessellation 1.0.23, lyon_path 1.0.19 and lyon_geom 1.0.20 (MIT OR Apache-2.0)
257
+ ===================================================================================
258
+
259
+ https://github.com/nical/lyon
260
+
261
+ The MIT License (MIT)
262
+
263
+ Copyright (c) 2013 Nicolas Silva
264
+
265
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
266
+ this software and associated documentation files (the "Software"), to deal in
267
+ the Software without restriction, including without limitation the rights to
268
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
269
+ the Software, and to permit persons to whom the Software is furnished to do so,
270
+ subject to the following conditions:
271
+
272
+ The above copyright notice and this permission notice shall be included in all
273
+ copies or substantial portions of the Software.
274
+
275
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
276
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
277
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
278
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
279
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
280
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
281
+
282
+
283
+ euclid 0.22.14 (MIT OR Apache-2.0)
284
+ ==================================
285
+
286
+ https://github.com/servo/euclid
287
+
288
+ Copyright (c) 2012-2013 Mozilla Foundation
289
+
290
+ Permission is hereby granted, free of charge, to any
291
+ person obtaining a copy of this software and associated
292
+ documentation files (the "Software"), to deal in the
293
+ Software without restriction, including without
294
+ limitation the rights to use, copy, modify, merge,
295
+ publish, distribute, sublicense, and/or sell copies of
296
+ the Software, and to permit persons to whom the Software
297
+ is furnished to do so, subject to the following
298
+ conditions:
299
+
300
+ The above copyright notice and this permission notice
301
+ shall be included in all copies or substantial portions
302
+ of the Software.
303
+
304
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
305
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
306
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
307
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
308
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
309
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
310
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
311
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
312
+ DEALINGS IN THE SOFTWARE.
313
+
314
+
315
+ arrayvec 0.7.8 (MIT OR Apache-2.0)
316
+ ==================================
317
+
318
+ https://github.com/bluss/arrayvec
319
+
320
+ Copyright (c) Ulrik Sverdrup "bluss" 2015-2023
321
+
322
+ Permission is hereby granted, free of charge, to any
323
+ person obtaining a copy of this software and associated
324
+ documentation files (the "Software"), to deal in the
325
+ Software without restriction, including without
326
+ limitation the rights to use, copy, modify, merge,
327
+ publish, distribute, sublicense, and/or sell copies of
328
+ the Software, and to permit persons to whom the Software
329
+ is furnished to do so, subject to the following
330
+ conditions:
331
+
332
+ The above copyright notice and this permission notice
333
+ shall be included in all copies or substantial portions
334
+ of the Software.
335
+
336
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
337
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
338
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
339
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
340
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
341
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
342
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
343
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
344
+ DEALINGS IN THE SOFTWARE.
345
+
346
+
347
+ num-traits 0.2.19 (MIT OR Apache-2.0)
348
+ =====================================
349
+
350
+ https://github.com/rust-num/num-traits
351
+
352
+ Copyright (c) 2014 The Rust Project Developers
353
+
354
+ Permission is hereby granted, free of charge, to any
355
+ person obtaining a copy of this software and associated
356
+ documentation files (the "Software"), to deal in the
357
+ Software without restriction, including without
358
+ limitation the rights to use, copy, modify, merge,
359
+ publish, distribute, sublicense, and/or sell copies of
360
+ the Software, and to permit persons to whom the Software
361
+ is furnished to do so, subject to the following
362
+ conditions:
363
+
364
+ The above copyright notice and this permission notice
365
+ shall be included in all copies or substantial portions
366
+ of the Software.
367
+
368
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
369
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
370
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
371
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
372
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
373
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
374
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
375
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
376
+ DEALINGS IN THE SOFTWARE.
377
+
378
+
379
+ float_next_after 1.0.0 (MIT)
380
+ ============================
381
+
382
+ https://gitlab.com/bronsonbdevost/next_afterf
383
+
384
+ MIT License
385
+
386
+ Copyright (c) 2020 Scripta Qumranica Electronica
387
+
388
+ Created by Bronson Brown-deVost
389
+
390
+ Permission is hereby granted, free of charge, to any person obtaining a copy
391
+ of this software and associated documentation files (the "Software"), to deal
392
+ in the Software without restriction, including without limitation the rights
393
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
394
+ copies of the Software, and to permit persons to whom the Software is
395
+ furnished to do so, subject to the following conditions:
396
+
397
+ The above copyright notice and this permission notice shall be included in all
398
+ copies or substantial portions of the Software.
399
+
400
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
401
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
402
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
403
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
404
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
405
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
406
+ SOFTWARE.
407
+
408
+
409
+ libm 0.2.16 (MIT)
410
+ =================
411
+
412
+ https://github.com/rust-lang/compiler-builtins
413
+
414
+ rust-lang/libm as a whole is available for use under the MIT license:
415
+
416
+ ------------------------------------------------------------------------------
417
+ Permission is hereby granted, free of charge, to any person obtaining a copy
418
+ of this software and associated documentation files (the "Software"), to deal
419
+ in the Software without restriction, including without limitation the rights
420
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
421
+ copies of the Software, and to permit persons to whom the Software is
422
+ furnished to do so, subject to the following conditions:
423
+
424
+ The above copyright notice and this permission notice shall be included in all
425
+ copies or substantial portions of the Software.
426
+
427
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
428
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
429
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
430
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
431
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
432
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
433
+ SOFTWARE.
434
+ ------------------------------------------------------------------------------
435
+
436
+ As a contributor, you agree that your code can be used under either the MIT
437
+ license or the Apache-2.0 license:
438
+
439
+ ------------------------------------------------------------------------------
440
+ Apache License
441
+ Version 2.0, January 2004
442
+ http://www.apache.org/licenses/
443
+
444
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
445
+
446
+ 1. Definitions.
447
+
448
+ "License" shall mean the terms and conditions for use, reproduction,
449
+ and distribution as defined by Sections 1 through 9 of this document.
450
+
451
+ "Licensor" shall mean the copyright owner or entity authorized by
452
+ the copyright owner that is granting the License.
453
+
454
+ "Legal Entity" shall mean the union of the acting entity and all
455
+ other entities that control, are controlled by, or are under common
456
+ control with that entity. For the purposes of this definition,
457
+ "control" means (i) the power, direct or indirect, to cause the
458
+ direction or management of such entity, whether by contract or
459
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
460
+ outstanding shares, or (iii) beneficial ownership of such entity.
461
+
462
+ "You" (or "Your") shall mean an individual or Legal Entity
463
+ exercising permissions granted by this License.
464
+
465
+ "Source" form shall mean the preferred form for making modifications,
466
+ including but not limited to software source code, documentation
467
+ source, and configuration files.
468
+
469
+ "Object" form shall mean any form resulting from mechanical
470
+ transformation or translation of a Source form, including but
471
+ not limited to compiled object code, generated documentation,
472
+ and conversions to other media types.
473
+
474
+ "Work" shall mean the work of authorship, whether in Source or
475
+ Object form, made available under the License, as indicated by a
476
+ copyright notice that is included in or attached to the work
477
+ (an example is provided in the Appendix below).
478
+
479
+ "Derivative Works" shall mean any work, whether in Source or Object
480
+ form, that is based on (or derived from) the Work and for which the
481
+ editorial revisions, annotations, elaborations, or other modifications
482
+ represent, as a whole, an original work of authorship. For the purposes
483
+ of this License, Derivative Works shall not include works that remain
484
+ separable from, or merely link (or bind by name) to the interfaces of,
485
+ the Work and Derivative Works thereof.
486
+
487
+ "Contribution" shall mean any work of authorship, including
488
+ the original version of the Work and any modifications or additions
489
+ to that Work or Derivative Works thereof, that is intentionally
490
+ submitted to Licensor for inclusion in the Work by the copyright owner
491
+ or by an individual or Legal Entity authorized to submit on behalf of
492
+ the copyright owner. For the purposes of this definition, "submitted"
493
+ means any form of electronic, verbal, or written communication sent
494
+ to the Licensor or its representatives, including but not limited to
495
+ communication on electronic mailing lists, source code control systems,
496
+ and issue tracking systems that are managed by, or on behalf of, the
497
+ Licensor for the purpose of discussing and improving the Work, but
498
+ excluding communication that is conspicuously marked or otherwise
499
+ designated in writing by the copyright owner as "Not a Contribution."
500
+
501
+ "Contributor" shall mean Licensor and any individual or Legal Entity
502
+ on behalf of whom a Contribution has been received by Licensor and
503
+ subsequently incorporated within the Work.
504
+
505
+ 2. Grant of Copyright License. Subject to the terms and conditions of
506
+ this License, each Contributor hereby grants to You a perpetual,
507
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
508
+ copyright license to reproduce, prepare Derivative Works of,
509
+ publicly display, publicly perform, sublicense, and distribute the
510
+ Work and such Derivative Works in Source or Object form.
511
+
512
+ 3. Grant of Patent License. Subject to the terms and conditions of
513
+ this License, each Contributor hereby grants to You a perpetual,
514
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
515
+ (except as stated in this section) patent license to make, have made,
516
+ use, offer to sell, sell, import, and otherwise transfer the Work,
517
+ where such license applies only to those patent claims licensable
518
+ by such Contributor that are necessarily infringed by their
519
+ Contribution(s) alone or by combination of their Contribution(s)
520
+ with the Work to which such Contribution(s) was submitted. If You
521
+ institute patent litigation against any entity (including a
522
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
523
+ or a Contribution incorporated within the Work constitutes direct
524
+ or contributory patent infringement, then any patent licenses
525
+ granted to You under this License for that Work shall terminate
526
+ as of the date such litigation is filed.
527
+
528
+ 4. Redistribution. You may reproduce and distribute copies of the
529
+ Work or Derivative Works thereof in any medium, with or without
530
+ modifications, and in Source or Object form, provided that You
531
+ meet the following conditions:
532
+
533
+ (a) You must give any other recipients of the Work or
534
+ Derivative Works a copy of this License; and
535
+
536
+ (b) You must cause any modified files to carry prominent notices
537
+ stating that You changed the files; and
538
+
539
+ (c) You must retain, in the Source form of any Derivative Works
540
+ that You distribute, all copyright, patent, trademark, and
541
+ attribution notices from the Source form of the Work,
542
+ excluding those notices that do not pertain to any part of
543
+ the Derivative Works; and
544
+
545
+ (d) If the Work includes a "NOTICE" text file as part of its
546
+ distribution, then any Derivative Works that You distribute must
547
+ include a readable copy of the attribution notices contained
548
+ within such NOTICE file, excluding those notices that do not
549
+ pertain to any part of the Derivative Works, in at least one
550
+ of the following places: within a NOTICE text file distributed
551
+ as part of the Derivative Works; within the Source form or
552
+ documentation, if provided along with the Derivative Works; or,
553
+ within a display generated by the Derivative Works, if and
554
+ wherever such third-party notices normally appear. The contents
555
+ of the NOTICE file are for informational purposes only and
556
+ do not modify the License. You may add Your own attribution
557
+ notices within Derivative Works that You distribute, alongside
558
+ or as an addendum to the NOTICE text from the Work, provided
559
+ that such additional attribution notices cannot be construed
560
+ as modifying the License.
561
+
562
+ You may add Your own copyright statement to Your modifications and
563
+ may provide additional or different license terms and conditions
564
+ for use, reproduction, or distribution of Your modifications, or
565
+ for any such Derivative Works as a whole, provided Your use,
566
+ reproduction, and distribution of the Work otherwise complies with
567
+ the conditions stated in this License.
568
+
569
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
570
+ any Contribution intentionally submitted for inclusion in the Work
571
+ by You to the Licensor shall be under the terms and conditions of
572
+ this License, without any additional terms or conditions.
573
+ Notwithstanding the above, nothing herein shall supersede or modify
574
+ the terms of any separate license agreement you may have executed
575
+ with Licensor regarding such Contributions.
576
+
577
+ 6. Trademarks. This License does not grant permission to use the trade
578
+ names, trademarks, service marks, or product names of the Licensor,
579
+ except as required for reasonable and customary use in describing the
580
+ origin of the Work and reproducing the content of the NOTICE file.
581
+
582
+ 7. Disclaimer of Warranty. Unless required by applicable law or
583
+ agreed to in writing, Licensor provides the Work (and each
584
+ Contributor provides its Contributions) on an "AS IS" BASIS,
585
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
586
+ implied, including, without limitation, any warranties or conditions
587
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
588
+ PARTICULAR PURPOSE. You are solely responsible for determining the
589
+ appropriateness of using or redistributing the Work and assume any
590
+ risks associated with Your exercise of permissions under this License.
591
+
592
+ 8. Limitation of Liability. In no event and under no legal theory,
593
+ whether in tort (including negligence), contract, or otherwise,
594
+ unless required by applicable law (such as deliberate and grossly
595
+ negligent acts) or agreed to in writing, shall any Contributor be
596
+ liable to You for damages, including any direct, indirect, special,
597
+ incidental, or consequential damages of any character arising as a
598
+ result of this License or out of the use or inability to use the
599
+ Work (including but not limited to damages for loss of goodwill,
600
+ work stoppage, computer failure or malfunction, or any and all
601
+ other commercial damages or losses), even if such Contributor
602
+ has been advised of the possibility of such damages.
603
+
604
+ 9. Accepting Warranty or Additional Liability. While redistributing
605
+ the Work or Derivative Works thereof, You may choose to offer,
606
+ and charge a fee for, acceptance of support, warranty, indemnity,
607
+ or other liability obligations and/or rights consistent with this
608
+ License. However, in accepting such obligations, You may act only
609
+ on Your own behalf and on Your sole responsibility, not on behalf
610
+ of any other Contributor, and only if You agree to indemnify,
611
+ defend, and hold each Contributor harmless for any liability
612
+ incurred by, or claims asserted against, such Contributor by reason
613
+ of your accepting any such warranty or additional liability.
614
+
615
+ END OF TERMS AND CONDITIONS
616
+
617
+ APPENDIX: How to apply the Apache License to your work.
618
+
619
+ To apply the Apache License to your work, attach the following
620
+ boilerplate notice, with the fields enclosed by brackets "[]"
621
+ replaced with your own identifying information. (Don't include
622
+ the brackets!) The text should be enclosed in the appropriate
623
+ comment syntax for the file format. We also recommend that a
624
+ file or class name and description of purpose be included on the
625
+ same "printed page" as the copyright notice for easier
626
+ identification within third-party archives.
627
+
628
+ Licensed under the Apache License, Version 2.0 (the "License");
629
+ you may not use this file except in compliance with the License.
630
+ You may obtain a copy of the License at
631
+
632
+ http://www.apache.org/licenses/LICENSE-2.0
633
+
634
+ Unless required by applicable law or agreed to in writing, software
635
+ distributed under the License is distributed on an "AS IS" BASIS,
636
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
637
+ See the License for the specific language governing permissions and
638
+ limitations under the License.
639
+ ------------------------------------------------------------------------------
640
+
641
+ This Rust library contains the following copyrights:
642
+
643
+ Copyright (c) 2018 Jorge Aparicio
644
+
645
+ Portions of this software are derived from third-party works licensed under
646
+ terms compatible with the above MIT license:
647
+
648
+ * musl libc https://www.musl-libc.org/. This library contains the following
649
+ copyright:
650
+
651
+ Copyright © 2005-2020 Rich Felker, et al.
652
+
653
+ * The CORE-MATH project https://core-math.gitlabpages.inria.fr/. CORE-MATH
654
+ routines are available under the MIT license on a per-file basis.
655
+
656
+ The musl libc COPYRIGHT file also includes the following notice relevant to
657
+ math portions of the library:
658
+
659
+ ------------------------------------------------------------------------------
660
+ Much of the math library code (src/math/* and src/complex/*) is
661
+ Copyright © 1993,2004 Sun Microsystems or
662
+ Copyright © 2003-2011 David Schultz or
663
+ Copyright © 2003-2009 Steven G. Kargl or
664
+ Copyright © 2003-2009 Bruce D. Evans or
665
+ Copyright © 2008 Stephen L. Moshier or
666
+ Copyright © 2017-2018 Arm Limited
667
+ and labelled as such in comments in the individual source files. All
668
+ have been licensed under extremely permissive terms.
669
+ ------------------------------------------------------------------------------
670
+
671
+ Copyright notices are retained in src/* files where relevant.
672
+
673
+
674
+ Rust's core and alloc libraries, 1.97.1 (MIT OR Apache-2.0)
675
+ ===========================================================
676
+
677
+ https://github.com/rust-lang/rust
678
+
679
+ The pinned toolchain compiles parts of Rust's standard library, its core
680
+ and alloc crates, into the library. The Rust project's COPYRIGHT says it
681
+ is dual-licensed under Apache 2.0 and MIT terms, and is Copyright (c) The
682
+ Rust Project Contributors. Its MIT license:
683
+
684
+ Copyright (c) The Rust Project Contributors
685
+
686
+ Permission is hereby granted, free of charge, to any
687
+ person obtaining a copy of this software and associated
688
+ documentation files (the "Software"), to deal in the
689
+ Software without restriction, including without
690
+ limitation the rights to use, copy, modify, merge,
691
+ publish, distribute, sublicense, and/or sell copies of
692
+ the Software, and to permit persons to whom the Software
693
+ is furnished to do so, subject to the following
694
+ conditions:
695
+
696
+ The above copyright notice and this permission notice
697
+ shall be included in all copies or substantial portions
698
+ of the Software.
699
+
700
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
701
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
702
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
703
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
704
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
705
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
706
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
707
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
708
+ DEALINGS IN THE SOFTWARE.
709
+
710
+
242
711
  @swf2es/native/render: SVG's feTurbulence (perlinNoise)
243
712
  =======================================================
244
713
 
package/README.md CHANGED
@@ -67,7 +67,9 @@ The wrappers, the Zig and the build are Apache-2.0. `LICENSE.third-party`
67
67
  carries each vendored library's notice: zlib is under the zlib license,
68
68
  the LZMA SDK files are in the public domain, minimp3 is CC0-1.0,
69
69
  libtess2 is under SGI Free Software License B, and jxrlib is under the BSD
70
- 2-Clause License; and those of the code derived from FFmpeg's Nellymoser
70
+ 2-Clause License; lyon, the crates it uses and Rust's core and alloc,
71
+ in the render module through swf2es/tessellate's archive, under the MIT
72
+ License (`src/render/lyon/LICENSE.third-party`, the release's notices); and those of the code derived from FFmpeg's Nellymoser
71
73
  decoder (`src/audio/nellymoser.zig`), under the MIT License, and of the code
72
74
  derived from SVG 1.1's feTurbulence (`src/render/pixels.zig`'s
73
75
  perlinNoise), under the W3C Software and Document License.
@@ -429,8 +431,76 @@ Crossings, touches, overlapping edges and repeated
429
431
  points, or an ear search that stalls, leave the fill to libtess2. The
430
432
  fast paths stay within libtess2's coordinate range.
431
433
 
434
+ libtess2's sweep keeps its active edges in a sorted list and gives each
435
+ crossing a vertex, so a fill of many contours that cross each other
436
+ densely, as a morph of near-identical outlines each turned a little does,
437
+ takes it time with the square of its crossings: seconds for a hundred
438
+ such contours. Before libtess2, `src/render/crossings.zig` looks at a fill
439
+ of four contours or more and a thousand points or more: first at how deep
440
+ its contours' boxes stack, their areas' sum over its box's area, which is N
441
+ for a deck of N contours and has stayed under six for every ordinary shape
442
+ measured, so that a fill stacked less than eight deep goes on to libtess2
443
+ at the cost of one pass over its points. A deeper one has its proper
444
+ crossings counted: its edges sorted into a grid of cells about twice an
445
+ edge long, each cell's pairs tested, and given up after 64 pairs a point.
446
+ A fill of 1,000 crossings or more goes to lyon's fill tessellator
447
+ (`src/render/lyon.zig`), which takes a tenth of the time there. The count
448
+ is a function of the points alone, so a fill goes the same way every
449
+ time. lyon is Rust: [swf2es/tessellate](https://github.com/swf2es/tessellate)
450
+ builds it into a `no_std` wasm32 static library, and
451
+ `src/render/lyon/libswf2es_tessellate.a` is that repository's release
452
+ archive, as its CI built it, with `release.json` naming its tag and
453
+ SHA-256, which `build.ts` checks, and `LICENSE.third-party` its notices.
454
+ `build.zig` links it into the render module (`addObjectFile`); it imports
455
+ only `malloc`, `realloc` and `free`, which `src/render/arena.zig` exports,
456
+ so its output lives in the arena until the next reset. It fills in twips
457
+ about the centre of the fill's box, as lyon's absolute epsilons drop
458
+ sub-pixel slivers at pixel scale and f32 keeps too few bits far from the
459
+ origin, and gives positions back as f32s, which the module widens. Every
460
+ other fill stays with libtess2, which fills a few ordinary self-crossing
461
+ even-odd shapes correctly that lyon covers twice in places.
462
+
463
+ lyon can still fill contours that come within hundredths of a pixel of
464
+ each other wrongly, covering wedges of the even-odd rule's fill several
465
+ times or not at all, and say nothing. So `src/render/validate.zig` checks
466
+ its triangles before they are drawn: along 256 scanlines over the fill's
467
+ box, every stretch between two crossings must be covered once where the
468
+ contours' winding there says the rule fills it and not at all elsewhere.
469
+ A stretch narrower than a quarter of a pixel (or than the positions' f32
470
+ rounding) passes alone, as lyon leaves slivers a tenth of a pixel wide
471
+ between converging contours here and there, a faint line at most; but the
472
+ signed error of such stretches in a row is added up, and more than a
473
+ quarter of a pixel of it fails, so that a wide misfill made of thin
474
+ stretches does not pass. One sliver up to about a third of a pixel wide
475
+ can still fall between scanlines. It reads every triangle once, about 11 ms
476
+ of lyon's 153 on a deck of 95 contours; lyon's wrong wedges can be under
477
+ three pixels tall, which 48 scanlines let through.
478
+
479
+ lyon sweeps along y and, where its triangles fail the check, again along x
480
+ (swf2es/tessellate's `HORIZONTAL` flag): converging contours can come out
481
+ wrong one way and right the other, and the sweep along y is the quicker on
482
+ decks, by a tenth.
483
+ A fill that fails both ways goes to libtess2, as the bands give up on such
484
+ decks after a tenth of a second or more without filling them; so does one
485
+ whose sweep along x fails outright (-1) after its sweep along y failed the
486
+ check. Of 100
487
+ even-odd decks of 80 to 100 contours turned 1e-5 to 1e-3 apart, the size of
488
+ a real morph's, 22 still fail both ways and take libtess2's 2 to 4 s, most
489
+ of them turned 1e-4 or less; the fuzz's random ones fail one in eight.
490
+ What lyon fails at (-1, or -3 where its own buffers or the check's scratch
491
+ find no memory) goes to the bands: libtess2, in the same nearly full arena,
492
+ would run out too and unwind the instance, where the bands fail cleanly and
493
+ the host fills the call again alone. Input lyon refuses (coordinates more
494
+ than ±838,860.8 from its box's centre) goes to libtess2. A trap in it is
495
+ the host's, as one in libtess2 is: lyon traps where it panics and where an
496
+ allocation of its own fails, which -3 does not cover, and the host fills the
497
+ call again by the bands in a new instance. `filledBy()` names what filled
498
+ the last fill (lyon's sweep along x apart from its sweep along y), `lyonFault()` makes the next lyon fill fail, and
499
+ `checkFill()` gives the check's verdict on given triangles, for tests.
500
+
432
501
  What libtess2 fails at, gives output
433
- unfit to draw for, or cannot take (coordinates outside ±2^23), the module
502
+ unfit to draw for, or cannot take (coordinates outside ±2^23), and what lyon
503
+ fails at, the module
434
504
  fills by bands (`src/render/bands.zig`): the fill cut at every vertex's
435
505
  height and every height two edges cross at, each span the rule fills a
436
506
  trapezoid between two edges, the bands meeting along horizontal lines,
@@ -454,7 +524,13 @@ curved layers, quadratics, cubics, curves of no length and NaN coordinates,
454
524
  and checks each fill against a JS flattening tessellated alone: drawn or
455
525
  refused alike, the same geometry bit for bit as JS with plain square roots
456
526
  gives, and within the flatness of what `Math.hypot` gives. `zig build
457
- test` in this folder runs `flatten.zig`'s and `bands.zig`'s own tests. Synthetic fixtures
527
+ test` in this folder runs `flatten.zig`'s, `bands.zig`'s and
528
+ `crossings.zig`'s and `validate.zig`'s own tests. The fuzz ends with decks
529
+ of random densely crossing contours, half of them converging to within
530
+ thousandths of a pixel, unrounded and up to 3,000 px from the origin:
531
+ whichever filler took each, lyon or libtess2, it must have libtess2's area
532
+ and cover every sample once where its rule fills it and not at all
533
+ elsewhere. Synthetic fixtures
458
534
  also check coincident edges, holes and detail at large coordinates.
459
535
 
460
536
  ## lines