@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.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/BitmapData.d.ts +142 -0
- package/dist/BitmapData.js +386 -0
- package/dist/BlendMode.d.ts +204 -0
- package/dist/BlendMode.js +240 -0
- package/dist/DisplayObject.d.ts +556 -0
- package/dist/DisplayObject.js +1671 -0
- package/dist/DisplayObjectContainer.d.ts +346 -0
- package/dist/DisplayObjectContainer.js +1775 -0
- package/dist/FrameLabel.d.ts +98 -0
- package/dist/FrameLabel.js +120 -0
- package/dist/Graphics.d.ts +571 -0
- package/dist/Graphics.js +2164 -0
- package/dist/GraphicsBitmapFill.d.ts +49 -0
- package/dist/GraphicsBitmapFill.js +86 -0
- package/dist/GraphicsGradientFill.d.ts +65 -0
- package/dist/GraphicsGradientFill.js +157 -0
- package/dist/InteractiveObject.d.ts +32 -0
- package/dist/InteractiveObject.js +43 -0
- package/dist/Loader.d.ts +130 -0
- package/dist/Loader.js +318 -0
- package/dist/LoaderInfo.d.ts +120 -0
- package/dist/LoaderInfo.js +184 -0
- package/dist/LoopConfig.d.ts +108 -0
- package/dist/LoopConfig.js +156 -0
- package/dist/LoopType.d.ts +104 -0
- package/dist/LoopType.js +122 -0
- package/dist/MovieClip.d.ts +310 -0
- package/dist/MovieClip.js +940 -0
- package/dist/Shape.d.ts +164 -0
- package/dist/Shape.js +509 -0
- package/dist/Sprite.d.ts +170 -0
- package/dist/Sprite.js +280 -0
- package/dist/Stage.d.ts +164 -0
- package/dist/Stage.js +251 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/package.json +45 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { Sprite } from "./Sprite";
|
|
2
|
+
import { FrameLabel } from "./FrameLabel";
|
|
3
|
+
import { Sound } from "@next2d/media";
|
|
4
|
+
import { LoopConfigImpl, ParentImpl, MovieClipCharacterImpl, DictionaryTagImpl, Character } from "@next2d/interface";
|
|
5
|
+
/**
|
|
6
|
+
* MovieClip クラスは、Sprite、DisplayObjectContainer、InteractiveObject、DisplayObject
|
|
7
|
+
* および EventDispatcher クラスを継承します。
|
|
8
|
+
* MovieClip オブジェクトには、Sprite オブジェクトとは違ってタイムラインがあります。
|
|
9
|
+
* タイムラインの再生ヘッドが停止されても、その MovieClip オブジェクトの子 MovieClip オブジェクトの再生ヘッドは停止しません。
|
|
10
|
+
*
|
|
11
|
+
* The MovieClip class inherits from the following classes: Sprite, DisplayObjectContainer,
|
|
12
|
+
* InteractiveObject, DisplayObject, and EventDispatcher.
|
|
13
|
+
* Unlike the Sprite object, a MovieClip object has a timeline.
|
|
14
|
+
* When the playback head of the timeline is stopped,
|
|
15
|
+
* the playback head of the child MovieClip object of that MovieClip object will not be stopped.
|
|
16
|
+
*
|
|
17
|
+
* @class
|
|
18
|
+
* @memberOf next2d.display
|
|
19
|
+
* @extends Sprite
|
|
20
|
+
*/
|
|
21
|
+
export declare class MovieClip extends Sprite {
|
|
22
|
+
private _$labels;
|
|
23
|
+
_$currentFrame: number;
|
|
24
|
+
_$stopFlag: boolean;
|
|
25
|
+
_$canAction: boolean;
|
|
26
|
+
private _$childRemove;
|
|
27
|
+
_$canSound: boolean;
|
|
28
|
+
_$actionProcess: boolean;
|
|
29
|
+
_$actions: Map<number, Function[]>;
|
|
30
|
+
_$frameCache: Map<string, any>;
|
|
31
|
+
_$sounds: Map<number, Sound[]>;
|
|
32
|
+
_$actionOffset: number;
|
|
33
|
+
_$actionLimit: number;
|
|
34
|
+
_$totalFrames: number;
|
|
35
|
+
_$isPlaying: boolean;
|
|
36
|
+
_$loopConfig: LoopConfigImpl | null;
|
|
37
|
+
private _$tweenFrame;
|
|
38
|
+
/**
|
|
39
|
+
* @constructor
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
constructor();
|
|
43
|
+
/**
|
|
44
|
+
* @description 指定されたクラスのストリングを返します。
|
|
45
|
+
* Returns the string representation of the specified class.
|
|
46
|
+
*
|
|
47
|
+
* @return {string}
|
|
48
|
+
* @default [class MovieClip]
|
|
49
|
+
* @method
|
|
50
|
+
* @static
|
|
51
|
+
*/
|
|
52
|
+
static toString(): string;
|
|
53
|
+
/**
|
|
54
|
+
* @description 指定されたクラスの空間名を返します。
|
|
55
|
+
* Returns the space name of the specified class.
|
|
56
|
+
*
|
|
57
|
+
* @return {string}
|
|
58
|
+
* @default next2d.display.MovieClip
|
|
59
|
+
* @const
|
|
60
|
+
* @static
|
|
61
|
+
*/
|
|
62
|
+
static get namespace(): string;
|
|
63
|
+
/**
|
|
64
|
+
* @description 指定されたオブジェクトのストリングを返します。
|
|
65
|
+
* Returns the string representation of the specified object.
|
|
66
|
+
*
|
|
67
|
+
* @return {string}
|
|
68
|
+
* @default [object MovieClip]
|
|
69
|
+
* @method
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
toString(): string;
|
|
73
|
+
/**
|
|
74
|
+
* @description 指定されたオブジェクトの空間名を返します。
|
|
75
|
+
* Returns the space name of the specified object.
|
|
76
|
+
*
|
|
77
|
+
* @return {string}
|
|
78
|
+
* @default next2d.display.MovieClip
|
|
79
|
+
* @const
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
get namespace(): string;
|
|
83
|
+
/**
|
|
84
|
+
* @description MovieClip インスタンスのタイムライン内の再生ヘッドが置かれているフレームの番号を示します。
|
|
85
|
+
* Specifies the number of the frame in which the playhead is located
|
|
86
|
+
* in the timeline of the MovieClip instance.
|
|
87
|
+
*
|
|
88
|
+
* @member {number}
|
|
89
|
+
* @default 1
|
|
90
|
+
* @readonly
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
get currentFrame(): number;
|
|
94
|
+
/**
|
|
95
|
+
* @description MovieClip インスタンスのタイムライン内の現在のフレームにあるラベルです。
|
|
96
|
+
* The label at the current frame in the timeline of the MovieClip instance.
|
|
97
|
+
*
|
|
98
|
+
* @member {FrameLabel|null}
|
|
99
|
+
* @readonly
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
get currentFrameLabel(): FrameLabel | null;
|
|
103
|
+
/**
|
|
104
|
+
* @description 現在のシーンの FrameLabel オブジェクトの配列を返します。
|
|
105
|
+
* Returns an array of FrameLabel objects from the current scene.
|
|
106
|
+
*
|
|
107
|
+
* @member {array|null}
|
|
108
|
+
* @readonly
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
get currentLabels(): FrameLabel[] | null;
|
|
112
|
+
/**
|
|
113
|
+
* @description ムービークリップが現在再生されているかどうかを示すブール値です。
|
|
114
|
+
* A Boolean value that indicates whether a movie clip is curently playing.
|
|
115
|
+
*
|
|
116
|
+
* @member {boolean}
|
|
117
|
+
* @default false
|
|
118
|
+
* @readonly
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
get isPlaying(): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* @description MovieClip インスタンス内のフレーム総数です。
|
|
124
|
+
* The total number of frames in the MovieClip instance.
|
|
125
|
+
*
|
|
126
|
+
* @member {number}
|
|
127
|
+
* @default 1
|
|
128
|
+
* @readonly
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
get totalFrames(): number;
|
|
132
|
+
/**
|
|
133
|
+
* @description MovieClipのフレームヘッダーの移動方法の設定オブジェクトを返します。
|
|
134
|
+
* Returns a configuration object for how MovieClip's frame headers are moved.
|
|
135
|
+
*
|
|
136
|
+
* @member {object}
|
|
137
|
+
* @default null
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
get loopConfig(): LoopConfigImpl | null;
|
|
141
|
+
set loopConfig(loop_config: LoopConfigImpl | null);
|
|
142
|
+
/**
|
|
143
|
+
* @description 指定されたフレームで SWF ファイルの再生を開始します。
|
|
144
|
+
* Starts playing the SWF file at the specified frame.
|
|
145
|
+
*
|
|
146
|
+
* @param {number|string} frame
|
|
147
|
+
* @return {void}
|
|
148
|
+
* @method
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
gotoAndPlay(frame: string | number): void;
|
|
152
|
+
/**
|
|
153
|
+
* @description このムービークリップの指定されたフレームに再生ヘッドを送り、そこで停止させます。
|
|
154
|
+
* Brings the playhead to the specified frame
|
|
155
|
+
* of the movie clip and stops it there.
|
|
156
|
+
*
|
|
157
|
+
* @param {number|string} frame
|
|
158
|
+
* @return {void}
|
|
159
|
+
* @method
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
gotoAndStop(frame: string | number): void;
|
|
163
|
+
/**
|
|
164
|
+
* @description 次のフレームに再生ヘッドを送り、停止します。
|
|
165
|
+
* Sends the playhead to the next frame and stops it.
|
|
166
|
+
*
|
|
167
|
+
* @return {void}
|
|
168
|
+
* @method
|
|
169
|
+
* @public
|
|
170
|
+
*/
|
|
171
|
+
nextFrame(): void;
|
|
172
|
+
/**
|
|
173
|
+
* @description ムービークリップのタイムライン内で再生ヘッドを移動します。
|
|
174
|
+
* Moves the playhead in the timeline of the movie clip.
|
|
175
|
+
*
|
|
176
|
+
* @return {void}
|
|
177
|
+
* @method
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
play(): void;
|
|
181
|
+
/**
|
|
182
|
+
* @description 直前のフレームに再生ヘッドを戻し、停止します。
|
|
183
|
+
* Sends the playhead to the previous frame and stops it.
|
|
184
|
+
*
|
|
185
|
+
* @return {void}
|
|
186
|
+
* @method
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
prevFrame(): void;
|
|
190
|
+
/**
|
|
191
|
+
* @description ムービークリップ内の再生ヘッドを停止します。
|
|
192
|
+
* Stops the playhead in the movie clip.
|
|
193
|
+
*
|
|
194
|
+
* @return {void}
|
|
195
|
+
* @method
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
stop(): void;
|
|
199
|
+
/**
|
|
200
|
+
* @description タイムラインに対して動的にLabelを追加できます。
|
|
201
|
+
* Labels can be added dynamically to the timeline.
|
|
202
|
+
*
|
|
203
|
+
* @example <caption>Example1 usage of addFrameLabel.</caption>
|
|
204
|
+
* // case 1
|
|
205
|
+
* const {MovieClip, FrameLabel} = next2d.display;
|
|
206
|
+
* const movieClip = new MovieClip();
|
|
207
|
+
* movieClip.addFrameLabel(new FrameLabel(1, "start"));
|
|
208
|
+
*
|
|
209
|
+
* @param {FrameLabel} frame_label
|
|
210
|
+
* @return {void}
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
213
|
+
addFrameLabel(frame_label: FrameLabel): void;
|
|
214
|
+
/**
|
|
215
|
+
* @description 指定のフレームのアクションを追加できます
|
|
216
|
+
* You can add an action for a given frame.
|
|
217
|
+
*
|
|
218
|
+
* @example <caption>Example1 usage of addFrameScript.</caption>
|
|
219
|
+
* // case 1
|
|
220
|
+
* const {MovieClip} = next2d.display;
|
|
221
|
+
* const movieClip = new MovieClip();
|
|
222
|
+
* movieClip.addFrameScript(1 , function ()
|
|
223
|
+
* {
|
|
224
|
+
* this.stop();
|
|
225
|
+
* });
|
|
226
|
+
*
|
|
227
|
+
* @example <caption>Example3 usage of addFrameScript.</caption>
|
|
228
|
+
* // case 2
|
|
229
|
+
* const {MovieClip} = next2d.display;
|
|
230
|
+
* const movieClip = new MovieClip();
|
|
231
|
+
* movieClip.addFrameScript(1, method_1, 2, method_2, 10, method_10);
|
|
232
|
+
*
|
|
233
|
+
* @return {void}
|
|
234
|
+
* @method
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
237
|
+
addFrameScript(...args: any[]): void;
|
|
238
|
+
/**
|
|
239
|
+
* @param {string} name
|
|
240
|
+
* @return {number}
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
_$getFrameForLabel(name: string): number;
|
|
244
|
+
/**
|
|
245
|
+
* @param {number} frame
|
|
246
|
+
* @param {function} script
|
|
247
|
+
* @return {void}
|
|
248
|
+
* @method
|
|
249
|
+
* @private
|
|
250
|
+
*/
|
|
251
|
+
_$addAction(frame: number, script: Function): void;
|
|
252
|
+
/**
|
|
253
|
+
* @return {void}
|
|
254
|
+
* @private
|
|
255
|
+
*/
|
|
256
|
+
_$setAction(): void;
|
|
257
|
+
/**
|
|
258
|
+
* @param {number|string} value
|
|
259
|
+
* @return {void}
|
|
260
|
+
* @private
|
|
261
|
+
*/
|
|
262
|
+
_$goToFrame(value: string | number): void;
|
|
263
|
+
/**
|
|
264
|
+
* @return {void}
|
|
265
|
+
* @method
|
|
266
|
+
* @private
|
|
267
|
+
*/
|
|
268
|
+
_$prepareActions(): void;
|
|
269
|
+
/**
|
|
270
|
+
* @return {boolean}
|
|
271
|
+
* @method
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
_$nextFrame(): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* @param {LoopConfig} loop_config
|
|
277
|
+
* @return {number}
|
|
278
|
+
* @method
|
|
279
|
+
* @private
|
|
280
|
+
*/
|
|
281
|
+
_$getLoopFrame(loop_config: LoopConfigImpl): number;
|
|
282
|
+
/**
|
|
283
|
+
* @param {object} character
|
|
284
|
+
* @return {void}
|
|
285
|
+
* @method
|
|
286
|
+
* @private
|
|
287
|
+
*/
|
|
288
|
+
_$buildCharacter(character: MovieClipCharacterImpl): void;
|
|
289
|
+
/**
|
|
290
|
+
* @param {object} character
|
|
291
|
+
* @return {void}
|
|
292
|
+
* @method
|
|
293
|
+
* @private
|
|
294
|
+
*/
|
|
295
|
+
_$sync(character: Character<MovieClipCharacterImpl>): void;
|
|
296
|
+
/**
|
|
297
|
+
* @param {object} tag
|
|
298
|
+
* @param {DisplayObjectContainer} parent
|
|
299
|
+
* @return {object}
|
|
300
|
+
* @method
|
|
301
|
+
* @private
|
|
302
|
+
*/
|
|
303
|
+
_$build(tag: DictionaryTagImpl, parent: ParentImpl<any>): MovieClipCharacterImpl;
|
|
304
|
+
/**
|
|
305
|
+
* @return {void}
|
|
306
|
+
* @method
|
|
307
|
+
* @private
|
|
308
|
+
*/
|
|
309
|
+
_$soundPlay(): void;
|
|
310
|
+
}
|