@galacean/engine 1.1.0-beta.27 → 1.1.0-beta.29
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/.DS_Store +0 -0
- package/dist/browser.js +52 -21
- package/dist/browser.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/.DS_Store
ADDED
|
Binary file
|
package/dist/browser.js
CHANGED
|
@@ -6675,8 +6675,8 @@
|
|
|
6675
6675
|
} else {
|
|
6676
6676
|
word += char;
|
|
6677
6677
|
wordWidth += charInfo.xAdvance;
|
|
6678
|
-
wordMaxAscent =
|
|
6679
|
-
wordMaxDescent =
|
|
6678
|
+
wordMaxAscent = Math.max(wordMaxAscent, ascent);
|
|
6679
|
+
wordMaxDescent = Math.max(wordMaxDescent, descent);
|
|
6680
6680
|
}
|
|
6681
6681
|
}
|
|
6682
6682
|
}
|
|
@@ -21067,6 +21067,8 @@
|
|
|
21067
21067
|
_this = ReferResource1.call(this, engine) || this;
|
|
21068
21068
|
/** @internal */ _this._renderStates = [] // todo: later will as a part of shaderData when shader effect frame is OK, that is more powerful and flexible.
|
|
21069
21069
|
;
|
|
21070
|
+
/** @internal */ _this._priority = 0 // todo: temporary resolution of submesh rendering order issue.
|
|
21071
|
+
;
|
|
21070
21072
|
_this._shaderData = new ShaderData(ShaderDataGroup.Material);
|
|
21071
21073
|
_this.shader = shader;
|
|
21072
21074
|
return _this;
|
|
@@ -26302,12 +26304,12 @@
|
|
|
26302
26304
|
/**
|
|
26303
26305
|
* @internal
|
|
26304
26306
|
*/ RenderQueue._compareFromNearToFar = function _compareFromNearToFar(a, b) {
|
|
26305
|
-
return a.data.component.priority - b.data.component.priority || a.data.component._distanceForSort - b.data.component._distanceForSort;
|
|
26307
|
+
return a.data.component.priority - b.data.component.priority || a.data.material._priority - b.data.material._priority || a.data.component._distanceForSort - b.data.component._distanceForSort;
|
|
26306
26308
|
};
|
|
26307
26309
|
/**
|
|
26308
26310
|
* @internal
|
|
26309
26311
|
*/ RenderQueue._compareFromFarToNear = function _compareFromFarToNear(a, b) {
|
|
26310
|
-
return a.data.component.priority - b.data.component.priority || b.data.component._distanceForSort - a.data.component._distanceForSort;
|
|
26312
|
+
return a.data.component.priority - b.data.component.priority || a.data.material._priority - b.data.material._priority || b.data.component._distanceForSort - a.data.component._distanceForSort;
|
|
26311
26313
|
};
|
|
26312
26314
|
return RenderQueue;
|
|
26313
26315
|
}();
|
|
@@ -29466,6 +29468,7 @@
|
|
|
29466
29468
|
_this = EngineObject1.call(this, null) || this;
|
|
29467
29469
|
_this.name = name1;
|
|
29468
29470
|
_this./** @internal */ _curveBindings = [];
|
|
29471
|
+
_this./** @internal */ _updateFlagManager = new UpdateFlagManager();
|
|
29469
29472
|
_this._length = 0;
|
|
29470
29473
|
_this._events = [];
|
|
29471
29474
|
return _this;
|
|
@@ -29494,11 +29497,13 @@
|
|
|
29494
29497
|
while(--index >= 0 && eventTime < events[index].time);
|
|
29495
29498
|
events.splice(index + 1, 0, newEvent);
|
|
29496
29499
|
}
|
|
29500
|
+
this._updateFlagManager.dispatch();
|
|
29497
29501
|
};
|
|
29498
29502
|
/**
|
|
29499
29503
|
* Clears all events from the clip.
|
|
29500
29504
|
*/ _proto.clearEvents = function clearEvents() {
|
|
29501
29505
|
this._events.length = 0;
|
|
29506
|
+
this._updateFlagManager.dispatch();
|
|
29502
29507
|
};
|
|
29503
29508
|
/**
|
|
29504
29509
|
* Add curve binding for the clip.
|
|
@@ -30955,26 +30960,31 @@
|
|
|
30955
30960
|
}
|
|
30956
30961
|
};
|
|
30957
30962
|
_proto._saveAnimatorEventHandlers = function _saveAnimatorEventHandlers(state, animatorStateData) {
|
|
30963
|
+
var _this = this;
|
|
30958
30964
|
var eventHandlerPool = this._animationEventHandlerPool;
|
|
30959
30965
|
var scripts = [];
|
|
30960
|
-
this._entity.getComponents(Script, scripts);
|
|
30961
|
-
var scriptCount = scripts.length;
|
|
30962
30966
|
var eventHandlers = animatorStateData.eventHandlers;
|
|
30963
|
-
var
|
|
30964
|
-
|
|
30965
|
-
|
|
30966
|
-
var
|
|
30967
|
-
|
|
30968
|
-
var
|
|
30969
|
-
|
|
30970
|
-
|
|
30971
|
-
|
|
30972
|
-
|
|
30973
|
-
|
|
30974
|
-
|
|
30967
|
+
var clipChangedListener = function clipChangedListener() {
|
|
30968
|
+
_this._entity.getComponents(Script, scripts);
|
|
30969
|
+
var scriptCount = scripts.length;
|
|
30970
|
+
var events = state.clip.events;
|
|
30971
|
+
eventHandlers.length = 0;
|
|
30972
|
+
for(var i = 0, n = events.length; i < n; i++){
|
|
30973
|
+
var event = events[i];
|
|
30974
|
+
var eventHandler = eventHandlerPool.getFromPool();
|
|
30975
|
+
var funcName = event.functionName;
|
|
30976
|
+
var handlers = eventHandler.handlers;
|
|
30977
|
+
eventHandler.event = event;
|
|
30978
|
+
handlers.length = 0;
|
|
30979
|
+
for(var j = scriptCount - 1; j >= 0; j--){
|
|
30980
|
+
var handler = scripts[j][funcName];
|
|
30981
|
+
handler && handlers.push(handler);
|
|
30982
|
+
}
|
|
30983
|
+
eventHandlers.push(eventHandler);
|
|
30975
30984
|
}
|
|
30976
|
-
|
|
30977
|
-
|
|
30985
|
+
};
|
|
30986
|
+
clipChangedListener();
|
|
30987
|
+
state._updateFlagManager.addListener(clipChangedListener);
|
|
30978
30988
|
};
|
|
30979
30989
|
_proto._clearCrossData = function _clearCrossData(animatorLayerData) {
|
|
30980
30990
|
animatorLayerData.crossCurveMark++;
|
|
@@ -31581,9 +31591,11 @@
|
|
|
31581
31591
|
this./** @internal */ _onStateEnterScripts = [];
|
|
31582
31592
|
this./** @internal */ _onStateUpdateScripts = [];
|
|
31583
31593
|
this./** @internal */ _onStateExitScripts = [];
|
|
31594
|
+
this./** @internal */ _updateFlagManager = new UpdateFlagManager();
|
|
31584
31595
|
this._clipStartTime = 0;
|
|
31585
31596
|
this._clipEndTime = 1;
|
|
31586
31597
|
this._transitions = [];
|
|
31598
|
+
this._onClipChanged = this._onClipChanged.bind(this);
|
|
31587
31599
|
};
|
|
31588
31600
|
var _proto = AnimatorState.prototype;
|
|
31589
31601
|
/**
|
|
@@ -31657,6 +31669,11 @@
|
|
|
31657
31669
|
index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
|
|
31658
31670
|
}
|
|
31659
31671
|
};
|
|
31672
|
+
/**
|
|
31673
|
+
* @internal
|
|
31674
|
+
*/ _proto._onClipChanged = function _onClipChanged() {
|
|
31675
|
+
this._updateFlagManager.dispatch();
|
|
31676
|
+
};
|
|
31660
31677
|
_create_class$3(AnimatorState, [
|
|
31661
31678
|
{
|
|
31662
31679
|
key: "transitions",
|
|
@@ -31674,8 +31691,17 @@
|
|
|
31674
31691
|
return this._clip;
|
|
31675
31692
|
},
|
|
31676
31693
|
set: function set(clip) {
|
|
31694
|
+
var lastClip = this._clip;
|
|
31695
|
+
if (lastClip === clip) {
|
|
31696
|
+
return;
|
|
31697
|
+
}
|
|
31698
|
+
if (lastClip) {
|
|
31699
|
+
lastClip._updateFlagManager.removeListener(this._onClipChanged);
|
|
31700
|
+
}
|
|
31677
31701
|
this._clip = clip;
|
|
31678
31702
|
this._clipEndTime = Math.min(this._clipEndTime, 1);
|
|
31703
|
+
this._onClipChanged();
|
|
31704
|
+
clip._updateFlagManager.addListener(this._onClipChanged);
|
|
31679
31705
|
}
|
|
31680
31706
|
},
|
|
31681
31707
|
{
|
|
@@ -38057,6 +38083,8 @@
|
|
|
38057
38083
|
if (position) entity.transform.position.copyFrom(position);
|
|
38058
38084
|
if (rotation) entity.transform.rotation.copyFrom(rotation);
|
|
38059
38085
|
if (scale) entity.transform.scale.copyFrom(scale);
|
|
38086
|
+
var _entityConfig_layer;
|
|
38087
|
+
entity.layer = (_entityConfig_layer = entityConfig.layer) != null ? _entityConfig_layer : entity.layer;
|
|
38060
38088
|
return entity;
|
|
38061
38089
|
});
|
|
38062
38090
|
};
|
|
@@ -43105,6 +43133,9 @@
|
|
|
43105
43133
|
if (shadow.shadowResolution != undefined) scene.shadowResolution = shadow.shadowResolution;
|
|
43106
43134
|
if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
|
|
43107
43135
|
if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
|
|
43136
|
+
var _shadow_shadowTwoCascadeSplits;
|
|
43137
|
+
scene.shadowTwoCascadeSplits = (_shadow_shadowTwoCascadeSplits = shadow.shadowTwoCascadeSplits) != null ? _shadow_shadowTwoCascadeSplits : scene.shadowTwoCascadeSplits;
|
|
43138
|
+
shadow.shadowFourCascadeSplits && scene.shadowFourCascadeSplits.copyFrom(shadow.shadowFourCascadeSplits);
|
|
43108
43139
|
}
|
|
43109
43140
|
return Promise.all(promises).then(function() {
|
|
43110
43141
|
resolve(scene);
|
|
@@ -43616,7 +43647,7 @@
|
|
|
43616
43647
|
], GALACEAN_animation_event);
|
|
43617
43648
|
|
|
43618
43649
|
//@ts-ignore
|
|
43619
|
-
var version = "1.1.0-beta.
|
|
43650
|
+
var version = "1.1.0-beta.29";
|
|
43620
43651
|
console.log("Galacean engine version: " + version);
|
|
43621
43652
|
for(var key in CoreObjects){
|
|
43622
43653
|
Loader.registerClass(key, CoreObjects[key]);
|