@galacean/engine-core 0.0.0-experimental-0.9-plus.8 → 0.0.0-experimental-double11.1
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 +15851 -13975
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +15851 -13975
- package/dist/module.js +15837 -13971
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
- package/types/2d/enums/SpriteDirtyFlag.d.ts +13 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
- package/types/2d/index.d.ts +1 -0
- package/types/2d/sprite/Sprite.d.ts +5 -2
- package/types/2d/sprite/SpriteMask.d.ts +0 -11
- package/types/2d/sprite/SpriteRenderer.d.ts +15 -11
- package/types/2d/text/Font.d.ts +2 -7
- package/types/2d/text/TextRenderer.d.ts +0 -11
- package/types/2d/text/index.d.ts +1 -0
- package/types/Camera.d.ts +27 -8
- package/types/Component.d.ts +0 -8
- package/types/ComponentsDependencies.d.ts +17 -9
- package/types/ComponentsManager.d.ts +3 -2
- package/types/DisorderedArray.d.ts +4 -3
- package/types/Engine.d.ts +35 -43
- package/types/Entity.d.ts +2 -2
- package/types/ListenerUpdateFlag.d.ts +12 -0
- package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +8 -6
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/RenderElement.d.ts +8 -8
- package/types/RenderPipeline/RenderPass.d.ts +1 -1
- package/types/RenderPipeline/RenderQueue.d.ts +3 -5
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
- package/types/Renderer.d.ts +3 -12
- package/types/Scene.d.ts +0 -1
- package/types/Script.d.ts +18 -15
- package/types/Transform.d.ts +10 -12
- package/types/Utils.d.ts +28 -0
- package/types/animation/AnimationClip.d.ts +2 -1
- package/types/animation/Animator.d.ts +7 -4
- package/types/animation/AnimatorStateTransition.d.ts +12 -0
- package/types/animation/AnimatorTransitionBase.d.ts +10 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
- package/types/animation/enums/LayerState.d.ts +3 -1
- package/types/animation/enums/StateMachineState.d.ts +13 -0
- package/types/animation/index.d.ts +0 -4
- package/types/animation/internal/AnimatorPlayableObject.d.ts +23 -0
- package/types/animation/internal/CrossCurveData.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/asset/AssetType.d.ts +16 -16
- package/types/asset/LoadItem.d.ts +16 -9
- package/types/asset/ResourceManager.d.ts +17 -9
- package/types/asset/request.d.ts +7 -3
- package/types/base/Constant.d.ts +2 -1
- package/types/base/EngineObject.d.ts +1 -0
- package/types/base/EventDispatcher.d.ts +2 -15
- package/types/base/Time.d.ts +25 -24
- package/types/base/index.d.ts +0 -2
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/env-probe/CubeProbe.d.ts +0 -7
- package/types/env-probe/Probe.d.ts +0 -6
- package/types/fog/EXP2Fog.d.ts +15 -0
- package/types/fog/Fog.d.ts +14 -0
- package/types/fog/LinearFog.d.ts +22 -0
- package/types/fog/index.d.ts +3 -0
- package/types/graphic/Buffer.d.ts +5 -12
- package/types/graphic/Mesh.d.ts +5 -16
- package/types/graphic/Primitive.d.ts +1 -0
- package/types/graphic/SubPrimitive.d.ts +9 -0
- package/types/index.d.ts +8 -7
- package/types/input/InputManager.d.ts +1 -1
- package/types/input/interface/IInput.d.ts +1 -1
- package/types/lighting/AmbientLight.d.ts +4 -1
- package/types/lighting/DirectLight.d.ts +0 -1
- package/types/lighting/Light.d.ts +0 -1
- package/types/lighting/LightManager.d.ts +1 -0
- package/types/lighting/SpotLight.d.ts +0 -1
- package/types/material/BaseMaterial.d.ts +8 -10
- package/types/material/BlinnPhongMaterial.d.ts +0 -3
- package/types/material/Material.d.ts +3 -6
- package/types/material/PBRMaterial.d.ts +1 -1
- package/types/material/PBRSpecularMaterial.d.ts +1 -1
- package/types/material/UnlitMaterial.d.ts +1 -1
- package/types/mesh/BlendShape.d.ts +1 -1
- package/types/mesh/BlendShapeFrame.d.ts +28 -6
- package/types/mesh/MeshRenderer.d.ts +1 -11
- package/types/mesh/ModelMesh.d.ts +5 -5
- package/types/mesh/PrimitiveMesh.d.ts +4 -2
- package/types/mesh/SkinnedMeshRenderer.d.ts +0 -15
- package/types/particle/ParticleBufferUtils.d.ts +1 -0
- package/types/particle/ParticleGenerator.d.ts +72 -0
- package/types/particle/ParticleMaterial.d.ts +28 -0
- package/types/particle/ParticleRenderer.d.ts +2 -2
- package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
- package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
- package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enums/ParticleStopMode.d.ts +6 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
- package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
- package/types/particle/modules/Burst.d.ts +14 -0
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/modules/EmissionModule.d.ts +45 -0
- package/types/particle/modules/MainModule.d.ts +68 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
- package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
- package/types/particle/modules/ParticleCurve.d.ts +56 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
- package/types/particle/modules/ParticleGradient.d.ts +94 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +42 -0
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/shape/BaseShape.d.ts +12 -0
- package/types/particle/modules/shape/BoxShape.d.ts +11 -0
- package/types/particle/modules/shape/CircleShape.d.ts +17 -0
- package/types/particle/modules/shape/ConeShape.d.ts +28 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/modules/shape/SphereShape.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
- package/types/particle/modules/shape/index.d.ts +6 -0
- package/types/physics/CharacterController.d.ts +0 -2
- package/types/physics/Collider.d.ts +3 -2
- package/types/physics/PhysicsManager.d.ts +5 -22
- package/types/physics/PhysicsScene.d.ts +6 -2
- package/types/physics/joint/HingeJoint.d.ts +2 -2
- package/types/physics/joint/Joint.d.ts +3 -4
- package/types/physics/joint/SpringJoint.d.ts +3 -2
- package/types/physics/shape/BoxColliderShape.d.ts +2 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +2 -0
- package/types/physics/shape/ColliderShape.d.ts +4 -1
- package/types/physics/shape/PlaneColliderShape.d.ts +1 -0
- package/types/physics/shape/SphereColliderShape.d.ts +2 -0
- package/types/renderingHardwareInterface/index.d.ts +1 -0
- package/types/shader/Shader.d.ts +32 -23
- package/types/shader/ShaderData.d.ts +24 -24
- package/types/shader/ShaderMacro.d.ts +16 -0
- package/types/shader/ShaderPass.d.ts +9 -2
- package/types/shader/ShaderProperty.d.ts +7 -0
- package/types/shader/enums/RenderStateElementKey.d.ts +58 -0
- package/types/shader/index.d.ts +5 -1
- package/types/shaderlib/particle/index.d.ts +14 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
- package/types/shadow/enum/ShadowMode.d.ts +13 -0
- package/types/sky/SkyBoxMaterial.d.ts +27 -9
- package/types/sky/index.d.ts +1 -0
- package/types/texture/RenderTarget.d.ts +2 -6
- package/types/texture/Texture.d.ts +8 -6
- package/types/texture/Texture2D.d.ts +3 -1
- package/types/texture/index.d.ts +1 -0
- package/types/trail/TrailRenderer.d.ts +0 -5
- package/types/SafeLoopArray.d.ts +0 -37
- /package/types/{animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts → RenderPipeline/CullingResults.d.ts} +0 -0
- /package/types/{animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts → RenderPipeline/DepthOnlyPass.d.ts} +0 -0
- /package/types/{animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts → RenderPipeline/PipelineUtils.d.ts} +0 -0
- /package/types/animation/{internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts → AnimatorStatePlayData.d.ts} +0 -0
- /package/types/animation/internal/{animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts → AnimatorStateInfo.d.ts} +0 -0
- /package/types/animation/internal/{animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts → AnimatorStateMachineData.d.ts} +0 -0
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { Camera } from "../Camera";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
3
|
import { Layer } from "../Layer";
|
|
4
|
-
import { Material } from "../material/Material";
|
|
5
|
-
import { Shader } from "../shader";
|
|
6
4
|
import { RenderElement } from "./RenderElement";
|
|
7
5
|
/**
|
|
8
6
|
* Render queue.
|
|
9
7
|
*/
|
|
10
8
|
export declare class RenderQueue {
|
|
11
|
-
readonly
|
|
9
|
+
readonly elements: RenderElement[];
|
|
12
10
|
private _spriteBatcher;
|
|
13
11
|
constructor(engine: Engine);
|
|
14
12
|
/**
|
|
15
13
|
* Push a render element.
|
|
16
14
|
*/
|
|
17
|
-
|
|
18
|
-
render(camera: Camera,
|
|
15
|
+
pushRenderElement(element: RenderElement): void;
|
|
16
|
+
render(camera: Camera, mask: Layer): void;
|
|
19
17
|
/**
|
|
20
18
|
* Clear collection.
|
|
21
19
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Camera } from "../Camera";
|
|
2
2
|
import { VertexElement } from "../graphic/VertexElement";
|
|
3
3
|
import { Basic2DBatcher } from "./Basic2DBatcher";
|
|
4
|
-
import {
|
|
4
|
+
import { RenderElement } from "./RenderElement";
|
|
5
|
+
import { SpriteMaskRenderData } from "./SpriteMaskRenderData";
|
|
5
6
|
export declare class SpriteMaskBatcher extends Basic2DBatcher {
|
|
6
7
|
createVertexElements(vertexElements: VertexElement[]): number;
|
|
7
|
-
canBatch(preElement:
|
|
8
|
-
updateVertices(element:
|
|
8
|
+
canBatch(preElement: RenderElement, curElement: RenderElement): boolean;
|
|
9
|
+
updateVertices(element: SpriteMaskRenderData, vertices: Float32Array, vertexIndex: number): number;
|
|
9
10
|
drawBatches(camera: Camera): void;
|
|
10
11
|
}
|
package/types/Renderer.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { BoundingBox,
|
|
1
|
+
import { BoundingBox, Vector4 } from "@galacean/engine-math";
|
|
2
2
|
import { Component } from "./Component";
|
|
3
|
-
import { RenderContext } from "./RenderPipeline/RenderContext";
|
|
4
|
-
import { TransformModifyFlags } from "./Transform";
|
|
5
3
|
import { ICustomClone } from "./clone/ComponentCloner";
|
|
6
|
-
import { Material } from "./material
|
|
4
|
+
import { Material } from "./material";
|
|
7
5
|
import { ShaderData } from "./shader/ShaderData";
|
|
8
6
|
/**
|
|
9
7
|
* Basis for all renderers.
|
|
10
|
-
* @decorator `@dependentComponents(Transform)`
|
|
8
|
+
* @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
|
|
11
9
|
*/
|
|
12
10
|
export declare class Renderer extends Component implements ICustomClone {
|
|
13
11
|
private static _tempVector0;
|
|
@@ -112,12 +110,5 @@ export declare class Renderer extends Component implements ICustomClone {
|
|
|
112
110
|
*/
|
|
113
111
|
setMaterials(materials: Material[]): void;
|
|
114
112
|
update(deltaTime: number): void;
|
|
115
|
-
protected _updateShaderData(context: RenderContext): void;
|
|
116
|
-
protected _updateTransformShaderData(context: RenderContext, worldMatrix: Matrix): void;
|
|
117
|
-
protected _registerEntityTransformListener(): void;
|
|
118
|
-
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
119
|
-
protected _render(context: RenderContext): void;
|
|
120
|
-
private _createInstanceMaterial;
|
|
121
113
|
private _setMaterial;
|
|
122
|
-
protected _onTransformChanged(type: TransformModifyFlags): void;
|
|
123
114
|
}
|
package/types/Scene.d.ts
CHANGED
package/types/Script.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Camera } from "./Camera";
|
|
|
2
2
|
import { Component } from "./Component";
|
|
3
3
|
import { Pointer } from "./input";
|
|
4
4
|
import { ColliderShape } from "./physics";
|
|
5
|
+
import { Collision } from "./physics/Collision";
|
|
5
6
|
/**
|
|
6
7
|
* Script class, used for logic writing.
|
|
7
8
|
*/
|
|
@@ -22,12 +23,12 @@ export declare class Script extends Component {
|
|
|
22
23
|
onStart(): void;
|
|
23
24
|
/**
|
|
24
25
|
* The main loop, called frame by frame.
|
|
25
|
-
* @param deltaTime - The
|
|
26
|
+
* @param deltaTime - The delta time since last frame in seconds
|
|
26
27
|
*/
|
|
27
28
|
onUpdate(deltaTime: number): void;
|
|
28
29
|
/**
|
|
29
30
|
* Called after the onUpdate finished, called frame by frame.
|
|
30
|
-
* @param deltaTime - The
|
|
31
|
+
* @param deltaTime - The delta time since last frame in seconds
|
|
31
32
|
*/
|
|
32
33
|
onLateUpdate(deltaTime: number): void;
|
|
33
34
|
/**
|
|
@@ -45,37 +46,39 @@ export declare class Script extends Component {
|
|
|
45
46
|
*/
|
|
46
47
|
onPhysicsUpdate(): void;
|
|
47
48
|
/**
|
|
48
|
-
* Called when the
|
|
49
|
+
* Called when the trigger enter.
|
|
49
50
|
* @param other - ColliderShape
|
|
50
51
|
*/
|
|
51
52
|
onTriggerEnter(other: ColliderShape): void;
|
|
52
53
|
/**
|
|
53
|
-
* Called when the
|
|
54
|
-
* @remarks onTriggerStay is called every frame while the collision stay.
|
|
54
|
+
* Called when the trigger exit.
|
|
55
55
|
* @param other - ColliderShape
|
|
56
56
|
*/
|
|
57
57
|
onTriggerExit(other: ColliderShape): void;
|
|
58
58
|
/**
|
|
59
|
-
* Called when the
|
|
59
|
+
* Called when the trigger stay.
|
|
60
|
+
* @remarks onTriggerStay is called every frame while the trigger stay.
|
|
60
61
|
* @param other - ColliderShape
|
|
61
62
|
*/
|
|
62
63
|
onTriggerStay(other: ColliderShape): void;
|
|
63
64
|
/**
|
|
64
65
|
* Called when the collision enter.
|
|
65
|
-
* @param other -
|
|
66
|
+
* @param other - The Collision data associated with this collision event
|
|
67
|
+
* @remarks The Collision data will be invalid after this call, you should copy the data if needed.
|
|
66
68
|
*/
|
|
67
|
-
onCollisionEnter(other:
|
|
69
|
+
onCollisionEnter(other: Collision): void;
|
|
68
70
|
/**
|
|
69
|
-
* Called when the collision
|
|
70
|
-
* @
|
|
71
|
-
* @
|
|
71
|
+
* Called when the collision exit.
|
|
72
|
+
* @param other - The Collision data associated with this collision event
|
|
73
|
+
* @remarks The Collision data will be invalid after this call, you should copy the data if needed.
|
|
72
74
|
*/
|
|
73
|
-
onCollisionExit(other:
|
|
75
|
+
onCollisionExit(other: Collision): void;
|
|
74
76
|
/**
|
|
75
|
-
* Called when the collision
|
|
76
|
-
* @param other -
|
|
77
|
+
* Called when the collision stay.
|
|
78
|
+
* @param other - The Collision data associated with this collision event
|
|
79
|
+
* @remarks The Collision data will be invalid after this call, you should copy the data if needed.
|
|
77
80
|
*/
|
|
78
|
-
onCollisionStay(other:
|
|
81
|
+
onCollisionStay(other: Collision): void;
|
|
79
82
|
/**
|
|
80
83
|
* Called when the pointer is down while over the ColliderShape.
|
|
81
84
|
* @param pointer - The pointer that triggered
|
package/types/Transform.d.ts
CHANGED
|
@@ -24,6 +24,9 @@ export declare class Transform extends Component {
|
|
|
24
24
|
private _lossyWorldScale;
|
|
25
25
|
private _localMatrix;
|
|
26
26
|
private _worldMatrix;
|
|
27
|
+
private _worldForward;
|
|
28
|
+
private _worldRight;
|
|
29
|
+
private _worldUp;
|
|
27
30
|
private _isParentDirty;
|
|
28
31
|
private _parentTransformCache;
|
|
29
32
|
private _dirtyFlag;
|
|
@@ -135,23 +138,17 @@ export declare class Transform extends Component {
|
|
|
135
138
|
*/
|
|
136
139
|
setWorldRotationQuaternion(x: number, y: number, z: number, w: number): void;
|
|
137
140
|
/**
|
|
138
|
-
*
|
|
139
|
-
* @param forward - Forward vector
|
|
140
|
-
* @returns Forward vector
|
|
141
|
+
* The forward direction in world space.
|
|
141
142
|
*/
|
|
142
|
-
|
|
143
|
+
get worldForward(): Vector3;
|
|
143
144
|
/**
|
|
144
|
-
*
|
|
145
|
-
* @param right - Right vector
|
|
146
|
-
* @returns Right vector
|
|
145
|
+
* The right direction in world space.
|
|
147
146
|
*/
|
|
148
|
-
|
|
147
|
+
get worldRight(): Vector3;
|
|
149
148
|
/**
|
|
150
|
-
*
|
|
151
|
-
* @param up - Up vector
|
|
152
|
-
* @returns Up vector
|
|
149
|
+
* The up direction in world space.
|
|
153
150
|
*/
|
|
154
|
-
|
|
151
|
+
get worldUp(): Vector3;
|
|
155
152
|
/**
|
|
156
153
|
* Translate in the direction and distance of the translation.
|
|
157
154
|
* @param translation - Direction and distance of translation
|
|
@@ -198,6 +195,7 @@ export declare class Transform extends Component {
|
|
|
198
195
|
* @returns Change flag
|
|
199
196
|
*/
|
|
200
197
|
registerWorldChangeFlag(): BoolUpdateFlag;
|
|
198
|
+
protected _onDestroy(): void;
|
|
201
199
|
/**
|
|
202
200
|
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
203
201
|
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
package/types/Utils.d.ts
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
1
|
export declare class Utils {
|
|
2
|
+
/**
|
|
3
|
+
* Fast remove an element from array.
|
|
4
|
+
* @param array - Array
|
|
5
|
+
* @param item - Element
|
|
6
|
+
*/
|
|
7
|
+
static removeFromArray(array: any[], item: any): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Decodes a given Uint8Array into a string.
|
|
10
|
+
*/
|
|
11
|
+
static decodeText(array: Uint8Array): string;
|
|
12
|
+
/**
|
|
13
|
+
* Judge whether the url is absolute url.
|
|
14
|
+
* @param url - The url to be judged.
|
|
15
|
+
* @returns Whether the url is absolute url.
|
|
16
|
+
*/
|
|
17
|
+
static isAbsoluteUrl(url: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the values of an object.
|
|
20
|
+
*/
|
|
21
|
+
static objectValues(obj: any): any[];
|
|
22
|
+
/**
|
|
23
|
+
* Convert a relative URL to an absolute URL based on a given base URL.
|
|
24
|
+
* @param baseUrl - The base url.
|
|
25
|
+
* @param relativeUrl - The relative url.
|
|
26
|
+
* @returns The resolved url.
|
|
27
|
+
*/
|
|
28
|
+
static resolveAbsoluteUrl(baseUrl: string, relativeUrl: string): string;
|
|
2
29
|
private static _stringToPath;
|
|
30
|
+
private static _formatRelativePath;
|
|
3
31
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EngineObject } from "../base/EngineObject";
|
|
1
2
|
import { Component } from "../Component";
|
|
2
3
|
import { Entity } from "../Entity";
|
|
3
4
|
import { AnimationClipCurveBinding } from "./AnimationClipCurveBinding";
|
|
@@ -7,7 +8,7 @@ import { KeyframeValueType } from "./Keyframe";
|
|
|
7
8
|
/**
|
|
8
9
|
* Stores keyframe based animations.
|
|
9
10
|
*/
|
|
10
|
-
export declare class AnimationClip {
|
|
11
|
+
export declare class AnimationClip extends EngineObject {
|
|
11
12
|
readonly name: string;
|
|
12
13
|
private _length;
|
|
13
14
|
private _events;
|
|
@@ -13,9 +13,9 @@ export declare class Animator extends Component {
|
|
|
13
13
|
speed: number;
|
|
14
14
|
protected _animatorController: AnimatorController;
|
|
15
15
|
protected _controllerUpdateFlag: BoolUpdateFlag;
|
|
16
|
+
protected _updateMark: number;
|
|
16
17
|
private _animatorLayersData;
|
|
17
|
-
private
|
|
18
|
-
private _animationCurveOwners;
|
|
18
|
+
private _curveOwnerPool;
|
|
19
19
|
private _animationEventHandlerPool;
|
|
20
20
|
private _tempAnimatorStateInfo;
|
|
21
21
|
private _controlledRenderers;
|
|
@@ -56,12 +56,11 @@ export declare class Animator extends Component {
|
|
|
56
56
|
*/
|
|
57
57
|
findAnimatorState(stateName: string, layerIndex?: number): AnimatorState;
|
|
58
58
|
private _getAnimatorStateInfo;
|
|
59
|
-
private _saveDefaultValues;
|
|
60
59
|
private _getAnimatorStateData;
|
|
61
60
|
private _saveAnimatorStateData;
|
|
62
61
|
private _saveAnimatorEventHandlers;
|
|
63
62
|
private _clearCrossData;
|
|
64
|
-
private
|
|
63
|
+
private _addCrossOwner;
|
|
65
64
|
private _prepareCrossFading;
|
|
66
65
|
private _prepareStandbyCrossFading;
|
|
67
66
|
private _prepareFixedPoseCrossFading;
|
|
@@ -72,9 +71,12 @@ export declare class Animator extends Component {
|
|
|
72
71
|
private _updatePlayingState;
|
|
73
72
|
private _updateCrossFade;
|
|
74
73
|
private _updateCrossFadeFromPose;
|
|
74
|
+
private _updateFinishedState;
|
|
75
75
|
private _updateCrossFadeData;
|
|
76
76
|
private _preparePlay;
|
|
77
77
|
private _checkTransition;
|
|
78
|
+
private _checkSubTransition;
|
|
79
|
+
private _checkBackwardsSubTransition;
|
|
78
80
|
private _crossFadeByTransition;
|
|
79
81
|
private _fireAnimationEvents;
|
|
80
82
|
private _fireSubAnimationEvents;
|
|
@@ -83,4 +85,5 @@ export declare class Animator extends Component {
|
|
|
83
85
|
private _callAnimatorScriptOnUpdate;
|
|
84
86
|
private _callAnimatorScriptOnExit;
|
|
85
87
|
private _checkAutoPlay;
|
|
88
|
+
private _checkRevertOwner;
|
|
86
89
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnimatorTransitionBase } from "./AnimatorTransitionBase";
|
|
2
|
+
/**
|
|
3
|
+
* Transitions define when and how the state machine switch from one state to another. AnimatorStateTransition always originate from an Animator State and have timing parameters.
|
|
4
|
+
*/
|
|
5
|
+
export declare class AnimatorStateTransition extends AnimatorTransitionBase {
|
|
6
|
+
/** The duration of the transition. This is represented in normalized time. */
|
|
7
|
+
duration: number;
|
|
8
|
+
/** The time at which the destination state will start. This is represented in normalized time. */
|
|
9
|
+
offset: number;
|
|
10
|
+
/** ExitTime represents the exact time at which the transition can take effect. This is represented in normalized time. */
|
|
11
|
+
exitTime: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnimatorStateMachine } from "./AnimatorStateMachine";
|
|
2
|
+
import { AnimatorState } from "./AnimatorState";
|
|
3
|
+
/**
|
|
4
|
+
* Base class for animator transitions. Transitions define when and how the state machine switches from one state to another.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimatorTransitionBase {
|
|
7
|
+
/** The destination state of the transition. */
|
|
8
|
+
destinationState?: AnimatorState;
|
|
9
|
+
destinationStateMachine?: AnimatorStateMachine;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rect } from "@galacean/engine-math";
|
|
2
|
+
import { AnimationCurve } from "./AnimationCurve";
|
|
3
|
+
/**
|
|
4
|
+
* Store a collection of Keyframes that can be evaluated over time.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimationRectCurve extends AnimationCurve<Rect> {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReferResource } from "../../asset/ReferResource";
|
|
2
|
+
import { AnimationCurve } from "./AnimationCurve";
|
|
3
|
+
/**
|
|
4
|
+
* Store a collection of Keyframes that can be evaluated over time.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimationRefCurve extends AnimationCurve<ReferResource> {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StateMachine state.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum StateMachineState {
|
|
5
|
+
/** Standby state. */
|
|
6
|
+
Standby = 0,
|
|
7
|
+
/** Playing state. */
|
|
8
|
+
Playing = 1,
|
|
9
|
+
/** CrossFading state. */
|
|
10
|
+
CrossFading = 2,
|
|
11
|
+
/** FixedCrossFading state. */
|
|
12
|
+
FixedCrossFading = 3
|
|
13
|
+
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import "./internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler";
|
|
2
|
-
import "./internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler";
|
|
3
|
-
import "./internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler";
|
|
4
|
-
import "./internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler";
|
|
5
1
|
export { AnimationClip } from "./AnimationClip";
|
|
6
2
|
export { AnimationClipCurveBinding } from "./AnimationClipCurveBinding";
|
|
7
3
|
export * from "./animationCurve";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AnimatorStateTransition } from "../AnimatorTransition";
|
|
2
|
+
export declare class AnimatorPlayableObject {
|
|
3
|
+
private _transitions;
|
|
4
|
+
/**
|
|
5
|
+
* The transitions that are going out of the object.
|
|
6
|
+
*/
|
|
7
|
+
get transitions(): Readonly<AnimatorStateTransition[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Add an outgoing transition to the destination object.
|
|
10
|
+
* @param transition - The transition
|
|
11
|
+
*/
|
|
12
|
+
addTransition(transition: AnimatorStateTransition): void;
|
|
13
|
+
/**
|
|
14
|
+
* Remove a transition from the object.
|
|
15
|
+
* @param transition - The transition
|
|
16
|
+
*/
|
|
17
|
+
removeTransition(transition: AnimatorStateTransition): void;
|
|
18
|
+
/**
|
|
19
|
+
* Clears all transitions from the object.
|
|
20
|
+
*/
|
|
21
|
+
clearTransitions(): void;
|
|
22
|
+
getDuration(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/animation/internal/animationCurveOwner/Assembler/IAnimationCurveOwnerAssembler.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,47 +6,47 @@ export declare enum AssetType {
|
|
|
6
6
|
* Plain text.
|
|
7
7
|
* @remarks Will not be cached based on url in ResourceManager.
|
|
8
8
|
*/
|
|
9
|
-
Text = "
|
|
9
|
+
Text = "Text",
|
|
10
10
|
/**
|
|
11
11
|
* JSON.
|
|
12
12
|
* @remarks Will not be cached based on url in ResourceManager.
|
|
13
13
|
*/
|
|
14
|
-
JSON = "
|
|
14
|
+
JSON = "JSON",
|
|
15
15
|
/**
|
|
16
16
|
* ArrayBuffer.
|
|
17
17
|
* @remarks Will not be cached based on url in ResourceManager.
|
|
18
18
|
*/
|
|
19
|
-
Buffer = "
|
|
19
|
+
Buffer = "Buffer",
|
|
20
20
|
/** 2D Texture. */
|
|
21
|
-
Texture2D = "
|
|
21
|
+
Texture2D = "Texture2D",
|
|
22
22
|
/** Cube Texture. */
|
|
23
|
-
TextureCube = "
|
|
23
|
+
TextureCube = "TextureCube",
|
|
24
24
|
/** Material. */
|
|
25
|
-
Material = "
|
|
25
|
+
Material = "Material",
|
|
26
26
|
/** Mesh. */
|
|
27
|
-
Mesh = "
|
|
27
|
+
Mesh = "Mesh",
|
|
28
28
|
/** AnimationClip. */
|
|
29
29
|
AnimationClip = "AnimationClip",
|
|
30
30
|
/** AnimatorController. */
|
|
31
31
|
AnimatorController = "AnimatorController",
|
|
32
32
|
/** Prefab.*/
|
|
33
|
-
|
|
33
|
+
GLTF = "GLTF",
|
|
34
34
|
/** Compress Texture. */
|
|
35
|
-
KTX = "
|
|
35
|
+
KTX = "KTX",
|
|
36
36
|
/** Cube Compress Texture. */
|
|
37
|
-
KTXCube = "
|
|
37
|
+
KTXCube = "KTXCube",
|
|
38
38
|
/** Sprite. */
|
|
39
|
-
Sprite = "
|
|
39
|
+
Sprite = "Sprite",
|
|
40
40
|
/** Sprite Atlas. */
|
|
41
|
-
SpriteAtlas = "
|
|
41
|
+
SpriteAtlas = "SpriteAtlas",
|
|
42
42
|
/** Ambient light. */
|
|
43
|
-
Env = "
|
|
43
|
+
Env = "Environment",
|
|
44
44
|
/** Scene. */
|
|
45
|
-
Scene = "
|
|
45
|
+
Scene = "Scene",
|
|
46
46
|
/** HDR to cube. */
|
|
47
47
|
HDR = "HDR",
|
|
48
48
|
/** Font. */
|
|
49
|
-
Font = "
|
|
49
|
+
Font = "Font",
|
|
50
50
|
/** Source Font, include ttf、 otf and woff. */
|
|
51
|
-
SourceFont = "
|
|
51
|
+
SourceFont = "SourceFont"
|
|
52
52
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
+
type PickOnlyOne<T extends {}, Keys extends keyof T = keyof T> = Keys extends unknown ? {
|
|
2
|
+
[K in Keys]: T[Keys];
|
|
3
|
+
} & {
|
|
4
|
+
[K in Exclude<keyof T, Keys>]?: never;
|
|
5
|
+
} : never;
|
|
1
6
|
/**
|
|
2
7
|
* Used to describe loading asset.
|
|
3
8
|
*/
|
|
4
9
|
export type LoadItem = {
|
|
5
|
-
/**
|
|
6
|
-
* Loading url.
|
|
7
|
-
*/
|
|
8
|
-
url?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Available when AssetType is TextureCube.
|
|
11
|
-
*/
|
|
12
|
-
urls?: string[];
|
|
13
10
|
/**
|
|
14
11
|
* Asset Type.
|
|
15
12
|
*/
|
|
@@ -30,4 +27,14 @@ export type LoadItem = {
|
|
|
30
27
|
* Additional parameters for specified loader.
|
|
31
28
|
*/
|
|
32
29
|
params?: Record<string, any>;
|
|
33
|
-
}
|
|
30
|
+
} & PickOnlyOne<{
|
|
31
|
+
/**
|
|
32
|
+
* Loading url.
|
|
33
|
+
*/
|
|
34
|
+
url: string;
|
|
35
|
+
/**
|
|
36
|
+
* Available when AssetType is TextureCube.
|
|
37
|
+
*/
|
|
38
|
+
urls: string[];
|
|
39
|
+
}>;
|
|
40
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Engine } from "..";
|
|
1
|
+
import { ContentRestorer, Engine, EngineObject } from "..";
|
|
2
2
|
import { AssetPromise } from "./AssetPromise";
|
|
3
3
|
import { Loader } from "./Loader";
|
|
4
4
|
import { LoadItem } from "./LoadItem";
|
|
@@ -17,14 +17,17 @@ export declare class ResourceManager {
|
|
|
17
17
|
retryInterval: number;
|
|
18
18
|
/** The default timeout period for loading assets, in milliseconds. */
|
|
19
19
|
timeout: number;
|
|
20
|
-
|
|
20
|
+
private _loadingPromises;
|
|
21
|
+
/** Asset path pool, key is the `instanceID` of resource, value is asset path. */
|
|
21
22
|
private _assetPool;
|
|
22
|
-
/** Asset pool,
|
|
23
|
+
/** Asset url pool, key is the asset path and the value is the asset. */
|
|
23
24
|
private _assetUrlPool;
|
|
24
|
-
/**
|
|
25
|
-
private
|
|
26
|
-
/**
|
|
27
|
-
private
|
|
25
|
+
/** Referable resource pool, key is the `instanceID` of resource. */
|
|
26
|
+
private _referResourcePool;
|
|
27
|
+
/** Graphic resource pool, key is the `instanceID` of resource. */
|
|
28
|
+
private _graphicResourcePool;
|
|
29
|
+
/** Restorable resource information pool, key is the `instanceID` of resource. */
|
|
30
|
+
private _contentRestorerPool;
|
|
28
31
|
/**
|
|
29
32
|
* Create a ResourceManager.
|
|
30
33
|
* @param engine - Engine to which the current ResourceManager belongs
|
|
@@ -85,6 +88,11 @@ export declare class ResourceManager {
|
|
|
85
88
|
* @remarks The release principle is that it is not referenced by the components, including direct and indirect reference.
|
|
86
89
|
*/
|
|
87
90
|
gc(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Add content restorer.
|
|
93
|
+
* @param restorer - The restorer
|
|
94
|
+
*/
|
|
95
|
+
addContentRestorer<T extends EngineObject>(restorer: ContentRestorer<T>): void;
|
|
88
96
|
private _assignDefaultOptions;
|
|
89
97
|
private _loadSingleItem;
|
|
90
98
|
private _gc;
|
|
@@ -96,6 +104,6 @@ export declare class ResourceManager {
|
|
|
96
104
|
/**
|
|
97
105
|
* Declare ResourceLoader's decorator.
|
|
98
106
|
* @param assetType - Type of asset
|
|
99
|
-
* @param
|
|
107
|
+
* @param extNames - Name of file extension
|
|
100
108
|
*/
|
|
101
|
-
export declare function resourceLoader(assetType: string,
|
|
109
|
+
export declare function resourceLoader(assetType: string, extNames: string[], useCache?: boolean): <T extends Loader<any>>(Target: new (useCache: boolean) => T) => void;
|
package/types/asset/request.d.ts
CHANGED
|
@@ -17,9 +17,13 @@ export declare class MultiExecutor {
|
|
|
17
17
|
private interval;
|
|
18
18
|
private _timeoutId;
|
|
19
19
|
private _currentCount;
|
|
20
|
+
private _onComplete;
|
|
21
|
+
private _onError;
|
|
22
|
+
private _error;
|
|
20
23
|
constructor(execFunc: (count?: number) => Promise<any>, totalCount: number, interval: number);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
start(): this;
|
|
25
|
+
onComplete(func: Function): this;
|
|
26
|
+
onError(func: Function): this;
|
|
27
|
+
cancel(): void;
|
|
24
28
|
private exec;
|
|
25
29
|
}
|
package/types/base/Constant.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ export declare enum GLCapabilityType {
|
|
|
105
105
|
pvrtc = "WEBGL_compressed_texture_pvrtc",
|
|
106
106
|
pvrtc_webkit = "WEBKIT_WEBGL_compressed_texture_pvrtc",
|
|
107
107
|
s3tc = "WEBGL_compressed_texture_s3tc",
|
|
108
|
-
s3tc_webkit = "WEBKIT_WEBGL_compressed_texture_s3tc"
|
|
108
|
+
s3tc_webkit = "WEBKIT_WEBGL_compressed_texture_s3tc",
|
|
109
|
+
WEBGL_lose_context = "WEBGL_lose_context"
|
|
109
110
|
}
|
|
110
111
|
export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
|