@next2d/renderer 3.15.1 → 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 +5 -5
- package/src/CommandController.js +1 -34
- package/src/RenderFrameLimiter.js +2 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/renderer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Next2D Renderer Package",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"url": "git+https://github.com/Next2D/Player.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@next2d/webgl": "3.
|
|
28
|
-
"@next2d/webgpu": "3.
|
|
29
|
-
"@next2d/cache": "3.
|
|
30
|
-
"@next2d/texture-packer": "3.
|
|
27
|
+
"@next2d/webgl": "3.16.0",
|
|
28
|
+
"@next2d/webgpu": "3.16.0",
|
|
29
|
+
"@next2d/cache": "3.16.0",
|
|
30
|
+
"@next2d/texture-packer": "3.16.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/CommandController.js
CHANGED
|
@@ -15,40 +15,7 @@ export class CommandController {
|
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
17
|
constructor() {
|
|
18
|
-
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: new RenderFrameLimiter(2)
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* @description workerの実行状態
|
|
26
|
-
* Execution status of worker
|
|
27
|
-
*
|
|
28
|
-
* @type {string}
|
|
29
|
-
* @default "deactivate"
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
Object.defineProperty(this, "state", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true,
|
|
36
|
-
value: void 0
|
|
37
|
-
});
|
|
38
|
-
/**
|
|
39
|
-
* @description 受け取ったメッセージ配列
|
|
40
|
-
* Received message array
|
|
41
|
-
*
|
|
42
|
-
* @type {array}
|
|
43
|
-
* @default []
|
|
44
|
-
* @public
|
|
45
|
-
*/
|
|
46
|
-
Object.defineProperty(this, "queue", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
configurable: true,
|
|
49
|
-
writable: true,
|
|
50
|
-
value: void 0
|
|
51
|
-
});
|
|
18
|
+
this.frameLimiter = new RenderFrameLimiter(2);
|
|
52
19
|
this.state = "deactivate";
|
|
53
20
|
this.queue = [];
|
|
54
21
|
}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
/** Limits outstanding rendered frames without mixing buffer ownership with GPU completion. */
|
|
2
2
|
export class RenderFrameLimiter {
|
|
3
3
|
constructor(limit = 2) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true,
|
|
8
|
-
value: limit
|
|
9
|
-
});
|
|
10
|
-
Object.defineProperty(this, "pending", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: []
|
|
15
|
-
});
|
|
4
|
+
this.limit = limit;
|
|
5
|
+
this.pending = [];
|
|
16
6
|
if (!Number.isInteger(limit) || limit < 1) {
|
|
17
7
|
throw new RangeError("Invalid frame limit");
|
|
18
8
|
}
|