@galacean/engine 1.3.5 → 1.3.6

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/browser.js CHANGED
@@ -15560,6 +15560,9 @@
15560
15560
  __decorate$1([
15561
15561
  assignmentClone
15562
15562
  ], SpriteMask.prototype, "influenceLayers", void 0);
15563
+ __decorate$1([
15564
+ ignoreClone
15565
+ ], SpriteMask.prototype, "_renderElement", void 0);
15563
15566
  __decorate$1([
15564
15567
  ignoreClone
15565
15568
  ], SpriteMask.prototype, "_subChunk", void 0);
@@ -25645,6 +25648,8 @@
25645
25648
  _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
25646
25649
  //@ts-ignore
25647
25650
  _this._upDirection._onValueChanged = _this._setUpDirection;
25651
+ // sync world position to physical space
25652
+ _this._onUpdate();
25648
25653
  return _this;
25649
25654
  };
25650
25655
  _inherits$2(CharacterController, Collider1);
@@ -25656,7 +25661,9 @@
25656
25661
  * @param elapsedTime - Time elapsed since last call
25657
25662
  * @return flags - The ControllerCollisionFlag
25658
25663
  */ _proto.move = function move(disp, minDist, elapsedTime) {
25659
- return this._nativeCollider.move(disp, minDist, elapsedTime);
25664
+ var flags = this._nativeCollider.move(disp, minDist, elapsedTime);
25665
+ this._syncWorldPositionFromPhysicalSpace();
25666
+ return flags;
25660
25667
  };
25661
25668
  /**
25662
25669
  * Add collider shape on this controller.
@@ -25692,8 +25699,7 @@
25692
25699
  /**
25693
25700
  * @internal
25694
25701
  */ _proto._onLateUpdate = function _onLateUpdate() {
25695
- var position = this.entity.transform.worldPosition;
25696
- this._nativeCollider.getWorldPosition(position);
25702
+ this._syncWorldPositionFromPhysicalSpace();
25697
25703
  this._updateFlag.flag = false;
25698
25704
  };
25699
25705
  /**
@@ -25716,6 +25722,9 @@
25716
25722
  physics._removeColliderShape(shapes[i]);
25717
25723
  }
25718
25724
  };
25725
+ _proto._syncWorldPositionFromPhysicalSpace = function _syncWorldPositionFromPhysicalSpace() {
25726
+ this._nativeCollider.getWorldPosition(this.entity.transform.worldPosition);
25727
+ };
25719
25728
  _proto._setUpDirection = function _setUpDirection() {
25720
25729
  this._nativeCollider.setUpDirection(this._upDirection);
25721
25730
  };
@@ -33270,7 +33279,9 @@
33270
33279
  // Precalculate to get the transition
33271
33280
  srcPlayData.update(playDeltaTime);
33272
33281
  var clipTime = srcPlayData.clipTime, isForwards = srcPlayData.isForwards;
33273
- var transition = this._applyTransitionsByCondition(layerIndex, layerData, layer, state, layer.stateMachine.anyStateTransitions, aniUpdate) || this._applyStateTransitions(layerIndex, layerData, layer, isForwards, srcPlayData, state.transitions, lastClipTime, clipTime, playDeltaTime, aniUpdate);
33282
+ var transitions = state.transitions;
33283
+ var anyStateTransitions = layer.stateMachine.anyStateTransitions;
33284
+ var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, srcPlayData, transitions, lastClipTime, clipTime, playDeltaTime, aniUpdate);
33274
33285
  var playCostTime;
33275
33286
  if (transition) {
33276
33287
  var clipDuration = state.clip.length;
@@ -33352,7 +33363,7 @@
33352
33363
  dstPlayCostTime = // > transition: The time that will be played is enough to finish the transition
33353
33364
  playedTime - dstPlayDeltaTime > transitionDuration ? playedTime - transitionDuration : dstPlayDeltaTime;
33354
33365
  }
33355
- var actualCostTime = dstPlaySpeed === 0 ? 0 : dstPlayCostTime / dstPlaySpeed;
33366
+ var actualCostTime = dstPlaySpeed === 0 ? deltaTime : dstPlayCostTime / dstPlaySpeed;
33356
33367
  var srcPlayCostTime = actualCostTime * srcPlaySpeed;
33357
33368
  srcPlayData.update(srcPlayCostTime);
33358
33369
  destPlayData.update(dstPlayCostTime);
@@ -33360,6 +33371,7 @@
33360
33371
  (crossWeight >= 1.0 - MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
33361
33372
  var crossFadeFinished = crossWeight === 1.0;
33362
33373
  if (crossFadeFinished) {
33374
+ srcPlayData.playState = AnimatorStatePlayState.Finished;
33363
33375
  this._preparePlayOwner(layerData, destState);
33364
33376
  this._evaluatePlayingState(destPlayData, weight, additive, aniUpdate);
33365
33377
  } else {
@@ -33412,7 +33424,7 @@
33412
33424
  dstPlayCostTime = // > transition: The time that will be played is enough to finish the transition
33413
33425
  playedTime - playDeltaTime > transitionDuration ? playedTime - transitionDuration : playDeltaTime;
33414
33426
  }
33415
- var actualCostTime = playSpeed === 0 ? 0 : dstPlayCostTime / playSpeed;
33427
+ var actualCostTime = playSpeed === 0 ? deltaTime : dstPlayCostTime / playSpeed;
33416
33428
  destPlayData.update(dstPlayCostTime);
33417
33429
  var crossWeight = Math.abs(destPlayData.frameTime) / transitionDuration;
33418
33430
  (crossWeight >= 1.0 - MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
@@ -33452,14 +33464,16 @@
33452
33464
  }
33453
33465
  };
33454
33466
  _proto._updateFinishedState = function _updateFinishedState(layerIndex, layerData, layer, weight, additive, deltaTime, aniUpdate) {
33455
- var stateMachine = layer.stateMachine;
33467
+ layer.stateMachine;
33456
33468
  var playData = layerData.srcPlayData;
33457
33469
  var state = playData.state;
33458
33470
  var actualSpeed = state.speed * this.speed;
33459
33471
  var actualDeltaTime = actualSpeed * deltaTime;
33460
33472
  playData.updateOrientation(actualDeltaTime);
33461
33473
  var clipTime = playData.clipTime, isForwards = playData.isForwards;
33462
- var transition = this._applyTransitionsByCondition(layerIndex, layerData, layer, state, stateMachine.anyStateTransitions, aniUpdate) || this._applyStateTransitions(layerIndex, layerData, layer, isForwards, playData, state.transitions, clipTime, clipTime, actualDeltaTime, aniUpdate);
33474
+ var transitions = state.transitions;
33475
+ var anyStateTransitions = layer.stateMachine.anyStateTransitions;
33476
+ var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, playData, transitions, clipTime, clipTime, actualDeltaTime, aniUpdate);
33463
33477
  if (transition) {
33464
33478
  this._updateState(layerIndex, layerData, layer, deltaTime, aniUpdate);
33465
33479
  } else {
@@ -48072,7 +48086,7 @@
48072
48086
  ], EXT_texture_webp);
48073
48087
 
48074
48088
  //@ts-ignore
48075
- var version = "1.3.5";
48089
+ var version = "1.3.6";
48076
48090
  console.log("Galacean engine version: " + version);
48077
48091
  for(var key in CoreObjects){
48078
48092
  Loader.registerClass(key, CoreObjects[key]);