@next2d/renderer 3.17.1 → 3.18.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next2d/renderer",
3
- "version": "3.17.1",
3
+ "version": "3.18.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.17.1",
28
- "@next2d/webgpu": "3.17.1",
29
- "@next2d/cache": "3.17.1",
30
- "@next2d/texture-packer": "3.17.1"
27
+ "@next2d/webgl": "3.18.0",
28
+ "@next2d/webgpu": "3.18.0",
29
+ "@next2d/cache": "3.18.0",
30
+ "@next2d/texture-packer": "3.18.0"
31
31
  }
32
32
  }
@@ -85,8 +85,23 @@ const BITMAP_STROKE = 14;
85
85
  * @protected
86
86
  */
87
87
  export const execute = (commands, is_clip = false) => {
88
+ // 実行環境が経路の実装を提供していれば (WebGL のみ)、経路の命令の並びをまとめて渡す
89
+ let pathCommands = "pathCommands" in $context;
88
90
  let index = 0;
89
91
  while (commands.length > index) {
92
+ if (pathCommands) {
93
+ const code = commands[index];
94
+ if (code === MOVE_TO || code === LINE_TO || code === CURVE_TO
95
+ || code === CUBIC || code === ARC || code === CLOSE_PATH) {
96
+ const next = $context.pathCommands(commands, index);
97
+ if (next > index) {
98
+ index = next;
99
+ continue;
100
+ }
101
+ // この図形では使えない: 以降は 1 つずつ処理する
102
+ pathCommands = false;
103
+ }
104
+ }
90
105
  switch (commands[index++]) {
91
106
  case BEGIN_PATH:
92
107
  $context.beginPath();