@safe-engine/cocos 2.2.6 → 2.2.7

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.
@@ -89,7 +89,7 @@ export class PhysicsSystem {
89
89
  fixtureDef.set_density(density);
90
90
  fixtureDef.set_friction(friction);
91
91
  fixtureDef.set_restitution(restitution);
92
- fixtureDef.set_isSensor(isSensor);
92
+ fixtureDef.set_isSensor(isSensor !== undefined);
93
93
  rigidBody.body.CreateFixture(fixtureDef);
94
94
  rigidBody.body.SetTransform(position, 0);
95
95
  rigidBody.body.SetLinearVelocity(zero);
@@ -74,10 +74,10 @@ export class GUISystem {
74
74
  node.setContentSize(contentSize);
75
75
  node.setViewSize(viewSize);
76
76
  node.setDirection(direction);
77
- if (isScrollToTop)
77
+ if (isScrollToTop !== undefined)
78
78
  node.setContentOffset(cc.p(0, viewSize.height - contentSize.height));
79
79
  // node.setTouchEnabled(false)
80
- node.setBounceable(isBounced);
80
+ node.setBounceable(isBounced !== undefined);
81
81
  scrollView.node = entity.assign(new NodeComp(node, entity));
82
82
  };
83
83
  onAddBlockInputEventsComp = ({ entity, component: blockInput }) => {
@@ -49,7 +49,7 @@ export class RenderSystem {
49
49
  spriteComp.node = ett.assign(new NodeComp(node, ett));
50
50
  };
51
51
  onAddMaskRender = ({ entity, component: maskComp }) => {
52
- const { inverted = false, spriteFrame, cropSize, alphaThreshold = 0.05 } = maskComp.props;
52
+ const { inverted, spriteFrame, cropSize, alphaThreshold = 0.05 } = maskComp.props;
53
53
  let stencil = new cc.Sprite(spriteFrame);
54
54
  if (cropSize) {
55
55
  const { width, height } = cropSize;
@@ -57,7 +57,7 @@ export class RenderSystem {
57
57
  }
58
58
  const clipper = new cc.ClippingNode(stencil);
59
59
  clipper.setAlphaThreshold(!spriteFrame ? 1 : alphaThreshold);
60
- clipper.setInverted(inverted);
60
+ clipper.setInverted(inverted !== undefined);
61
61
  maskComp.node = entity.assign(new NodeComp(clipper, entity));
62
62
  };
63
63
  onAddGraphicsRender = ({ entity }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-engine/cocos",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "safe-engine with cocos renderer support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",