@next2d/geom 1.18.12 → 2.0.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 (98) hide show
  1. package/package.json +8 -24
  2. package/src/ColorTransform/service/ColorTransformConcatService.d.ts +12 -0
  3. package/src/ColorTransform/service/ColorTransformConcatService.js +25 -0
  4. package/{dist → src}/ColorTransform.d.ts +57 -69
  5. package/src/ColorTransform.js +240 -0
  6. package/src/GeomUtil.d.ts +63 -0
  7. package/src/GeomUtil.js +102 -0
  8. package/src/Matrix/service/MatirxConcatService.d.ts +12 -0
  9. package/src/Matrix/service/MatirxConcatService.js +34 -0
  10. package/src/Matrix/service/MatrixCloneService.d.ts +11 -0
  11. package/src/Matrix/service/MatrixCloneService.js +13 -0
  12. package/src/Matrix/service/MatrixCopyFromService.d.ts +12 -0
  13. package/src/Matrix/service/MatrixCopyFromService.js +18 -0
  14. package/src/Matrix/service/MatrixCreateBoxService.d.ts +15 -0
  15. package/src/Matrix/service/MatrixCreateBoxService.js +19 -0
  16. package/src/Matrix/service/MatrixCreateGradientBoxService.d.ts +16 -0
  17. package/src/Matrix/service/MatrixCreateGradientBoxService.js +33 -0
  18. package/src/Matrix/service/MatrixDeltaTransformPointService.d.ts +13 -0
  19. package/src/Matrix/service/MatrixDeltaTransformPointService.js +14 -0
  20. package/src/Matrix/service/MatrixIdentityService.d.ts +11 -0
  21. package/src/Matrix/service/MatrixIdentityService.js +17 -0
  22. package/src/Matrix/service/MatrixInvertService.d.ts +11 -0
  23. package/src/Matrix/service/MatrixInvertService.js +37 -0
  24. package/src/Matrix/service/MatrixRotateService.d.ts +11 -0
  25. package/src/Matrix/service/MatrixRotateService.js +24 -0
  26. package/src/Matrix/service/MatrixScaleService.d.ts +13 -0
  27. package/src/Matrix/service/MatrixScaleService.js +20 -0
  28. package/src/Matrix/service/MatrixSetToService.d.ts +17 -0
  29. package/src/Matrix/service/MatrixSetToService.js +24 -0
  30. package/src/Matrix/service/MatrixTransformPointService.d.ts +13 -0
  31. package/src/Matrix/service/MatrixTransformPointService.js +17 -0
  32. package/src/Matrix/service/MatrixTranslateService.d.ts +13 -0
  33. package/src/Matrix/service/MatrixTranslateService.js +15 -0
  34. package/{dist → src}/Matrix.d.ts +45 -69
  35. package/{dist → src}/Matrix.js +92 -204
  36. package/src/Point/service/PointAddService.d.ts +12 -0
  37. package/src/Point/service/PointAddService.js +14 -0
  38. package/src/Point/service/PointCloneService.d.ts +11 -0
  39. package/src/Point/service/PointCloneService.js +13 -0
  40. package/src/Point/service/PointCopyFromService.d.ts +12 -0
  41. package/src/Point/service/PointCopyFromService.js +14 -0
  42. package/src/Point/service/PointDistanceService.d.ts +12 -0
  43. package/src/Point/service/PointDistanceService.js +14 -0
  44. package/src/Point/service/PointEqualsService.d.ts +12 -0
  45. package/src/Point/service/PointEqualsService.js +13 -0
  46. package/src/Point/service/PointInterpolateService.d.ts +13 -0
  47. package/src/Point/service/PointInterpolateService.js +15 -0
  48. package/src/Point/service/PointNormalizeService.d.ts +12 -0
  49. package/src/Point/service/PointNormalizeService.js +15 -0
  50. package/src/Point/service/PointOffsetService.d.ts +13 -0
  51. package/src/Point/service/PointOffsetService.js +15 -0
  52. package/src/Point/service/PointPolarService.d.ts +12 -0
  53. package/src/Point/service/PointPolarService.js +14 -0
  54. package/src/Point/service/PointSetToService.d.ts +13 -0
  55. package/src/Point/service/PointSetToService.js +15 -0
  56. package/src/Point/service/PointSubtractService.d.ts +12 -0
  57. package/src/Point/service/PointSubtractService.js +14 -0
  58. package/{dist → src}/Point.d.ts +34 -82
  59. package/{dist → src}/Point.js +67 -128
  60. package/src/Rectangle/service/RectangleCloneService.d.ts +11 -0
  61. package/src/Rectangle/service/RectangleCloneService.js +13 -0
  62. package/src/Rectangle/service/RectangleContainsPointService.d.ts +13 -0
  63. package/src/Rectangle/service/RectangleContainsPointService.js +16 -0
  64. package/src/Rectangle/service/RectangleContainsRectService.d.ts +12 -0
  65. package/src/Rectangle/service/RectangleContainsRectService.js +16 -0
  66. package/src/Rectangle/service/RectangleContainsService.d.ts +13 -0
  67. package/src/Rectangle/service/RectangleContainsService.js +17 -0
  68. package/src/Rectangle/service/RectangleCopyFromService.d.ts +12 -0
  69. package/src/Rectangle/service/RectangleCopyFromService.js +16 -0
  70. package/src/Rectangle/service/RectangleEqualsService.d.ts +12 -0
  71. package/src/Rectangle/service/RectangleEqualsService.js +16 -0
  72. package/src/Rectangle/service/RectangleInflatePointService.d.ts +13 -0
  73. package/src/Rectangle/service/RectangleInflatePointService.js +16 -0
  74. package/src/Rectangle/service/RectangleInflateService.d.ts +13 -0
  75. package/src/Rectangle/service/RectangleInflateService.js +17 -0
  76. package/src/Rectangle/service/RectangleIntersectionService.d.ts +12 -0
  77. package/src/Rectangle/service/RectangleIntersectionService.js +22 -0
  78. package/src/Rectangle/service/RectangleIntersectsService.d.ts +12 -0
  79. package/src/Rectangle/service/RectangleIntersectsService.js +17 -0
  80. package/src/Rectangle/service/RectangleIsEmptyService.d.ts +11 -0
  81. package/src/Rectangle/service/RectangleIsEmptyService.js +12 -0
  82. package/src/Rectangle/service/RectangleOffsetPointService.d.ts +13 -0
  83. package/src/Rectangle/service/RectangleOffsetPointService.js +14 -0
  84. package/src/Rectangle/service/RectangleOffsetService.d.ts +13 -0
  85. package/src/Rectangle/service/RectangleOffsetService.js +15 -0
  86. package/src/Rectangle/service/RectangleSetEmptyService.d.ts +11 -0
  87. package/src/Rectangle/service/RectangleSetEmptyService.js +12 -0
  88. package/src/Rectangle/service/RectangleSetToService.d.ts +15 -0
  89. package/src/Rectangle/service/RectangleSetToService.js +19 -0
  90. package/src/Rectangle/service/RectangleUnionService.d.ts +12 -0
  91. package/src/Rectangle/service/RectangleUnionService.js +20 -0
  92. package/{dist → src}/Rectangle.d.ts +50 -102
  93. package/{dist → src}/Rectangle.js +110 -205
  94. package/{dist → src}/index.d.ts +0 -1
  95. package/{dist → src}/index.js +0 -1
  96. package/dist/ColorTransform.js +0 -278
  97. package/dist/Transform.d.ts +0 -209
  98. package/dist/Transform.js +0 -478
package/dist/Transform.js DELETED
@@ -1,478 +0,0 @@
1
- import { Rectangle } from "./Rectangle";
2
- import { BevelFilter, BlurFilter, ColorMatrixFilter, ConvolutionFilter, DisplacementMapFilter, DropShadowFilter, GlowFilter, GradientBevelFilter, GradientGlowFilter } from "@next2d/filters";
3
- import { $getColorTransform, $getMatrix } from "@next2d/util";
4
- import { $Array, $Math, $MATRIX_ARRAY_IDENTITY, $COLOR_ARRAY_IDENTITY, $doUpdated, $getFloat32Array6, $getArray, $poolArray, $multiplicationColor, $multiplicationMatrix, $poolBoundsObject, $getFloat32Array8 } from "@next2d/share";
5
- /**
6
- * Transform クラスは、表示オブジェクトに適用されるカラー調整プロパティと 2 次元の変換オブジェクトへのアクセスを提供します。
7
- * 変換時に、表示オブジェクトのカラーまたは方向と位置が、現在の値または座標から新しい値または座標に調整(オフセット)されます。
8
- * Transform クラスは、表示オブジェクトおよびすべての親オブジェクトに適用されるカラー変換と 2 次元マトリックス変換に関するデータも収集します。
9
- * concatenatedColorTransform プロパティと concatenatedMatrix プロパティを使用して、これらの結合された変換にアクセスできます。
10
- * カラー変換を適用するには、ColorTransform オブジェクトを作成し、オブジェクトのメソッドとプロパティを使用してカラー調整を設定した後、
11
- * colorTransformation プロパティ(表示オブジェクトの transform プロパティの)を新しい ColorTransformation オブジェクトに割り当てます。
12
- * 2 次元変換を適用するには、Matrix オブジェクトを作成し、マトリックスの 2 次元変換を設定した後、表示オブジェクトの transform.matrix プロパティを新しい Matrix オブジェクトに割り当てます。
13
- *
14
- * The Transform class provides access to color adjustment properties and two--dimensional transformation objects that can be applied to a display object.
15
- * During the transformation, the color or the orientation and position of a display object is adjusted (offset) from the current values or coordinates to new values or coordinates.
16
- * The Transform class also collects data about color and two-dimensional matrix transformations that are applied to a display object and all of its parent objects.
17
- * You can access these combined transformations through the concatenatedColorTransform and concatenatedMatrix properties.
18
- * To apply color transformations: create a ColorTransform object,
19
- * set the color adjustments using the object's methods and properties,
20
- * and then assign the colorTransformation property of the transform property of the display object to the new ColorTransformation object.
21
- * To apply two-dimensional transformations: create a Matrix object,
22
- * set the matrix's two-dimensional transformation,
23
- * and then assign the transform.matrix property of the display object to the new Matrix object.
24
- *
25
- * @example <caption>Example usage of Transform.</caption>
26
- * // new Transform
27
- * const {Transform} = next2d.geom;
28
- * const transform = new Transform(displayObject);
29
- *
30
- * @class
31
- * @memberOf next2d.geom
32
- */
33
- export class Transform {
34
- /**
35
- * @param {DisplayObject} src
36
- *
37
- * @constructor
38
- * @public
39
- */
40
- constructor(src) {
41
- /**
42
- * @type {DisplayObject}
43
- * @private
44
- */
45
- this._$displayObject = src;
46
- /**
47
- * @type {Matrix}
48
- * @default null
49
- * @private
50
- */
51
- this._$matrix = null;
52
- /**
53
- * @type {ColorTransform}
54
- * @default null
55
- * @private
56
- */
57
- this._$colorTransform = null;
58
- /**
59
- * @type {string}
60
- * @default null
61
- * @private
62
- */
63
- this._$blendMode = null;
64
- /**
65
- * @type {array}
66
- * @default null
67
- * @private
68
- */
69
- this._$filters = null;
70
- }
71
- /**
72
- * 指定されたクラスのストリングを返します。
73
- * Returns the string representation of the specified class.
74
- *
75
- * @return {string}
76
- * @default [class Transform]
77
- * @method
78
- * @static
79
- */
80
- static toString() {
81
- return "[class Transform]";
82
- }
83
- /**
84
- * @description 指定されたクラスの空間名を返します。
85
- * Returns the space name of the specified class.
86
- *
87
- * @member {string}
88
- * @default next2d.geom.Transform
89
- * @const
90
- * @static
91
- */
92
- static get namespace() {
93
- return "next2d.geom.Transform";
94
- }
95
- /**
96
- * @description 指定されたオブジェクトのストリングを返します。
97
- * Returns the string representation of the specified object.
98
- *
99
- * @return {string}
100
- * @method
101
- * @public
102
- */
103
- toString() {
104
- return "[object Transform]";
105
- }
106
- /**
107
- * @description 指定されたオブジェクトの空間名を返します。
108
- * Returns the space name of the specified object.
109
- *
110
- * @member {string}
111
- * @default next2d.geom.Transform
112
- * @const
113
- * @public
114
- */
115
- get namespace() {
116
- return "next2d.geom.Transform";
117
- }
118
- /**
119
- * @description 表示オブジェクトのカラーを全体的に調整する値を格納している
120
- * ColorTransform オブジェクトです。
121
- * A ColorTransform object containing values that universally adjust
122
- * the colors in the display object.
123
- *
124
- * @member {ColorTransform}
125
- * @public
126
- */
127
- get colorTransform() {
128
- if (this._$colorTransform) {
129
- return this._$colorTransform._$clone();
130
- }
131
- const displayObject = this._$displayObject;
132
- const placeObject = displayObject._$placeObject || displayObject._$getPlaceObject();
133
- if (placeObject && placeObject.colorTransform) {
134
- const buffer = placeObject.colorTransform;
135
- return $getColorTransform(buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7]);
136
- }
137
- this._$transform();
138
- if (!this._$colorTransform) {
139
- this._$colorTransform = $getColorTransform();
140
- }
141
- return this._$colorTransform._$clone();
142
- }
143
- set colorTransform(color_transform) {
144
- this._$transform(null, color_transform._$colorTransform);
145
- }
146
- /**
147
- * @description この表示オブジェクトおよびルートレベルまでのすべての親オブジェクトに適用される、
148
- * 結合されたカラー変換を表す ColorTransform オブジェクトです。
149
- * A ColorTransform object representing
150
- * the combined color transformations applied to the display object
151
- * and all of its parent objects, back to the root level.
152
- *
153
- * @member {ColorTransform}
154
- * @readonly
155
- * @public
156
- */
157
- get concatenatedColorTransform() {
158
- let colorTransform = this._$rawColorTransform();
159
- let parent = this._$displayObject._$parent;
160
- while (parent) {
161
- colorTransform = $multiplicationColor(parent._$transform._$rawColorTransform(), colorTransform);
162
- parent = parent._$parent;
163
- }
164
- return $getColorTransform(colorTransform[0], colorTransform[1], colorTransform[2], colorTransform[3], colorTransform[4], colorTransform[5], colorTransform[6], colorTransform[7]);
165
- }
166
- /**
167
- * @description 表示オブジェクトの拡大 / 縮小、回転、および移動を変更する値を格納している
168
- * Matrix オブジェクトです。
169
- * A Matrix object containing values that alter the scaling,
170
- * rotation, and translation of the display object.
171
- *
172
- * @member {Matrix}
173
- * @public
174
- */
175
- get matrix() {
176
- if (this._$matrix) {
177
- return this._$matrix._$clone();
178
- }
179
- const displayObject = this._$displayObject;
180
- const placeObject = displayObject._$placeObject || displayObject._$getPlaceObject();
181
- if (placeObject && placeObject.matrix) {
182
- const buffer = placeObject.matrix;
183
- return $getMatrix(buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5]);
184
- }
185
- this._$transform();
186
- if (!this._$matrix) {
187
- this._$matrix = $getMatrix();
188
- }
189
- return this._$matrix._$clone();
190
- }
191
- set matrix(matrix) {
192
- this._$transform(matrix._$matrix, null);
193
- }
194
- /**
195
- * @description この表示オブジェクトおよびルートレベルまでのそのすべての親オブジェクトの結合された
196
- * 変換マトリックスを表す Matrix オブジェクトです。
197
- * A Matrix object representing the combined transformation matrixes
198
- * of the display object and all of its parent objects, back to the root level.
199
- *
200
- * @member {Matrix}
201
- * @readonly
202
- * @method
203
- * @public
204
- */
205
- get concatenatedMatrix() {
206
- let matrix = this._$rawMatrix();
207
- let parent = this._$displayObject._$parent;
208
- while (parent) {
209
- matrix = $multiplicationMatrix(parent._$transform._$rawMatrix(), matrix);
210
- parent = parent._$parent;
211
- }
212
- return $getMatrix(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
213
- }
214
- /**
215
- * @description ステージ上の表示オブジェクトの境界を示す矩形を定義する Transform オブジェクトです。
216
- * A Transform object that defines the bounding rectangle of
217
- * the display object on the stage.
218
- *
219
- * @member {Transform}
220
- * @readonly
221
- * @method
222
- * @public
223
- */
224
- pixelBounds() {
225
- if (!this._$displayObject) {
226
- return new Rectangle(0, 0, 0, 0);
227
- }
228
- const bounds = this
229
- ._$displayObject
230
- ._$getBounds(null);
231
- const rectangle = new Rectangle(bounds.xMin, bounds.yMin, +$Math.abs(bounds.xMax - bounds.xMin), +$Math.abs(bounds.yMax - bounds.yMin));
232
- $poolBoundsObject(bounds);
233
- return rectangle;
234
- }
235
- /**
236
- * matrix プロパティから取得される Matrix の Matrix._$matrix と同じ値を返しますが、matrix プロパティと異なり Matrix を複製しません。
237
- * 返される値は一時的に使用することのみできます。返される値の要素を直接更新してはいけません。返される値をプール(Util.$poolFloat32Array)してはいけません。
238
- *
239
- * @return {Float32Array}
240
- * @method
241
- * @private
242
- */
243
- _$rawMatrix() {
244
- if (this._$matrix !== null) {
245
- return this._$matrix._$matrix;
246
- }
247
- const displayObject = this._$displayObject;
248
- const placeObject = displayObject._$placeObject || displayObject._$getPlaceObject();
249
- if (placeObject && placeObject.matrix) {
250
- if ($Array.isArray(placeObject.matrix)) {
251
- const matrix = placeObject.matrix;
252
- placeObject.matrix = $getFloat32Array6(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
253
- $poolArray(matrix);
254
- }
255
- return placeObject.matrix;
256
- }
257
- return $MATRIX_ARRAY_IDENTITY;
258
- }
259
- /**
260
- * colorTransform プロパティから取得される ColorTransform の colorTransform._$colorTransform と同じ値を返しますが、colorTransform プロパティと異なり ColorTransform を複製しません。
261
- * 返される値は一時的に使用することのみできます。返される値の要素を直接更新してはいけません。返される値をプール(Util.$poolFloat32Array)してはいけません。
262
- *
263
- * @return {Float32Array}
264
- * @method
265
- * @private
266
- */
267
- _$rawColorTransform() {
268
- if (this._$colorTransform !== null) {
269
- return this._$colorTransform._$colorTransform;
270
- }
271
- const displayObject = this._$displayObject;
272
- const placeObject = displayObject._$placeObject || displayObject._$getPlaceObject();
273
- if (placeObject && placeObject.colorTransform) {
274
- if ($Array.isArray(placeObject.colorTransform)) {
275
- const colorTransform = placeObject.colorTransform;
276
- placeObject.colorTransform = $getFloat32Array8(colorTransform[0], colorTransform[1], colorTransform[2], colorTransform[3], colorTransform[4], colorTransform[5], colorTransform[6], colorTransform[7]);
277
- $poolArray(colorTransform);
278
- }
279
- return placeObject.colorTransform;
280
- }
281
- return $COLOR_ARRAY_IDENTITY;
282
- }
283
- /**
284
- * @param {Float32Array} [matrix=null]
285
- * @param {Float32Array} [color_transform=null]
286
- * @param {array} [filters=null]
287
- * @param {string} [blend_mode=""]
288
- * @return {void}
289
- * @method
290
- * @private
291
- */
292
- _$transform(matrix = null, color_transform = null, filters = null, blend_mode = "") {
293
- const displayObject = this._$displayObject;
294
- const placeObject = displayObject._$placeObject || displayObject._$getPlaceObject();
295
- // Matrix
296
- this._$setMatrix(matrix, placeObject);
297
- // ColorTransform
298
- this._$setColorTransform(color_transform, placeObject);
299
- // Filter
300
- this._$setFilters(filters, placeObject);
301
- // BlendMode
302
- this._$setBlendMode(blend_mode, placeObject);
303
- }
304
- /**
305
- * @param {Float32Array} [matrix=null]
306
- * @param {object} [place_object=null]
307
- * @return {void}
308
- * @method
309
- * @private
310
- */
311
- _$setMatrix(matrix = null, place_object = null) {
312
- if (matrix || place_object) {
313
- this._$displayObject._$doChanged();
314
- $doUpdated();
315
- }
316
- // Matrix
317
- if (!this._$matrix) {
318
- this._$matrix = $getMatrix(1, 0, 0, 1, 0, 0);
319
- if (!matrix
320
- && place_object
321
- && place_object.matrix) {
322
- matrix = place_object.matrix;
323
- }
324
- }
325
- // update
326
- if (matrix) {
327
- const currentMatrix = this._$matrix._$matrix;
328
- currentMatrix[0] = matrix[0];
329
- currentMatrix[1] = matrix[1];
330
- currentMatrix[2] = matrix[2];
331
- currentMatrix[3] = matrix[3];
332
- currentMatrix[4] = matrix[4];
333
- currentMatrix[5] = matrix[5];
334
- }
335
- }
336
- /**
337
- * @param {Float32Array} [color_transform=null]
338
- * @param {object} [place_object=null]
339
- * @return {void}
340
- * @method
341
- * @private
342
- */
343
- _$setColorTransform(color_transform = null, place_object = null) {
344
- if (color_transform || place_object) {
345
- this._$displayObject._$doChanged();
346
- $doUpdated();
347
- }
348
- if (!this._$colorTransform) {
349
- this._$colorTransform = $getColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
350
- if (!color_transform
351
- && place_object
352
- && place_object.colorTransform) {
353
- color_transform = place_object.colorTransform;
354
- }
355
- }
356
- if (color_transform) {
357
- const colorTransform = this._$colorTransform._$colorTransform;
358
- colorTransform[0] = color_transform[0];
359
- colorTransform[1] = color_transform[1];
360
- colorTransform[2] = color_transform[2];
361
- colorTransform[3] = color_transform[3];
362
- colorTransform[4] = color_transform[4];
363
- colorTransform[5] = color_transform[5];
364
- colorTransform[6] = color_transform[6];
365
- colorTransform[7] = color_transform[7];
366
- }
367
- }
368
- /**
369
- * @param {array} [filters=null]
370
- * @param {object} [place_object=null]
371
- * @return {void}
372
- * @method
373
- * @private
374
- */
375
- _$setFilters(filters = null, place_object = null) {
376
- if ($Array.isArray(filters)) {
377
- if (this._$filters) {
378
- $poolArray(this._$filters);
379
- }
380
- this._$filters = filters.slice(0);
381
- this._$displayObject._$doChanged();
382
- $doUpdated();
383
- return;
384
- }
385
- if (this._$filters) {
386
- return;
387
- }
388
- if (!place_object) {
389
- this._$filters = $getArray();
390
- return;
391
- }
392
- if (place_object.filters) {
393
- this._$filters = place_object.filters.slice(0);
394
- for (let idx = 0; idx < this._$filters.length; ++idx) {
395
- this._$filters[idx] = this._$filters[idx].clone();
396
- }
397
- return;
398
- }
399
- if (place_object.surfaceFilterList) {
400
- // build origin
401
- place_object.filters = this._$buildFilter(place_object.surfaceFilterList);
402
- // use clone
403
- this._$filters = place_object.filters.slice(0);
404
- for (let idx = 0; idx < this._$filters.length; ++idx) {
405
- this._$filters[idx] = this._$filters[idx].clone();
406
- }
407
- }
408
- }
409
- /**
410
- * @param {array} surface_filter_list
411
- * @return {array}
412
- * @method
413
- * @public
414
- */
415
- _$buildFilter(surface_filter_list) {
416
- const filters = $getArray();
417
- const length = surface_filter_list.length;
418
- for (let idx = 0; idx < length; ++idx) {
419
- const filter = surface_filter_list[idx];
420
- if (filter.params[0] === null) {
421
- filter.params.shift();
422
- }
423
- switch (filter.class) {
424
- case "BevelFilter":
425
- filters.push(new BevelFilter(...filter.params));
426
- break;
427
- case "BlurFilter":
428
- filters.push(new BlurFilter(...filter.params));
429
- break;
430
- case "ColorMatrixFilter":
431
- filters.push(new ColorMatrixFilter(...filter.params));
432
- break;
433
- case "ConvolutionFilter":
434
- filters.push(new ConvolutionFilter(...filter.params));
435
- break;
436
- case "DisplacementMapFilter":
437
- filters.push(new DisplacementMapFilter(...filter.params));
438
- break;
439
- case "DropShadowFilter":
440
- filters.push(new DropShadowFilter(...filter.params));
441
- break;
442
- case "GlowFilter":
443
- filters.push(new GlowFilter(...filter.params));
444
- break;
445
- case "GradientBevelFilter":
446
- filters.push(new GradientBevelFilter(...filter.params));
447
- break;
448
- case "GradientGlowFilter":
449
- filters.push(new GradientGlowFilter(...filter.params));
450
- break;
451
- }
452
- }
453
- return filters;
454
- }
455
- /**
456
- * @param {string} [blend_mode=""]
457
- * @param {object} [place_object=null]
458
- * @return {void}
459
- * @method
460
- * @private
461
- */
462
- _$setBlendMode(blend_mode = "", place_object = null) {
463
- if (blend_mode) {
464
- this._$blendMode = blend_mode;
465
- this._$displayObject._$doChanged();
466
- $doUpdated();
467
- return;
468
- }
469
- if (this._$blendMode) {
470
- return;
471
- }
472
- if (place_object && place_object.blendMode) {
473
- this._$blendMode = place_object.blendMode;
474
- return;
475
- }
476
- this._$blendMode = "normal";
477
- }
478
- }