@safe-engine/cocos 2.4.2 → 2.5.1

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/dist/app.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare function startGame(defaultFont: string, { width, height }: {
10
10
  width: any;
11
11
  height: any;
12
12
  }, option?: Partial<RunOptions>): Promise<void>;
13
- export declare function loadAll(assets?: string[], cb?: (progress: number) => void): Promise<unknown>;
13
+ export declare function loadAll(assets: any, cb?: (progress: number) => void): Promise<unknown>;
14
14
  export declare function loadJsonFromCache<T>(filePath: string): T;
15
15
  export declare const audioEngine: typeof cc.audioEngine;
16
16
  export {};
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,QAQ7C;AACD,UAAU,UAAU;IAClB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CACtB;AACD,wBAAsB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;;;CAAA,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,iBA2CnG;AAED,wBAAgB,OAAO,CAAC,MAAM,GAAE,MAAM,EAAO,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,oBA4B7E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,CAIxD;AAED,eAAO,MAAM,WAAW,uBAAiB,CAAA"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,QAQ7C;AACD,UAAU,UAAU;IAClB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CACtB;AACD,wBAAsB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;;;CAAA,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,iBA2CnG;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,oBAiCnE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,CAIxD;AAED,eAAO,MAAM,WAAW,uBAAiB,CAAA"}
package/dist/app.js CHANGED
@@ -50,18 +50,25 @@ export async function startGame(defaultFont, { width, height }, option) {
50
50
  });
51
51
  });
52
52
  }
53
- export function loadAll(assets = [], cb) {
53
+ export function loadAll(assets, cb) {
54
+ const allAssets = [];
55
+ Object.values(assets).forEach((value) => {
56
+ if (value.skeleton) {
57
+ allAssets.push(value.skeleton, value.atlas, value.texture);
58
+ }
59
+ else if (value.endsWith('.ttf')) {
60
+ allAssets.push({
61
+ type: 'font',
62
+ name: cc.path.basename(value, '.ttf'),
63
+ srcs: [value],
64
+ });
65
+ }
66
+ else {
67
+ allAssets.push(value);
68
+ }
69
+ });
54
70
  return new Promise((resolve) => {
55
- cc.loader.load(assets.map((value) => {
56
- if (value.endsWith('.ttf')) {
57
- return {
58
- type: 'font',
59
- name: cc.path.basename(value, '.ttf'),
60
- srcs: [value],
61
- };
62
- }
63
- return value;
64
- }), function (result, count, loadedCount) {
71
+ cc.loader.load(allAssets, function (result, count, loadedCount) {
65
72
  // console.log(result)
66
73
  if (result instanceof cc.Texture2D) {
67
74
  // cc.textureCache.addImage(result.url)
@@ -1 +1 @@
1
- {"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../src/render/RenderSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAKnF,oBAAY,WAAW;IACrB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,KAAK,IAAA;IACL,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AA4CD,qBAAa,YAAa,YAAW,MAAM;IACzC,SAAS,CAAC,aAAa,EAAE,YAAY;IAWrC,OAAO,CAAC,eAAe,CAKtB;IAED,OAAO,CAAC,iBAAiB,CAgBxB;IAED,OAAO,CAAC,eAAe,CAatB;IAED,OAAO,CAAC,mBAAmB,CAQ1B;IAED,OAAO,CAAC,iBAAiB,CAKxB;IAED,OAAO,CAAC,aAAa,CAKpB;IAED,OAAO,CAAC,iBAAiB,CAUxB;IAED,OAAO,CAAC,iBAAiB,CAKxB;CAKF"}
1
+ {"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../src/render/RenderSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAMnF,oBAAY,WAAW;IACrB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,KAAK,IAAA;IACL,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED,qBAAa,YAAa,YAAW,MAAM;IACzC,SAAS,CAAC,aAAa,EAAE,YAAY;IAWrC,OAAO,CAAC,eAAe,CAKtB;IAED,OAAO,CAAC,iBAAiB,CAgBxB;IAED,OAAO,CAAC,eAAe,CAatB;IAED,OAAO,CAAC,mBAAmB,CAQ1B;IAED,OAAO,CAAC,iBAAiB,CAKxB;IAED,OAAO,CAAC,aAAa,CAKpB;IAED,OAAO,CAAC,iBAAiB,CAUxB;IAED,OAAO,CAAC,iBAAiB,CAKxB;CAKF"}
@@ -1,6 +1,7 @@
1
1
  import { EventTypes } from 'entityx-ts';
2
2
  import { NodeComp } from '../core/NodeComp';
3
3
  import { GraphicsRender, MaskRender, MotionStreakComp, NodeRender, ParticleComp, SpriteRender, TiledMap } from './RenderComponent';
4
+ import { createTiledSprite } from './TiledSprite';
4
5
  export var SpriteTypes;
5
6
  (function (SpriteTypes) {
6
7
  SpriteTypes[SpriteTypes["SIMPLE"] = 0] = "SIMPLE";
@@ -10,41 +11,6 @@ export var SpriteTypes;
10
11
  SpriteTypes[SpriteTypes["MESH"] = 4] = "MESH";
11
12
  SpriteTypes[SpriteTypes["ANIMATION"] = 5] = "ANIMATION";
12
13
  })(SpriteTypes || (SpriteTypes = {}));
13
- function createTiledSprite(src, totalW, totalH) {
14
- // tạo sprite từ input
15
- const tileSprite = new cc.Sprite(src);
16
- // lấy kích thước gốc của texture
17
- const frame = tileSprite.getSpriteFrame();
18
- const tileW = frame ? frame.getRect().width : tileSprite.getContentSize().width;
19
- const tileH = frame ? frame.getRect().height : tileSprite.getContentSize().height;
20
- // tạo renderTexture với kích thước cần phủ
21
- const { width, height } = cc.winSize;
22
- const rt = new cc.RenderTexture(width, height);
23
- rt.beginWithClear(0, 0, 0, 0);
24
- const drawSprite = new cc.Sprite(tileSprite.getTexture());
25
- // if (frame) {
26
- // drawSprite.setSpriteFrame(frame)
27
- // }
28
- drawSprite.setAnchorPoint(0, 0);
29
- // số tile theo trục x,y
30
- const cols = Math.ceil(totalW / tileW);
31
- const rows = Math.ceil(totalH / tileH);
32
- for (let r = 0; r < rows; r++) {
33
- for (let c = 0; c < cols; c++) {
34
- const s = new cc.Sprite(frame);
35
- s.setFlippedY(true);
36
- s.setAnchorPoint(0, 0);
37
- s.setPosition(c * tileW, r * tileH);
38
- s.visit(rt);
39
- }
40
- }
41
- rt.end();
42
- const finalSprite = rt.sprite;
43
- // finalSprite.setFlippedY(true) // RenderTexture bị lật
44
- finalSprite.setAnchorPoint(0, 0);
45
- finalSprite.setContentSize(cc.size(totalW, totalH));
46
- return new cc.Sprite(finalSprite.texture);
47
- }
48
14
  export class RenderSystem {
49
15
  configure(event_manager) {
50
16
  event_manager.subscribe(EventTypes.ComponentAdded, NodeRender, this.onAddNodeRender);
@@ -1,13 +1,12 @@
1
- import { Application, TilingSprite } from 'pixi.js';
2
- export declare class TiledSprite extends cc.Sprite {
3
- _tilingSprite: TilingSprite;
4
- _canvas: any;
5
- _pixiApp: Application;
6
- _texture: cc.Texture2D;
7
- constructor(config: any);
8
- setContentSize(size: any, height: any): void;
9
- setScale(scaleX: any, scaleY?: any): void;
10
- _updateRepeat(): void;
11
- onExit(): void;
1
+ export declare class TiledSpriteNode extends cc.Sprite {
2
+ _program: cc.GLProgram;
3
+ _tileScaleLoc: WebGLUniformLocation;
4
+ _texSizeLoc: WebGLUniformLocation;
5
+ _texLoc: WebGLUniformLocation;
6
+ constructor(file: any);
7
+ initShader(): void;
8
+ updateShaderUniforms(): void;
9
+ setContentSize(w: any, h: any): void;
12
10
  }
11
+ export declare function createTiledSprite(src: string, totalW: number, totalH: number): cc.Sprite;
13
12
  //# sourceMappingURL=TiledSprite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TiledSprite.d.ts","sourceRoot":"","sources":["../../src/render/TiledSprite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,YAAY,EAAE,MAAM,SAAS,CAAA;AAEpE,qBAAa,WAAY,SAAQ,EAAE,CAAC,MAAM;IACxC,aAAa,EAAE,YAAY,CAAA;IAC3B,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,WAAW,CAAA;IACrB,QAAQ,EAAE,EAAE,CAAC,SAAS,CAAA;gBAEV,MAAM,KAAA;IAoClB,cAAc,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA;IAM3B,QAAQ,CAAC,MAAM,KAAA,EAAE,MAAM,CAAC,KAAA;IAKxB,aAAa;IAeb,MAAM;CAMP"}
1
+ {"version":3,"file":"TiledSprite.d.ts","sourceRoot":"","sources":["../../src/render/TiledSprite.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAgB,SAAQ,EAAE,CAAC,MAAM;IAC5C,QAAQ,EAAE,EAAE,CAAC,SAAS,CAAA;IACtB,aAAa,EAAE,oBAAoB,CAAA;IACnC,WAAW,EAAE,oBAAoB,CAAA;IACjC,OAAO,EAAE,oBAAoB,CAAA;gBAEjB,IAAI,KAAA;IAMhB,UAAU;IAqBV,oBAAoB;IAgBpB,cAAc,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA;CAIpB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAmC5E"}
@@ -1,69 +1,83 @@
1
- import { Application, Assets, Texture, TilingSprite } from 'pixi.js';
2
- export class TiledSprite extends cc.Sprite {
3
- _tilingSprite;
4
- _canvas;
5
- _pixiApp;
6
- _texture;
7
- constructor(config) {
8
- super();
9
- super.ctor();
10
- this._canvas = document.createElement('canvas');
11
- this._canvas.width = config.width || 1024;
12
- this._canvas.height = config.height || 1024;
13
- this._pixiApp = new Application();
14
- this._pixiApp
15
- .init({
16
- view: this._canvas,
17
- width: this._canvas.width,
18
- height: this._canvas.height,
19
- backgroundAlpha: 0, // nền trong suốt
20
- // transparent: true, // bắt buộc để alpha hoạt động
21
- clearBeforeRender: true, // xoá trước khi vẽ frame mới
22
- preserveDrawingBuffer: true, // giúp lấy ảnh từ canvas
23
- antialias: true,
24
- })
25
- .then(() => {
26
- Assets.load(config.texture).then(() => {
27
- const texture = Texture.from(config.texture);
28
- const { width, height } = config;
29
- this._tilingSprite = new TilingSprite({ texture, width, height });
30
- this._pixiApp.stage.addChild(this._tilingSprite);
31
- this._updateRepeat();
32
- });
33
- });
34
- this._texture = new cc.Texture2D();
35
- this._texture.initWithElement(this._canvas);
36
- this._texture.handleLoadedTexture();
37
- this.initWithTexture(this._texture);
38
- // this.schedule(this._updateRepeat, 1, Infinity, 0)
1
+ import { tieldFsh, tiledVsh } from './shader';
2
+ export class TiledSpriteNode extends cc.Sprite {
3
+ _program;
4
+ _tileScaleLoc;
5
+ _texSizeLoc;
6
+ _texLoc;
7
+ constructor(file) {
8
+ super(file);
9
+ this.ctor();
10
+ this.initShader();
39
11
  }
40
- setContentSize(size, height) {
41
- // console.log('setContentSize', size, height)
42
- super.setContentSize(size, height);
43
- this._updateRepeat();
12
+ initShader() {
13
+ const program = new cc.GLProgram();
14
+ program.initWithVertexShaderByteArray(tiledVsh, tieldFsh);
15
+ program.addAttribute(cc.ATTRIBUTE_NAME_POSITION, cc.VERTEX_ATTRIB_POSITION);
16
+ program.addAttribute(cc.ATTRIBUTE_NAME_COLOR, cc.VERTEX_ATTRIB_COLOR);
17
+ program.addAttribute(cc.ATTRIBUTE_NAME_TEX_COORD, cc.VERTEX_ATTRIB_TEX_COORDS);
18
+ program.link();
19
+ program.updateUniforms();
20
+ program.use();
21
+ this._program = program;
22
+ this.setShaderProgram(program);
23
+ // Lưu lại uniform location để update nhanh
24
+ this._tileScaleLoc = program.getUniformLocationForName('u_tileScale');
25
+ this._texSizeLoc = program.getUniformLocationForName('u_texSize');
26
+ this._texLoc = program.getUniformLocationForName('u_texture');
27
+ this.scheduleUpdate();
44
28
  }
45
- setScale(scaleX, scaleY) {
46
- super.setScale(scaleX, scaleY);
47
- this._updateRepeat();
29
+ updateShaderUniforms() {
30
+ if (!this._program || !this.texture || !this.texture.isLoaded())
31
+ return;
32
+ const texW = this.texture.width;
33
+ const texH = this.texture.height;
34
+ const size = this.getContentSize();
35
+ const scaleX = size.width / texW;
36
+ const scaleY = size.height / texH;
37
+ this._program.use();
38
+ this._program.setUniformLocationWith2f(this._tileScaleLoc, scaleX, scaleY);
39
+ this._program.setUniformLocationWith2f(this._texSizeLoc, texW, texH);
40
+ this._program.setUniformLocationWith1i(this._texLoc, 0);
48
41
  }
49
- _updateRepeat() {
50
- if (this._tilingSprite && this._pixiApp.renderer) {
51
- this._tilingSprite.width = this.width;
52
- this._tilingSprite.height = this.height;
53
- this._canvas.width = this.width;
54
- this._canvas.height = this.height;
55
- // console.log('_updateRepeat', this._pixiApp, this._tilingSprite)
56
- this._pixiApp.renderer.render(this._pixiApp.stage);
57
- this._texture.initWithElement(this._canvas);
58
- this._texture.handleLoadedTexture();
59
- // console.log('_texture', this._texture, this)
60
- this.setTexture(this._texture);
61
- }
42
+ setContentSize(w, h) {
43
+ super.setContentSize(w, h);
44
+ this.updateShaderUniforms();
62
45
  }
63
- onExit() {
64
- this.unschedule(this._updateRepeat);
65
- this._pixiApp.destroy(true, { children: true });
66
- this._canvas.remove();
67
- super.onExit();
46
+ }
47
+ export function createTiledSprite(src, totalW, totalH) {
48
+ // tạo sprite từ input
49
+ const tileSprite = new cc.Sprite(src);
50
+ // lấy kích thước gốc của texture
51
+ const tileW = tileSprite.texture.width;
52
+ const tileH = tileSprite.texture.height;
53
+ const program = new cc.GLProgram();
54
+ program.initWithString(tiledVsh, tieldFsh);
55
+ // program.initWithVertexShaderByteArray(vert, frag);
56
+ program.addAttribute(cc.ATTRIBUTE_NAME_POSITION, cc.VERTEX_ATTRIB_POSITION);
57
+ program.addAttribute(cc.ATTRIBUTE_NAME_COLOR, cc.VERTEX_ATTRIB_COLOR);
58
+ program.addAttribute(cc.ATTRIBUTE_NAME_TEX_COORD, cc.VERTEX_ATTRIB_TEX_COORDS);
59
+ if (!program.link()) {
60
+ console.error('Failed to link shader program');
61
+ return;
62
+ }
63
+ program.updateUniforms();
64
+ program.setUniformLocationWith1i(program.getUniformLocationForName('u_texture'), 0);
65
+ const tileScaleLoc = program.getUniformLocationForName('u_tileScale');
66
+ const texSizeLoc = program.getUniformLocationForName('u_texSize');
67
+ const scaleX = totalW / tileW;
68
+ const scaleY = totalH / tileH;
69
+ if (tileSprite.texture._textureLoaded)
70
+ afterLoaded();
71
+ else
72
+ tileSprite.texture.addLoadedEventListener(afterLoaded);
73
+ function afterLoaded() {
74
+ // program.use()
75
+ program.setUniformLocationWith2f(texSizeLoc, tileW, tileH);
76
+ program.setUniformLocationWith2f(tileScaleLoc, scaleX, scaleY);
77
+ tileSprite.setShaderProgram(program);
78
+ // nếu dùng batch node hoặc spriteframe atlas, đảm bảo texture unit đúng
68
79
  }
80
+ // tileSprite.setContentSize(totalW, totalH)
81
+ tileSprite.setScale(scaleX, scaleY);
82
+ return tileSprite;
69
83
  }
@@ -0,0 +1,3 @@
1
+ export declare const tieldFsh = "\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\nvarying vec2 v_texCoord;\nvarying vec4 v_fragmentColor;\n\nuniform sampler2D u_texture;\nuniform vec2 u_tileScale;\nuniform vec2 u_texSize;\n\nvoid main()\n{\n // scale UV to tile space\n vec2 uv = v_texCoord * u_tileScale;\n\n // wrap using fract\n vec2 uvw = fract(uv);\n\n // avoid linear-filter seams: push UVs slightly away from exact 0.0/1.0 edges\n // compute texel size in uv-space\n vec2 texel = 1.0 / u_texSize;\n\n // shrink usable range slightly to avoid sampling border when linear filter is used\n // the factor 1.0 - 2.0*texel moves the uv into [texel, 1-texel]\n uvw = uvw * (1.0 - 2.0 * texel) + texel;\n\n vec4 color = texture2D(u_texture, uvw);\n\n gl_FragColor = color * v_fragmentColor;\n}\n";
2
+ export declare const tiledVsh = "\nattribute vec4 a_position;\nattribute vec2 a_texCoord;\nattribute vec4 a_color;\n\n#ifdef GL_ES\nvarying mediump vec2 v_texCoord;\nvarying lowp vec4 v_fragmentColor;\n#else\nvarying vec2 v_texCoord;\nvarying vec4 v_fragmentColor;\n#endif\n\nvoid main() {\n gl_Position = CC_PMatrix * a_position;\n v_texCoord = a_texCoord;\n v_fragmentColor = a_color;\n}\n";
3
+ //# sourceMappingURL=shader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shader.d.ts","sourceRoot":"","sources":["../../src/render/shader.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,qyBAgCpB,CAAA;AACD,eAAO,MAAM,QAAQ,oXAkBpB,CAAA"}
@@ -0,0 +1,52 @@
1
+ export const tieldFsh = `
2
+ #ifdef GL_ES
3
+ precision mediump float;
4
+ #endif
5
+
6
+ varying vec2 v_texCoord;
7
+ varying vec4 v_fragmentColor;
8
+
9
+ uniform sampler2D u_texture;
10
+ uniform vec2 u_tileScale;
11
+ uniform vec2 u_texSize;
12
+
13
+ void main()
14
+ {
15
+ // scale UV to tile space
16
+ vec2 uv = v_texCoord * u_tileScale;
17
+
18
+ // wrap using fract
19
+ vec2 uvw = fract(uv);
20
+
21
+ // avoid linear-filter seams: push UVs slightly away from exact 0.0/1.0 edges
22
+ // compute texel size in uv-space
23
+ vec2 texel = 1.0 / u_texSize;
24
+
25
+ // shrink usable range slightly to avoid sampling border when linear filter is used
26
+ // the factor 1.0 - 2.0*texel moves the uv into [texel, 1-texel]
27
+ uvw = uvw * (1.0 - 2.0 * texel) + texel;
28
+
29
+ vec4 color = texture2D(u_texture, uvw);
30
+
31
+ gl_FragColor = color * v_fragmentColor;
32
+ }
33
+ `;
34
+ export const tiledVsh = `
35
+ attribute vec4 a_position;
36
+ attribute vec2 a_texCoord;
37
+ attribute vec4 a_color;
38
+
39
+ #ifdef GL_ES
40
+ varying mediump vec2 v_texCoord;
41
+ varying lowp vec4 v_fragmentColor;
42
+ #else
43
+ varying vec2 v_texCoord;
44
+ varying vec4 v_fragmentColor;
45
+ #endif
46
+
47
+ void main() {
48
+ gl_Position = CC_PMatrix * a_position;
49
+ v_texCoord = a_texCoord;
50
+ v_fragmentColor = a_color;
51
+ }
52
+ `;
@@ -47,7 +47,6 @@ export declare class CCSkeleton extends cc.Node {
47
47
  _debugBones: boolean;
48
48
  _premultipliedAlpha: boolean;
49
49
  _ownsSkeletonData: any;
50
- _renderCmd: any;
51
50
  _state: AnimationState;
52
51
  _ownsAnimationStateData: boolean;
53
52
  _listener: any;
@@ -1 +1 @@
1
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O,EAAE,OAAO;IAIrC,oBAAoB;IAIpB,YAAY,CAAC,KAAK,EAAE,MAAM;IAI1B,YAAY;IAIZ,YAAY,CAAC,gBAAgB,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAiC9D,cAAc;IAkDd,oBAAoB;IAIpB,cAAc;IAId,mBAAmB;IAInB,mBAAmB;IAInB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAIzB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAIzB,OAAO,CAAC,QAAQ,EAAE,MAAM;IAIxB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAItD,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAItD,qBAAqB,CAAC,aAAa,EAAE,OAAO;IAI5C,oBAAoB;IAIpB,eAAe,CAAC,YAAY,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG;IAiBxD,eAAe,CAAC,gBAAgB,EAAE,GAAG;IAIrC,YAAY;IAaZ,YAAY;IAIZ,MAAM,CAAC,EAAE,EAAE,GAAG;CAGf"}
@@ -50,7 +50,6 @@ export class CCSkeleton extends cc.Node {
50
50
  _debugBones = false;
51
51
  _premultipliedAlpha = false;
52
52
  _ownsSkeletonData = null;
53
- _renderCmd;
54
53
  _state;
55
54
  _ownsAnimationStateData = false;
56
55
  _listener;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-engine/cocos",
3
- "version": "2.4.2",
3
+ "version": "2.5.1",
4
4
  "description": "safe-engine with cocos renderer support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@cocos/dragonbones-js": "^1.0.2",
25
- "@esotericsoftware/spine-core": "^4.2.93",
25
+ "@esotericsoftware/spine-core": "^4.2.94",
26
26
  "box2d-wasm": "^7.0.0",
27
- "cocos-html5-ts": "^2.1.2",
27
+ "cocos-html5-ts": "^2.1.4",
28
28
  "entityx-ts": "^2.3.1"
29
29
  },
30
30
  "author": "",