@galacean/engine-core 1.1.0-beta.10 → 1.1.0-beta.12
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/main.js +45 -47
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +45 -47
- package/dist/module.js +45 -47
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/RenderPipeline/RenderElementX.d.ts +12 -0
- package/types/SafeLoopArray.d.ts +37 -0
- package/types/Ticker.d.ts +30 -0
- package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
- package/types/graphic/PrimitiveVertexBinding.d.ts +1 -0
- package/types/particle/ParticleData.d.ts +1 -0
- package/types/particle/ParticleMesh.d.ts +289 -0
- package/types/particle/ParticleShaderDeclaration.d.ts +1 -0
- package/types/particle/ParticleShaderMacro.d.ts +1 -0
- package/types/particle/ParticleShaderProperty.d.ts +1 -0
- package/types/particle/ParticleSystem.d.ts +41 -0
- package/types/particle/ParticleVertexElements.d.ts +1 -0
- package/types/particle/ParticleVertexUtils.d.ts +1 -0
- package/types/particle/enum/ParticleAnimationRowMode.d.ts +9 -0
- package/types/particle/enum/ParticleAnimationType.d.ts +9 -0
- package/types/particle/enum/ParticleCurveMode.d.ts +13 -0
- package/types/particle/enum/ParticleGradientMode.d.ts +13 -0
- package/types/particle/enum/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enum/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +9 -0
- package/types/particle/enum/ParticleShapeType.d.ts +15 -0
- package/types/particle/enum/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enum/index.d.ts +9 -0
- package/types/particle/module/Burst.d.ts +38 -0
- package/types/particle/module/ColorGradient.d.ts +75 -0
- package/types/particle/module/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/module/EmissionModule.d.ts +63 -0
- package/types/particle/module/FrameOverTime.d.ts +73 -0
- package/types/particle/module/ParticleCurve.d.ts +37 -0
- package/types/particle/module/RotationOverLifetimeModule.d.ts +21 -0
- package/types/particle/module/RotationVelocityGradient.d.ts +184 -0
- package/types/particle/module/SizeGradient.d.ts +151 -0
- package/types/particle/module/SizeOverLifetimeModule.d.ts +21 -0
- package/types/particle/module/StartFrame.d.ts +46 -0
- package/types/particle/module/TextureSheetAnimationModule.d.ts +37 -0
- package/types/particle/module/VelocityGradient.d.ts +110 -0
- package/types/particle/module/VelocityOverLifetimeModule.d.ts +22 -0
- package/types/particle/module/index.d.ts +15 -0
- package/types/particle/module/shape/BaseShape.d.ts +26 -0
- package/types/particle/module/shape/BoxShape.d.ts +20 -0
- package/types/particle/module/shape/CircleShape.d.ts +27 -0
- package/types/particle/module/shape/ConeShape.d.ts +35 -0
- package/types/particle/module/shape/HemisphereShape.d.ts +23 -0
- package/types/particle/module/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/module/shape/SphereShape.d.ts +23 -0
- package/types/particle/module/shape/index.d.ts +5 -0
- package/types/particle/modules/ShapeModule.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
- package/types/particle/moudules/Burst.d.ts +25 -0
- package/types/particle/moudules/Emission.d.ts +47 -0
- package/types/particle/moudules/EmissionModule.d.ts +49 -0
- package/types/particle/moudules/MainModule.d.ts +59 -0
- package/types/particle/moudules/ParticleCurve.d.ts +27 -0
- package/types/particle/moudules/ParticleGradient.d.ts +28 -0
- package/types/particle/moudules/ShapeModule.d.ts +7 -0
- package/types/particle/moudules/shape/BaseShape.d.ts +28 -0
- package/types/particle/moudules/shape/BoxShape.d.ts +20 -0
- package/types/particle/moudules/shape/CircleShape.d.ts +27 -0
- package/types/particle/moudules/shape/ConeShape.d.ts +35 -0
- package/types/particle/moudules/shape/HemisphereShape.d.ts +23 -0
- package/types/particle/moudules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/moudules/shape/SphereShape.d.ts +23 -0
- package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
- package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +15 -0
- package/types/particle/moudules/shape/index.d.ts +5 -0
- package/types/shadow/PipelinePass.d.ts +16 -0
- package/types/utils/BoolUpdateFlag.d.ts +12 -0
- package/types/utils/DisorderedArray.d.ts +18 -0
- package/types/utils/UpdateFlag.d.ts +20 -0
- package/types/utils/UpdateFlagManager.d.ts +1 -0
- package/types/utils/Utils.d.ts +31 -0
- package/types/xr/XRManager.d.ts +31 -0
- package/types/xr/component/XRPoseDriver.d.ts +10 -0
- package/types/xr/data/XRCamera.d.ts +6 -0
- package/types/xr/data/XRDevice.d.ts +9 -0
- package/types/xr/data/XRHandle.d.ts +10 -0
- package/types/xr/enum/EnumXRButton.d.ts +5 -0
- package/types/xr/enum/EnumXRDevicePhase.d.ts +4 -0
- package/types/xr/enum/EnumXRFeature.d.ts +9 -0
- package/types/xr/enum/EnumXRInputSource.d.ts +8 -0
- package/types/xr/enum/EnumXRMode.d.ts +7 -0
- package/types/xr/enum/EnumXRSubsystem.d.ts +4 -0
- package/types/xr/enum/EnumXRTrackingMode.d.ts +7 -0
- package/types/xr/feature/XRCameraManager.d.ts +21 -0
- package/types/xr/feature/XRFeature.d.ts +29 -0
- package/types/xr/feature/XRImageTrackManager.d.ts +10 -0
- package/types/xr/feature/XRInputManager.d.ts +16 -0
- package/types/xr/index.d.ts +18 -0
- package/types/xr/provider/XRProvider.d.ts +19 -0
- package/types/xr/subsystem/XRInputSubsystem.d.ts +5 -0
- package/types/xr/subsystem/XRSubsystem.d.ts +30 -0
package/dist/main.js
CHANGED
|
@@ -15876,6 +15876,7 @@ __decorate([
|
|
|
15876
15876
|
case "pointercancel":
|
|
15877
15877
|
pointer.phase = exports.PointerPhase.Leave;
|
|
15878
15878
|
pointer._firePointerExitAndEnter(null);
|
|
15879
|
+
break;
|
|
15879
15880
|
}
|
|
15880
15881
|
}
|
|
15881
15882
|
events.length = 0;
|
|
@@ -16003,7 +16004,7 @@ __decorate([
|
|
|
16003
16004
|
var point = PointerManager._tempPoint, ray = PointerManager._tempRay, hitResult = PointerManager._tempHitResult;
|
|
16004
16005
|
for(var i = scenes.length - 1; i >= 0; i--){
|
|
16005
16006
|
var scene = scenes[i];
|
|
16006
|
-
if (scene.destroyed) {
|
|
16007
|
+
if (!scene.isActive || scene.destroyed) {
|
|
16007
16008
|
continue;
|
|
16008
16009
|
}
|
|
16009
16010
|
var cameras = scene._activeCameras;
|
|
@@ -16565,7 +16566,7 @@ var unlitVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#in
|
|
|
16565
16566
|
* @internal
|
|
16566
16567
|
*/ var ShaderProgramPool = /*#__PURE__*/ function() {
|
|
16567
16568
|
function ShaderProgramPool() {
|
|
16568
|
-
this.
|
|
16569
|
+
this._cacheHierarchyDepth = 1;
|
|
16569
16570
|
this._cacheMap = Object.create(null);
|
|
16570
16571
|
}
|
|
16571
16572
|
var _proto = ShaderProgramPool.prototype;
|
|
@@ -16576,12 +16577,14 @@ var unlitVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#in
|
|
|
16576
16577
|
*/ _proto.get = function get(macros) {
|
|
16577
16578
|
var cacheMap = this._cacheMap;
|
|
16578
16579
|
var maskLength = macros._length;
|
|
16579
|
-
|
|
16580
|
-
|
|
16580
|
+
var cacheHierarchyDepth = this._cacheHierarchyDepth;
|
|
16581
|
+
if (maskLength > cacheHierarchyDepth) {
|
|
16582
|
+
this._resizeCacheMapHierarchy(cacheMap, 0, cacheHierarchyDepth, maskLength - cacheHierarchyDepth);
|
|
16583
|
+
this._cacheHierarchyDepth = maskLength;
|
|
16581
16584
|
}
|
|
16582
16585
|
var mask = macros._mask;
|
|
16583
16586
|
var endIndex = macros._length - 1;
|
|
16584
|
-
var maxEndIndex = this.
|
|
16587
|
+
var maxEndIndex = this._cacheHierarchyDepth - 1;
|
|
16585
16588
|
for(var i = 0; i < maxEndIndex; i++){
|
|
16586
16589
|
var subMask = endIndex < i ? 0 : mask[i];
|
|
16587
16590
|
var subCacheShaders = cacheMap[subMask];
|
|
@@ -16606,25 +16609,21 @@ var unlitVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#in
|
|
|
16606
16609
|
*/ _proto.cache = function cache(shaderProgram) {
|
|
16607
16610
|
this._lastQueryMap[this._lastQueryKey] = shaderProgram;
|
|
16608
16611
|
};
|
|
16609
|
-
_proto._resizeCacheMapHierarchy = function _resizeCacheMapHierarchy(cacheMap, hierarchy,
|
|
16610
|
-
//
|
|
16611
|
-
|
|
16612
|
-
if (hierarchy == end) {
|
|
16612
|
+
_proto._resizeCacheMapHierarchy = function _resizeCacheMapHierarchy(cacheMap, hierarchy, currentHierarchy, increaseHierarchy) {
|
|
16613
|
+
// Only expand but not shrink
|
|
16614
|
+
if (hierarchy == currentHierarchy - 1) {
|
|
16613
16615
|
for(var k in cacheMap){
|
|
16614
16616
|
var shader = cacheMap[k];
|
|
16615
16617
|
var subCacheMap = cacheMap;
|
|
16616
|
-
for(var i = 0
|
|
16617
|
-
|
|
16618
|
-
subCacheMap[0] = shader;
|
|
16619
|
-
} else {
|
|
16620
|
-
subCacheMap = subCacheMap[i == 0 ? k : 0] = Object.create(null);
|
|
16621
|
-
}
|
|
16618
|
+
for(var i = 0; i < increaseHierarchy; i++){
|
|
16619
|
+
subCacheMap[i == 0 ? k : 0] = subCacheMap = Object.create(null);
|
|
16622
16620
|
}
|
|
16621
|
+
subCacheMap[0] = shader;
|
|
16623
16622
|
}
|
|
16624
|
-
this._cacheHierarchy = resizeLength;
|
|
16625
16623
|
} else {
|
|
16624
|
+
hierarchy++;
|
|
16626
16625
|
for(var k1 in cacheMap){
|
|
16627
|
-
this._resizeCacheMapHierarchy(cacheMap[k1],
|
|
16626
|
+
this._resizeCacheMapHierarchy(cacheMap[k1], hierarchy, currentHierarchy, increaseHierarchy);
|
|
16628
16627
|
}
|
|
16629
16628
|
}
|
|
16630
16629
|
};
|
|
@@ -16744,57 +16743,56 @@ ShaderPool.init();
|
|
|
16744
16743
|
this._textRenderDataPool.resetPool();
|
|
16745
16744
|
var _this = this, inputManager = _this.inputManager, physicsInitialized = _this._physicsInitialized;
|
|
16746
16745
|
inputManager._update();
|
|
16747
|
-
var
|
|
16748
|
-
var sceneCount =
|
|
16746
|
+
var scenes = this._sceneManager._scenes.getLoopArray();
|
|
16747
|
+
var sceneCount = scenes.length;
|
|
16749
16748
|
// Sort cameras and fire script `onStart`
|
|
16750
16749
|
for(var i = 0; i < sceneCount; i++){
|
|
16751
|
-
var scene =
|
|
16752
|
-
if (scene.destroyed) continue;
|
|
16750
|
+
var scene = scenes[i];
|
|
16751
|
+
if (!scene.isActive || scene.destroyed) continue;
|
|
16753
16752
|
scene._cameraNeedSorting && scene._sortCameras();
|
|
16754
16753
|
scene._componentsManager.callScriptOnStart();
|
|
16755
16754
|
}
|
|
16756
16755
|
// Update physics and fire `onPhysicsUpdate`
|
|
16757
16756
|
if (physicsInitialized) {
|
|
16758
16757
|
for(var i1 = 0; i1 < sceneCount; i1++){
|
|
16759
|
-
var scene1 =
|
|
16760
|
-
if (scene1.destroyed) continue;
|
|
16758
|
+
var scene1 = scenes[i1];
|
|
16759
|
+
if (!scene1.isActive || scene1.destroyed) continue;
|
|
16761
16760
|
scene1.physics._update(deltaTime);
|
|
16762
16761
|
}
|
|
16763
16762
|
}
|
|
16764
16763
|
// Fire `onPointerXX`
|
|
16765
|
-
physicsInitialized && inputManager._firePointerScript(
|
|
16764
|
+
physicsInitialized && inputManager._firePointerScript(scenes);
|
|
16766
16765
|
// Fire `onUpdate`
|
|
16767
16766
|
for(var i2 = 0; i2 < sceneCount; i2++){
|
|
16768
|
-
var scene2 =
|
|
16769
|
-
if (scene2.destroyed) continue;
|
|
16767
|
+
var scene2 = scenes[i2];
|
|
16768
|
+
if (!scene2.isActive || scene2.destroyed) continue;
|
|
16770
16769
|
scene2._componentsManager.callScriptOnUpdate(deltaTime);
|
|
16771
16770
|
}
|
|
16772
16771
|
// Update `Animator` logic
|
|
16773
16772
|
for(var i3 = 0; i3 < sceneCount; i3++){
|
|
16774
|
-
var scene3 =
|
|
16775
|
-
if (scene3.destroyed) continue;
|
|
16773
|
+
var scene3 = scenes[i3];
|
|
16774
|
+
if (!scene3.isActive || scene3.destroyed) continue;
|
|
16776
16775
|
scene3._componentsManager.callAnimationUpdate(deltaTime);
|
|
16777
16776
|
}
|
|
16778
16777
|
// Fire `onLateUpdate`
|
|
16779
16778
|
for(var i4 = 0; i4 < sceneCount; i4++){
|
|
16780
|
-
var scene4 =
|
|
16781
|
-
if (scene4.destroyed) continue;
|
|
16779
|
+
var scene4 = scenes[i4];
|
|
16780
|
+
if (!scene4.isActive || scene4.destroyed) continue;
|
|
16782
16781
|
scene4._componentsManager.callScriptOnLateUpdate(deltaTime);
|
|
16783
16782
|
}
|
|
16784
16783
|
// Render scene and fire `onBeginRender` and `onEndRender`
|
|
16785
16784
|
if (!this._isDeviceLost) {
|
|
16786
|
-
this._render(
|
|
16787
|
-
}
|
|
16788
|
-
// Handling invalid scripts and fire `onDestroy`
|
|
16789
|
-
for(var i5 = 0; i5 < sceneCount; i5++){
|
|
16790
|
-
var scene5 = loopScenes[i5];
|
|
16791
|
-
if (scene5.destroyed) continue;
|
|
16792
|
-
if (!this._waitingDestroy) {
|
|
16793
|
-
scene5._componentsManager.handlingInvalidScripts();
|
|
16794
|
-
}
|
|
16785
|
+
this._render(scenes);
|
|
16795
16786
|
}
|
|
16796
16787
|
if (this._waitingDestroy) {
|
|
16797
16788
|
this._destroy();
|
|
16789
|
+
} else {
|
|
16790
|
+
// Handling invalid scripts and fire `onDestroy`
|
|
16791
|
+
for(var i5 = 0; i5 < sceneCount; i5++){
|
|
16792
|
+
var scene5 = scenes[i5];
|
|
16793
|
+
if (!scene5.isActive || scene5.destroyed) continue;
|
|
16794
|
+
scene5._componentsManager.handlingInvalidScripts();
|
|
16795
|
+
}
|
|
16798
16796
|
}
|
|
16799
16797
|
if (this._waitingGC) {
|
|
16800
16798
|
this._gc();
|
|
@@ -16873,19 +16871,19 @@ ShaderPool.init();
|
|
|
16873
16871
|
};
|
|
16874
16872
|
/**
|
|
16875
16873
|
* @internal
|
|
16876
|
-
*/ _proto._render = function _render(
|
|
16874
|
+
*/ _proto._render = function _render(scenes) {
|
|
16877
16875
|
// Update `Renderer` logic and shader data
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16876
|
+
var deltaTime = this.time.deltaTime;
|
|
16877
|
+
for(var i = 0, n = scenes.length; i < n; i++){
|
|
16878
|
+
var scene = scenes[i];
|
|
16879
|
+
if (!scene.isActive || scene.destroyed) continue;
|
|
16882
16880
|
scene._componentsManager.callRendererOnUpdate(deltaTime);
|
|
16883
16881
|
scene._updateShaderData();
|
|
16884
16882
|
}
|
|
16885
16883
|
// Fire script `onBeginRender` and `onEndRender`
|
|
16886
|
-
for(var i1 = 0, n1 =
|
|
16887
|
-
var scene1 =
|
|
16888
|
-
if (scene1.destroyed) continue;
|
|
16884
|
+
for(var i1 = 0, n1 = scenes.length; i1 < n1; i1++){
|
|
16885
|
+
var scene1 = scenes[i1];
|
|
16886
|
+
if (!scene1.isActive || scene1.destroyed) continue;
|
|
16889
16887
|
var cameras = scene1._activeCameras;
|
|
16890
16888
|
var cameraCount = cameras.length;
|
|
16891
16889
|
if (cameraCount > 0) {
|