@safe-engine/cocos 1.5.7 → 1.5.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/GUISystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAiBlG,qBAAa,SAAU,YAAW,MAAM;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,aAAa,EAAE,YAAY;IAWrC,OAAO,CAAC,eAAe,CAuBtB;IAED,OAAO,CAAC,sBAAsB,CAa7B;IAED,OAAO,CAAC,cAAc,CAMrB;IAED,OAAO,CAAC,qBAAqB,CAM5B;IAED,OAAO,CAAC,oBAAoB,CAM3B;IAED,OAAO,CAAC,mBAAmB,CAU1B;IAED,OAAO,CAAC,yBAAyB,CAOhC;IAED,OAAO,CAAC,cAAc,CAWrB;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAIjE"}
1
+ {"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/GUISystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAiBlG,qBAAa,SAAU,YAAW,MAAM;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,aAAa,EAAE,YAAY;IAWrC,OAAO,CAAC,eAAe,CAuBtB;IAED,OAAO,CAAC,sBAAsB,CAc7B;IAED,OAAO,CAAC,cAAc,CAMrB;IAED,OAAO,CAAC,qBAAqB,CAM5B;IAED,OAAO,CAAC,oBAAoB,CAM3B;IAED,OAAO,CAAC,mBAAmB,CAU1B;IAED,OAAO,CAAC,yBAAyB,CAOhC;IAED,OAAO,CAAC,cAAc,CAWrB;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAIjE"}
@@ -40,8 +40,9 @@ export class GUISystem {
40
40
  touchComp.props.onTouchCancel = touchComp.props.onTouchEnd;
41
41
  };
42
42
  onAddProgressTimerComp = ({ entity, component: bar }) => {
43
- const { spriteFrame, fillType = FillType.HORIZONTAL, fillRange = 1, fillCenter = Vec2(1, 0) } = bar.props;
44
- const sprite = new cc.Sprite(spriteFrame);
43
+ const { spriteFrame, fillType = FillType.HORIZONTAL, fillRange = 1, fillCenter = Vec2(0, 0) } = bar.props;
44
+ const frame = cc.spriteFrameCache.getSpriteFrame(spriteFrame);
45
+ const sprite = new cc.Sprite(frame || spriteFrame);
45
46
  const pTimer = new cc.ProgressTimer(sprite);
46
47
  const ptt = fillType === FillType.RADIAL ? cc.ProgressTimer.TYPE_RADIAL : cc.ProgressTimer.TYPE_BAR;
47
48
  pTimer.setType(ptt);
@@ -31,7 +31,7 @@ export class RenderSystem {
31
31
  const { spriteFrame } = spriteComp.props;
32
32
  const frame = cc.spriteFrameCache.getSpriteFrame(spriteFrame);
33
33
  // console.log('frame', spriteFrame, frame)
34
- const node = new cc.Sprite(frame);
34
+ const node = new cc.Sprite(frame || spriteFrame);
35
35
  const ett = entity;
36
36
  spriteComp.node = ett.assign(new NodeComp(node, ett));
37
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-engine/cocos",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "safe-engine with cocos renderer support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",