@next2d/display 1.14.20

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.
@@ -0,0 +1,556 @@
1
+ import type { Stage } from "./Stage";
2
+ import type { LoaderInfo } from "./LoaderInfo";
3
+ import type { Sprite } from "./Sprite";
4
+ import { EventDispatcher } from "@next2d/events";
5
+ import { Transform, Rectangle, Point } from "@next2d/geom";
6
+ import { FilterArrayImpl, BlendModeImpl, ParentImpl, PlaceObjectImpl, BoundsImpl, DictionaryTagImpl, PropertyMessageMapImpl, DisplayObjectImpl } from "@next2d/interface";
7
+ import { CanvasToWebGLContext } from "@next2d/webgl";
8
+ /**
9
+ * DisplayObject クラスは、表示リストに含めることのできるすべてのオブジェクトに関する基本クラスです。
10
+ * DisplayObject クラス自体は、画面上でのコンテンツの描画のための API を含みません。
11
+ * そのため、DisplayObject クラスのカスタムサブクラスを作成する場合は、
12
+ * Shape、Sprite、Bitmap、TextField または MovieClip など、
13
+ * 画面上にコンテンツを描画する API を持つサブクラスの 1 つを拡張する必要があります。
14
+ *
15
+ * The DisplayObject class is the base class for all objects that can be placed on the display list.
16
+ * The DisplayObject class itself does not include any APIs for rendering content onscreen.
17
+ * For that reason, if you want create a custom subclass of the DisplayObject class,
18
+ * you will want to extend one of its subclasses that do have APIs for rendering content onscreen,
19
+ * such as the Shape, Sprite, Bitmap, TextField, or MovieClip class.
20
+ *
21
+ * @class
22
+ * @memberOf next2d.display
23
+ * @extends EventDispatcher
24
+ */
25
+ export declare class DisplayObject extends EventDispatcher {
26
+ readonly _$instanceId: number;
27
+ protected _$id: number;
28
+ protected _$stage: Stage | null;
29
+ protected _$parent: ParentImpl<any> | null;
30
+ protected _$scale9Grid: Rectangle | null;
31
+ protected _$characterId: number;
32
+ protected _$active: boolean;
33
+ protected _$isMask: boolean;
34
+ _$updated: boolean;
35
+ protected _$added: boolean;
36
+ protected _$addedStage: boolean;
37
+ protected _$filters: FilterArrayImpl | null;
38
+ protected _$blendMode: BlendModeImpl | null;
39
+ protected _$transform: Transform;
40
+ _$hitObject: Sprite | null;
41
+ protected _$isNext: boolean;
42
+ protected _$created: boolean;
43
+ protected _$posted: boolean;
44
+ protected _$clipDepth: number;
45
+ protected _$name: string;
46
+ protected _$mask: DisplayObjectImpl<any> | null;
47
+ protected _$visible: boolean;
48
+ protected _$root: ParentImpl<any> | null;
49
+ _$loaderInfo: LoaderInfo | null;
50
+ protected _$scaleX: number | null;
51
+ protected _$scaleY: number | null;
52
+ protected _$variables: Map<any, any> | null;
53
+ protected _$placeObject: PlaceObjectImpl | null;
54
+ protected _$rotation: number | null;
55
+ protected _$changePlace: boolean;
56
+ protected _$currentPlaceId: number;
57
+ protected _$placeId: number;
58
+ protected _$startFrame: number;
59
+ protected _$endFrame: number;
60
+ /**
61
+ * @constructor
62
+ * @public
63
+ */
64
+ constructor();
65
+ /**
66
+ * @description 指定されたオブジェクトのアルファ透明度値を示します。
67
+ * 有効な値は 0.0(完全な透明)~ 1.0(完全な不透明)です。
68
+ * デフォルト値は 1.0 です。alpha が 0.0 に設定されている表示オブジェクトは、
69
+ * 表示されない場合でも、アクティブです。
70
+ * Indicates the alpha transparency value of the object specified.
71
+ * Valid values are 0.0 (fully transparent) to 1.0 (fully opaque).
72
+ * The default value is 1.0. Display objects with alpha set to 0.0 are active,
73
+ * even though they are invisible.
74
+ *
75
+ * @member {number}
76
+ * @default 1
77
+ * @public
78
+ */
79
+ get alpha(): number;
80
+ set alpha(alpha: number);
81
+ /**
82
+ * @description 使用するブレンドモードを指定する BlendMode クラスの値です。
83
+ * A value from the BlendMode class that specifies which blend mode to use.
84
+ *
85
+ * @member {string}
86
+ * @default BlendMode.NORMAL
87
+ * @public
88
+ */
89
+ get blendMode(): BlendModeImpl;
90
+ set blendMode(blend_mode: BlendModeImpl);
91
+ /**
92
+ * @description 表示オブジェクトに現在関連付けられている各フィルターオブジェクトが
93
+ * 格納されているインデックス付きの配列です。
94
+ * An indexed array that contains each filter object
95
+ * currently associated with the display object.
96
+ *
97
+ * @member {array}
98
+ * @default {array}
99
+ * @public
100
+ */
101
+ get filters(): FilterArrayImpl;
102
+ set filters(filters: FilterArrayImpl | null);
103
+ /**
104
+ * @description 表示オブジェクトの高さを示します(ピクセル単位)。
105
+ * Indicates the height of the display object, in pixels.
106
+ *
107
+ * @member {number}
108
+ * @public
109
+ */
110
+ get height(): number;
111
+ set height(height: number);
112
+ /**
113
+ * @description この表示オブジェクトが属するファイルの読み込み情報を含む LoaderInfo オブジェクトを返します。
114
+ * Returns a LoaderInfo object containing information
115
+ * about loading the file to which this display object belongs.
116
+ *
117
+ * @member {LoaderInfo}
118
+ * @default null
119
+ * @readonly
120
+ * @public
121
+ */
122
+ get loaderInfo(): LoaderInfo | null;
123
+ /**
124
+ * @description 呼び出し元の表示オブジェクトは、指定された mask オブジェクトによってマスクされます。
125
+ * The calling display object is masked by the specified mask object.
126
+ *
127
+ * @member {DisplayObject|null}
128
+ * @public
129
+ */
130
+ get mask(): DisplayObjectImpl<any> | null;
131
+ set mask(mask: DisplayObjectImpl<any> | null);
132
+ /**
133
+ * @description マウスまたはユーザー入力デバイスの x 軸の位置をピクセルで示します。
134
+ * Indicates the x coordinate of the mouse or user input device position, in pixels.
135
+ *
136
+ * @member {number}
137
+ * @default 0
138
+ * @readonly
139
+ * @public
140
+ */
141
+ get mouseX(): number;
142
+ /**
143
+ * @description マウスまたはユーザー入力デバイスの y 軸の位置をピクセルで示します。
144
+ * Indicates the y coordinate of the mouse or user input device position, in pixels.
145
+ *
146
+ * @member {number}
147
+ * @default 0
148
+ * @readonly
149
+ * @public
150
+ */
151
+ get mouseY(): number;
152
+ /**
153
+ * @description DisplayObject のインスタンス名を示します。
154
+ * Indicates the instance name of the DisplayObject.
155
+ *
156
+ * @member {string}
157
+ * @public
158
+ */
159
+ get name(): string;
160
+ set name(name: string);
161
+ /**
162
+ * @description この表示オブジェクトを含む DisplayObjectContainer オブジェクトを示します。
163
+ * Indicates the DisplayObjectContainer object that contains this display object.
164
+ *
165
+ * @member {DisplayObjectContainer | null}
166
+ * @readonly
167
+ * @public
168
+ */
169
+ get parent(): ParentImpl<any> | null;
170
+ /**
171
+ * @description 読み込まれた SWF ファイル内の表示オブジェクトの場合、
172
+ * root プロパティはその SWF ファイルが表す表示リストのツリー構造部分の一番上にある表示オブジェクトとなります。
173
+ * For a display object in a loaded SWF file,
174
+ * the root property is the top-most display object
175
+ * in the portion of the display list's tree structure represented by that SWF file.
176
+ *
177
+ * @member {DisplayObject|null}
178
+ * @readonly
179
+ * @public
180
+ */
181
+ get root(): ParentImpl<any>;
182
+ /**
183
+ * @description DisplayObject インスタンスの元の位置からの回転角を度単位で示します。
184
+ * Indicates the rotation of the DisplayObject instance,
185
+ * in degrees, from its original orientation.
186
+ *
187
+ * @member {number}
188
+ * @public
189
+ */
190
+ get rotation(): number;
191
+ set rotation(rotation: number);
192
+ /**
193
+ * @description 現在有効な拡大 / 縮小グリッドです。
194
+ * The current scaling grid that is in effect.
195
+ *
196
+ * @member {Rectangle}
197
+ * @public
198
+ */
199
+ get scale9Grid(): Rectangle | null;
200
+ set scale9Grid(scale_9_grid: Rectangle | null);
201
+ /**
202
+ * @description 基準点から適用されるオブジェクトの水平スケール(パーセンテージ)を示します。
203
+ * Indicates the horizontal scale (percentage)
204
+ * of the object as applied from the registration point.
205
+ *
206
+ * @member {number}
207
+ * @public
208
+ */
209
+ get scaleX(): number;
210
+ set scaleX(scale_x: number);
211
+ /**
212
+ * @description 基準点から適用されるオブジェクトの垂直スケール(パーセンテージ)を示します。
213
+ * IIndicates the vertical scale (percentage)
214
+ * of an object as applied from the registration point.
215
+ *
216
+ * @member {number}
217
+ * @public
218
+ */
219
+ get scaleY(): number;
220
+ set scaleY(scale_y: number);
221
+ /**
222
+ * @description 表示オブジェクトのステージです。
223
+ * The Stage of the display object.
224
+ *
225
+ * @member {Stage}
226
+ * @readonly
227
+ * @public
228
+ */
229
+ get stage(): Stage | null;
230
+ /**
231
+ * @description 表示オブジェクトのマトリックス、カラー変換、
232
+ * ピクセル境界に関係するプロパティを持つオブジェクトです。
233
+ * An object with properties pertaining
234
+ * to a display object's matrix, color transform, and pixel bounds.
235
+ *
236
+ * @member {Transform}
237
+ * @public
238
+ */
239
+ get transform(): Transform;
240
+ set transform(transform: Transform);
241
+ /**
242
+ * @description 表示オブジェクトが可視かどうかを示します。
243
+ * Whether or not the display object is visible.
244
+ *
245
+ * @member {boolean}
246
+ * @public
247
+ */
248
+ get visible(): boolean;
249
+ set visible(visible: boolean);
250
+ /**
251
+ * @description 表示オブジェクトの幅を示します(ピクセル単位)。
252
+ * Indicates the width of the display object, in pixels.
253
+ *
254
+ * @member {number}
255
+ * @public
256
+ */
257
+ get width(): number;
258
+ set width(width: number);
259
+ /**
260
+ * @description 親 DisplayObjectContainer のローカル座標を基準にした
261
+ * DisplayObject インスタンスの x 座標を示します。
262
+ * Indicates the x coordinate
263
+ * of the DisplayObject instance relative to the local coordinates
264
+ * of the parent DisplayObjectContainer.
265
+ *
266
+ * @member {number}
267
+ * @public
268
+ */
269
+ get x(): number;
270
+ set x(x: number);
271
+ /**
272
+ * @description 親 DisplayObjectContainer のローカル座標を基準にした
273
+ * DisplayObject インスタンスの y 座標を示します。
274
+ * Indicates the y coordinate
275
+ * of the DisplayObject instance relative to the local coordinates
276
+ * of the parent DisplayObjectContainer.
277
+ *
278
+ * @member {number}
279
+ * @public
280
+ */
281
+ get y(): number;
282
+ set y(y: number);
283
+ /**
284
+ * @description targetCoordinateSpace オブジェクトの座標系を基準にして、
285
+ * 表示オブジェクトの領域を定義する矩形を返します。
286
+ * Returns a rectangle that defines the area
287
+ * of the display object relative to the coordinate system
288
+ * of the targetCoordinateSpace object.
289
+ *
290
+ * @param {DisplayObject} [target=null]
291
+ * @return {Rectangle}
292
+ */
293
+ getBounds(target?: DisplayObjectImpl<any> | null): Rectangle;
294
+ /**
295
+ * @description point オブジェクトをステージ(グローバル)座標から
296
+ * 表示オブジェクトの(ローカル)座標に変換します。
297
+ * Converts the point object from the Stage (global) coordinates
298
+ * to the display object's (local) coordinates.
299
+ *
300
+ * @param {Point} point
301
+ * @return {Point}
302
+ * @public
303
+ */
304
+ globalToLocal(point: Point): Point;
305
+ /**
306
+ * @description 表示オブジェクトの境界ボックスを評価して、
307
+ * obj 表示オブジェクトの境界ボックスと重複または交差するかどうかを調べます。
308
+ * Evaluates the bounding box of the display object to see
309
+ * if it overlaps or intersects with the bounding box of the obj display object.
310
+ *
311
+ * @param {DisplayObject} object
312
+ * @returns {boolean}
313
+ * @public
314
+ */
315
+ hitTestObject(object: DisplayObjectImpl<any>): boolean;
316
+ /**
317
+ * @description 表示オブジェクトを評価して、x および y パラメーターで指定された
318
+ * ポイントと重複または交差するかどうかを調べます。
319
+ * Evaluates the display object to see if it overlaps
320
+ * or intersects with the point specified by the x and y parameters.
321
+ *
322
+ * @param {number} x
323
+ * @param {number} y
324
+ * @param {boolean} [shape_flag=false]
325
+ * @returns {boolean}
326
+ * @public
327
+ */
328
+ hitTestPoint(x: number, y: number, shape_flag?: boolean): boolean;
329
+ /**
330
+ * @description point オブジェクトを表示オブジェクトの(ローカル)座標から
331
+ * ステージ(グローバル)座標に変換します。
332
+ * Converts the point object from the display object's (local) coordinates
333
+ * to the Stage (global) coordinates.
334
+ *
335
+ *
336
+ * @param {Point} point
337
+ * @returns {Point}
338
+ * @public
339
+ */
340
+ localToGlobal(point: Point): Point;
341
+ /**
342
+ * @description クラスのローカル変数空間から値を取得
343
+ * Get a value from the local variable space of the class
344
+ *
345
+ * @param {*} key
346
+ * @return {*}
347
+ * @method
348
+ * @public
349
+ */
350
+ getLocalVariable(key: any): any;
351
+ /**
352
+ * @description クラスのローカル変数空間へ値を保存
353
+ * Store values in the local variable space of the class
354
+ *
355
+ * @param {*} key
356
+ * @param {*} value
357
+ * @return {void}
358
+ * @method
359
+ * @public
360
+ */
361
+ setLocalVariable(key: any, value: any): void;
362
+ /**
363
+ * @description クラスのローカル変数空間に値があるかどうかを判断します。
364
+ * Determines if there is a value in the local variable space of the class.
365
+ *
366
+ * @param {*} key
367
+ * @return {boolean}
368
+ * @method
369
+ * @public
370
+ */
371
+ hasLocalVariable(key: any): boolean;
372
+ /**
373
+ * @description クラスのローカル変数空間の値を削除
374
+ * Remove values from the local variable space of a class
375
+ *
376
+ * @param {*} key
377
+ * @return {void}
378
+ * @method
379
+ * @public
380
+ */
381
+ deleteLocalVariable(key: any): void;
382
+ /**
383
+ * @description グローバル変数空間から値を取得
384
+ * Get a value from the global variable space
385
+ *
386
+ * @param {*} key
387
+ * @return {*}
388
+ * @method
389
+ * @public
390
+ */
391
+ getGlobalVariable(key: any): any;
392
+ /**
393
+ * @description グローバル変数空間へ値を保存
394
+ * Save values to global variable space
395
+ *
396
+ * @param {*} key
397
+ * @param {*} value
398
+ * @return {void}
399
+ * @method
400
+ * @public
401
+ */
402
+ setGlobalVariable(key: any, value: any): void;
403
+ /**
404
+ * @description グローバル変数空間に値があるかどうかを判断します。
405
+ * Determines if there is a value in the global variable space.
406
+ *
407
+ * @param {*} key
408
+ * @return {boolean}
409
+ * @method
410
+ * @public
411
+ */
412
+ hasGlobalVariable(key: any): boolean;
413
+ /**
414
+ * @description グローバル変数空間の値を削除
415
+ * Remove values from global variable space.
416
+ *
417
+ * @param {*} key
418
+ * @return {void}
419
+ * @method
420
+ * @public
421
+ */
422
+ deleteGlobalVariable(key: any): void;
423
+ /**
424
+ * @description グローバル変数空間に値を全てクリアします。
425
+ * Clear all values in the global variable space.
426
+ *
427
+ * @return {void}
428
+ * @method
429
+ * @public
430
+ */
431
+ clearGlobalVariable(): void;
432
+ /**
433
+ * @return {object}
434
+ * @method
435
+ * @private
436
+ */
437
+ _$getPlaceObject(): PlaceObjectImpl | null;
438
+ /**
439
+ * @param {object} tag
440
+ * @param {DisplayObjectContainer} parent
441
+ * @return {object}
442
+ * @method
443
+ * @private
444
+ */
445
+ _$baseBuild<T>(tag: DictionaryTagImpl, parent: ParentImpl<any>): T;
446
+ /**
447
+ * @return {boolean}
448
+ * @method
449
+ * @private
450
+ */
451
+ _$isUpdated(): boolean;
452
+ /**
453
+ * @return {void}
454
+ * @method
455
+ * @private
456
+ */
457
+ _$updateState(): void;
458
+ /**
459
+ * @return {void}
460
+ * @method
461
+ * @private
462
+ */
463
+ _$doChanged(): void;
464
+ /**
465
+ * @param {CanvasToWebGLContext} context
466
+ * @param {WebGLTexture} target_texture
467
+ * @param {Float32Array} matrix
468
+ * @param {array} filters
469
+ * @param {number} width
470
+ * @param {number} height
471
+ * @return {WebGLTexture}
472
+ * @method
473
+ * @private
474
+ */
475
+ _$drawFilter(context: CanvasToWebGLContext, target_texture: WebGLTexture, matrix: Float32Array, filters: FilterArrayImpl, width: number, height: number): WebGLTexture;
476
+ /**
477
+ * @param {array} [matrix=null]
478
+ * @returns {object}
479
+ * @private
480
+ */
481
+ _$getLayerBounds(matrix?: Float32Array | null): BoundsImpl;
482
+ /**
483
+ * @return {void}
484
+ * @method
485
+ * @private
486
+ */
487
+ _$executeAddedEvent(): void;
488
+ /**
489
+ * @return {void}
490
+ * @method
491
+ * @private
492
+ */
493
+ _$prepareActions(): void;
494
+ /**
495
+ * @return {boolean}
496
+ * @method
497
+ * @private
498
+ */
499
+ _$nextFrame(): boolean;
500
+ /**
501
+ * @param {array} [filters=null]
502
+ * @return {boolean}
503
+ * @private
504
+ */
505
+ _$canApply(filters?: FilterArrayImpl | null): boolean;
506
+ /**
507
+ * @param {number} width
508
+ * @param {number} height
509
+ * @param {Float32Array} matrix
510
+ * @param {array} [filters=null]
511
+ * @param {boolean} [can_apply=false]
512
+ * @param {number} [position_x=0]
513
+ * @param {number} [position_y=0]
514
+ * @return {boolean}
515
+ * @private
516
+ */
517
+ _$isFilterUpdated(width: number, height: number, matrix: Float32Array, filters?: FilterArrayImpl | null, can_apply?: boolean, position_x?: number, position_y?: number): boolean;
518
+ /**
519
+ * @param {CanvasToWebGLContext} context
520
+ * @param {array} filters
521
+ * @param {WebGLTexture} target_texture
522
+ * @param {Float32Array} matrix
523
+ * @param {number} width
524
+ * @param {number} height
525
+ * @return {WebGLTexture}
526
+ * @private
527
+ */
528
+ _$applyFilter(context: CanvasToWebGLContext, filters: FilterArrayImpl, target_texture: WebGLTexture, matrix: Float32Array, width: number, height: number): WebGLTexture;
529
+ /**
530
+ * @param {Float32Array} matrix
531
+ * @return {boolean}
532
+ * @method
533
+ * @private
534
+ */
535
+ _$shouldClip(matrix: Float32Array): boolean;
536
+ /**
537
+ * @param {CanvasToWebGLContext} context
538
+ * @param {Float32Array} matrix
539
+ * @return {Float32Array|boolean|null}
540
+ * @method
541
+ * @private
542
+ */
543
+ _$startClip(context: CanvasToWebGLContext, matrix: Float32Array): Float32Array | boolean | null;
544
+ /**
545
+ * @return {void}
546
+ * @method
547
+ * @private
548
+ */
549
+ _$removeWorkerInstance(): void;
550
+ /**
551
+ * @return {object}
552
+ * @method
553
+ * @private
554
+ */
555
+ _$createMessage(): PropertyMessageMapImpl<any>;
556
+ }