@galacean/effects-core 2.1.5-alpha.0 → 2.1.5
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/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.1.5
|
|
6
|
+
* Version: v2.1.5
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -16582,17 +16582,10 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16582
16582
|
];
|
|
16583
16583
|
};
|
|
16584
16584
|
_proto.onStart = function onStart() {
|
|
16585
|
-
var _this = this;
|
|
16586
|
-
var _this_item_composition;
|
|
16587
16585
|
var options = this.item.props.content.options;
|
|
16588
16586
|
var env = this.item.engine.renderer.env;
|
|
16589
16587
|
var composition = this.item.composition;
|
|
16590
16588
|
var _this_interactData_options = this.interactData.options, type = _this_interactData_options.type, showPreview = _this_interactData_options.showPreview;
|
|
16591
|
-
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.on("goto", function() {
|
|
16592
|
-
if (_this.item.time > 0) {
|
|
16593
|
-
_this.duringPlay = true;
|
|
16594
|
-
}
|
|
16595
|
-
});
|
|
16596
16589
|
if (type === InteractType.CLICK) {
|
|
16597
16590
|
this.clickable = true;
|
|
16598
16591
|
if (showPreview && env === PLAYER_OPTIONS_ENV_EDITOR) {
|
|
@@ -16633,12 +16626,12 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16633
16626
|
};
|
|
16634
16627
|
_proto.onUpdate = function onUpdate(dt) {
|
|
16635
16628
|
var _this_previewContent;
|
|
16629
|
+
this.duringPlay = true;
|
|
16636
16630
|
// trigger messageBegin when item enter
|
|
16637
|
-
if (this.item.time > 0 &&
|
|
16631
|
+
if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
|
|
16638
16632
|
var _this_item_composition;
|
|
16639
16633
|
var options = this.item.props.content.options;
|
|
16640
16634
|
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
|
|
16641
|
-
this.duringPlay = true;
|
|
16642
16635
|
}
|
|
16643
16636
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16644
16637
|
if (!this.dragEvent || !this.bouncingArg) {
|
|
@@ -23315,7 +23308,7 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
23315
23308
|
this.playable.play();
|
|
23316
23309
|
}
|
|
23317
23310
|
this.parentMixer.setInputWeight(this.playable, weight);
|
|
23318
|
-
var clipTime = clip.toLocalTime(localTime);
|
|
23311
|
+
var clipTime = parseFloat(clip.toLocalTime(localTime).toFixed(3));
|
|
23319
23312
|
this.playable.setTime(clipTime);
|
|
23320
23313
|
// 判断动画是否结束
|
|
23321
23314
|
if (ended) {
|
|
@@ -28915,7 +28908,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28915
28908
|
if (!this.assigned || this.paused) {
|
|
28916
28909
|
return;
|
|
28917
28910
|
}
|
|
28918
|
-
var dt = this.getUpdateTime(deltaTime * this.speed);
|
|
28911
|
+
var dt = parseFloat(this.getUpdateTime(deltaTime * this.speed).toFixed(0));
|
|
28919
28912
|
this.updateRootComposition(dt / 1000);
|
|
28920
28913
|
this.updateVideo();
|
|
28921
28914
|
// 更新 model-tree-plugin
|
|
@@ -31392,7 +31385,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
31392
31385
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
31393
31386
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
31394
31387
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
31395
|
-
var version = "2.1.5
|
|
31388
|
+
var version = "2.1.5";
|
|
31396
31389
|
logger.info("Core version: " + version + ".");
|
|
31397
31390
|
|
|
31398
31391
|
exports.AbstractPlugin = AbstractPlugin;
|