libraries/EaselJS_docs/classes/AlphaMaskFilter.html (view raw)
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <link rel="stylesheet" href="../assets/css/yui-cssgrids-min.css">
6 <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
7 <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
8 <link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
9 <script src="../assets/js/yui-source.js"></script>
10 <title>EaselJS v1.0.0 API Documentation : AlphaMaskFilter</title>
11</head>
12<body class="yui3-skin-sam">
13
14<div id="doc">
15 <div id="hd" class="yui3-g header">
16 <div class="yui3-u-3-4">
17
18 <h1><a href="http://www.createjs.com/easeljs"><img src="../assets/docs-icon-EaselJS.png" title="EaselJS"></a></h1>
19
20 </div>
21 <div class="version">
22 <em>API Documentation for: 1.0.0</em>
23 </div>
24 </div>
25 <div id="bd" class="yui3-g">
26
27 <div class="yui3-u-1-4">
28 <div id="docs-sidebar" class="sidebar apidocs">
29 <div id="api-list">
30 <h2 class="off-left">APIs</h2>
31 <div id="api-tabview" class="tabview">
32 <ul class="tabs">
33 <li><a href="#api-classes">Classes</a></li>
34 </ul>
35
36 <div id="api-tabview-filter">
37 <input type="search" id="api-filter" placeholder="Type to filter APIs">
38 </div>
39
40 <div id="api-tabview-panel">
41 <ul id="api-classes" class="apis classes">
42
43 <li><a href="../classes/AlphaMapFilter.html">AlphaMapFilter</a></li>
44
45 <li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
46
47 <li><a href="../classes/Bitmap.html">Bitmap</a></li>
48
49 <li><a href="../classes/BitmapCache.html">BitmapCache</a></li>
50
51 <li><a href="../classes/BitmapText.html">BitmapText</a></li>
52
53 <li><a href="../classes/BlurFilter.html">BlurFilter</a></li>
54
55 <li><a href="../classes/ButtonHelper.html">ButtonHelper</a></li>
56
57 <li><a href="../classes/ColorFilter.html">ColorFilter</a></li>
58
59 <li><a href="../classes/ColorMatrix.html">ColorMatrix</a></li>
60
61 <li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
62
63 <li><a href="../classes/Container.html">Container</a></li>
64
65 <li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
66
67 <li><a href="../classes/DisplayProps.html">DisplayProps</a></li>
68
69 <li><a href="../classes/DOMElement.html">DOMElement</a></li>
70
71 <li><a href="../classes/EaselJS.html">EaselJS</a></li>
72
73 <li><a href="../classes/Event.html">Event</a></li>
74
75 <li><a href="../classes/EventDispatcher.html">EventDispatcher</a></li>
76
77 <li><a href="../classes/Filter.html">Filter</a></li>
78
79 <li><a href="../classes/Graphics.html">Graphics</a></li>
80
81 <li><a href="../classes/Graphics.Arc.html">Graphics.Arc</a></li>
82
83 <li><a href="../classes/Graphics.ArcTo.html">Graphics.ArcTo</a></li>
84
85 <li><a href="../classes/Graphics.BeginPath.html">Graphics.BeginPath</a></li>
86
87 <li><a href="../classes/Graphics.BezierCurveTo.html">Graphics.BezierCurveTo</a></li>
88
89 <li><a href="../classes/Graphics.Circle.html">Graphics.Circle</a></li>
90
91 <li><a href="../classes/Graphics.ClosePath.html">Graphics.ClosePath</a></li>
92
93 <li><a href="../classes/Graphics.Ellipse.html">Graphics.Ellipse</a></li>
94
95 <li><a href="../classes/Graphics.Fill.html">Graphics.Fill</a></li>
96
97 <li><a href="../classes/Graphics.LineTo.html">Graphics.LineTo</a></li>
98
99 <li><a href="../classes/Graphics.MoveTo.html">Graphics.MoveTo</a></li>
100
101 <li><a href="../classes/Graphics.PolyStar.html">Graphics.PolyStar</a></li>
102
103 <li><a href="../classes/Graphics.QuadraticCurveTo.html">Graphics.QuadraticCurveTo</a></li>
104
105 <li><a href="../classes/Graphics.Rect.html">Graphics.Rect</a></li>
106
107 <li><a href="../classes/Graphics.RoundRect.html">Graphics.RoundRect</a></li>
108
109 <li><a href="../classes/Graphics.Stroke.html">Graphics.Stroke</a></li>
110
111 <li><a href="../classes/Graphics.StrokeDash.html">Graphics.StrokeDash</a></li>
112
113 <li><a href="../classes/Graphics.StrokeStyle.html">Graphics.StrokeStyle</a></li>
114
115 <li><a href="../classes/Matrix2D.html">Matrix2D</a></li>
116
117 <li><a href="../classes/MouseEvent.html">MouseEvent</a></li>
118
119 <li><a href="../classes/MovieClip.html">MovieClip</a></li>
120
121 <li><a href="../classes/MovieClipPlugin.html">MovieClipPlugin</a></li>
122
123 <li><a href="../classes/Point.html">Point</a></li>
124
125 <li><a href="../classes/Rectangle.html">Rectangle</a></li>
126
127 <li><a href="../classes/Shadow.html">Shadow</a></li>
128
129 <li><a href="../classes/Shape.html">Shape</a></li>
130
131 <li><a href="../classes/Sprite.html">Sprite</a></li>
132
133 <li><a href="../classes/SpriteSheet.html">SpriteSheet</a></li>
134
135 <li><a href="../classes/SpriteSheetBuilder.html">SpriteSheetBuilder</a></li>
136
137 <li><a href="../classes/SpriteSheetUtils.html">SpriteSheetUtils</a></li>
138
139 <li><a href="../classes/Stage.html">Stage</a></li>
140
141 <li><a href="../classes/StageGL.html">StageGL</a></li>
142
143 <li><a href="../classes/Text.html">Text</a></li>
144
145 <li><a href="../classes/Ticker.html">Ticker</a></li>
146
147 <li><a href="../classes/Touch.html">Touch</a></li>
148
149 <li><a href="../classes/UID.html">UID</a></li>
150
151 <li><a href="../classes/Utility Methods.html">Utility Methods</a></li>
152
153 <li><a href="../classes/VideoBuffer.html">VideoBuffer</a></li>
154
155 <li><a href="../classes/WebGLInspector.html">WebGLInspector</a></li>
156
157 </ul>
158
159 <ul id="api-modules" class="apis modules">
160
161 <li><a href="../modules/CreateJS.html">CreateJS</a></li>
162
163 <li><a href="../modules/EaselJS.html">EaselJS</a></li>
164
165 </ul>
166 </div>
167 </div>
168</div>
169
170 </div>
171 </div>
172 <div class="yui3-u-3-4">
173 <div id="api-options">
174 Show:
175 <label for="api-show-inherited">
176 <input type="checkbox" id="api-show-inherited" checked>
177 Inherited
178 </label>
179
180 <label for="api-show-protected">
181 <input type="checkbox" id="api-show-protected">
182 Protected
183 </label>
184
185 <label for="api-show-private">
186 <input type="checkbox" id="api-show-private">
187 Private
188 </label>
189 <label for="api-show-deprecated">
190 <input type="checkbox" id="api-show-deprecated">
191 Deprecated
192 </label>
193
194 </div>
195 <div class="apidocs">
196 <div id="docs-main">
197 <div class="content">
198 <h1>AlphaMaskFilter Class</h1>
199<div class="box meta">
200
201
202
203 <div class="extends">
204 Extends <a href="../classes/Filter.html" class="crosslink">Filter</a>
205 </div>
206
207
208
209 <div class="foundat">
210 Defined in: <a href="../files/easeljs_filters_AlphaMaskFilter.js.html#l41"><code>AlphaMaskFilter:41</code></a>
211 </div>
212
213
214
215
216 Module: <a href="../modules/EaselJS.html">EaselJS</a>
217
218
219
220
221</div>
222
223
224
225<div class="box intro">
226 <p>Applies the alpha from the mask image (or canvas) to the target, such that the alpha channel of the result will
227be derived from the mask, and the RGB channels will be copied from the target. This can be used, for example, to
228apply an alpha mask to a display object. This can also be used to combine a JPG compressed RGB image with a PNG32
229alpha mask, which can result in a much smaller file size than a single PNG32 containing ARGB.</p>
230<p><b>IMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters correctly.</b></p>
231<p><h4>Example</h4>
232This example draws a gradient box, then caches it and uses the "cacheCanvas" as the alpha mask on a 100x100 image.</p>
233<pre class="code prettyprint"><code> var box = new createjs.Shape();
234 box.graphics.beginLinearGradientFill(["#000000", "rgba(0, 0, 0, 0)"], [0, 1], 0, 0, 100, 100)
235 box.graphics.drawRect(0, 0, 100, 100);
236 box.cache(0, 0, 100, 100);
237
238 var bmp = new createjs.Bitmap("path/to/image.jpg");
239 bmp.filters = [
240 new createjs.AlphaMaskFilter(box.cacheCanvas)
241 ];
242 bmp.cache(0, 0, 100, 100);</code></pre>
243<p>See <a href="../classes/Filter.html" class="crosslink">Filter</a> for more information on applying filters.</p>
244
245</div>
246
247
248 <div class="constructor">
249 <h2>Constructor</h2>
250 <div id="method_AlphaMaskFilter" class="method item">
251 <h3 class="name"><code>AlphaMaskFilter</code></h3>
252
253
254 <div class="args">
255 <span class="paren">(</span><ul class="args-list inline commas">
256
257 <li class="arg">
258
259 <code>mask</code>
260
261 </li>
262
263 </ul><span class="paren">)</span>
264 </div>
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281 <div class="meta">
282
283
284
285 <p>
286
287 Defined in
288
289
290
291
292 <a href="../files/easeljs_filters_AlphaMaskFilter.js.html#l41"><code>AlphaMaskFilter:41</code></a>
293
294 </p>
295
296
297
298
299
300 </div>
301
302 <div class="description">
303
304 </div>
305
306
307 <div class="params">
308 <h4>Parameters:</h4>
309
310 <ul class="params-list">
311
312 <li class="param">
313
314 <code class="param-name">mask</code>
315 <span class="type">HTMLImageElement | HTMLCanvasElement</span>
316
317
318
319
320 <div class="param-description">
321
322 </div>
323
324
325 </li>
326
327 </ul>
328 </div>
329
330
331
332
333
334</div>
335
336 </div>
337
338
339<div id="classdocs" class="tabview">
340 <ul class="api-class-tabs">
341 <li class="api-class-tab index"><a href="#index">Index</a></li>
342
343
344 <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
345
346
347 <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
348
349
350
351 </ul>
352
353 <div>
354 <div id="index" class="api-class-tabpanel index">
355 <h2 class="off-left">Item Index</h2>
356
357
358 <div class="index-section methods">
359 <h3>Methods</h3>
360
361 <ul class="index-list methods extends">
362
363 <li class="index-item method inherited">
364 <a href="#method__applyFilter">_applyFilter</a>
365
366
367
368 </li>
369
370 <li class="index-item method inherited">
371 <a href="#method_applyFilter">applyFilter</a>
372
373
374
375 </li>
376
377 <li class="index-item method inherited">
378 <a href="#method_clone">clone</a>
379
380
381
382 </li>
383
384 <li class="index-item method inherited">
385 <a href="#method_getBounds">getBounds</a>
386
387
388
389 </li>
390
391 <li class="index-item method inherited">
392 <a href="#method_shaderParamSetup">shaderParamSetup</a>
393
394
395
396 </li>
397
398 <li class="index-item method inherited">
399 <a href="#method_toString">toString</a>
400
401
402
403 </li>
404
405 </ul>
406 </div>
407
408
409
410 <div class="index-section properties">
411 <h3>Properties</h3>
412
413 <ul class="index-list properties extends">
414
415 <li class="index-item property private inherited">
416 <a href="#property__multiPass">_multiPass</a>
417
418
419
420 </li>
421
422 <li class="index-item property inherited">
423 <a href="#property_FRAG_SHADER">FRAG_SHADER</a>
424
425
426
427 </li>
428
429 <li class="index-item property">
430 <a href="#property_mask">mask</a>
431
432
433
434 </li>
435
436 <li class="index-item property inherited">
437 <a href="#property_usesContext">usesContext</a>
438
439
440
441 </li>
442
443 <li class="index-item property inherited">
444 <a href="#property_VTX_SHADER">VTX_SHADER</a>
445
446
447
448 </li>
449
450 </ul>
451 </div>
452
453
454
455
456
457 </div>
458
459
460 <div id="methods" class="api-class-tabpanel">
461 <h2 class="off-left">Methods</h2>
462
463
464 <div id="method__applyFilter" class="method item inherited">
465 <h3 class="name"><code>_applyFilter</code></h3>
466
467
468 <div class="args">
469 <span class="paren">(</span><ul class="args-list inline commas">
470
471 <li class="arg">
472
473 <code>imageData</code>
474
475 </li>
476
477 </ul><span class="paren">)</span>
478 </div>
479
480
481
482 <span class="returns-inline">
483 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
484 </span>
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499 <div class="meta">
500
501
502 <p>Inherited from
503 <a href="../classes/Filter.html#method__applyFilter">Filter</a>:
504
505
506
507 <a href="../files/easeljs_filters_Filter.js.html#l180"><code>_applyFilter:180</code></a>
508
509 </p>
510
511
512
513
514
515 </div>
516
517 <div class="description">
518
519 </div>
520
521
522 <div class="params">
523 <h4>Parameters:</h4>
524
525 <ul class="params-list">
526
527 <li class="param">
528
529 <code class="param-name">imageData</code>
530 <span class="type">ImageData</span>
531
532
533
534
535 <div class="param-description">
536 <p>Target ImageData instance.</p>
537
538 </div>
539
540
541 </li>
542
543 </ul>
544 </div>
545
546
547
548 <div class="returns">
549 <h4>Returns:</h4>
550
551 <div class="returns-description">
552
553
554 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
555
556
557 </div>
558 </div>
559
560
561
562</div>
563
564
565 <div id="method_applyFilter" class="method item">
566 <h3 class="name"><code>applyFilter</code></h3>
567
568
569 <div class="args">
570 <span class="paren">(</span><ul class="args-list inline commas">
571
572 <li class="arg">
573
574 <code>ctx</code>
575
576 </li>
577
578 <li class="arg">
579
580 <code>x</code>
581
582 </li>
583
584 <li class="arg">
585
586 <code>y</code>
587
588 </li>
589
590 <li class="arg">
591
592 <code>width</code>
593
594 </li>
595
596 <li class="arg">
597
598 <code>height</code>
599
600 </li>
601
602 <li class="arg">
603
604 <code class="optional">[targetCtx]</code>
605
606 </li>
607
608 <li class="arg">
609
610 <code class="optional">[targetX]</code>
611
612 </li>
613
614 <li class="arg">
615
616 <code class="optional">[targetY]</code>
617
618 </li>
619
620 </ul><span class="paren">)</span>
621 </div>
622
623
624
625 <span class="returns-inline">
626 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
627 </span>
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642 <div class="meta">
643
644 <p>Inherited from
645 <a href="../classes/Filter.html#method_applyFilter">
646 Filter
647 </a>
648
649 but overwritten in
650
651
652
653 <a href="../files/easeljs_filters_AlphaMaskFilter.js.html#l115"><code>applyFilter:115</code></a>
654
655 </p>
656
657
658
659
660
661 </div>
662
663 <div class="description">
664 <p>Applies the filter to the specified context.</p>
665<p><strong>IMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters
666correctly.</strong></p>
667
668 </div>
669
670
671 <div class="params">
672 <h4>Parameters:</h4>
673
674 <ul class="params-list">
675
676 <li class="param">
677
678 <code class="param-name">ctx</code>
679 <span class="type">CanvasRenderingContext2D</span>
680
681
682
683
684 <div class="param-description">
685 <p>The 2D context to use as the source.</p>
686
687 </div>
688
689
690 </li>
691
692 <li class="param">
693
694 <code class="param-name">x</code>
695 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
696
697
698
699
700 <div class="param-description">
701 <p>The x position to use for the source rect.</p>
702
703 </div>
704
705
706 </li>
707
708 <li class="param">
709
710 <code class="param-name">y</code>
711 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
712
713
714
715
716 <div class="param-description">
717 <p>The y position to use for the source rect.</p>
718
719 </div>
720
721
722 </li>
723
724 <li class="param">
725
726 <code class="param-name">width</code>
727 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
728
729
730
731
732 <div class="param-description">
733 <p>The width to use for the source rect.</p>
734
735 </div>
736
737
738 </li>
739
740 <li class="param">
741
742 <code class="param-name">height</code>
743 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
744
745
746
747
748 <div class="param-description">
749 <p>The height to use for the source rect.</p>
750
751 </div>
752
753
754 </li>
755
756 <li class="param">
757
758 <code class="param-name optional">[targetCtx]</code>
759 <span class="type">CanvasRenderingContext2D</span>
760 <span class="flag optional" title="This parameter is optional.">optional</span>
761
762
763
764
765 <div class="param-description">
766 <p>NOT SUPPORTED IN THIS FILTER. The 2D context to draw the result to. Defaults to the context passed to ctx.</p>
767
768 </div>
769
770
771 </li>
772
773 <li class="param">
774
775 <code class="param-name optional">[targetX]</code>
776 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
777 <span class="flag optional" title="This parameter is optional.">optional</span>
778
779
780
781
782 <div class="param-description">
783 <p>NOT SUPPORTED IN THIS FILTER. The x position to draw the result to. Defaults to the value passed to x.</p>
784
785 </div>
786
787
788 </li>
789
790 <li class="param">
791
792 <code class="param-name optional">[targetY]</code>
793 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
794 <span class="flag optional" title="This parameter is optional.">optional</span>
795
796
797
798
799 <div class="param-description">
800 <p>NOT SUPPORTED IN THIS FILTER. The y position to draw the result to. Defaults to the value passed to y.</p>
801
802 </div>
803
804
805 </li>
806
807 </ul>
808 </div>
809
810
811
812 <div class="returns">
813 <h4>Returns:</h4>
814
815 <div class="returns-description">
816
817
818 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
819
820 <p>If the filter was applied successfully.</p>
821
822
823 </div>
824 </div>
825
826
827
828</div>
829
830
831 <div id="method_clone" class="method item inherited">
832 <h3 class="name"><code>clone</code></h3>
833
834
835 <span class="paren">()</span>
836
837
838
839 <span class="returns-inline">
840 <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
841 </span>
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856 <div class="meta">
857
858
859 <p>Inherited from
860 <a href="../classes/Filter.html#method_clone">Filter</a>:
861
862
863
864 <a href="../files/easeljs_filters_Filter.js.html#l170"><code>clone:170</code></a>
865
866 </p>
867
868
869
870
871
872 </div>
873
874 <div class="description">
875 <p>Returns a clone of this Filter instance.</p>
876
877 </div>
878
879
880
881
882 <div class="returns">
883 <h4>Returns:</h4>
884
885 <div class="returns-description">
886
887
888 <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>:
889
890 <p>A clone of the current Filter instance.</p>
891
892
893 </div>
894 </div>
895
896
897
898</div>
899
900
901 <div id="method_getBounds" class="method item inherited">
902 <h3 class="name"><code>getBounds</code></h3>
903
904
905 <div class="args">
906 <span class="paren">(</span><ul class="args-list inline commas">
907
908 <li class="arg">
909
910 <code class="optional">[rect]</code>
911
912 </li>
913
914 </ul><span class="paren">)</span>
915 </div>
916
917
918
919 <span class="returns-inline">
920 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
921 </span>
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936 <div class="meta">
937
938
939 <p>Inherited from
940 <a href="../classes/Filter.html#method_getBounds">Filter</a>:
941
942
943
944 <a href="../files/easeljs_filters_Filter.js.html#l111"><code>getBounds:111</code></a>
945
946 </p>
947
948
949
950
951
952 </div>
953
954 <div class="description">
955 <p>Provides padding values for this filter. That is, how much the filter will extend the visual bounds of an object it is applied to.</p>
956
957 </div>
958
959
960 <div class="params">
961 <h4>Parameters:</h4>
962
963 <ul class="params-list">
964
965 <li class="param">
966
967 <code class="param-name optional">[rect]</code>
968 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
969 <span class="flag optional" title="This parameter is optional.">optional</span>
970
971
972
973
974 <div class="param-description">
975 <p>If specified, the provided Rectangle instance will be expanded by the padding amounts and returned.</p>
976
977 </div>
978
979
980 </li>
981
982 </ul>
983 </div>
984
985
986
987 <div class="returns">
988 <h4>Returns:</h4>
989
990 <div class="returns-description">
991
992
993 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
994
995 <p>If a <code>rect</code> param was provided, it is returned. If not, either a new rectangle with the padding values, or null if no padding is required for this filter.</p>
996
997
998 </div>
999 </div>
1000
1001
1002
1003</div>
1004
1005
1006 <div id="method_shaderParamSetup" class="method item inherited">
1007 <h3 class="name"><code>shaderParamSetup</code></h3>
1008
1009
1010 <div class="args">
1011 <span class="paren">(</span><ul class="args-list inline commas">
1012
1013 <li class="arg">
1014
1015 <code>gl</code>
1016
1017 </li>
1018
1019 <li class="arg">
1020
1021 <code>stage</code>
1022
1023 </li>
1024
1025 <li class="arg">
1026
1027 <code>shaderProgram</code>
1028
1029 </li>
1030
1031 </ul><span class="paren">)</span>
1032 </div>
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049 <div class="meta">
1050
1051
1052 <p>Inherited from
1053 <a href="../classes/Filter.html#method_shaderParamSetup">Filter</a>:
1054
1055
1056
1057 <a href="../files/easeljs_filters_Filter.js.html#l121"><code>shaderParamSetup:121</code></a>
1058
1059 </p>
1060
1061
1062
1063
1064
1065 </div>
1066
1067 <div class="description">
1068 <p>Assign any unique uniforms or other setup functionality here.</p>
1069
1070 </div>
1071
1072
1073 <div class="params">
1074 <h4>Parameters:</h4>
1075
1076 <ul class="params-list">
1077
1078 <li class="param">
1079
1080 <code class="param-name">gl</code>
1081 <span class="type">WebGLContext</span>
1082
1083
1084
1085
1086 <div class="param-description">
1087 <p>The context associated with the stage performing the render.</p>
1088
1089 </div>
1090
1091
1092 </li>
1093
1094 <li class="param">
1095
1096 <code class="param-name">stage</code>
1097 <span class="type"><a href="../classes/StageGL.html" class="crosslink">StageGL</a></span>
1098
1099
1100
1101
1102 <div class="param-description">
1103 <p>The stage instance that will be rendering.</p>
1104
1105 </div>
1106
1107
1108 </li>
1109
1110 <li class="param">
1111
1112 <code class="param-name">shaderProgram</code>
1113 <span class="type">ShaderProgram</span>
1114
1115
1116
1117
1118 <div class="param-description">
1119 <p>The compiled shader that is going to be used to perform the render.</p>
1120
1121 </div>
1122
1123
1124 </li>
1125
1126 </ul>
1127 </div>
1128
1129
1130
1131
1132
1133</div>
1134
1135
1136 <div id="method_toString" class="method item inherited">
1137 <h3 class="name"><code>toString</code></h3>
1138
1139
1140 <span class="paren">()</span>
1141
1142
1143
1144 <span class="returns-inline">
1145 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1146 </span>
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161 <div class="meta">
1162
1163
1164 <p>Inherited from
1165 <a href="../classes/Filter.html#method_toString">Filter</a>:
1166
1167
1168
1169 <a href="../files/easeljs_filters_Filter.js.html#l161"><code>toString:161</code></a>
1170
1171 </p>
1172
1173
1174
1175
1176
1177 </div>
1178
1179 <div class="description">
1180 <p>Returns a string representation of this object.</p>
1181
1182 </div>
1183
1184
1185
1186
1187 <div class="returns">
1188 <h4>Returns:</h4>
1189
1190 <div class="returns-description">
1191
1192
1193 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
1194
1195 <p>a string representation of the instance.</p>
1196
1197
1198 </div>
1199 </div>
1200
1201
1202
1203</div>
1204
1205
1206 </div>
1207
1208
1209
1210 <div id="properties" class="api-class-tabpanel">
1211 <h2 class="off-left">Properties</h2>
1212
1213
1214 <div id="property__multiPass" class="property item private inherited">
1215 <h3 class="name"><code>_multiPass</code></h3>
1216 <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
1217
1218
1219
1220
1221 <span class="flag private">private</span>
1222
1223
1224
1225
1226
1227
1228
1229
1230 <div class="meta">
1231
1232
1233 <p>Inherited from
1234 <a href="../classes/Filter.html#property__multiPass">Filter</a>:
1235
1236
1237
1238 <a href="../files/easeljs_filters_Filter.js.html#l79"><code>_multiPass:79</code></a>
1239
1240 </p>
1241
1242
1243
1244
1245 </div>
1246
1247 <div class="description">
1248 <p>Another filter that is required to act as part of this filter and created and managed under the hood.</p>
1249
1250 </div>
1251
1252
1253 <p><strong>Default:</strong> null</p>
1254
1255
1256
1257
1258
1259</div>
1260
1261
1262 <div id="property_FRAG_SHADER" class="property item inherited">
1263 <h3 class="name"><code>FRAG_SHADER</code></h3>
1264 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275 <span class="flag readonly">readonly</span>
1276
1277
1278 <div class="meta">
1279
1280
1281 <p>Inherited from
1282 <a href="../classes/Filter.html#property_FRAG_SHADER">Filter</a>:
1283
1284
1285
1286 <a href="../files/easeljs_filters_Filter.js.html#l98"><code>FRAG_SHADER:98</code></a>
1287
1288 </p>
1289
1290
1291
1292
1293 </div>
1294
1295 <div class="description">
1296 <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1297This should be based upon StageGL.SHADER_FRAGMENT_BODY_REGULAR</p>
1298
1299 </div>
1300
1301
1302
1303
1304
1305
1306</div>
1307
1308
1309 <div id="property_mask" class="property item">
1310 <h3 class="name"><code>mask</code></h3>
1311 <span class="type">HTMLImageElement | HTMLCanvasElement</span>
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323 <div class="meta">
1324
1325
1326
1327 <p>
1328
1329 Defined in
1330
1331
1332
1333
1334 <a href="../files/easeljs_filters_AlphaMaskFilter.js.html#l73"><code>mask:73</code></a>
1335
1336 </p>
1337
1338
1339
1340
1341 </div>
1342
1343 <div class="description">
1344 <p>The image (or canvas) to use as the mask.</p>
1345
1346 </div>
1347
1348
1349
1350
1351
1352
1353</div>
1354
1355
1356 <div id="property_usesContext" class="property item inherited">
1357 <h3 class="name"><code>usesContext</code></h3>
1358 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370 <div class="meta">
1371
1372
1373 <p>Inherited from
1374 <a href="../classes/Filter.html#property_usesContext">Filter</a>:
1375
1376
1377
1378 <a href="../files/easeljs_filters_Filter.js.html#l71"><code>usesContext:71</code></a>
1379
1380 </p>
1381
1382
1383
1384
1385 </div>
1386
1387 <div class="description">
1388 <p>A flag stating that this filter uses a context draw mode and cannot be batched into imageData processing.</p>
1389
1390 </div>
1391
1392
1393 <p><strong>Default:</strong> false</p>
1394
1395
1396
1397
1398
1399</div>
1400
1401
1402 <div id="property_VTX_SHADER" class="property item inherited">
1403 <h3 class="name"><code>VTX_SHADER</code></h3>
1404 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415 <span class="flag readonly">readonly</span>
1416
1417
1418 <div class="meta">
1419
1420
1421 <p>Inherited from
1422 <a href="../classes/Filter.html#property_VTX_SHADER">Filter</a>:
1423
1424
1425
1426 <a href="../files/easeljs_filters_Filter.js.html#l88"><code>VTX_SHADER:88</code></a>
1427
1428 </p>
1429
1430
1431
1432
1433 </div>
1434
1435 <div class="description">
1436 <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1437This should be based upon StageGL.SHADER_VERTEX_BODY_REGULAR</p>
1438
1439 </div>
1440
1441
1442
1443
1444
1445
1446</div>
1447
1448
1449 </div>
1450
1451
1452
1453
1454
1455 </div>
1456</div>
1457
1458 </div>
1459 </div>
1460 </div>
1461 </div>
1462 </div>
1463</div>
1464<script src="../assets/vendor/prettify/prettify-min.js"></script>
1465<script>prettyPrint();</script>
1466<script src="../assets/js/yui-prettify.js"></script>
1467<script src="../assets/../api.js"></script>
1468<script src="../assets/js/api-filter.js"></script>
1469<script src="../assets/js/api-list.js"></script>
1470<script src="../assets/js/api-search.js"></script>
1471<script src="../assets/js/apidocs.js"></script>
1472</body>
1473</html>