@next2d/filters 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 (118) hide show
  1. package/package.json +8 -20
  2. package/src/BevelFilter/service/BevelFilterCanApplyFilterService.d.ts +11 -0
  3. package/src/BevelFilter/service/BevelFilterCanApplyFilterService.js +16 -0
  4. package/src/BevelFilter/service/BevelFilterToArrayService.d.ts +11 -0
  5. package/src/BevelFilter/service/BevelFilterToArrayService.js +26 -0
  6. package/src/BevelFilter/service/BevelFilterToNumberArrayService.d.ts +11 -0
  7. package/src/BevelFilter/service/BevelFilterToNumberArrayService.js +27 -0
  8. package/src/BevelFilter/usecase/BevelFilterGetBoundsUseCase.d.ts +10 -0
  9. package/src/BevelFilter/usecase/BevelFilterGetBoundsUseCase.js +29 -0
  10. package/{dist → src}/BevelFilter.d.ts +117 -84
  11. package/src/BevelFilter.js +513 -0
  12. package/src/BitmapFilter.d.ts +50 -0
  13. package/src/BitmapFilter.js +61 -0
  14. package/src/BlurFilter/service/BlurFilterCanApplyFilterService.d.ts +16 -0
  15. package/src/BlurFilter/service/BlurFilterCanApplyFilterService.js +12 -0
  16. package/src/BlurFilter/service/BlurFilterToArrayService.d.ts +11 -0
  17. package/src/BlurFilter/service/BlurFilterToArrayService.js +17 -0
  18. package/src/BlurFilter/service/BlurFilterToNumberArrayService.d.ts +11 -0
  19. package/src/BlurFilter/service/BlurFilterToNumberArrayService.js +17 -0
  20. package/src/BlurFilter/usecase/BlurFilterGetBoundsUseCase.d.ts +17 -0
  21. package/src/BlurFilter/usecase/BlurFilterGetBoundsUseCase.js +29 -0
  22. package/src/BlurFilter.d.ts +142 -0
  23. package/src/BlurFilter.js +213 -0
  24. package/src/ColorMatrixFilter/service/ColorMatrixFilterToArrayService.d.ts +11 -0
  25. package/src/ColorMatrixFilter/service/ColorMatrixFilterToArrayService.js +15 -0
  26. package/src/ColorMatrixFilter/service/ColorMatrixFilterToNumberArrayService.d.ts +11 -0
  27. package/src/ColorMatrixFilter/service/ColorMatrixFilterToNumberArrayService.js +15 -0
  28. package/src/ColorMatrixFilter.d.ts +78 -0
  29. package/src/ColorMatrixFilter.js +129 -0
  30. package/src/ConvolutionFilter/service/ConvolutionFilterCanApplyFilterService.d.ts +11 -0
  31. package/src/ConvolutionFilter/service/ConvolutionFilterCanApplyFilterService.js +13 -0
  32. package/src/ConvolutionFilter/service/ConvolutionFilterToArrayService.d.ts +11 -0
  33. package/src/ConvolutionFilter/service/ConvolutionFilterToArrayService.js +23 -0
  34. package/src/ConvolutionFilter/service/ConvolutionFilterToNumberArrayService.d.ts +11 -0
  35. package/src/ConvolutionFilter/service/ConvolutionFilterToNumberArrayService.js +24 -0
  36. package/{dist → src}/ConvolutionFilter.d.ts +75 -63
  37. package/{dist → src}/ConvolutionFilter.js +148 -126
  38. package/src/DisplacementMapFilter/service/DisplacementMapFilterCanApplyFilterService.d.ts +11 -0
  39. package/src/DisplacementMapFilter/service/DisplacementMapFilterCanApplyFilterService.js +16 -0
  40. package/src/DisplacementMapFilter/service/DisplacementMapFilterToArrayService.d.ts +11 -0
  41. package/src/DisplacementMapFilter/service/DisplacementMapFilterToArrayService.js +28 -0
  42. package/src/DisplacementMapFilter/service/DisplacementMapFilterToNumberArrayService.d.ts +11 -0
  43. package/src/DisplacementMapFilter/service/DisplacementMapFilterToNumberArrayService.js +36 -0
  44. package/src/DisplacementMapFilter.d.ts +274 -0
  45. package/src/DisplacementMapFilter.js +481 -0
  46. package/src/DropShadowFilter/service/DropShadowFilterCanApplyFilterService.d.ts +11 -0
  47. package/src/DropShadowFilter/service/DropShadowFilterCanApplyFilterService.js +16 -0
  48. package/src/DropShadowFilter/service/DropShadowFilterToArrayService.d.ts +11 -0
  49. package/src/DropShadowFilter/service/DropShadowFilterToArrayService.js +25 -0
  50. package/src/DropShadowFilter/service/DropShadowFilterToNumberArrayService.d.ts +11 -0
  51. package/src/DropShadowFilter/service/DropShadowFilterToNumberArrayService.js +25 -0
  52. package/src/DropShadowFilter/usecase/DropShadowFilterGetBoundsUseCase.d.ts +10 -0
  53. package/src/DropShadowFilter/usecase/DropShadowFilterGetBoundsUseCase.js +33 -0
  54. package/{dist → src}/DropShadowFilter.d.ts +98 -73
  55. package/src/DropShadowFilter.js +466 -0
  56. package/src/FilterUtil.d.ts +36 -0
  57. package/src/FilterUtil.js +60 -0
  58. package/src/GlowFilter/service/GlowFilterCanApplyFilterService.d.ts +11 -0
  59. package/src/GlowFilter/service/GlowFilterCanApplyFilterService.js +16 -0
  60. package/src/GlowFilter/service/GlowFilterToArrayService.d.ts +11 -0
  61. package/src/GlowFilter/service/GlowFilterToArrayService.js +22 -0
  62. package/src/GlowFilter/service/GlowFilterToNumberArrayService.d.ts +11 -0
  63. package/src/GlowFilter/service/GlowFilterToNumberArrayService.js +22 -0
  64. package/src/GlowFilter/usecase/GlowFilterGetBoundsUseCase.d.ts +10 -0
  65. package/src/GlowFilter/usecase/GlowFilterGetBoundsUseCase.js +19 -0
  66. package/{dist → src}/GlowFilter.d.ts +84 -74
  67. package/src/GlowFilter.js +367 -0
  68. package/src/GradientBevelFilter/service/GradientBevelFilterCanApplyFilterService.d.ts +11 -0
  69. package/src/GradientBevelFilter/service/GradientBevelFilterCanApplyFilterService.js +19 -0
  70. package/src/GradientBevelFilter/service/GradientBevelFilterToArrayService.d.ts +11 -0
  71. package/src/GradientBevelFilter/service/GradientBevelFilterToArrayService.js +25 -0
  72. package/src/GradientBevelFilter/service/GradientBevelFilterToNumberArrayService.d.ts +11 -0
  73. package/src/GradientBevelFilter/service/GradientBevelFilterToNumberArrayService.js +29 -0
  74. package/src/GradientBevelFilter/usecase/GradientBevelFilterGetBoundsUseCase.d.ts +10 -0
  75. package/src/GradientBevelFilter/usecase/GradientBevelFilterGetBoundsUseCase.js +29 -0
  76. package/{dist → src}/GradientBevelFilter.d.ts +102 -77
  77. package/src/GradientBevelFilter.js +482 -0
  78. package/src/GradientGlowFilter/service/GradientGlowFilterCanApplyFilterService.d.ts +11 -0
  79. package/src/GradientGlowFilter/service/GradientGlowFilterCanApplyFilterService.js +19 -0
  80. package/src/GradientGlowFilter/service/GradientGlowFilterToArrayService.d.ts +11 -0
  81. package/src/GradientGlowFilter/service/GradientGlowFilterToArrayService.js +25 -0
  82. package/src/GradientGlowFilter/service/GradientGlowFilterToNumberArrayService.d.ts +11 -0
  83. package/src/GradientGlowFilter/service/GradientGlowFilterToNumberArrayService.js +29 -0
  84. package/src/GradientGlowFilter/usecase/GradientGlowFilterGetBoundsUseCase.d.ts +10 -0
  85. package/src/GradientGlowFilter/usecase/GradientGlowFilterGetBoundsUseCase.js +19 -0
  86. package/{dist → src}/GradientGlowFilter.d.ts +102 -78
  87. package/src/GradientGlowFilter.js +480 -0
  88. package/src/interface/IBitmapDataChannel.d.ts +1 -0
  89. package/src/interface/IBitmapFilterType.d.ts +1 -0
  90. package/{dist/interface/BoundsImpl.d.ts → src/interface/IBounds.d.ts} +1 -1
  91. package/src/interface/IDisplacementMapFilterMode.d.ts +1 -0
  92. package/src/interface/IFilterQuality.d.ts +1 -0
  93. package/dist/BevelFilter.js +0 -504
  94. package/dist/BitmapFilter.d.ts +0 -75
  95. package/dist/BitmapFilter.js +0 -95
  96. package/dist/BlurFilter.d.ts +0 -150
  97. package/dist/BlurFilter.js +0 -375
  98. package/dist/ColorMatrixFilter.d.ts +0 -116
  99. package/dist/ColorMatrixFilter.js +0 -179
  100. package/dist/DisplacementMapFilter.d.ts +0 -211
  101. package/dist/DisplacementMapFilter.js +0 -368
  102. package/dist/DropShadowFilter.js +0 -475
  103. package/dist/GlowFilter.js +0 -356
  104. package/dist/GradientBevelFilter.js +0 -490
  105. package/dist/GradientGlowFilter.js +0 -480
  106. package/dist/interface/AttachmentImpl.d.ts +0 -11
  107. package/dist/interface/BitmapDataChannelImpl.d.ts +0 -1
  108. package/dist/interface/BitmapFilterTypeImpl.d.ts +0 -1
  109. package/dist/interface/DisplacementMapFilterModeImpl.d.ts +0 -1
  110. package/dist/interface/FilterQualityImpl.d.ts +0 -1
  111. package/dist/interface/FilterQualityImpl.js +0 -1
  112. /package/{dist → src}/index.d.ts +0 -0
  113. /package/{dist → src}/index.js +0 -0
  114. /package/{dist/interface/AttachmentImpl.js → src/interface/IBitmapDataChannel.js} +0 -0
  115. /package/{dist/interface/BitmapDataChannelImpl.js → src/interface/IBitmapFilterType.js} +0 -0
  116. /package/{dist/interface/BitmapFilterTypeImpl.js → src/interface/IBounds.js} +0 -0
  117. /package/{dist/interface/BoundsImpl.js → src/interface/IDisplacementMapFilterMode.js} +0 -0
  118. /package/{dist/interface/DisplacementMapFilterModeImpl.js → src/interface/IFilterQuality.js} +0 -0
@@ -0,0 +1,481 @@
1
+ import { BitmapFilter } from "./BitmapFilter";
2
+ import { execute as displacementMapFilterCanApplyFilterService } from "./DisplacementMapFilter/service/DisplacementMapFilterCanApplyFilterService";
3
+ import { execute as displacementMapFilterToArrayService } from "./DisplacementMapFilter/service/DisplacementMapFilterToArrayService";
4
+ import { execute as displacementMapFilterToNumberArrayService } from "./DisplacementMapFilter/service/DisplacementMapFilterToNumberArrayService";
5
+ import { $clamp, $convertColorStringToNumber } from "./FilterUtil";
6
+ /**
7
+ * @description DisplacementMapFilter クラスは、指定された BitmapData オブジェクト(置き換えマップイメージと言います)
8
+ * のピクセル値を使用して、オブジェクトの置き換え(変位)を実行します。
9
+ *
10
+ * The DisplacementMapFilter class uses the pixel values from the specified
11
+ * BitmapData object (called the displacement map image) to perform a displacement of an object.
12
+ *
13
+ * @class
14
+ * @memberOf next2d.filters
15
+ * @extends BitmapFilter
16
+ */
17
+ export class DisplacementMapFilter extends BitmapFilter {
18
+ /**
19
+ * @param {Uint8Array} [bitmap_buffer = null]
20
+ * @param {number} [bitmap_width = 0]
21
+ * @param {number} [bitmap_height = 0]
22
+ * @param {number} [map_point_x = 0]
23
+ * @param {number} [map_point_y = 0]
24
+ * @param {number} [component_x = 0]
25
+ * @param {number} [component_y = 0]
26
+ * @param {number} [scale_x = 0.0]
27
+ * @param {number} [scale_y = 0.0]
28
+ * @param {string} [mode = DisplacementMapFilterMode.WRAP]
29
+ * @param {number} [color = 0]
30
+ * @param {number} [alpha = 0.0]
31
+ *
32
+ * @constructor
33
+ * @public
34
+ */
35
+ constructor(bitmap_buffer = null, bitmap_width = 0, bitmap_height = 0, map_point_x = 0, map_point_y = 0, component_x = 0, component_y = 0, scale_x = 0, scale_y = 0, mode = "wrap", color = 0, alpha = 0) {
36
+ super();
37
+ /**
38
+ * @description フィルター認識番号
39
+ * Filter Recognition Number
40
+ *
41
+ * @member {number}
42
+ * @public
43
+ */
44
+ Object.defineProperty(this, "$filterType", {
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true,
48
+ value: 4
49
+ });
50
+ /**
51
+ * @type {Uint8Array}
52
+ * @default null
53
+ * @private
54
+ */
55
+ Object.defineProperty(this, "_$bitmapBuffer", {
56
+ enumerable: true,
57
+ configurable: true,
58
+ writable: true,
59
+ value: void 0
60
+ });
61
+ /**
62
+ * @type {number}
63
+ * @default 0
64
+ * @private
65
+ */
66
+ Object.defineProperty(this, "_$bitmapWidth", {
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true,
70
+ value: void 0
71
+ });
72
+ /**
73
+ * @type {number}
74
+ * @default 0
75
+ * @private
76
+ */
77
+ Object.defineProperty(this, "_$bitmapHeight", {
78
+ enumerable: true,
79
+ configurable: true,
80
+ writable: true,
81
+ value: void 0
82
+ });
83
+ /**
84
+ * @type {number}
85
+ * @default 0
86
+ * @private
87
+ */
88
+ Object.defineProperty(this, "_$mapPointX", {
89
+ enumerable: true,
90
+ configurable: true,
91
+ writable: true,
92
+ value: void 0
93
+ });
94
+ /**
95
+ * @type {number}
96
+ * @default 0
97
+ * @private
98
+ */
99
+ Object.defineProperty(this, "_$mapPointY", {
100
+ enumerable: true,
101
+ configurable: true,
102
+ writable: true,
103
+ value: void 0
104
+ });
105
+ /**
106
+ * @type {number}
107
+ * @default 0
108
+ * @private
109
+ */
110
+ Object.defineProperty(this, "_$componentX", {
111
+ enumerable: true,
112
+ configurable: true,
113
+ writable: true,
114
+ value: void 0
115
+ });
116
+ /**
117
+ * @type {number}
118
+ * @default 0
119
+ * @private
120
+ */
121
+ Object.defineProperty(this, "_$componentY", {
122
+ enumerable: true,
123
+ configurable: true,
124
+ writable: true,
125
+ value: void 0
126
+ });
127
+ /**
128
+ * @type {number}
129
+ * @default 0
130
+ * @private
131
+ */
132
+ Object.defineProperty(this, "_$scaleX", {
133
+ enumerable: true,
134
+ configurable: true,
135
+ writable: true,
136
+ value: void 0
137
+ });
138
+ /**
139
+ * @type {number}
140
+ * @default 0
141
+ * @private
142
+ */
143
+ Object.defineProperty(this, "_$scaleY", {
144
+ enumerable: true,
145
+ configurable: true,
146
+ writable: true,
147
+ value: void 0
148
+ });
149
+ /**
150
+ * @type {string}
151
+ * @default "wrap"
152
+ * @private
153
+ */
154
+ Object.defineProperty(this, "_$mode", {
155
+ enumerable: true,
156
+ configurable: true,
157
+ writable: true,
158
+ value: void 0
159
+ });
160
+ /**
161
+ * @type {number}
162
+ * @default 0
163
+ * @private
164
+ */
165
+ Object.defineProperty(this, "_$color", {
166
+ enumerable: true,
167
+ configurable: true,
168
+ writable: true,
169
+ value: void 0
170
+ });
171
+ /**
172
+ * @type {number}
173
+ * @default 0
174
+ * @private
175
+ */
176
+ Object.defineProperty(this, "_$alpha", {
177
+ enumerable: true,
178
+ configurable: true,
179
+ writable: true,
180
+ value: void 0
181
+ });
182
+ // default
183
+ this._$bitmapBuffer = null;
184
+ this._$bitmapWidth = 0;
185
+ this._$bitmapHeight = 0;
186
+ this._$mapPointX = 0;
187
+ this._$mapPointY = 0;
188
+ this._$componentX = 0;
189
+ this._$componentY = 0;
190
+ this._$scaleX = 0;
191
+ this._$scaleY = 0;
192
+ this._$mode = "wrap";
193
+ this._$color = 0;
194
+ this._$alpha = 0;
195
+ // setup
196
+ this.bitmapBuffer = bitmap_buffer;
197
+ this.bitmapWidth = bitmap_width;
198
+ this.bitmapHeight = bitmap_height;
199
+ this.mapPointX = map_point_x;
200
+ this.mapPointY = map_point_y;
201
+ this.componentX = component_x;
202
+ this.componentY = component_y;
203
+ this.scaleX = scale_x;
204
+ this.scaleY = scale_y;
205
+ this.mode = mode;
206
+ this.color = color;
207
+ this.alpha = alpha;
208
+ }
209
+ /**
210
+ * @description アルファ透明度の値です。
211
+ * The alpha transparency value for the color.
212
+ *
213
+ * @member {number}
214
+ * @default 0
215
+ * @public
216
+ */
217
+ get alpha() {
218
+ return this._$alpha;
219
+ }
220
+ set alpha(alpha) {
221
+ alpha = $clamp(+alpha, 0, 1, 0);
222
+ if (alpha === this._$alpha) {
223
+ return;
224
+ }
225
+ this._$alpha = alpha;
226
+ this.$updated = true;
227
+ }
228
+ /**
229
+ * @description 範囲外置き換えの場合に使用する色を指定します。
230
+ * Specifies what color to use for out-of-bounds displacements.
231
+ *
232
+ * @member {number}
233
+ * @default 0
234
+ * @public
235
+ */
236
+ get color() {
237
+ return this._$color;
238
+ }
239
+ set color(color) {
240
+ color = $clamp(typeof color === "string"
241
+ ? $convertColorStringToNumber(color)
242
+ : color, 0, 0xffffff, 0);
243
+ if (color === this._$color) {
244
+ return;
245
+ }
246
+ this._$color = color;
247
+ this.$updated = true;
248
+ }
249
+ /**
250
+ * @description x の結果を変位させる場合にどのカラーチャンネルをマップイメージで使用するかを指定します。
251
+ * Describes which color channel to use in the map image to displace the x result.
252
+ *
253
+ * @member {number}
254
+ * @default 0
255
+ * @public
256
+ */
257
+ get componentX() {
258
+ return this._$componentX;
259
+ }
260
+ set componentX(component_x) {
261
+ if (component_x === this._$componentX) {
262
+ return;
263
+ }
264
+ this._$componentX = component_x;
265
+ this.$updated = true;
266
+ }
267
+ /**
268
+ * @description y の結果を変位させる場合にどのカラーチャンネルをマップイメージで使用するかを指定します。
269
+ * Describes which color channel to use in the map image to displace the y result.
270
+ *
271
+ * @member {number}
272
+ * @default 0
273
+ * @public
274
+ */
275
+ get componentY() {
276
+ return this._$componentY;
277
+ }
278
+ set componentY(component_y) {
279
+ if (component_y === this._$componentY) {
280
+ return;
281
+ }
282
+ this._$componentY = component_y;
283
+ this.$updated = true;
284
+ }
285
+ /**
286
+ * @description 置き換えマップデータが含まれる BitmapData オブジェクトです。
287
+ * A BitmapData object containing the displacement map data.
288
+ *
289
+ * @member {HTMLImageElement}
290
+ * @default null
291
+ * @public
292
+ */
293
+ get bitmapBuffer() {
294
+ return this._$bitmapBuffer;
295
+ }
296
+ set bitmapBuffer(bitmap_buffer) {
297
+ if (bitmap_buffer === this._$bitmapBuffer) {
298
+ return;
299
+ }
300
+ this._$bitmapBuffer = bitmap_buffer;
301
+ this.$updated = true;
302
+ }
303
+ /**
304
+ * @description 置き換えマップデータの幅です。
305
+ * The width of the displacement map image.
306
+ *
307
+ * @member {number}
308
+ * @default 0
309
+ * @public
310
+ */
311
+ get bitmapWidth() {
312
+ return this._$bitmapWidth;
313
+ }
314
+ set bitmapWidth(bitmap_width) {
315
+ if (bitmap_width === this._$bitmapWidth) {
316
+ return;
317
+ }
318
+ this._$bitmapWidth = bitmap_width;
319
+ this.$updated = true;
320
+ }
321
+ /**
322
+ * @description 置き換えマップデータの高さです。
323
+ * The height of the displacement map image.
324
+ *
325
+ * @member {number}
326
+ * @default 0
327
+ * @public
328
+ */
329
+ get bitmapHeight() {
330
+ return this._$bitmapHeight;
331
+ }
332
+ set bitmapHeight(bitmap_height) {
333
+ if (bitmap_height === this._$bitmapHeight) {
334
+ return;
335
+ }
336
+ this._$bitmapHeight = bitmap_height;
337
+ this.$updated = true;
338
+ }
339
+ /**
340
+ * @description マップイメージの左上隅を基準としたターゲット表示オブジェクトの
341
+ * 左上隅のオフセットが含まれる値です。
342
+ * A value that contains the offset of the upper-left corner
343
+ * of the target display object from the upper-left corner of the map image.
344
+ *
345
+ * @member {number}
346
+ * @default 0
347
+ * @public
348
+ */
349
+ get mapPointX() {
350
+ return this._$mapPointX;
351
+ }
352
+ set mapPointX(map_point_x) {
353
+ if (map_point_x === this._$mapPointX) {
354
+ return;
355
+ }
356
+ this._$mapPointX = map_point_x;
357
+ this.$updated = true;
358
+ }
359
+ /**
360
+ * @description マップイメージの左上隅を基準としたターゲット表示オブジェクトの
361
+ * 左上隅のオフセットが含まれる値です。
362
+ * A value that contains the offset of the upper-left corner
363
+ * of the target display object from the upper-left corner of the map image.
364
+ *
365
+ * @member {number}
366
+ * @default 0
367
+ * @public
368
+ */
369
+ get mapPointY() {
370
+ return this._$mapPointY;
371
+ }
372
+ set mapPointY(map_point_y) {
373
+ if (map_point_y === this._$mapPointY) {
374
+ return;
375
+ }
376
+ this._$mapPointY = map_point_y;
377
+ this.$updated = true;
378
+ }
379
+ /**
380
+ * @description フィルターのモードです。
381
+ * The mode for the filter.
382
+ *
383
+ * @member {string}
384
+ * @default DisplacementMapFilterMode.WRAP
385
+ * @public
386
+ */
387
+ get mode() {
388
+ return this._$mode;
389
+ }
390
+ set mode(mode) {
391
+ if (mode === this._$mode) {
392
+ return;
393
+ }
394
+ this._$mode = mode;
395
+ this.$updated = true;
396
+ }
397
+ /**
398
+ * @description マップ計算の x 置き換え結果を拡大 / 縮小する場合に使用する乗数です。
399
+ * The multiplier to use to scale the x displacement result from the map calculation.
400
+ *
401
+ * @member {number}
402
+ * @default 0
403
+ * @public
404
+ */
405
+ get scaleX() {
406
+ return this._$scaleX;
407
+ }
408
+ set scaleX(scale_x) {
409
+ scale_x = $clamp(+scale_x, -0xffff, 0xffff, 0);
410
+ if (scale_x === this._$scaleX) {
411
+ return;
412
+ }
413
+ this._$scaleX = scale_x;
414
+ this.$updated = true;
415
+ }
416
+ /**
417
+ * @description マップ計算の y 置き換え結果を拡大 / 縮小する場合に使用する乗数です。
418
+ * The multiplier to use to scale the y displacement result from the map calculation.
419
+ *
420
+ * @member {number}
421
+ * @default 0
422
+ * @public
423
+ */
424
+ get scaleY() {
425
+ return this._$scaleY;
426
+ }
427
+ set scaleY(scale_y) {
428
+ scale_y = $clamp(+scale_y, -0xffff, 0xffff, 0);
429
+ if (scale_y === this._$scaleY) {
430
+ return;
431
+ }
432
+ this._$scaleY = scale_y;
433
+ this.$updated = true;
434
+ }
435
+ /**
436
+ * @description オブジェクトのコピーを返します。
437
+ * Returns a copy of this filter object.
438
+ *
439
+ * @return {DisplacementMapFilter}
440
+ * @method
441
+ * @public
442
+ */
443
+ clone() {
444
+ return new DisplacementMapFilter(this._$bitmapBuffer
445
+ ? this._$bitmapBuffer.slice()
446
+ : null, this._$bitmapWidth, this._$bitmapHeight, this._$mapPointX, this._$mapPointX, this._$componentX, this._$componentY, this._$scaleX, this._$scaleY, this._$mode, this._$color, this._$alpha);
447
+ }
448
+ /**
449
+ * @description 設定されたフィルターの値を配列で返します。
450
+ * Returns the value of the specified filter as an array.
451
+ *
452
+ * @return {array}
453
+ * @method
454
+ * @public
455
+ */
456
+ toArray() {
457
+ return displacementMapFilterToArrayService(this);
458
+ }
459
+ /**
460
+ * @description 設定されたフィルターの値を数値配列で返します。
461
+ * Returns the value of the specified filter as a number array.
462
+ *
463
+ * @return {Float32Array}
464
+ * @method
465
+ * @public
466
+ */
467
+ toNumberArray() {
468
+ return displacementMapFilterToNumberArrayService(this);
469
+ }
470
+ /**
471
+ * @description フィルターを適用できるかどうかを返します。
472
+ * Returns whether the filter can be applied.
473
+ *
474
+ * @return {boolean}
475
+ * @method
476
+ * @public
477
+ */
478
+ canApplyFilter() {
479
+ return displacementMapFilterCanApplyFilterService(this);
480
+ }
481
+ }
@@ -0,0 +1,11 @@
1
+ import type { DropShadowFilter } from "../../DropShadowFilter";
2
+ /**
3
+ * @description フィルターを適用できるかどうかを返します。
4
+ * Returns whether the filter can be applied.
5
+ *
6
+ * @param {DropShadowFilter} drop_shadow_filter
7
+ * @return {boolean}
8
+ * @method
9
+ * @private
10
+ */
11
+ export declare const execute: (drop_shadow_filter: DropShadowFilter) => boolean;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @description フィルターを適用できるかどうかを返します。
3
+ * Returns whether the filter can be applied.
4
+ *
5
+ * @param {DropShadowFilter} drop_shadow_filter
6
+ * @return {boolean}
7
+ * @method
8
+ * @private
9
+ */
10
+ export const execute = (drop_shadow_filter) => {
11
+ return drop_shadow_filter.alpha > 0
12
+ && drop_shadow_filter.strength !== 0
13
+ && drop_shadow_filter.blurX > 0
14
+ && drop_shadow_filter.blurY > 0
15
+ && drop_shadow_filter.quality > 0;
16
+ };
@@ -0,0 +1,11 @@
1
+ import type { DropShadowFilter } from "../../DropShadowFilter";
2
+ /**
3
+ * @description フィルターの設定値を配列で返却します。
4
+ * Returns an array of filter settings.
5
+ *
6
+ * @param {DropShadowFilter} drop_shadow_filter
7
+ * @return {Array<number | boolean>}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export declare const execute: (drop_shadow_filter: DropShadowFilter) => Array<number | boolean>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @description フィルターの設定値を配列で返却します。
3
+ * Returns an array of filter settings.
4
+ *
5
+ * @param {DropShadowFilter} drop_shadow_filter
6
+ * @return {Array<number | boolean>}
7
+ * @method
8
+ * @protected
9
+ */
10
+ export const execute = (drop_shadow_filter) => {
11
+ return [
12
+ drop_shadow_filter.$filterType,
13
+ drop_shadow_filter.distance,
14
+ drop_shadow_filter.angle,
15
+ drop_shadow_filter.color,
16
+ drop_shadow_filter.alpha,
17
+ drop_shadow_filter.blurX,
18
+ drop_shadow_filter.blurY,
19
+ drop_shadow_filter.strength,
20
+ drop_shadow_filter.quality,
21
+ drop_shadow_filter.inner,
22
+ drop_shadow_filter.knockout,
23
+ drop_shadow_filter.hideObject
24
+ ];
25
+ };
@@ -0,0 +1,11 @@
1
+ import type { DropShadowFilter } from "../../DropShadowFilter";
2
+ /**
3
+ * @description フィルターの設定値を数値配列で返却します。
4
+ * Returns a numeric array of filter settings.
5
+ *
6
+ * @param {DropShadowFilter} drop_shadow_filter
7
+ * @return {Float32Array}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export declare const execute: (drop_shadow_filter: DropShadowFilter) => Float32Array;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @description フィルターの設定値を数値配列で返却します。
3
+ * Returns a numeric array of filter settings.
4
+ *
5
+ * @param {DropShadowFilter} drop_shadow_filter
6
+ * @return {Float32Array}
7
+ * @method
8
+ * @protected
9
+ */
10
+ export const execute = (drop_shadow_filter) => {
11
+ return new Float32Array([
12
+ drop_shadow_filter.$filterType,
13
+ drop_shadow_filter.distance,
14
+ drop_shadow_filter.angle,
15
+ drop_shadow_filter.color,
16
+ drop_shadow_filter.alpha,
17
+ drop_shadow_filter.blurX,
18
+ drop_shadow_filter.blurY,
19
+ drop_shadow_filter.strength,
20
+ drop_shadow_filter.quality,
21
+ +drop_shadow_filter.inner,
22
+ +drop_shadow_filter.knockout,
23
+ +drop_shadow_filter.hideObject
24
+ ]);
25
+ };
@@ -0,0 +1,10 @@
1
+ import type { DropShadowFilter } from "../../DropShadowFilter";
2
+ /**
3
+ * @description Filterの描画後の描画範囲を返却
4
+ * Returns the drawing range after drawing Filter
5
+ *
6
+ * @param {DropShadowFilter} drop_shadow_filter
7
+ * @param {Float32Array} bounds
8
+ * @return {Float32Array}
9
+ */
10
+ export declare const execute: (drop_shadow_filter: DropShadowFilter, bounds: Float32Array) => Float32Array;
@@ -0,0 +1,33 @@
1
+ import { $Deg2Rad } from "../../FilterUtil";
2
+ import { execute as dropShadowFilterCanApplyFilterService } from "../service/DropShadowFilterCanApplyFilterService";
3
+ import { execute as blurFilterGetBoundsUseCase } from "../../BlurFilter/usecase/BlurFilterGetBoundsUseCase";
4
+ /**
5
+ * @description Filterの描画後の描画範囲を返却
6
+ * Returns the drawing range after drawing Filter
7
+ *
8
+ * @param {DropShadowFilter} drop_shadow_filter
9
+ * @param {Float32Array} bounds
10
+ * @return {Float32Array}
11
+ */
12
+ export const execute = (drop_shadow_filter, bounds) => {
13
+ if (!dropShadowFilterCanApplyFilterService(drop_shadow_filter)) {
14
+ return bounds;
15
+ }
16
+ if (drop_shadow_filter.inner) {
17
+ return bounds;
18
+ }
19
+ blurFilterGetBoundsUseCase(drop_shadow_filter, bounds);
20
+ const radian = drop_shadow_filter.angle * $Deg2Rad;
21
+ const distance = drop_shadow_filter.distance;
22
+ const x = Math.cos(radian) * distance;
23
+ const y = Math.sin(radian) * distance;
24
+ bounds[0] = Math.min(bounds[0], x);
25
+ if (x > 0) {
26
+ bounds[2] += x;
27
+ }
28
+ bounds[1] = Math.min(bounds[1], y);
29
+ if (y > 0) {
30
+ bounds[3] += y;
31
+ }
32
+ return bounds;
33
+ };