@next2d/filters 1.18.12 → 2.0.0

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,513 @@
1
+ import { BitmapFilter } from "./BitmapFilter";
2
+ import { execute as bevelFilterGetBoundsService } from "./BevelFilter/usecase/BevelFilterGetBoundsUseCase";
3
+ import { execute as bevelFilterCanApplyFilterService } from "./BevelFilter/service/BevelFilterCanApplyFilterService";
4
+ import { execute as bevelFilterToArrayService } from "./BevelFilter/service/BevelFilterToArrayService";
5
+ import { execute as bevelFilterToNumberArrayService } from "./BevelFilter/service/BevelFilterToNumberArrayService";
6
+ import { $clamp, $convertColorStringToNumber } from "./FilterUtil";
7
+ /**
8
+ * @description BevelFilter クラスを使用すると、表示オブジェクトにベベル効果を追加できます。
9
+ * ボタンなどのオブジェクトにベベル効果を適用すると 3 次元的に表現されます。
10
+ * 異なるハイライトカラー、シャドウカラー、ベベルのぼかし量、ベベルの角度、ベベルの配置、
11
+ * ノックアウト効果を使用して、ベベルの外観をカスタマイズできます。
12
+ *
13
+ * The BevelFilter class lets you add a bevel effect to display objects.
14
+ * A bevel effect gives objects such as buttons a three-dimensional look.
15
+ * You can customize the look of the bevel with different highlight and shadow colors,
16
+ * the amount of blur on the bevel, the angle of the bevel, the placement of the bevel,
17
+ * and a knockout effect.
18
+ *
19
+ * @class
20
+ * @memberOf next2d.filters
21
+ * @extends BitmapFilter
22
+ */
23
+ export class BevelFilter extends BitmapFilter {
24
+ /**
25
+ * @param {number} [distance=4]
26
+ * @param {number} [angle=45]
27
+ * @param {number} [highlight_color=0xffffff]
28
+ * @param {number} [highlight_alpha=1]
29
+ * @param {number} [shadow_color=0x000000]
30
+ * @param {number} [shadow_alpha=1]
31
+ * @param {number} [blur_x=4]
32
+ * @param {number} [blur_y=4]
33
+ * @param {number} [strength=1]
34
+ * @param {number} [quality=1]
35
+ * @param {string} [type=BitmapFilterType.INNER]
36
+ * @param {boolean} [knockout=false]
37
+ *
38
+ * @constructor
39
+ * @public
40
+ */
41
+ constructor(distance = 4, angle = 45, highlight_color = 0xffffff, highlight_alpha = 1, shadow_color = 0, shadow_alpha = 1, blur_x = 4, blur_y = 4, strength = 1, quality = 1, type = "inner", knockout = false) {
42
+ super();
43
+ /**
44
+ * @description フィルター認識番号
45
+ * Filter Recognition Number
46
+ *
47
+ * @member {number}
48
+ * @public
49
+ */
50
+ Object.defineProperty(this, "$filterType", {
51
+ enumerable: true,
52
+ configurable: true,
53
+ writable: true,
54
+ value: 0
55
+ });
56
+ /**
57
+ * @description BevelFilterの認識番号
58
+ * The recognition number of the BevelFilter.
59
+ *
60
+ * @member {number}
61
+ * @public
62
+ */
63
+ Object.defineProperty(this, "_$blurX", {
64
+ enumerable: true,
65
+ configurable: true,
66
+ writable: true,
67
+ value: void 0
68
+ });
69
+ /**
70
+ * @type {number}
71
+ * @default 4
72
+ * @private
73
+ */
74
+ Object.defineProperty(this, "_$blurY", {
75
+ enumerable: true,
76
+ configurable: true,
77
+ writable: true,
78
+ value: void 0
79
+ });
80
+ /**
81
+ * @type {IFilterQuality}
82
+ * @default 1
83
+ * @private
84
+ */
85
+ Object.defineProperty(this, "_$quality", {
86
+ enumerable: true,
87
+ configurable: true,
88
+ writable: true,
89
+ value: void 0
90
+ });
91
+ /**
92
+ * @type {number}
93
+ * @default 4
94
+ * @private
95
+ */
96
+ Object.defineProperty(this, "_$distance", {
97
+ enumerable: true,
98
+ configurable: true,
99
+ writable: true,
100
+ value: void 0
101
+ });
102
+ /**
103
+ * @type {number}
104
+ * @default 45
105
+ * @private
106
+ */
107
+ Object.defineProperty(this, "_$angle", {
108
+ enumerable: true,
109
+ configurable: true,
110
+ writable: true,
111
+ value: void 0
112
+ });
113
+ /**
114
+ * @type {number}
115
+ * @default 0xffffff
116
+ * @private
117
+ */
118
+ Object.defineProperty(this, "_$highlightColor", {
119
+ enumerable: true,
120
+ configurable: true,
121
+ writable: true,
122
+ value: void 0
123
+ });
124
+ /**
125
+ * @type {number}
126
+ * @default 1
127
+ * @private
128
+ */
129
+ Object.defineProperty(this, "_$highlightAlpha", {
130
+ enumerable: true,
131
+ configurable: true,
132
+ writable: true,
133
+ value: void 0
134
+ });
135
+ /**
136
+ * @type {number}
137
+ * @default 0
138
+ * @private
139
+ */
140
+ Object.defineProperty(this, "_$shadowColor", {
141
+ enumerable: true,
142
+ configurable: true,
143
+ writable: true,
144
+ value: void 0
145
+ });
146
+ /**
147
+ * @type {number}
148
+ * @default 1
149
+ * @private
150
+ */
151
+ Object.defineProperty(this, "_$shadowAlpha", {
152
+ enumerable: true,
153
+ configurable: true,
154
+ writable: true,
155
+ value: void 0
156
+ });
157
+ /**
158
+ * @type {number}
159
+ * @default 1
160
+ * @private
161
+ */
162
+ Object.defineProperty(this, "_$strength", {
163
+ enumerable: true,
164
+ configurable: true,
165
+ writable: true,
166
+ value: void 0
167
+ });
168
+ /**
169
+ * @type {string}
170
+ * @default "inner"
171
+ * @private
172
+ */
173
+ Object.defineProperty(this, "_$type", {
174
+ enumerable: true,
175
+ configurable: true,
176
+ writable: true,
177
+ value: void 0
178
+ });
179
+ /**
180
+ * @type {boolean}
181
+ * @default false
182
+ * @private
183
+ */
184
+ Object.defineProperty(this, "_$knockout", {
185
+ enumerable: true,
186
+ configurable: true,
187
+ writable: true,
188
+ value: void 0
189
+ });
190
+ // default
191
+ this._$distance = 4;
192
+ this._$angle = 45;
193
+ this._$highlightColor = 0xffffff;
194
+ this._$highlightAlpha = 1;
195
+ this._$blurX = 4;
196
+ this._$blurY = 4;
197
+ this._$quality = 1;
198
+ this._$shadowColor = 0;
199
+ this._$shadowAlpha = 1;
200
+ this._$strength = 1;
201
+ this._$type = "inner";
202
+ this._$knockout = false;
203
+ // setup
204
+ this.blurX = blur_x;
205
+ this.blurY = blur_y;
206
+ this.quality = quality;
207
+ this.distance = distance;
208
+ this.angle = angle;
209
+ this.highlightColor = highlight_color;
210
+ this.highlightAlpha = highlight_alpha;
211
+ this.shadowColor = shadow_color;
212
+ this.shadowAlpha = shadow_alpha;
213
+ this.strength = strength;
214
+ this.type = type;
215
+ this.knockout = knockout;
216
+ }
217
+ /**
218
+ * @description シャドウの角度
219
+ * The angle of the shadow.
220
+ *
221
+ * @member {number}
222
+ * @default 45
223
+ * @public
224
+ */
225
+ get angle() {
226
+ return this._$angle;
227
+ }
228
+ set angle(angle) {
229
+ angle = $clamp(angle % 360, -360, 360, 45);
230
+ if (angle === this._$angle) {
231
+ return;
232
+ }
233
+ this._$angle = angle;
234
+ this.$updated = true;
235
+ }
236
+ /**
237
+ * @description 水平方向のぼかし量。
238
+ * The amount of horizontal blur.
239
+ *
240
+ * @member {number}
241
+ * @default 4
242
+ * @public
243
+ */
244
+ get blurX() {
245
+ return this._$blurX;
246
+ }
247
+ set blurX(blur_x) {
248
+ blur_x = $clamp(+blur_x, 0, 255, 0);
249
+ if (blur_x === this._$blurX) {
250
+ return;
251
+ }
252
+ this._$blurX = blur_x;
253
+ this.$updated = true;
254
+ }
255
+ /**
256
+ * @description 垂直方向のぼかし量。
257
+ * The amount of vertical blur.
258
+ *
259
+ * @member {number}
260
+ * @default 4
261
+ * @public
262
+ */
263
+ get blurY() {
264
+ return this._$blurY;
265
+ }
266
+ set blurY(blur_y) {
267
+ blur_y = $clamp(+blur_y, 0, 255, 0);
268
+ if (blur_y === this._$blurY) {
269
+ return;
270
+ }
271
+ this._$blurY = blur_y;
272
+ this.$updated = true;
273
+ }
274
+ /**
275
+ * @description シャドウのオフセット距離です。
276
+ * The offset distance for the shadow, in pixels.
277
+ *
278
+ * @member {number}
279
+ * @default 4
280
+ * @public
281
+ */
282
+ get distance() {
283
+ return this._$distance;
284
+ }
285
+ set distance(distance) {
286
+ distance = $clamp(+distance, -255, 255, 4);
287
+ if (distance === this._$distance) {
288
+ return;
289
+ }
290
+ this._$distance = distance;
291
+ this.$updated = true;
292
+ }
293
+ /**
294
+ * @description アルファ透明度の値です。
295
+ * The alpha transparency value for the color.
296
+ *
297
+ * @member {number}
298
+ * @default 1
299
+ * @public
300
+ */
301
+ get highlightAlpha() {
302
+ return this._$highlightAlpha;
303
+ }
304
+ set highlightAlpha(highlight_alpha) {
305
+ highlight_alpha = $clamp(+highlight_alpha, 0, 1, 0);
306
+ if (highlight_alpha === this._$highlightAlpha) {
307
+ return;
308
+ }
309
+ this._$highlightAlpha = highlight_alpha;
310
+ this.$updated = true;
311
+ }
312
+ /**
313
+ * @description グローのカラー
314
+ * The color of the glow.
315
+ *
316
+ * @member {number}
317
+ * @default 0xffffff
318
+ * @public
319
+ */
320
+ get highlightColor() {
321
+ return this._$highlightColor;
322
+ }
323
+ set highlightColor(highlight_color) {
324
+ highlight_color = $clamp(typeof highlight_color === "string"
325
+ ? $convertColorStringToNumber(highlight_color)
326
+ : highlight_color, 0, 0xffffff, 0xffffff);
327
+ if (highlight_color === this._$highlightColor) {
328
+ return;
329
+ }
330
+ this._$highlightColor = highlight_color;
331
+ this.$updated = true;
332
+ }
333
+ /**
334
+ * @description オブジェクトにノックアウト効果を適用するかどうか
335
+ * Specifies whether the object has a knockout effect.
336
+ *
337
+ * @member {boolean}
338
+ * @default false
339
+ * @public
340
+ */
341
+ get knockout() {
342
+ return this._$knockout;
343
+ }
344
+ set knockout(knockout) {
345
+ knockout = !!knockout;
346
+ if (knockout === this._$knockout) {
347
+ return;
348
+ }
349
+ this._$knockout = knockout;
350
+ this.$updated = true;
351
+ }
352
+ /**
353
+ * @description ぼかしの実行回数です。
354
+ * The number of times to perform the blur.
355
+ *
356
+ * @member {number}
357
+ * @default 1
358
+ * @public
359
+ */
360
+ get quality() {
361
+ return this._$quality;
362
+ }
363
+ set quality(quality) {
364
+ quality = $clamp(quality | 0, 0, 15, 1);
365
+ if (quality === this._$quality) {
366
+ return;
367
+ }
368
+ this._$quality = quality;
369
+ this.$updated = true;
370
+ }
371
+ /**
372
+ * @description アルファ透明度の値です。
373
+ * The alpha transparency value for the color.
374
+ *
375
+ * @member {number}
376
+ * @default 1
377
+ * @public
378
+ */
379
+ get shadowAlpha() {
380
+ return this._$shadowAlpha;
381
+ }
382
+ set shadowAlpha(shadow_alpha) {
383
+ shadow_alpha = $clamp(shadow_alpha, 0, 1, 0);
384
+ if (shadow_alpha === this._$shadowAlpha) {
385
+ return;
386
+ }
387
+ this._$shadowAlpha = shadow_alpha;
388
+ this.$updated = true;
389
+ }
390
+ /**
391
+ * @description グローのカラー
392
+ * The color of the glow.
393
+ *
394
+ * @member {number}
395
+ * @default 0
396
+ * @public
397
+ */
398
+ get shadowColor() {
399
+ return this._$shadowColor;
400
+ }
401
+ set shadowColor(shadow_color) {
402
+ shadow_color = $clamp(typeof shadow_color === "string"
403
+ ? $convertColorStringToNumber(shadow_color)
404
+ : shadow_color, 0, 0xffffff, 0);
405
+ if (shadow_color === this._$shadowColor) {
406
+ return;
407
+ }
408
+ this._$shadowColor = shadow_color;
409
+ this.$updated = true;
410
+ }
411
+ /**
412
+ * @description インプリントの強さまたは広がりです。
413
+ * The strength of the imprint or spread.
414
+ *
415
+ * @member {number}
416
+ * @default 1
417
+ * @public
418
+ */
419
+ get strength() {
420
+ return this._$strength;
421
+ }
422
+ set strength(strength) {
423
+ strength = $clamp(strength | 0, 0, 255, 0);
424
+ if (strength === this._$strength) {
425
+ return;
426
+ }
427
+ this._$strength = strength;
428
+ this.$updated = true;
429
+ }
430
+ /**
431
+ * @description オブジェクトでのベベルの配置
432
+ * The placement of the bevel on the object.
433
+ *
434
+ * @member {string}
435
+ * @default BitmapFilterType.INNER
436
+ * @public
437
+ */
438
+ get type() {
439
+ return this._$type;
440
+ }
441
+ set type(type) {
442
+ type = `${type}`.toLowerCase();
443
+ if (type === this._$type) {
444
+ return;
445
+ }
446
+ switch (type) {
447
+ case "inner":
448
+ case "outer":
449
+ case "full":
450
+ break;
451
+ default:
452
+ return;
453
+ }
454
+ this._$type = type;
455
+ this.$updated = true;
456
+ }
457
+ /**
458
+ * @description オブジェクトのコピーを返します。
459
+ * Returns a copy of this filter object.
460
+ *
461
+ * @return {BevelFilter}
462
+ * @method
463
+ * @public
464
+ */
465
+ clone() {
466
+ return new BevelFilter(this._$distance, this._$angle, this._$highlightColor, this._$highlightAlpha, this._$shadowColor, this._$shadowAlpha, this._$blurX, this._$blurY, this._$strength, this._$quality, this._$type, this._$knockout);
467
+ }
468
+ /**
469
+ * @description 設定されたフィルターの値を配列で返します。
470
+ * Returns the value of the specified filter as an array.
471
+ *
472
+ * @return {array}
473
+ * @method
474
+ * @public
475
+ */
476
+ toArray() {
477
+ return bevelFilterToArrayService(this);
478
+ }
479
+ /**
480
+ * @description 設定されたフィルターの値を数値配列で返します。
481
+ * Returns the value of the specified filter as a number array.
482
+ *
483
+ * @return {Float32Array}
484
+ * @method
485
+ * @public
486
+ */
487
+ toNumberArray() {
488
+ return bevelFilterToNumberArrayService(this);
489
+ }
490
+ /**
491
+ * @description フィルターを適用できるかどうかを返します。
492
+ * Returns whether the filter can be applied.
493
+ *
494
+ * @return {boolean}
495
+ * @method
496
+ * @public
497
+ */
498
+ canApplyFilter() {
499
+ return bevelFilterCanApplyFilterService(this);
500
+ }
501
+ /**
502
+ * @description フィルターの描画範囲のバウンディングボックスを返します。
503
+ * Returns the bounding box of the filter drawing area.
504
+ *
505
+ * @param {Float32Array} bounds
506
+ * @return {Float32Array}
507
+ * @method
508
+ * @public
509
+ */
510
+ getBounds(bounds) {
511
+ return bevelFilterGetBoundsService(this, bounds);
512
+ }
513
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @description BitmapFilter クラスは、すべてのイメージフィルター効果の基本クラスです。
3
+ * BevelFilter、BlurFilter、ColorMatrixFilter、ConvolutionFilter、DisplacementMapFilter、DropShadowFilter、GlowFilter、GradientBevelFilter、
4
+ * および GradientGlowFilter クラスはすべて、BitmapFilter クラスを継承します。
5
+ * このフィルター効果は、あらゆる表示オブジェクトに適用できます。
6
+ *
7
+ * The BitmapFilter class is the base class for all image filter effects.
8
+ * The BevelFilter, BlurFilter, ColorMatrixFilter, ConvolutionFilter, DisplacementMapFilter, DropShadowFilter, GlowFilter, GradientBevelFilter,
9
+ * and GradientGlowFilter classes all extend the BitmapFilter class.
10
+ * You can apply these filter effects to any display object.
11
+ * You can neither directly instantiate nor extend BitmapFilter.
12
+ *
13
+ * @class
14
+ * @memberOf next2d.filters
15
+ */
16
+ export declare class BitmapFilter {
17
+ /**
18
+ * @description フィルターが更新されたかどうかを示します。
19
+ * Indicates whether the filter is updated.
20
+ *
21
+ * @type {boolean}
22
+ * @default true
23
+ * @public
24
+ */
25
+ $updated: boolean;
26
+ /**
27
+ * @constructor
28
+ * @public
29
+ */
30
+ constructor();
31
+ /**
32
+ * @description フィルターを適用できるかどうかを返します。
33
+ * Returns whether the filter can be applied.
34
+ *
35
+ * @return {boolean}
36
+ * @method
37
+ * @public
38
+ */
39
+ canApplyFilter(): boolean;
40
+ /**
41
+ * @description フィルターの描画範囲のバウンディングボックスを返します。
42
+ * Returns the bounding box of the filter drawing area.
43
+ *
44
+ * @param {Float32Array} bounds
45
+ * @return {Float32Array}
46
+ * @method
47
+ * @public
48
+ */
49
+ getBounds(bounds: Float32Array): Float32Array;
50
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @description BitmapFilter クラスは、すべてのイメージフィルター効果の基本クラスです。
3
+ * BevelFilter、BlurFilter、ColorMatrixFilter、ConvolutionFilter、DisplacementMapFilter、DropShadowFilter、GlowFilter、GradientBevelFilter、
4
+ * および GradientGlowFilter クラスはすべて、BitmapFilter クラスを継承します。
5
+ * このフィルター効果は、あらゆる表示オブジェクトに適用できます。
6
+ *
7
+ * The BitmapFilter class is the base class for all image filter effects.
8
+ * The BevelFilter, BlurFilter, ColorMatrixFilter, ConvolutionFilter, DisplacementMapFilter, DropShadowFilter, GlowFilter, GradientBevelFilter,
9
+ * and GradientGlowFilter classes all extend the BitmapFilter class.
10
+ * You can apply these filter effects to any display object.
11
+ * You can neither directly instantiate nor extend BitmapFilter.
12
+ *
13
+ * @class
14
+ * @memberOf next2d.filters
15
+ */
16
+ export class BitmapFilter {
17
+ /**
18
+ * @constructor
19
+ * @public
20
+ */
21
+ constructor() {
22
+ /**
23
+ * @description フィルターが更新されたかどうかを示します。
24
+ * Indicates whether the filter is updated.
25
+ *
26
+ * @type {boolean}
27
+ * @default true
28
+ * @public
29
+ */
30
+ Object.defineProperty(this, "$updated", {
31
+ enumerable: true,
32
+ configurable: true,
33
+ writable: true,
34
+ value: void 0
35
+ });
36
+ this.$updated = true;
37
+ }
38
+ /**
39
+ * @description フィルターを適用できるかどうかを返します。
40
+ * Returns whether the filter can be applied.
41
+ *
42
+ * @return {boolean}
43
+ * @method
44
+ * @public
45
+ */
46
+ canApplyFilter() {
47
+ return true;
48
+ }
49
+ /**
50
+ * @description フィルターの描画範囲のバウンディングボックスを返します。
51
+ * Returns the bounding box of the filter drawing area.
52
+ *
53
+ * @param {Float32Array} bounds
54
+ * @return {Float32Array}
55
+ * @method
56
+ * @public
57
+ */
58
+ getBounds(bounds) {
59
+ return bounds;
60
+ }
61
+ }
@@ -0,0 +1,16 @@
1
+ import type { BlurFilter } from "../../BlurFilter";
2
+ import type { BevelFilter } from "../../BevelFilter";
3
+ import type { DropShadowFilter } from "../../DropShadowFilter";
4
+ import type { GlowFilter } from "../../GlowFilter";
5
+ import type { GradientBevelFilter } from "../../GradientBevelFilter";
6
+ import type { GradientGlowFilter } from "../../GradientGlowFilter";
7
+ /**
8
+ * @description フィルターを適用できるかどうかを返します。
9
+ * Returns whether the filter can be applied.
10
+ *
11
+ * @param {BlurFilter} filter
12
+ * @return {boolean}
13
+ * @method
14
+ * @private
15
+ */
16
+ export declare const execute: (filter: BlurFilter | BevelFilter | DropShadowFilter | GlowFilter | GradientBevelFilter | GradientGlowFilter) => boolean;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @description フィルターを適用できるかどうかを返します。
3
+ * Returns whether the filter can be applied.
4
+ *
5
+ * @param {BlurFilter} filter
6
+ * @return {boolean}
7
+ * @method
8
+ * @private
9
+ */
10
+ export const execute = (filter) => {
11
+ return filter.blurX > 0 && filter.blurY > 0 && filter.quality > 0;
12
+ };
@@ -0,0 +1,11 @@
1
+ import type { BlurFilter } from "../../BlurFilter";
2
+ /**
3
+ * @description フィルターの設定値を配列で返却します。
4
+ * Returns an array of filter settings.
5
+ *
6
+ * @param {BlurFilter} blur_filter
7
+ * @return {number[]}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export declare const execute: (blur_filter: BlurFilter) => number[];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @description フィルターの設定値を配列で返却します。
3
+ * Returns an array of filter settings.
4
+ *
5
+ * @param {BlurFilter} blur_filter
6
+ * @return {number[]}
7
+ * @method
8
+ * @protected
9
+ */
10
+ export const execute = (blur_filter) => {
11
+ return [
12
+ blur_filter.$filterType,
13
+ blur_filter.blurX,
14
+ blur_filter.blurY,
15
+ blur_filter.quality
16
+ ];
17
+ };
@@ -0,0 +1,11 @@
1
+ import type { BlurFilter } from "../../BlurFilter";
2
+ /**
3
+ * @description フィルターの設定値を配列で返却します。
4
+ * Returns an array of filter settings.
5
+ *
6
+ * @param {BlurFilter} blur_filter
7
+ * @return {Float32Array}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export declare const execute: (blur_filter: BlurFilter) => Float32Array;