@next2d/core 3.15.0 → 3.16.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.
- package/package.json +11 -11
- package/src/Next2D.js +0 -117
- package/src/Player/usecase/PlayerTickerUseCase.js +9 -0
- package/src/Player.js +0 -196
- package/src/renderer.worker.inline.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Next2D Core Package",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"url": "git+https://github.com/Next2D/Player.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@next2d/core": "3.
|
|
28
|
-
"@next2d/display": "3.
|
|
29
|
-
"@next2d/events": "3.
|
|
30
|
-
"@next2d/filters": "3.
|
|
31
|
-
"@next2d/geom": "3.
|
|
32
|
-
"@next2d/media": "3.
|
|
33
|
-
"@next2d/net": "3.
|
|
34
|
-
"@next2d/text": "3.
|
|
35
|
-
"@next2d/ui": "3.
|
|
36
|
-
"@next2d/render-queue": "3.
|
|
27
|
+
"@next2d/core": "3.16.0",
|
|
28
|
+
"@next2d/display": "3.16.0",
|
|
29
|
+
"@next2d/events": "3.16.0",
|
|
30
|
+
"@next2d/filters": "3.16.0",
|
|
31
|
+
"@next2d/geom": "3.16.0",
|
|
32
|
+
"@next2d/media": "3.16.0",
|
|
33
|
+
"@next2d/net": "3.16.0",
|
|
34
|
+
"@next2d/text": "3.16.0",
|
|
35
|
+
"@next2d/ui": "3.16.0",
|
|
36
|
+
"@next2d/render-queue": "3.16.0"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/src/Next2D.js
CHANGED
|
@@ -22,123 +22,6 @@ export class Next2D {
|
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
24
|
constructor() {
|
|
25
|
-
/**
|
|
26
|
-
* @description Displayパッケージ
|
|
27
|
-
* Display package
|
|
28
|
-
*
|
|
29
|
-
* @type {IDisplay}
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
Object.defineProperty(this, "display", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true,
|
|
36
|
-
value: void 0
|
|
37
|
-
});
|
|
38
|
-
/**
|
|
39
|
-
* @description Eventsパッケージ
|
|
40
|
-
* Events package
|
|
41
|
-
*
|
|
42
|
-
* @type {IEvents}
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
Object.defineProperty(this, "events", {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
configurable: true,
|
|
48
|
-
writable: true,
|
|
49
|
-
value: void 0
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
* @description Filtersパッケージ
|
|
53
|
-
* Filters package
|
|
54
|
-
*
|
|
55
|
-
* @type {IFilters}
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
Object.defineProperty(this, "filters", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true,
|
|
62
|
-
value: void 0
|
|
63
|
-
});
|
|
64
|
-
/**
|
|
65
|
-
* @description Geomパッケージ
|
|
66
|
-
* Geom package
|
|
67
|
-
*
|
|
68
|
-
* @type {IGeom}
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
Object.defineProperty(this, "geom", {
|
|
72
|
-
enumerable: true,
|
|
73
|
-
configurable: true,
|
|
74
|
-
writable: true,
|
|
75
|
-
value: void 0
|
|
76
|
-
});
|
|
77
|
-
/**
|
|
78
|
-
* @description Mediaパッケージ
|
|
79
|
-
* Media package
|
|
80
|
-
*
|
|
81
|
-
* @type {IMedia}
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
Object.defineProperty(this, "media", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
configurable: true,
|
|
87
|
-
writable: true,
|
|
88
|
-
value: void 0
|
|
89
|
-
});
|
|
90
|
-
/**
|
|
91
|
-
* @description Netパッケージ
|
|
92
|
-
* Net package
|
|
93
|
-
*
|
|
94
|
-
* @type {INet}
|
|
95
|
-
* @public
|
|
96
|
-
*/
|
|
97
|
-
Object.defineProperty(this, "net", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
configurable: true,
|
|
100
|
-
writable: true,
|
|
101
|
-
value: void 0
|
|
102
|
-
});
|
|
103
|
-
/**
|
|
104
|
-
* @description Textパッケージ
|
|
105
|
-
* Text package
|
|
106
|
-
*
|
|
107
|
-
* @type {IText}
|
|
108
|
-
* @public
|
|
109
|
-
*/
|
|
110
|
-
Object.defineProperty(this, "text", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
configurable: true,
|
|
113
|
-
writable: true,
|
|
114
|
-
value: void 0
|
|
115
|
-
});
|
|
116
|
-
/**
|
|
117
|
-
* @description UIパッケージ
|
|
118
|
-
* UI package
|
|
119
|
-
*
|
|
120
|
-
* @type {IUI}
|
|
121
|
-
* @public
|
|
122
|
-
*/
|
|
123
|
-
Object.defineProperty(this, "ui", {
|
|
124
|
-
enumerable: true,
|
|
125
|
-
configurable: true,
|
|
126
|
-
writable: true,
|
|
127
|
-
value: void 0
|
|
128
|
-
});
|
|
129
|
-
/**
|
|
130
|
-
* @description 初期起動Promise
|
|
131
|
-
* Initial boot Promise
|
|
132
|
-
*
|
|
133
|
-
* @type {Promise}
|
|
134
|
-
* @private
|
|
135
|
-
*/
|
|
136
|
-
Object.defineProperty(this, "_$promise", {
|
|
137
|
-
enumerable: true,
|
|
138
|
-
configurable: true,
|
|
139
|
-
writable: true,
|
|
140
|
-
value: void 0
|
|
141
|
-
});
|
|
142
25
|
// packages
|
|
143
26
|
this.display = display;
|
|
144
27
|
this.events = events;
|
|
@@ -43,6 +43,15 @@ export const execute = (timestamp) => {
|
|
|
43
43
|
if (stage.changed) {
|
|
44
44
|
playerRenderingPostMessageService();
|
|
45
45
|
}
|
|
46
|
+
// LRU上限を超えたキャッシュを削除する。描画情報を送ったあとに行うことで、
|
|
47
|
+
// worker には必ず「描画」→「削除」の順で届く(生成の途中で削除すると、
|
|
48
|
+
// 作り直したキャッシュがあとから届いた削除で消えてしまう)。
|
|
49
|
+
if ($cacheStore.$overLimit) {
|
|
50
|
+
$cacheStore.evictOverLimit();
|
|
51
|
+
if ($cacheStore.$removeIds.length) {
|
|
52
|
+
playerRemoveCachePostMessageService();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
46
55
|
// タイマーにセットされたキャッシュを削除
|
|
47
56
|
if ($cacheStore.$removeCache) {
|
|
48
57
|
$cacheStore.removeTimerScheduledCache();
|
package/src/Player.js
CHANGED
|
@@ -18,202 +18,6 @@ class Player {
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
constructor() {
|
|
21
|
-
/**
|
|
22
|
-
* @description devicePixelRatioを含んだcanvasの描画領域の幅
|
|
23
|
-
* The width of the drawing area of the canvas including devicePixelRatio
|
|
24
|
-
*
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @default 0
|
|
27
|
-
* @private
|
|
28
|
-
*/
|
|
29
|
-
Object.defineProperty(this, "rendererWidth", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true,
|
|
32
|
-
writable: true,
|
|
33
|
-
value: void 0
|
|
34
|
-
});
|
|
35
|
-
/**
|
|
36
|
-
* @description devicePixelRatioを含んだcanvasの描画領域の高さ
|
|
37
|
-
* The height of the drawing area of the canvas including devicePixelRatio
|
|
38
|
-
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @default 0
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
Object.defineProperty(this, "rendererHeight", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true,
|
|
47
|
-
value: void 0
|
|
48
|
-
});
|
|
49
|
-
/**
|
|
50
|
-
* @description メインのdiv elementの幅
|
|
51
|
-
* Width of the main div element
|
|
52
|
-
*
|
|
53
|
-
* @type {number}
|
|
54
|
-
* @default 0
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
Object.defineProperty(this, "screenWidth", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
configurable: true,
|
|
60
|
-
writable: true,
|
|
61
|
-
value: void 0
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
|
-
* @description メインのdiv elementの高さ
|
|
65
|
-
* Height of the main div element
|
|
66
|
-
*
|
|
67
|
-
* @type {number}
|
|
68
|
-
* @default 0
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
Object.defineProperty(this, "screenHeight", {
|
|
72
|
-
enumerable: true,
|
|
73
|
-
configurable: true,
|
|
74
|
-
writable: true,
|
|
75
|
-
value: void 0
|
|
76
|
-
});
|
|
77
|
-
/**
|
|
78
|
-
* @description devicePixelRatioを含んだcanvasの描画領域の拡大率
|
|
79
|
-
* The magnification of the drawing area of the canvas including devicePixelRatio
|
|
80
|
-
*
|
|
81
|
-
* @type {number}
|
|
82
|
-
* @default 1
|
|
83
|
-
* @private
|
|
84
|
-
*/
|
|
85
|
-
Object.defineProperty(this, "rendererScale", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
configurable: true,
|
|
88
|
-
writable: true,
|
|
89
|
-
value: void 0
|
|
90
|
-
});
|
|
91
|
-
/**
|
|
92
|
-
* @description optionで指定された描画領域の固定幅、optionで指定されない場合は0
|
|
93
|
-
* The fixed width of the drawing area specified by the option, 0 if not specified by the option
|
|
94
|
-
*
|
|
95
|
-
* @type {number}
|
|
96
|
-
* @default 0
|
|
97
|
-
* @public
|
|
98
|
-
*/
|
|
99
|
-
Object.defineProperty(this, "fixedWidth", {
|
|
100
|
-
enumerable: true,
|
|
101
|
-
configurable: true,
|
|
102
|
-
writable: true,
|
|
103
|
-
value: void 0
|
|
104
|
-
});
|
|
105
|
-
/**
|
|
106
|
-
* @description optionで指定された描画領域の固定高さ、optionで指定されない場合は0
|
|
107
|
-
* The fixed height of the drawing area specified by the option, 0 if not specified by the option
|
|
108
|
-
*
|
|
109
|
-
* @type {number}
|
|
110
|
-
* @default 0
|
|
111
|
-
* @public
|
|
112
|
-
*/
|
|
113
|
-
Object.defineProperty(this, "fixedHeight", {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
configurable: true,
|
|
116
|
-
writable: true,
|
|
117
|
-
value: void 0
|
|
118
|
-
});
|
|
119
|
-
/**
|
|
120
|
-
* @description Playerの停止フラグ
|
|
121
|
-
* Player stop flag
|
|
122
|
-
*
|
|
123
|
-
* @type {boolean}
|
|
124
|
-
* @default true
|
|
125
|
-
* @private
|
|
126
|
-
*/
|
|
127
|
-
Object.defineProperty(this, "stopFlag", {
|
|
128
|
-
enumerable: true,
|
|
129
|
-
configurable: true,
|
|
130
|
-
writable: true,
|
|
131
|
-
value: void 0
|
|
132
|
-
});
|
|
133
|
-
/**
|
|
134
|
-
* @description Playerの描画開始時間
|
|
135
|
-
* Player drawing start time
|
|
136
|
-
*
|
|
137
|
-
* @type {number}
|
|
138
|
-
* @default 0
|
|
139
|
-
* @private
|
|
140
|
-
*/
|
|
141
|
-
Object.defineProperty(this, "startTime", {
|
|
142
|
-
enumerable: true,
|
|
143
|
-
configurable: true,
|
|
144
|
-
writable: true,
|
|
145
|
-
value: void 0
|
|
146
|
-
});
|
|
147
|
-
/**
|
|
148
|
-
* @description PlayerのFPS
|
|
149
|
-
* Player FPS
|
|
150
|
-
*
|
|
151
|
-
* @type {number}
|
|
152
|
-
* @default 16
|
|
153
|
-
* @private
|
|
154
|
-
*/
|
|
155
|
-
Object.defineProperty(this, "fps", {
|
|
156
|
-
enumerable: true,
|
|
157
|
-
configurable: true,
|
|
158
|
-
writable: true,
|
|
159
|
-
value: void 0
|
|
160
|
-
});
|
|
161
|
-
/**
|
|
162
|
-
* @description optionで指定されたcanvasのID、optionで指定されない場合は空文字
|
|
163
|
-
* The ID of the canvas specified by the option, an empty string if not specified by the option
|
|
164
|
-
*
|
|
165
|
-
* @type {string}
|
|
166
|
-
* @default ""
|
|
167
|
-
* @private
|
|
168
|
-
*/
|
|
169
|
-
Object.defineProperty(this, "tagId", {
|
|
170
|
-
enumerable: true,
|
|
171
|
-
configurable: true,
|
|
172
|
-
writable: true,
|
|
173
|
-
value: void 0
|
|
174
|
-
});
|
|
175
|
-
/**
|
|
176
|
-
* @description フルスクリーンモードの設定
|
|
177
|
-
* Full screen mode setting
|
|
178
|
-
*
|
|
179
|
-
* @type {boolean}
|
|
180
|
-
* @default false
|
|
181
|
-
* @private
|
|
182
|
-
*/
|
|
183
|
-
Object.defineProperty(this, "_$fullScreen", {
|
|
184
|
-
enumerable: true,
|
|
185
|
-
configurable: true,
|
|
186
|
-
writable: true,
|
|
187
|
-
value: void 0
|
|
188
|
-
});
|
|
189
|
-
/**
|
|
190
|
-
* @description Playerの描画処理関数のタイマーID
|
|
191
|
-
* Timer ID of the drawing process function of Player
|
|
192
|
-
*
|
|
193
|
-
* @type {number}
|
|
194
|
-
* @default -1
|
|
195
|
-
* @private
|
|
196
|
-
*/
|
|
197
|
-
Object.defineProperty(this, "timerId", {
|
|
198
|
-
enumerable: true,
|
|
199
|
-
configurable: true,
|
|
200
|
-
writable: true,
|
|
201
|
-
value: void 0
|
|
202
|
-
});
|
|
203
|
-
/**
|
|
204
|
-
* @description マウスの状態
|
|
205
|
-
* Mouse state
|
|
206
|
-
*
|
|
207
|
-
* @type {"up" | "down"}
|
|
208
|
-
* @default "up"
|
|
209
|
-
* @public
|
|
210
|
-
*/
|
|
211
|
-
Object.defineProperty(this, "mouseState", {
|
|
212
|
-
enumerable: true,
|
|
213
|
-
configurable: true,
|
|
214
|
-
writable: true,
|
|
215
|
-
value: void 0
|
|
216
|
-
});
|
|
217
21
|
this.rendererWidth = 0;
|
|
218
22
|
this.rendererHeight = 0;
|
|
219
23
|
this.rendererScale = 1;
|