etro 0.8.0 → 0.8.3

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 (97) hide show
  1. package/.github/workflows/nodejs.yml +3 -1
  2. package/.github/workflows/shipjs-trigger.yml +29 -0
  3. package/CHANGELOG.md +36 -13
  4. package/CODE_OF_CONDUCT.md +5 -5
  5. package/CONTRIBUTING.md +22 -72
  6. package/README.md +2 -2
  7. package/dist/effect/base.d.ts +14 -1
  8. package/dist/etro-cjs.js +189 -230
  9. package/dist/etro-iife.js +189 -230
  10. package/dist/layer/base.d.ts +13 -0
  11. package/eslint.conf.js +2 -1
  12. package/eslint.test-conf.js +1 -0
  13. package/examples/application/readme-screenshot.html +4 -8
  14. package/examples/application/video-player.html +3 -4
  15. package/examples/introduction/effects.html +23 -4
  16. package/karma.conf.js +4 -2
  17. package/package.json +8 -4
  18. package/scripts/gen-effect-samples.html +0 -3
  19. package/ship.config.js +80 -0
  20. package/src/effect/base.ts +29 -10
  21. package/src/effect/gaussian-blur.ts +10 -10
  22. package/src/effect/pixelate.ts +1 -2
  23. package/src/effect/shader.ts +18 -22
  24. package/src/effect/stack.ts +8 -4
  25. package/src/effect/transform.ts +13 -14
  26. package/src/event.ts +8 -14
  27. package/src/layer/audio-source.ts +16 -14
  28. package/src/layer/audio.ts +1 -2
  29. package/src/layer/base.ts +26 -7
  30. package/src/layer/visual.ts +11 -6
  31. package/src/movie.ts +70 -64
  32. package/src/util.ts +50 -57
  33. package/docs/effect.js.html +0 -1215
  34. package/docs/event.js.html +0 -145
  35. package/docs/index.html +0 -81
  36. package/docs/index.js.html +0 -92
  37. package/docs/layer.js.html +0 -888
  38. package/docs/module-effect-GaussianBlurComponent.html +0 -345
  39. package/docs/module-effect.Brightness.html +0 -339
  40. package/docs/module-effect.Channels.html +0 -319
  41. package/docs/module-effect.ChromaKey.html +0 -611
  42. package/docs/module-effect.Contrast.html +0 -339
  43. package/docs/module-effect.EllipticalMask.html +0 -200
  44. package/docs/module-effect.GaussianBlur.html +0 -202
  45. package/docs/module-effect.GaussianBlurHorizontal.html +0 -242
  46. package/docs/module-effect.GaussianBlurVertical.html +0 -242
  47. package/docs/module-effect.Pixelate.html +0 -330
  48. package/docs/module-effect.Shader.html +0 -1227
  49. package/docs/module-effect.Stack.html +0 -406
  50. package/docs/module-effect.Transform.Matrix.html +0 -193
  51. package/docs/module-effect.Transform.html +0 -1174
  52. package/docs/module-effect.html +0 -148
  53. package/docs/module-event.html +0 -473
  54. package/docs/module-index.html +0 -186
  55. package/docs/module-layer-Media.html +0 -1116
  56. package/docs/module-layer-MediaMixin.html +0 -164
  57. package/docs/module-layer.Audio.html +0 -1188
  58. package/docs/module-layer.Base.html +0 -629
  59. package/docs/module-layer.Image.html +0 -1421
  60. package/docs/module-layer.Text.html +0 -1731
  61. package/docs/module-layer.Video.html +0 -1938
  62. package/docs/module-layer.Visual.html +0 -1698
  63. package/docs/module-layer.html +0 -137
  64. package/docs/module-movie.html +0 -3118
  65. package/docs/module-util.Color.html +0 -702
  66. package/docs/module-util.Font.html +0 -395
  67. package/docs/module-util.html +0 -845
  68. package/docs/movie.js.html +0 -689
  69. package/docs/scripts/collapse.js +0 -20
  70. package/docs/scripts/linenumber.js +0 -25
  71. package/docs/scripts/nav.js +0 -12
  72. package/docs/scripts/polyfill.js +0 -4
  73. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  74. package/docs/scripts/prettify/lang-css.js +0 -2
  75. package/docs/scripts/prettify/prettify.js +0 -28
  76. package/docs/scripts/search.js +0 -83
  77. package/docs/styles/jsdoc.css +0 -671
  78. package/docs/styles/prettify.css +0 -79
  79. package/docs/util.js.html +0 -503
  80. package/spec/assets/effect/gaussian-blur-horizontal.png +0 -0
  81. package/spec/assets/effect/gaussian-blur-vertical.png +0 -0
  82. package/spec/assets/effect/grayscale.png +0 -0
  83. package/spec/assets/effect/original.png +0 -0
  84. package/spec/assets/effect/pixelate.png +0 -0
  85. package/spec/assets/effect/transform/multiply.png +0 -0
  86. package/spec/assets/effect/transform/rotate.png +0 -0
  87. package/spec/assets/effect/transform/scale-fraction.png +0 -0
  88. package/spec/assets/effect/transform/scale.png +0 -0
  89. package/spec/assets/effect/transform/translate-fraction.png +0 -0
  90. package/spec/assets/effect/transform/translate.png +0 -0
  91. package/spec/assets/layer/audio.wav +0 -0
  92. package/spec/assets/layer/image.jpg +0 -0
  93. package/spec/effect.spec.js +0 -421
  94. package/spec/event.spec.js +0 -39
  95. package/spec/layer.spec.js +0 -307
  96. package/spec/movie.spec.js +0 -346
  97. package/spec/util.spec.js +0 -294
@@ -1,611 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>ChromaKey - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
- </head>
19
- <body>
20
-
21
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
- <label for="nav-trigger" class="navicon-button x">
23
- <div class="navicon"></div>
24
- </label>
25
-
26
- <label for="nav-trigger" class="overlay"></label>
27
-
28
- <nav >
29
-
30
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module-effect.Brightness.html">Brightness</a></li><li><a href="module-effect.Channels.html">Channels</a></li><li><a href="module-effect.ChromaKey.html">ChromaKey</a></li><li><a href="module-effect.Contrast.html">Contrast</a></li><li><a href="module-effect.EllipticalMask.html">EllipticalMask</a></li><li><a href="module-effect.GaussianBlur.html">GaussianBlur</a></li><li><a href="module-effect.GaussianBlurHorizontal.html">GaussianBlurHorizontal</a></li><li><a href="module-effect.GaussianBlurVertical.html">GaussianBlurVertical</a></li><li><a href="module-effect.Pixelate.html">Pixelate</a></li><li><a href="module-effect.Shader.html">Shader</a><ul class='methods'><li data-type='method'><a href="module-effect.Shader.html#._initBuffer">_initBuffer</a></li><li data-type='method'><a href="module-effect.Shader.html#._loadTexture">_loadTexture</a></li><li data-type='method'><a href="module-effect.Shader.html#_prepareValue">_prepareValue</a></li></ul></li><li><a href="module-effect.Stack.html">Stack</a><ul class='methods'><li data-type='method'><a href="module-effect.Stack.html#addEffect">addEffect</a></li></ul></li><li><a href="module-effect.Transform.html">Transform</a><ul class='methods'><li data-type='method'><a href="module-effect.Transform.html#.Matrix#cell">Matrix#cell</a></li><li data-type='method'><a href="module-effect.Transform.html#.Matrix#multiply">Matrix#multiply</a></li><li data-type='method'><a href="module-effect.Transform.html#.Matrix#rotate">Matrix#rotate</a></li><li data-type='method'><a href="module-effect.Transform.html#.Matrix#scale">Matrix#scale</a></li><li data-type='method'><a href="module-effect.Transform.html#.Matrix#translate">Matrix#translate</a></li></ul></li><li><a href="module-effect.Transform.Matrix.html">Matrix</a></li><li><a href="module-effect-GaussianBlurComponent.html">GaussianBlurComponent</a></li><li><a href="module-layer.Audio.html">Audio</a></li><li><a href="module-layer.Base.html">Base</a><ul class='methods'><li data-type='method'><a href="module-layer.Base.html#_render">_render</a></li></ul></li><li><a href="module-layer.Image.html">Image</a></li><li><a href="module-layer.Text.html">Text</a></li><li><a href="module-layer.Video.html">Video</a></li><li><a href="module-layer.Visual.html">Visual</a><ul class='methods'><li data-type='method'><a href="module-layer.Visual.html#_render">_render</a></li><li data-type='method'><a href="module-layer.Visual.html#addEffect">addEffect</a></li></ul></li><li><a href="module-layer-Media.html">Media</a></li><li><a href="module-movie.html">movie</a><ul class='methods'><li data-type='method'><a href="module-movie.html#addEffect">addEffect</a></li><li data-type='method'><a href="module-movie.html#addLayer">addLayer</a></li><li data-type='method'><a href="module-movie.html#pause">pause</a></li><li data-type='method'><a href="module-movie.html#play">play</a></li><li data-type='method'><a href="module-movie.html#publishToLayers">publishToLayers</a></li><li data-type='method'><a href="module-movie.html#record">record</a></li><li data-type='method'><a href="module-movie.html#refresh">refresh</a></li><li data-type='method'><a href="module-movie.html#setCurrentTime">setCurrentTime</a></li><li data-type='method'><a href="module-movie.html#stop">stop</a></li></ul></li><li><a href="module-util.Color.html">Color</a><ul class='methods'><li data-type='method'><a href="module-util.Color.html#toString">toString</a></li></ul></li><li><a href="module-util.Font.html">Font</a><ul class='methods'><li data-type='method'><a href="module-util.Font.html#toString">toString</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-effect.html">effect</a></li><li><a href="module-event.html">event</a><ul class='methods'><li data-type='method'><a href="module-event.html#.publish">publish</a></li><li data-type='method'><a href="module-event.html#.subscribe">subscribe</a></li></ul></li><li><a href="module-index.html">index</a></li><li><a href="module-layer.html">layer</a></li><li><a href="module-movie.html">movie</a><ul class='methods'><li data-type='method'><a href="module-movie.html#addEffect">addEffect</a></li><li data-type='method'><a href="module-movie.html#addLayer">addLayer</a></li><li data-type='method'><a href="module-movie.html#pause">pause</a></li><li data-type='method'><a href="module-movie.html#play">play</a></li><li data-type='method'><a href="module-movie.html#publishToLayers">publishToLayers</a></li><li data-type='method'><a href="module-movie.html#record">record</a></li><li data-type='method'><a href="module-movie.html#refresh">refresh</a></li><li data-type='method'><a href="module-movie.html#setCurrentTime">setCurrentTime</a></li><li data-type='method'><a href="module-movie.html#stop">stop</a></li></ul></li><li><a href="module-util.html">util</a><ul class='methods'><li data-type='method'><a href="module-util.html#.parseColor">parseColor</a></li><li data-type='method'><a href="module-util.html#.parseFont">parseFont</a></li><li data-type='method'><a href="module-util.html#.watchPublic">watchPublic</a></li><li data-type='method'><a href="module-util.html#~isKeyFrames">isKeyFrames</a></li></ul></li></ul><h3>Mixins</h3><ul><li><a href="module-layer-MediaMixin.html">MediaMixin</a></li></ul>
31
- </nav>
32
-
33
- <div id="main">
34
-
35
- <h1 class="page-title">ChromaKey</h1>
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
- <section>
44
-
45
- <header>
46
-
47
- <h2>
48
- <span class="ancestors"><a href="module-effect.html">effect</a>.</span>
49
-
50
- ChromaKey
51
- </h2>
52
-
53
- <div class="class-description">Reduces alpha for pixels which are close to a specified target color</div>
54
-
55
-
56
- </header>
57
-
58
- <article>
59
-
60
- <div class="container-overview">
61
-
62
-
63
-
64
-
65
- <h2>Constructor</h2>
66
-
67
-
68
- <h4 class="name" id="ChromaKey"><span class="type-signature"></span>new ChromaKey<span class="signature">(target<span class="signature-attributes">opt</span>, threshold<span class="signature-attributes">opt</span>, interpolate<span class="signature-attributes">opt</span>, smoothingSharpness<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
69
-
70
-
71
-
72
-
73
-
74
-
75
- <dl class="details">
76
-
77
-
78
- <dt class="tag-source">Source:</dt>
79
- <dd class="tag-source"><ul class="dummy"><li>
80
- <a href="effect.js.html">effect.js</a>, <a href="effect.js.html#line640">line 640</a>
81
- </li></ul></dd>
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
- <dt class="tag-todo">To Do:</dt>
114
- <dd class="tag-todo">
115
- <ul>
116
- <li>Use <code>smoothingSharpness</code></li>
117
- </ul>
118
- </dd>
119
-
120
- </dl>
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <h5>Parameters:</h5>
137
-
138
-
139
- <table class="params">
140
- <thead>
141
- <tr>
142
-
143
- <th>Name</th>
144
-
145
-
146
- <th>Type</th>
147
-
148
-
149
- <th>Attributes</th>
150
-
151
-
152
-
153
- <th>Default</th>
154
-
155
-
156
- <th class="last">Description</th>
157
- </tr>
158
- </thead>
159
-
160
- <tbody>
161
-
162
-
163
- <tr>
164
-
165
- <td class="name"><code>target</code></td>
166
-
167
-
168
- <td class="type">
169
-
170
-
171
- <span class="param-type"><a href="module-util.Color.html">module:util.Color</a></span>
172
-
173
-
174
-
175
- </td>
176
-
177
-
178
- <td class="attributes">
179
-
180
- &lt;optional><br>
181
-
182
-
183
-
184
-
185
-
186
- </td>
187
-
188
-
189
-
190
- <td class="default">
191
-
192
- <code>{r: 0, g: 0, b: 0}</code>
193
-
194
- </td>
195
-
196
-
197
- <td class="description last">the color to remove</td>
198
- </tr>
199
-
200
-
201
-
202
- <tr>
203
-
204
- <td class="name"><code>threshold</code></td>
205
-
206
-
207
- <td class="type">
208
-
209
-
210
- <span class="param-type">number</span>
211
-
212
-
213
-
214
- </td>
215
-
216
-
217
- <td class="attributes">
218
-
219
- &lt;optional><br>
220
-
221
-
222
-
223
-
224
-
225
- </td>
226
-
227
-
228
-
229
- <td class="default">
230
-
231
- <code>0</code>
232
-
233
- </td>
234
-
235
-
236
- <td class="description last">how much error is allowed</td>
237
- </tr>
238
-
239
-
240
-
241
- <tr>
242
-
243
- <td class="name"><code>interpolate</code></td>
244
-
245
-
246
- <td class="type">
247
-
248
-
249
- <span class="param-type">boolean</span>
250
-
251
-
252
-
253
- </td>
254
-
255
-
256
- <td class="attributes">
257
-
258
- &lt;optional><br>
259
-
260
-
261
-
262
-
263
-
264
- </td>
265
-
266
-
267
-
268
- <td class="default">
269
-
270
- <code>false</code>
271
-
272
- </td>
273
-
274
-
275
- <td class="description last">true value to interpolate the alpha channel,
276
- or false value for no smoothing (i.e. 255 or 0 alpha)</td>
277
- </tr>
278
-
279
-
280
-
281
- <tr>
282
-
283
- <td class="name"><code>smoothingSharpness</code></td>
284
-
285
-
286
- <td class="type">
287
-
288
-
289
- <span class="param-type">number</span>
290
-
291
-
292
-
293
- </td>
294
-
295
-
296
- <td class="attributes">
297
-
298
- &lt;optional><br>
299
-
300
-
301
-
302
-
303
-
304
- </td>
305
-
306
-
307
-
308
- <td class="default">
309
-
310
- <code>0</code>
311
-
312
- </td>
313
-
314
-
315
- <td class="description last">a modifier to lessen the smoothing range, if applicable</td>
316
- </tr>
317
-
318
-
319
- </tbody>
320
- </table>
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
-
337
-
338
-
339
-
340
-
341
- </div>
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
-
356
-
357
- <h3 class="subsection-title">Members</h3>
358
-
359
-
360
-
361
- <h4 class="name" id="interpolate"><span class="type-signature"></span>interpolate<span class="type-signature"> :boolean</span></h4>
362
-
363
-
364
-
365
-
366
-
367
- <dl class="details">
368
-
369
-
370
- <dt class="tag-source">Source:</dt>
371
- <dd class="tag-source"><ul class="dummy"><li>
372
- <a href="effect.js.html">effect.js</a>, <a href="effect.js.html#line692">line 692</a>
373
- </li></ul></dd>
374
-
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
- </dl>
406
-
407
-
408
-
409
-
410
-
411
- <div class="description">
412
- True value to interpolate the alpha channel,
413
- or false value for no smoothing (i.e. 255 or 0 alpha)
414
- </div>
415
-
416
-
417
-
418
- <h5>Type:</h5>
419
- <ul>
420
- <li>
421
-
422
- <span class="param-type">boolean</span>
423
-
424
-
425
- </li>
426
- </ul>
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
- <h4 class="name" id="target"><span class="type-signature"></span>target<span class="type-signature"> :<a href="module-util.Color.html">module:util.Color</a></span></h4>
436
-
437
-
438
-
439
-
440
-
441
- <dl class="details">
442
-
443
-
444
- <dt class="tag-source">Source:</dt>
445
- <dd class="tag-source"><ul class="dummy"><li>
446
- <a href="effect.js.html">effect.js</a>, <a href="effect.js.html#line681">line 681</a>
447
- </li></ul></dd>
448
-
449
-
450
-
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
- </dl>
480
-
481
-
482
-
483
-
484
-
485
- <div class="description">
486
- The color to remove
487
- </div>
488
-
489
-
490
-
491
- <h5>Type:</h5>
492
- <ul>
493
- <li>
494
-
495
- <span class="param-type"><a href="module-util.Color.html">module:util.Color</a></span>
496
-
497
-
498
- </li>
499
- </ul>
500
-
501
-
502
-
503
-
504
-
505
-
506
-
507
-
508
- <h4 class="name" id="threshold"><span class="type-signature"></span>threshold<span class="type-signature"> :number</span></h4>
509
-
510
-
511
-
512
-
513
-
514
- <dl class="details">
515
-
516
-
517
- <dt class="tag-source">Source:</dt>
518
- <dd class="tag-source"><ul class="dummy"><li>
519
- <a href="effect.js.html">effect.js</a>, <a href="effect.js.html#line686">line 686</a>
520
- </li></ul></dd>
521
-
522
-
523
-
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
-
543
-
544
-
545
-
546
-
547
-
548
-
549
-
550
-
551
-
552
- </dl>
553
-
554
-
555
-
556
-
557
-
558
- <div class="description">
559
- How much error is alloed
560
- </div>
561
-
562
-
563
-
564
- <h5>Type:</h5>
565
- <ul>
566
- <li>
567
-
568
- <span class="param-type">number</span>
569
-
570
-
571
- </li>
572
- </ul>
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
- </article>
588
-
589
- </section>
590
-
591
-
592
-
593
-
594
-
595
-
596
- </div>
597
-
598
- <br class="clear">
599
-
600
- <footer>
601
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Sun Oct 13 2019 15:38:43 GMT-0400 (Eastern Daylight Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
602
- </footer>
603
-
604
- <script>prettyPrint();</script>
605
- <script src="scripts/polyfill.js"></script>
606
- <script src="scripts/linenumber.js"></script>
607
-
608
-
609
-
610
- </body>
611
- </html>