@galacean/engine-core 0.0.0-experimental-ktx2.0 → 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.
Files changed (124) hide show
  1. package/dist/main.js +9998 -10838
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +9998 -10838
  4. package/dist/module.js +9902 -10742
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/enums/SpriteDirtyFlag.d.ts +13 -0
  8. package/types/Camera.d.ts +8 -30
  9. package/types/Component.d.ts +0 -1
  10. package/types/ComponentsManager.d.ts +3 -2
  11. package/types/Engine.d.ts +4 -9
  12. package/types/Entity.d.ts +0 -2
  13. package/types/ListenerUpdateFlag.d.ts +12 -0
  14. package/types/RenderPipeline/BasicRenderPipeline.d.ts +2 -1
  15. package/types/RenderPipeline/MeshRenderElement.d.ts +3 -1
  16. package/types/RenderPipeline/RenderElement.d.ts +4 -2
  17. package/types/RenderPipeline/RenderQueue.d.ts +1 -1
  18. package/types/RenderPipeline/SpriteElement.d.ts +3 -1
  19. package/types/RenderPipeline/SpriteMaskElement.d.ts +3 -1
  20. package/types/RenderPipeline/TextRenderElement.d.ts +3 -1
  21. package/types/RenderPipeline/enums/PipelineStage.d.ts +0 -2
  22. package/types/Scene.d.ts +4 -3
  23. package/types/SceneManager.d.ts +5 -28
  24. package/types/animation/Animator.d.ts +2 -0
  25. package/types/animation/AnimatorStateTransition.d.ts +12 -0
  26. package/types/animation/AnimatorTransitionBase.d.ts +10 -0
  27. package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
  28. package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
  29. package/types/animation/enums/StateMachineState.d.ts +13 -0
  30. package/types/animation/index.d.ts +0 -4
  31. package/types/animation/internal/AnimatorPlayableObject.d.ts +23 -0
  32. package/types/animation/internal/animationCurveOwner/Assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
  33. package/types/animation/internal/animationCurveOwner/Assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
  34. package/types/animation/internal/animationCurveOwner/Assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
  35. package/types/animation/internal/animationCurveOwner/Assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
  36. package/types/asset/AssetType.d.ts +0 -2
  37. package/types/asset/Loader.d.ts +1 -3
  38. package/types/asset/ResourceManager.d.ts +2 -6
  39. package/types/base/Constant.d.ts +0 -1
  40. package/types/clone/ComponentCloner.d.ts +1 -2
  41. package/types/fog/EXP2Fog.d.ts +15 -0
  42. package/types/fog/Fog.d.ts +14 -0
  43. package/types/fog/LinearFog.d.ts +22 -0
  44. package/types/fog/index.d.ts +3 -0
  45. package/types/graphic/Buffer.d.ts +6 -22
  46. package/types/graphic/BufferUtil.d.ts +0 -1
  47. package/types/graphic/Primitive.d.ts +1 -0
  48. package/types/graphic/SubPrimitive.d.ts +9 -0
  49. package/types/graphic/VertexElement.d.ts +6 -10
  50. package/types/index.d.ts +0 -1
  51. package/types/input/InputManager.d.ts +2 -2
  52. package/types/mesh/BufferMesh.d.ts +2 -2
  53. package/types/mesh/ModelMesh.d.ts +41 -62
  54. package/types/mesh/PrimitiveMesh.d.ts +2 -4
  55. package/types/mesh/Skin.d.ts +0 -3
  56. package/types/mesh/SkinnedMeshRenderer.d.ts +11 -20
  57. package/types/mesh/index.d.ts +5 -6
  58. package/types/particle/ParticleBufferUtils.d.ts +1 -0
  59. package/types/particle/ParticleGenerator.d.ts +72 -0
  60. package/types/particle/ParticleMaterial.d.ts +28 -0
  61. package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
  62. package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
  63. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
  64. package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
  65. package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
  66. package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
  67. package/types/particle/enums/ParticleStopMode.d.ts +6 -0
  68. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
  69. package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
  70. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
  71. package/types/particle/modules/Burst.d.ts +14 -0
  72. package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
  73. package/types/particle/modules/EmissionModule.d.ts +45 -0
  74. package/types/particle/modules/MainModule.d.ts +68 -0
  75. package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
  76. package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
  77. package/types/particle/modules/ParticleCurve.d.ts +56 -0
  78. package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
  79. package/types/particle/modules/ParticleGradient.d.ts +94 -0
  80. package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
  81. package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
  82. package/types/particle/modules/TextureSheetAnimationModule.d.ts +42 -0
  83. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
  84. package/types/particle/modules/shape/BaseShape.d.ts +12 -0
  85. package/types/particle/modules/shape/BoxShape.d.ts +11 -0
  86. package/types/particle/modules/shape/CircleShape.d.ts +17 -0
  87. package/types/particle/modules/shape/ConeShape.d.ts +28 -0
  88. package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
  89. package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
  90. package/types/particle/modules/shape/SphereShape.d.ts +9 -0
  91. package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
  92. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
  93. package/types/particle/modules/shape/index.d.ts +6 -0
  94. package/types/physics/Collider.d.ts +2 -1
  95. package/types/physics/PhysicsManager.d.ts +4 -2
  96. package/types/physics/PhysicsScene.d.ts +6 -2
  97. package/types/physics/index.d.ts +7 -7
  98. package/types/physics/joint/Joint.d.ts +1 -2
  99. package/types/physics/joint/SpringJoint.d.ts +2 -1
  100. package/types/physics/shape/BoxColliderShape.d.ts +2 -0
  101. package/types/physics/shape/CapsuleColliderShape.d.ts +2 -0
  102. package/types/physics/shape/ColliderShape.d.ts +4 -1
  103. package/types/physics/shape/PlaneColliderShape.d.ts +1 -0
  104. package/types/physics/shape/SphereColliderShape.d.ts +2 -0
  105. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +1 -0
  106. package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +1 -1
  107. package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +1 -1
  108. package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +1 -1
  109. package/types/shader/Shader.d.ts +0 -22
  110. package/types/shader/index.d.ts +0 -1
  111. package/types/shaderlib/particle/index.d.ts +14 -0
  112. package/types/shadow/CascadedShadowCasterPass.d.ts +6 -5
  113. package/types/shadow/enum/ShadowMode.d.ts +13 -0
  114. package/types/texture/RenderTarget.d.ts +2 -1
  115. package/types/texture/Texture2D.d.ts +1 -1
  116. package/types/texture/Texture2DArray.d.ts +1 -1
  117. package/types/texture/TextureCube.d.ts +1 -1
  118. package/types/texture/enums/TextureFormat.d.ts +49 -55
  119. /package/types/animation/{internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts → AnimatorStatePlayData.d.ts} +0 -0
  120. /package/types/animation/internal/{animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts → AnimatorStateInfo.d.ts} +0 -0
  121. /package/types/animation/internal/{animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts → AnimatorStateMachineData.d.ts} +0 -0
  122. /package/types/animation/internal/{animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts → CrossCurveData.d.ts} +0 -0
  123. /package/types/animation/internal/animationCurveOwner/{assembler/ScaleAnimationCurveOwnerAssembler.d.ts → Assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts} +0 -0
  124. /package/types/animation/internal/animationCurveOwner/{assembler/UniversalAnimationCurveOwnerAssembler.d.ts → Assembler/IAnimationCurveOwnerAssembler.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-core",
3
- "version": "0.0.0-experimental-ktx2.0",
3
+ "version": "0.0.0-experimental-double11.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -15,10 +15,10 @@
15
15
  "types/**/*"
16
16
  ],
17
17
  "dependencies": {
18
- "@galacean/engine-math": "0.0.0-experimental-ktx2.0"
18
+ "@galacean/engine-math": "0.0.0-experimental-double11.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@galacean/engine-design": "0.0.0-experimental-ktx2.0"
21
+ "@galacean/engine-design": "0.0.0-experimental-double11.1"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Sprite Property Dirty Flag.
3
+ */
4
+ export declare enum SpritePropertyDirtyFlag {
5
+ texture = 1,
6
+ size = 2,
7
+ atlasRotate = 4,
8
+ atlasRegion = 8,
9
+ atlasRegionOffset = 16,
10
+ region = 32,
11
+ pivot = 64,
12
+ border = 128
13
+ }
package/types/Camera.d.ts CHANGED
@@ -1,21 +1,19 @@
1
- import { Matrix, Ray, Rect, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
1
+ import { Matrix, Ray, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
2
2
  import { Component } from "./Component";
3
- import { Layer } from "./Layer";
4
3
  import { CameraClearFlags } from "./enums/CameraClearFlags";
5
- import { DepthTextureMode } from "./enums/DepthTextureMode";
4
+ import { Layer } from "./Layer";
6
5
  import { Shader } from "./shader/Shader";
7
6
  import { ShaderData } from "./shader/ShaderData";
8
7
  import { ShaderTagKey } from "./shader/ShaderTagKey";
9
- import { RenderTarget } from "./texture/RenderTarget";
10
8
  import { TextureCubeFace } from "./texture/enums/TextureCubeFace";
9
+ import { RenderTarget } from "./texture/RenderTarget";
11
10
  /**
12
11
  * Camera component, as the entrance to the three-dimensional world.
13
12
  * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
14
13
  */
15
14
  export declare class Camera extends Component {
16
- private static _inverseViewMatrixProperty;
17
- private static _cameraPositionProperty;
18
- private static _cameraDepthBufferParamsProperty;
15
+ /** Rendering priority - A Camera with higher priority will be rendered on top of a camera with lower priority. */
16
+ priority: number;
19
17
  /** Whether to enable frustum culling, it is enabled by default. */
20
18
  enableFrustumCulling: boolean;
21
19
  /**
@@ -28,12 +26,6 @@ export declare class Camera extends Component {
28
26
  * @remarks Support bit manipulation, corresponding to `Layer`.
29
27
  */
30
28
  cullingMask: Layer;
31
- /**
32
- * Depth texture mode.
33
- * @defaultValue `DepthTextureMode.None`
34
- */
35
- depthTextureMode: DepthTextureMode;
36
- private _priority;
37
29
  private _shaderData;
38
30
  private _isProjMatSetting;
39
31
  private _nearClipPlane;
@@ -45,13 +37,11 @@ export declare class Camera extends Component {
45
37
  private _isFrustumProjectDirty;
46
38
  private _customAspectRatio;
47
39
  private _renderTarget;
48
- private _depthBufferParams;
49
40
  private _frustumViewChangeFlag;
50
41
  private _transform;
51
42
  private _isViewMatrixDirty;
52
43
  private _isInvViewProjDirty;
53
44
  private _viewport;
54
- private _pixelViewport;
55
45
  private _inverseProjectionMatrix;
56
46
  private _lastAspectSize;
57
47
  private _invViewProjMat;
@@ -81,22 +71,11 @@ export declare class Camera extends Component {
81
71
  get aspectRatio(): number;
82
72
  set aspectRatio(value: number);
83
73
  /**
84
- * The viewport of the camera in normalized coordinates on the screen.
85
- * In normalized screen coordinates, the upper-left corner is (0, 0), and the lower-right corner is (1.0, 1.0).
74
+ * Viewport, normalized expression, the upper left corner is (0, 0), and the lower right corner is (1, 1).
86
75
  * @remarks Re-assignment is required after modification to ensure that the modification takes effect.
87
76
  */
88
77
  get viewport(): Vector4;
89
78
  set viewport(value: Vector4);
90
- /**
91
- * The viewport of the camera in pixel coordinates on the screen.
92
- * In pixel screen coordinates, the upper-left corner is (0, 0), and the lower-right corner is (1.0, 1.0).
93
- */
94
- get pixelViewport(): Rect;
95
- /**
96
- * Rendering priority, higher priority will be rendered on top of a camera with lower priority.
97
- */
98
- get priority(): number;
99
- set priority(value: number);
100
79
  /**
101
80
  * Whether it is orthogonal, the default is false. True will use orthographic projection, false will use perspective projection.
102
81
  */
@@ -230,12 +209,11 @@ export declare class Camera extends Component {
230
209
  /**
231
210
  * @inheritdoc
232
211
  */
233
- _onEnableInScene(): void;
212
+ _onEnable(): void;
234
213
  /**
235
214
  * @inheritdoc
236
215
  */
237
- _onDisableInScene(): void;
238
- private _updatePixelViewport;
216
+ _onDisable(): void;
239
217
  private _projMatChange;
240
218
  private _innerViewportToWorldPoint;
241
219
  private _updateShaderData;
@@ -6,7 +6,6 @@ import { Scene } from "./Scene";
6
6
  */
7
7
  export declare class Component extends EngineObject {
8
8
  private _phasedActive;
9
- private _phasedActiveInScene;
10
9
  private _enabled;
11
10
  /**
12
11
  * Indicates whether the component is enabled.
@@ -2,6 +2,7 @@ import { Camera } from "./Camera";
2
2
  import { Component } from "./Component";
3
3
  import { Renderer } from "./Renderer";
4
4
  import { Script } from "./Script";
5
+ import { Animator } from "./animation";
5
6
  /**
6
7
  * The manager of the components.
7
8
  */
@@ -26,8 +27,8 @@ export declare class ComponentsManager {
26
27
  removeOnLateUpdateScript(script: Script): void;
27
28
  addOnPhysicsUpdateScript(script: Script): void;
28
29
  removeOnPhysicsUpdateScript(script: Script): void;
29
- addOnUpdateAnimations(animation: Component): void;
30
- removeOnUpdateAnimations(animation: Component): void;
30
+ addOnUpdateAnimations(animation: Animator): void;
31
+ removeOnUpdateAnimations(animation: Animator): void;
31
32
  addOnUpdateRenderers(renderer: Renderer): void;
32
33
  removeOnUpdateRenderers(renderer: Renderer): void;
33
34
  addDisableScript(component: Script): void;
package/types/Engine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IPhysics, IShaderLab } from "@galacean/engine-design";
1
+ import { IPhysics } from "@galacean/engine-design";
2
2
  import { Canvas } from "./Canvas";
3
3
  import { EngineSettings } from "./EngineSettings";
4
4
  import { Entity } from "./Entity";
@@ -7,12 +7,14 @@ import { ResourceManager } from "./asset/ResourceManager";
7
7
  import { EventDispatcher, Time } from "./base";
8
8
  import { ColorSpace } from "./enums/ColorSpace";
9
9
  import { InputManager } from "./input";
10
- import { PhysicsScene } from "./physics/PhysicsScene";
10
+ import { PhysicsManager } from "./physics";
11
11
  import { IHardwareRenderer } from "./renderingHardwareInterface";
12
12
  /**
13
13
  * Engine.
14
14
  */
15
15
  export declare class Engine extends EventDispatcher {
16
+ /** Physics manager of Engine. */
17
+ readonly physicsManager: PhysicsManager;
16
18
  /** Input manager of Engine. */
17
19
  readonly inputManager: InputManager;
18
20
  private _settings;
@@ -118,11 +120,6 @@ export declare class Engine extends EventDispatcher {
118
120
  private _onDeviceLost;
119
121
  private _onDeviceRestored;
120
122
  private _gc;
121
- /**
122
- * @deprecated
123
- * The first scene physics manager.
124
- */
125
- get physicsManager(): PhysicsScene;
126
123
  }
127
124
  /**
128
125
  * Engine configuration.
@@ -132,6 +129,4 @@ export interface EngineConfiguration {
132
129
  physics?: IPhysics;
133
130
  /** Color space. */
134
131
  colorSpace?: ColorSpace;
135
- /** Shader lab */
136
- shaderLab?: IShaderLab;
137
132
  }
package/types/Entity.d.ts CHANGED
@@ -130,8 +130,6 @@ export declare class Entity extends EngineObject {
130
130
  * @returns Cloned entity
131
131
  */
132
132
  clone(): Entity;
133
- private _createCloneEntity;
134
- private _parseCloneEntity;
135
133
  /**
136
134
  * Destroy self.
137
135
  */
@@ -0,0 +1,12 @@
1
+ import { UpdateFlag } from "./UpdateFlag";
2
+ /**
3
+ * Used to update tags.
4
+ */
5
+ export declare class ListenerUpdateFlag extends UpdateFlag {
6
+ /** Listener. */
7
+ listener: Function;
8
+ /**
9
+ * @inheritdoc
10
+ */
11
+ dispatch(param?: Object): void;
12
+ }
@@ -9,12 +9,13 @@ import { RenderPass } from "./RenderPass";
9
9
  * Basic render pipeline.
10
10
  */
11
11
  export declare class BasicRenderPipeline {
12
+ private static _shadowCasterPipelineStageTagValue;
13
+ private static _forwardPipelineStageTagValue;
12
14
  private _camera;
13
15
  private _defaultPass;
14
16
  private _renderPassArray;
15
17
  private _lastCanvasSize;
16
18
  private _cascadedShadowCaster;
17
- private _depthOnlyPass;
18
19
  /**
19
20
  * Create a basic render pipeline.
20
21
  * @param camera - Camera
@@ -4,14 +4,16 @@ import { Material } from "../material/Material";
4
4
  import { Renderer } from "../Renderer";
5
5
  import { ShaderPass } from "../shader/ShaderPass";
6
6
  import { RenderState } from "../shader/state/RenderState";
7
+ import { IPoolElement } from "./IPoolElement";
7
8
  import { RenderElement } from "./RenderElement";
8
9
  /**
9
10
  * Render element.
10
11
  */
11
- export declare class MeshRenderElement extends RenderElement {
12
+ export declare class MeshRenderElement extends RenderElement implements IPoolElement {
12
13
  /** Mesh. */
13
14
  mesh: Mesh;
14
15
  /** Sub mesh. */
15
16
  subMesh: SubMesh;
16
17
  setValue(component: Renderer, mesh: Mesh, subMesh: SubMesh, material: Material, renderState: RenderState, shaderPass: ShaderPass): void;
18
+ dispose(): void;
17
19
  }
@@ -1,9 +1,11 @@
1
1
  import { ShaderPass } from "../shader/ShaderPass";
2
+ import { RenderState } from "../shader/state/RenderState";
2
3
  import { IPoolElement } from "./IPoolElement";
3
4
  import { RenderData } from "./RenderData";
4
5
  export declare class RenderElement implements IPoolElement {
5
6
  data: RenderData;
6
- shaderPasses: ReadonlyArray<ShaderPass>;
7
- set(data: RenderData, shaderPasses: ReadonlyArray<ShaderPass>): void;
7
+ shaderPass: ShaderPass;
8
+ renderState: RenderState;
9
+ set(data: RenderData, shaderPass: ShaderPass, renderState: RenderState): void;
8
10
  dispose(): void;
9
11
  }
@@ -13,7 +13,7 @@ export declare class RenderQueue {
13
13
  * Push a render element.
14
14
  */
15
15
  pushRenderElement(element: RenderElement): void;
16
- render(camera: Camera, mask: Layer, pipelineStageTagValue: string): void;
16
+ render(camera: Camera, mask: Layer): void;
17
17
  /**
18
18
  * Clear collection.
19
19
  */
@@ -4,10 +4,12 @@ import { Renderer } from "../Renderer";
4
4
  import { ShaderPass } from "../shader";
5
5
  import { RenderState } from "../shader/state/RenderState";
6
6
  import { Texture2D } from "../texture";
7
+ import { IPoolElement } from "./IPoolElement";
7
8
  import { RenderElement } from "./RenderElement";
8
- export declare class SpriteElement extends RenderElement {
9
+ export declare class SpriteElement extends RenderElement implements IPoolElement {
9
10
  renderData: RenderData2D;
10
11
  texture: Texture2D;
11
12
  constructor();
12
13
  setValue(component: Renderer, renderDate: RenderData2D, material: Material, texture: Texture2D, renderState: RenderState, shaderPass: ShaderPass): void;
14
+ dispose(): void;
13
15
  }
@@ -1,10 +1,12 @@
1
1
  import { RenderData2D } from "../2d/data/RenderData2D";
2
2
  import { Material } from "../material/Material";
3
3
  import { Renderer } from "../Renderer";
4
+ import { IPoolElement } from "./IPoolElement";
4
5
  import { RenderElement } from "./RenderElement";
5
- export declare class SpriteMaskElement extends RenderElement {
6
+ export declare class SpriteMaskElement extends RenderElement implements IPoolElement {
6
7
  renderData: RenderData2D;
7
8
  isAdd: boolean;
8
9
  constructor();
9
10
  setValue(component: Renderer, renderData: RenderData2D, material: Material): void;
11
+ dispose(): void;
10
12
  }
@@ -1,6 +1,8 @@
1
+ import { IPoolElement } from "./IPoolElement";
1
2
  import { RenderElement } from "./RenderElement";
2
3
  import { SpriteElement } from "./SpriteElement";
3
- export declare class TextRenderElement extends RenderElement {
4
+ export declare class TextRenderElement extends RenderElement implements IPoolElement {
4
5
  charElements: SpriteElement[];
5
6
  constructor();
7
+ dispose(): void;
6
8
  }
@@ -2,8 +2,6 @@
2
2
  * Pipeline stage.
3
3
  */
4
4
  export declare enum PipelineStage {
5
- /** DepthOnly stage. */
6
- DepthOnly = "DepthOnly",
7
5
  /** Shadow caster stage. */
8
6
  ShadowCaster = "ShadowCaster",
9
7
  /** Forward shading stage. */
package/types/Scene.d.ts CHANGED
@@ -5,7 +5,6 @@ import { Entity } from "./Entity";
5
5
  import { EngineObject } from "./base";
6
6
  import { FogMode } from "./enums/FogMode";
7
7
  import { AmbientLight } from "./lighting/AmbientLight";
8
- import { PhysicsScene } from "./physics/PhysicsScene";
9
8
  import { ShaderData } from "./shader/ShaderData";
10
9
  import { ShadowCascadesMode } from "./shadow/enum/ShadowCascadesMode";
11
10
  import { ShadowResolution } from "./shadow/enum/ShadowResolution";
@@ -19,8 +18,6 @@ export declare class Scene extends EngineObject {
19
18
  private static _sunlightDirectionProperty;
20
19
  /** Scene name. */
21
20
  name: string;
22
- /** Physics. */
23
- readonly physics: PhysicsScene;
24
21
  /** If cast shadows. */
25
22
  castShadows: boolean;
26
23
  /** The resolution of the shadow maps. */
@@ -143,6 +140,10 @@ export declare class Scene extends EngineObject {
143
140
  * @returns Entity
144
141
  */
145
142
  findEntityByPath(path: string): Entity | null;
143
+ /**
144
+ * Destroy this scene.
145
+ */
146
+ destroy(): void;
146
147
  private _addToRootEntityList;
147
148
  private _computeLinearFogParams;
148
149
  private _computeExponentialFogParams;
@@ -1,35 +1,20 @@
1
+ import { AssetPromise } from "./asset/AssetPromise";
1
2
  import { Engine } from "./Engine";
2
3
  import { Scene } from "./Scene";
3
- import { AssetPromise } from "./asset/AssetPromise";
4
4
  /**
5
5
  * Scene manager.
6
6
  */
7
7
  export declare class SceneManager {
8
8
  readonly engine: Engine;
9
9
  /**
10
- * Get the scene list.
11
- */
12
- get scenes(): ReadonlyArray<Scene>;
13
- /**
14
- * Add scene.
15
- * @param scene - The scene which want to be added
16
- */
17
- addScene(scene: Scene): void;
18
- /**
19
- * Add scene at specified index.
20
- * @param index - specified index
21
- * @param child - The scene which want to be added
22
- */
23
- addScene(index: number, scene: Scene): void;
24
- /**
25
- * Remove scene.
26
- * @param scene - The scene which want to be removed
10
+ * Get the activated scene.
27
11
  */
28
- removeScene(scene: Scene): void;
12
+ get activeScene(): Scene;
13
+ set activeScene(scene: Scene);
29
14
  /**
30
15
  * Load and activate scene.
31
16
  * @param url - the path of the scene
32
- * @param destroyOldScene - whether to destroy old scene
17
+ * @param destroyOldScene - whether to destroy old scene information
33
18
  * @returns scene promise
34
19
  */
35
20
  loadScene(url: string, destroyOldScene?: boolean): AssetPromise<Scene>;
@@ -40,12 +25,4 @@ export declare class SceneManager {
40
25
  * @param destScene - target scene
41
26
  */
42
27
  mergeScenes(sourceScene: Scene, destScene: Scene): void;
43
- /**
44
- * @deprecated
45
- * Please use `scenes` instead.
46
- *
47
- * Get the first scene.
48
- */
49
- get activeScene(): Scene;
50
- set activeScene(scene: Scene);
51
28
  }
@@ -75,6 +75,8 @@ export declare class Animator extends Component {
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;
@@ -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
+ }
@@ -35,8 +35,6 @@ export declare enum AssetType {
35
35
  KTX = "KTX",
36
36
  /** Cube Compress Texture. */
37
37
  KTXCube = "KTXCube",
38
- /** KTX2 Compress Texture */
39
- KTX2 = "KTX2",
40
38
  /** Sprite. */
41
39
  Sprite = "Sprite",
42
40
  /** Sprite Atlas. */
@@ -1,4 +1,3 @@
1
- import { Engine, EngineConfiguration } from "../Engine";
2
1
  import { AssetPromise } from "./AssetPromise";
3
2
  import { LoadItem } from "./LoadItem";
4
3
  import { RequestConfig } from "./request";
@@ -26,7 +25,6 @@ export declare abstract class Loader<T> {
26
25
  };
27
26
  private static _engineObjects;
28
27
  constructor(useCache: boolean);
29
- initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void>;
30
- abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T> | Record<string, AssetPromise<any>>;
31
28
  request: <U>(url: string, config: RequestConfig) => AssetPromise<U>;
29
+ abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T> | Record<string, AssetPromise<any>>;
32
30
  }
@@ -7,6 +7,8 @@ import { LoadItem } from "./LoadItem";
7
7
  */
8
8
  export declare class ResourceManager {
9
9
  readonly engine: Engine;
10
+ /** Loader collection. */
11
+ private static _loaders;
10
12
  private static _extTypeMapping;
11
13
  private static _getTypeByUrl;
12
14
  /** The number of retries after failing to load assets. */
@@ -61,12 +63,6 @@ export declare class ResourceManager {
61
63
  * @returns Resource object
62
64
  */
63
65
  getFromCache<T>(url: string): T;
64
- /**
65
- * Find the resource by type.
66
- * @param type - Resource type
67
- * @returns - Resource collection
68
- */
69
- findResourcesByType<T extends EngineObject>(type: new (...args: any[]) => T): T[];
70
66
  /**
71
67
  * Get asset url from instanceId.
72
68
  * @param instanceId - Engine instance id
@@ -106,7 +106,6 @@ export declare enum GLCapabilityType {
106
106
  pvrtc_webkit = "WEBKIT_WEBGL_compressed_texture_pvrtc",
107
107
  s3tc = "WEBGL_compressed_texture_s3tc",
108
108
  s3tc_webkit = "WEBKIT_WEBGL_compressed_texture_s3tc",
109
- bptc = "EXT_texture_compression_bptc",
110
109
  WEBGL_lose_context = "WEBGL_lose_context"
111
110
  }
112
111
  export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
@@ -1,5 +1,4 @@
1
1
  import { Component } from "../Component";
2
- import { Entity } from "../Entity";
3
2
  /**
4
3
  * Custom clone interface.
5
4
  */
@@ -11,5 +10,5 @@ export declare class ComponentCloner {
11
10
  * @param source - Clone source
12
11
  * @param target - Clone target
13
12
  */
14
- static cloneComponent(source: Component, target: Component, srcRoot: Entity, targetRoot: Entity): void;
13
+ static cloneComponent(source: Component, target: Component): void;
15
14
  }
@@ -0,0 +1,15 @@
1
+ import { Entity } from "../Entity";
2
+ import { Fog } from "./Fog";
3
+ /**
4
+ * Exponential fog.
5
+ */
6
+ export declare class EXP2Fog extends Fog {
7
+ private static _densityProperty;
8
+ /**
9
+ * Density of fog.
10
+ */
11
+ get density(): number;
12
+ set density(value: number);
13
+ private _density;
14
+ constructor(entity: Entity);
15
+ }
@@ -0,0 +1,14 @@
1
+ import { Color } from "@oasis-engine/math";
2
+ import { Component } from "../Component";
3
+ /**
4
+ * Fog.
5
+ */
6
+ export declare class Fog extends Component {
7
+ protected static _colorProperty: import("..").ShaderProperty;
8
+ /**
9
+ * Fog color.
10
+ */
11
+ get color(): Color;
12
+ set color(value: Color);
13
+ private _color;
14
+ }