@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
@@ -0,0 +1,28 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ /**
3
+ * Cone shape.
4
+ */
5
+ export declare class ConeShape extends BaseShape {
6
+ private static _tempVector20;
7
+ private static _tempVector21;
8
+ private static _tempVector30;
9
+ private static _tempVector31;
10
+ /** Angle of the cone to emit particles from. */
11
+ angle: number;
12
+ /** Radius of the shape to emit particles from. */
13
+ radius: number;
14
+ /** Length of the cone to emit particles from. */
15
+ length: number;
16
+ /** Cone emitter type. */
17
+ emitType: ConeEmitType;
18
+ constructor();
19
+ }
20
+ /**
21
+ * Cone emitter type.
22
+ */
23
+ export declare enum ConeEmitType {
24
+ /** Emit particles from the base of the cone. */
25
+ Base = 0,
26
+ /** Emit particles from the volume of the cone. */
27
+ Volume = 1
28
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ /**
3
+ * Particle shape that emits particles from a hemisphere.
4
+ */
5
+ export declare class HemisphereShape extends BaseShape {
6
+ /** Radius of the shape to emit particles from. */
7
+ radius: number;
8
+ constructor();
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ /**
3
+ * Particle shape that emits particles from a sphere.
4
+ */
5
+ export declare class SphereShape extends BaseShape {
6
+ /** Radius of the shape to emit particles from. */
7
+ radius: number;
8
+ constructor();
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Particle shape multi mode value.
3
+ */
4
+ export declare enum ParticleShapeArcMode {
5
+ /** Generate points randomly. */
6
+ Random = 0,
7
+ /** Animate the emission point around the shape. */
8
+ Loop = 1
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The emission shape.
3
+ */
4
+ export declare enum ParticleShapeType {
5
+ /** Emit from the volume of a box. */
6
+ Box = 0,
7
+ /** Emit from a circle. */
8
+ Circle = 1,
9
+ /** Emit from the base of a cone. */
10
+ Cone = 2,
11
+ /** Emit from a half-sphere. */
12
+ Hemisphere = 3,
13
+ /** Emit from a sphere. */
14
+ Sphere = 4
15
+ }
@@ -0,0 +1,6 @@
1
+ export { BoxShape } from "./BoxShape";
2
+ export { CircleShape } from "./CircleShape";
3
+ export { ConeShape, ConeEmitType } from "./ConeShape";
4
+ export { HemisphereShape } from "./HemisphereShape";
5
+ export { SphereShape } from "./SphereShape";
6
+ export { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
@@ -1,11 +1,12 @@
1
1
  import { BoolUpdateFlag } from "../BoolUpdateFlag";
2
2
  import { Component } from "../Component";
3
3
  import { ColliderShape } from "./shape/ColliderShape";
4
+ import { ICustomClone } from "../clone/ComponentCloner";
4
5
  /**
5
6
  * Base class for all colliders.
6
7
  * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
7
8
  */
8
- export declare class Collider extends Component {
9
+ export declare class Collider extends Component implements ICustomClone {
9
10
  protected _updateFlag: BoolUpdateFlag;
10
11
  protected _shapes: ColliderShape[];
11
12
  /**
@@ -9,6 +9,7 @@ export declare class PhysicsManager {
9
9
  private static _collision;
10
10
  private _engine;
11
11
  private _restTime;
12
+ private _fixedTimeStep;
12
13
  private _colliders;
13
14
  private _gravity;
14
15
  private _nativePhysicsManager;
@@ -19,13 +20,14 @@ export declare class PhysicsManager {
19
20
  private _onTriggerEnter;
20
21
  private _onTriggerExit;
21
22
  private _onTriggerStay;
22
- /** The fixed time step in seconds at which physics are performed. */
23
- fixedTimeStep: number;
24
23
  /**
25
24
  * The gravity of physics scene.
26
25
  */
27
26
  get gravity(): Vector3;
28
27
  set gravity(value: Vector3);
28
+ /** The fixed time step in seconds at which physics are performed. */
29
+ get fixedTimeStep(): number;
30
+ set fixedTimeStep(value: number);
29
31
  constructor(engine: Engine);
30
32
  /**
31
33
  * Casts a ray through the Scene and returns the first hit.
@@ -9,6 +9,7 @@ export declare class PhysicsScene {
9
9
  private static _collision;
10
10
  private _scene;
11
11
  private _restTime;
12
+ private _fixedTimeStep;
12
13
  private _colliders;
13
14
  private _gravity;
14
15
  private _nativePhysicsScene;
@@ -18,13 +19,16 @@ export declare class PhysicsScene {
18
19
  private _onTriggerEnter;
19
20
  private _onTriggerExit;
20
21
  private _onTriggerStay;
21
- /** The fixed time step in seconds at which physics are performed. */
22
- fixedTimeStep: number;
23
22
  /**
24
23
  * The gravity of physics scene.
25
24
  */
26
25
  get gravity(): Vector3;
27
26
  set gravity(value: Vector3);
27
+ /**
28
+ * The fixed time step in seconds at which physics are performed.
29
+ */
30
+ get fixedTimeStep(): number;
31
+ set fixedTimeStep(value: number);
28
32
  constructor(scene: Scene);
29
33
  /**
30
34
  * Casts a ray through the Scene and returns the first hit.
@@ -1,10 +1,10 @@
1
- export { CharacterController } from "./CharacterController";
2
- export { Collider } from "./Collider";
3
- export { CollisionDetectionMode, DynamicCollider, DynamicColliderConstraints } from "./DynamicCollider";
4
1
  export { HitResult } from "./HitResult";
2
+ export { PhysicsManager } from "./PhysicsManager";
5
3
  export { PhysicsMaterial } from "./PhysicsMaterial";
6
- export { PhysicsScene } from "./PhysicsScene";
7
- export { StaticCollider } from "./StaticCollider";
8
- export * from "./enums";
9
- export * from "./joint";
4
+ export { CharacterController } from "./CharacterController";
10
5
  export * from "./shape";
6
+ export * from "./joint";
7
+ export * from "./enums";
8
+ export { Collider } from "./Collider";
9
+ export { StaticCollider } from "./StaticCollider";
10
+ export { DynamicCollider, CollisionDetectionMode, DynamicColliderConstraints } from "./DynamicCollider";
@@ -8,8 +8,7 @@ import { Collider } from "../Collider";
8
8
  * @decorator `@dependentComponents(Collider, DependentMode.CheckOnly)`
9
9
  */
10
10
  export declare class Joint extends Component {
11
- protected _connectedCollider: JointCollider;
12
- protected _collider: JointCollider;
11
+ protected _connectedColliderInfo: JointCollider;
13
12
  protected _nativeJoint: IJoint;
14
13
  private _force;
15
14
  private _torque;
@@ -1,9 +1,10 @@
1
1
  import { Vector3 } from "@galacean/engine-math";
2
+ import { ICustomClone } from "../../clone/ComponentCloner";
2
3
  import { Joint } from "./Joint";
3
4
  /**
4
5
  * A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
5
6
  */
6
- export declare class SpringJoint extends Joint {
7
+ export declare class SpringJoint extends Joint implements ICustomClone {
7
8
  private _minDistance;
8
9
  private _maxDistance;
9
10
  private _tolerance;
@@ -11,5 +11,7 @@ export declare class BoxColliderShape extends ColliderShape {
11
11
  get size(): Vector3;
12
12
  set size(value: Vector3);
13
13
  constructor();
14
+ clone(): BoxColliderShape;
15
+ cloneTo(target: BoxColliderShape): void;
14
16
  private _setSize;
15
17
  }
@@ -23,4 +23,6 @@ export declare class CapsuleColliderShape extends ColliderShape {
23
23
  get upAxis(): ColliderShapeUpAxis;
24
24
  set upAxis(value: ColliderShapeUpAxis);
25
25
  constructor();
26
+ clone(): CapsuleColliderShape;
27
+ cloneTo(target: CapsuleColliderShape): void;
26
28
  }
@@ -1,10 +1,11 @@
1
+ import { IClone } from "@galacean/engine-design";
1
2
  import { PhysicsMaterial } from "../PhysicsMaterial";
2
3
  import { Vector3 } from "@galacean/engine-math";
3
4
  import { Collider } from "../Collider";
4
5
  /**
5
6
  * Abstract class for collider shapes.
6
7
  */
7
- export declare abstract class ColliderShape {
8
+ export declare abstract class ColliderShape implements IClone {
8
9
  private static _idGenerator;
9
10
  protected _id: number;
10
11
  protected _material: PhysicsMaterial;
@@ -46,6 +47,8 @@ export declare abstract class ColliderShape {
46
47
  get isTrigger(): boolean;
47
48
  set isTrigger(value: boolean);
48
49
  protected constructor();
50
+ abstract clone(): ColliderShape;
51
+ cloneTo(target: ColliderShape): void;
49
52
  private _setPosition;
50
53
  private _setRotation;
51
54
  }
@@ -4,4 +4,5 @@ import { ColliderShape } from "./ColliderShape";
4
4
  */
5
5
  export declare class PlaneColliderShape extends ColliderShape {
6
6
  constructor();
7
+ clone(): PlaneColliderShape;
7
8
  }
@@ -10,4 +10,6 @@ export declare class SphereColliderShape extends ColliderShape {
10
10
  get radius(): number;
11
11
  set radius(value: number);
12
12
  constructor();
13
+ clone(): SphereColliderShape;
14
+ cloneTo(target: SphereColliderShape): void;
13
15
  }
@@ -3,5 +3,6 @@ export interface IPlatformBuffer {
3
3
  bind(): void;
4
4
  setData(byteLength: number, data: ArrayBuffer | ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number, options?: SetDataOptions): void;
5
5
  getData(data: ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number): void;
6
+ resize(byteLength: number): void;
6
7
  destroy(): void;
7
8
  }
@@ -23,7 +23,7 @@ export interface IPlatformTexture2D extends IPlatformTexture {
23
23
  * @param x - X coordinate of area start
24
24
  * @param y - Y coordinate of area start
25
25
  */
26
- setImageSource(imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
26
+ setImageSource(imageSource: TexImageSource | OffscreenCanvas, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
27
27
  /**
28
28
  * Get the pixel color buffer according to the specified area.
29
29
  * @param x - X coordinate of area start
@@ -25,7 +25,7 @@ export interface IPlatformTexture2DArray extends IPlatformTexture {
25
25
  * @param x - X coordinate of area start
26
26
  * @param y - Y coordinate of area start
27
27
  */
28
- setImageSource(index: number, imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
28
+ setImageSource(index: number, imageSource: TexImageSource | OffscreenCanvas, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
29
29
  /**
30
30
  * Get the pixel color buffer according to the specified area.
31
31
  * @param elementIndex - The texture array element index
@@ -26,7 +26,7 @@ export interface IPlatformTextureCube extends IPlatformTexture {
26
26
  * @param x - X coordinate of area start
27
27
  * @param y - Y coordinate of area start
28
28
  */
29
- setImageSource(face: TextureCubeFace, imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
29
+ setImageSource(face: TextureCubeFace, imageSource: TexImageSource | OffscreenCanvas, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
30
30
  /**
31
31
  * Get the pixel color buffer according to the specified cube face and area.
32
32
  * @param face - You can choose which cube face to read
@@ -9,27 +9,6 @@ import { SubShader } from "./SubShader";
9
9
  export declare class Shader {
10
10
  readonly name: string;
11
11
  private static _shaderMap;
12
- /**
13
- * Create a shader by source code.
14
- *
15
- * @remarks
16
- *
17
- * ShaderLab must be enabled first as follows:
18
- * ```ts
19
- * // Import shaderLab
20
- * import { ShaderLab } from "@galacean/engine-shader-lab";
21
- * // Create engine with shaderLab
22
- * const engine = await WebGLEngine.create({ canvas: "canvas", new ShaderLab() });
23
- * ...
24
- * ```
25
- *
26
- * @param shaderSource - shader code
27
- * @returns Shader
28
- *
29
- * @throws
30
- * Throw string exception if shaderLab has not been enabled properly.
31
- */
32
- static create(shaderSource: string): Shader;
33
12
  /**
34
13
  * Create a shader.
35
14
  * @param name - Name of the shader
@@ -74,7 +53,6 @@ export declare class Shader {
74
53
  * @returns Is the compiled shader variant valid
75
54
  */
76
55
  compileVariant(engine: Engine, macros: string[]): boolean;
77
- private static _applyConstRenderStates;
78
56
  /**
79
57
  * @deprecated Please use `ShaderMacro.getByName` instead
80
58
  *
@@ -3,7 +3,6 @@ export { BlendOperation } from "./enums/BlendOperation";
3
3
  export { ColorWriteMask } from "./enums/ColorWriteMask";
4
4
  export { CompareFunction } from "./enums/CompareFunction";
5
5
  export { CullMode } from "./enums/CullMode";
6
- export { RenderStateElementKey as RenderStateDataKey } from "./enums/RenderStateElementKey";
7
6
  export { RenderQueueType } from "./enums/RenderQueueType";
8
7
  export { ShaderPropertyType } from "./enums/ShaderPropertyType";
9
8
  export { StencilOperation } from "./enums/StencilOperation";
@@ -0,0 +1,14 @@
1
+ declare const _default: {
2
+ particle_common: string;
3
+ velocity_over_lifetime_module: string;
4
+ rotation_over_lifetime_module: string;
5
+ size_over_lifetime_module: string;
6
+ color_over_lifetime_module: string;
7
+ texture_sheet_animation_module: string;
8
+ sphere_billboard: string;
9
+ stretched_billboard: string;
10
+ vertical_billboard: string;
11
+ horizontal_billboard: string;
12
+ particle_mesh: string;
13
+ };
14
+ export default _default;
@@ -1,9 +1,8 @@
1
1
  import { Camera } from "../Camera";
2
- import { PipelinePass } from "../RenderPipeline/PipelinePass";
3
2
  /**
4
- * Cascade shadow caster pass.
3
+ * Cascade shadow caster.
5
4
  */
6
- export declare class CascadedShadowCasterPass extends PipelinePass {
5
+ export declare class CascadedShadowCasterPass {
7
6
  private static _lightShadowBiasProperty;
8
7
  private static _lightDirectionProperty;
9
8
  private static _shadowMatricesProperty;
@@ -18,6 +17,7 @@ export declare class CascadedShadowCasterPass extends PipelinePass {
18
17
  private static _tempVector;
19
18
  private static _tempMatrix0;
20
19
  private readonly _camera;
20
+ private readonly _engine;
21
21
  private readonly _supportDepthTexture;
22
22
  private _shadowMapResolution;
23
23
  private _shadowMapSize;
@@ -30,17 +30,18 @@ export declare class CascadedShadowCasterPass extends PipelinePass {
30
30
  private _lightSide;
31
31
  private _existShadowMap;
32
32
  private _splitBoundSpheres;
33
- /** The end is project precision problem in shader. */
33
+ /** The end is project prcision problem in shader. */
34
34
  private _shadowMatrices;
35
35
  private _shadowInfos;
36
36
  private _depthTexture;
37
- private _renderTarget;
37
+ private _renderTargets;
38
38
  private _viewportOffsets;
39
39
  constructor(camera: Camera);
40
40
  private _renderDirectShadowMap;
41
41
  private _updateReceiversShaderData;
42
42
  private _getCascadesSplitDistance;
43
43
  private _getFarWithRadius;
44
+ private _getAvailableRenderTarget;
44
45
  private _updateShadowSettings;
45
46
  private _updateSingleShadowCasterShaderData;
46
47
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Determines which type of shadows should be used.
3
+ */
4
+ export declare enum ShadowMode {
5
+ /** Disable Shadows. */
6
+ None = 0,
7
+ /** Hard Shadows Only. */
8
+ Hard = 1,
9
+ /** Cast "soft" shadows with low range. */
10
+ SoftLow = 2,
11
+ /** Cast "soft" shadows with large range. */
12
+ SoftHigh = 3
13
+ }
@@ -79,8 +79,9 @@ export declare class RenderTarget extends GraphicsResource {
79
79
  */
80
80
  constructor(engine: Engine, width: number, height: number, colorTextures: Texture[], depthTexture: Texture, antiAliasing?: number);
81
81
  /**
82
+ *
82
83
  * Get the render color texture by index.
83
- * @param index - Render color texture index
84
+ * @param index
84
85
  */
85
86
  getColorTexture(index?: number): Texture | null;
86
87
  /**
@@ -36,7 +36,7 @@ export declare class Texture2D extends Texture {
36
36
  * @param x - X coordinate of area start
37
37
  * @param y - Y coordinate of area start
38
38
  */
39
- setImageSource(imageSource: TexImageSource, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
39
+ setImageSource(imageSource: TexImageSource | OffscreenCanvas, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
40
40
  /**
41
41
  * Get pixel color buffer.
42
42
  * @param out - Color buffer
@@ -43,7 +43,7 @@ export declare class Texture2DArray extends Texture {
43
43
  * @param x - X coordinate of area start
44
44
  * @param y - Y coordinate of area start
45
45
  */
46
- setImageSource(elementIndex: number, imageSource: TexImageSource, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
46
+ setImageSource(elementIndex: number, imageSource: TexImageSource | OffscreenCanvas, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
47
47
  /**
48
48
  * Get pixel color buffer.
49
49
  * @param elementIndex - The texture array element index
@@ -36,7 +36,7 @@ export declare class TextureCube extends Texture {
36
36
  * @param x - X coordinate of area start
37
37
  * @param y - Y coordinate of area start
38
38
  */
39
- setImageSource(face: TextureCubeFace, imageSource: TexImageSource, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
39
+ setImageSource(face: TextureCubeFace, imageSource: TexImageSource | OffscreenCanvas, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
40
40
  /**
41
41
  * Get pixel color buffer.
42
42
  * @param out - Color buffer
@@ -2,74 +2,68 @@
2
2
  * Texture format enumeration.
3
3
  */
4
4
  export declare enum TextureFormat {
5
- /** RGB format, 8 bits per channel. */
5
+ /** RGB format,8 bits per channel. */
6
6
  R8G8B8 = 0,
7
- /** RGBA format, 8 bits per channel. */
7
+ /** RGBA format,8 bits per channel. */
8
8
  R8G8B8A8 = 1,
9
- /** RGBA format, 4 bits per channel. */
9
+ /** RGBA format,4 bits per channel. */
10
10
  R4G4B4A4 = 2,
11
- /** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */
11
+ /** RGBA format,5 bits in R channel,5 bits in G channel,5 bits in B channel, 1 bit in A channel. */
12
12
  R5G5B5A1 = 3,
13
- /** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
13
+ /** RGB format,5 bits in R channel,6 bits in G channel,5 bits in B channel. */
14
14
  R5G6B5 = 4,
15
- /** Transparent format, 8 bits. */
15
+ /** Transparent format,8 bits. */
16
16
  Alpha8 = 5,
17
17
  /** Luminance/alpha in RGB channel, alpha in A channel. */
18
18
  LuminanceAlpha = 6,
19
- /** RGBA format, 16 bits per channel. */
19
+ /** RGBA format,16 bits per channel. */
20
20
  R16G16B16A16 = 7,
21
- /** RGBA format, 32 bits per channel. */
21
+ /** RGBA format,32 bits per channel. */
22
22
  R32G32B32A32 = 8,
23
- /** RGB compressed format, 4 bits per pixel. */
24
- BC1 = 9,
25
- /** RGBA compressed format, 8 bits per pixel. */
26
- BC3 = 10,
27
- /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
28
- BC7 = 11,
29
- /** RGB compressed format, 4 bits per pixel. */
30
- ETC1_RGB = 12,
31
- /** RGB compressed format, 4 bits per pixel. */
32
- ETC2_RGB = 13,
33
- /** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
34
- ETC2_RGBA5 = 14,
35
- /** RGB compressed format, 8 bits per pixel. */
36
- ETC2_RGBA8 = 15,
37
- /** RGB compressed format, 2 bits per pixel. */
38
- PVRTC_RGB2 = 16,
39
- /** RGBA compressed format, 2 bits per pixel. */
40
- PVRTC_RGBA2 = 17,
41
- /** RGB compressed format, 4 bits per pixel. */
42
- PVRTC_RGB4 = 18,
43
- /** RGBA compressed format, 4 bits per pixel. */
44
- PVRTC_RGBA4 = 19,
45
- /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
46
- ASTC_4x4 = 20,
47
- /** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
48
- ASTC_5x5 = 21,
49
- /** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
50
- ASTC_6x6 = 22,
51
- /** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
52
- ASTC_8x8 = 23,
53
- /** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
54
- ASTC_10x10 = 24,
55
- /** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
56
- ASTC_12x12 = 25,
57
- /** Automatic depth format, engine will automatically select the supported precision. */
58
- Depth = 26,
59
- /** Automatic depth stencil format, engine will automatically select the supported precision. */
60
- DepthStencil = 27,
23
+ /** RGB compressed format。*/
24
+ DXT1 = 9,
25
+ /** RGBA compressed format。*/
26
+ DXT5 = 10,
27
+ /** RGB compressed format,4 bits per pixel。*/
28
+ ETC1_RGB = 11,
29
+ /** RGB compressed format,4 bits per pixel。*/
30
+ ETC2_RGB = 12,
31
+ /** RGBA compressed format,5 bits per pixel,4 bit in RGB, 1 bit in A. */
32
+ ETC2_RGBA5 = 13,
33
+ /** RGB compressed format,8 bits per pixel. */
34
+ ETC2_RGBA8 = 14,
35
+ /** RGB compressed format,2 bits per pixel. */
36
+ PVRTC_RGB2 = 15,
37
+ /** RGBA compressed format,2 bits per pixel. */
38
+ PVRTC_RGBA2 = 16,
39
+ /** RGB compressed format,4 bits per pixel. */
40
+ PVRTC_RGB4 = 17,
41
+ /** RGBA compressed format,4 bits per pixel. */
42
+ PVRTC_RGBA4 = 18,
43
+ /** RGB(A) compressed format,128 bits per 4x4 pixel block. */
44
+ ASTC_4x4 = 19,
45
+ /** RGB(A) compressed format,128 bits per 5x5 pixel block. */
46
+ ASTC_5x5 = 20,
47
+ /** RGB(A) compressed format,128 bits per 6x6 pixel block. */
48
+ ASTC_6x6 = 21,
49
+ /** RGB(A) compressed format,128 bits per 8x8 pixel block. */
50
+ ASTC_8x8 = 22,
51
+ /** RGB(A) compressed format,128 bits per 10x10 pixel block. */
52
+ ASTC_10x10 = 23,
53
+ /** RGB(A) compressed format,128 bits per 12x12 pixel block. */
54
+ ASTC_12x12 = 24,
55
+ /** Automatic depth format,engine will automatically select the supported precision. */
56
+ Depth = 25,
57
+ /** Automatic depth setncil format, engine will automatically select the supported precision. */
58
+ DepthStencil = 26,
61
59
  /** 16-bit depth format. */
62
- Depth16 = 28,
60
+ Depth16 = 27,
63
61
  /** 24-bit depth format. */
64
- Depth24 = 29,
62
+ Depth24 = 28,
65
63
  /** 32-bit depth format. */
66
- Depth32 = 30,
64
+ Depth32 = 29,
67
65
  /** 16-bit depth + 8-bit stencil format. */
68
- Depth24Stencil8 = 31,
66
+ Depth24Stencil8 = 30,
69
67
  /** 32-bit depth + 8-bit stencil format. */
70
- Depth32Stencil8 = 32,
71
- /** @deprecated Use `TextureFormat.BC1` instead. */
72
- DXT1 = 33,
73
- /** @deprecated Use `TextureFormat.BC3` instead. */
74
- DXT5 = 34
68
+ Depth32Stencil8 = 31
75
69
  }