@galacean/engine-core 0.9.0-beta.80 → 1.0.0-alpha.6

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 (66) hide show
  1. package/dist/main.js +17814 -16665
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +17814 -16665
  4. package/dist/module.js +17808 -16663
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
  8. package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
  9. package/types/2d/index.d.ts +1 -0
  10. package/types/2d/sprite/Sprite.d.ts +2 -6
  11. package/types/2d/sprite/SpriteMask.d.ts +4 -4
  12. package/types/2d/sprite/SpriteRenderer.d.ts +18 -1
  13. package/types/2d/text/Font.d.ts +2 -7
  14. package/types/2d/text/TextRenderer.d.ts +4 -0
  15. package/types/2d/text/index.d.ts +1 -0
  16. package/types/Camera.d.ts +28 -2
  17. package/types/Component.d.ts +0 -8
  18. package/types/ComponentsDependencies.d.ts +17 -9
  19. package/types/Engine.d.ts +31 -39
  20. package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
  21. package/types/RenderPipeline/BasicRenderPipeline.d.ts +8 -6
  22. package/types/RenderPipeline/RenderElement.d.ts +5 -7
  23. package/types/RenderPipeline/RenderPass.d.ts +1 -1
  24. package/types/RenderPipeline/RenderQueue.d.ts +3 -5
  25. package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
  26. package/types/Renderer.d.ts +2 -2
  27. package/types/Script.d.ts +18 -15
  28. package/types/Transform.d.ts +9 -12
  29. package/types/animation/AnimationClip.d.ts +2 -1
  30. package/types/asset/AssetType.d.ts +16 -16
  31. package/types/asset/ResourceManager.d.ts +17 -9
  32. package/types/base/Constant.d.ts +2 -1
  33. package/types/base/EngineObject.d.ts +1 -0
  34. package/types/base/EventDispatcher.d.ts +1 -14
  35. package/types/base/Time.d.ts +27 -24
  36. package/types/base/index.d.ts +0 -1
  37. package/types/graphic/Buffer.d.ts +5 -9
  38. package/types/graphic/Mesh.d.ts +4 -5
  39. package/types/index.d.ts +7 -7
  40. package/types/input/InputManager.d.ts +1 -1
  41. package/types/input/interface/IInput.d.ts +1 -1
  42. package/types/lighting/DirectLight.d.ts +0 -1
  43. package/types/lighting/SpotLight.d.ts +0 -1
  44. package/types/material/BaseMaterial.d.ts +8 -8
  45. package/types/material/Material.d.ts +3 -7
  46. package/types/mesh/BlendShape.d.ts +1 -1
  47. package/types/mesh/BlendShapeFrame.d.ts +28 -6
  48. package/types/mesh/ModelMesh.d.ts +5 -5
  49. package/types/mesh/PrimitiveMesh.d.ts +4 -2
  50. package/types/mesh/SkinnedMeshRenderer.d.ts +0 -1
  51. package/types/particle/ParticleRenderer.d.ts +2 -2
  52. package/types/physics/Collider.d.ts +1 -1
  53. package/types/physics/PhysicsManager.d.ts +1 -20
  54. package/types/physics/joint/Joint.d.ts +2 -2
  55. package/types/renderingHardwareInterface/index.d.ts +1 -0
  56. package/types/shader/Shader.d.ts +32 -23
  57. package/types/shader/ShaderData.d.ts +24 -24
  58. package/types/shader/ShaderMacro.d.ts +16 -0
  59. package/types/shader/ShaderPass.d.ts +9 -2
  60. package/types/shader/ShaderProperty.d.ts +7 -0
  61. package/types/shader/index.d.ts +4 -1
  62. package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
  63. package/types/texture/RenderTarget.d.ts +4 -4
  64. package/types/texture/Texture.d.ts +2 -6
  65. package/types/texture/Texture2DArray.d.ts +4 -0
  66. package/types/texture/TextureCube.d.ts +4 -0
@@ -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
- * Get the forward direction in world space.
139
- * @param forward - Forward vector
140
- * @returns Forward vector
141
+ * The forward direction in world space.
141
142
  */
142
- getWorldForward(forward: Vector3): Vector3;
143
+ get worldForward(): Vector3;
143
144
  /**
144
- * Get the right direction in world space.
145
- * @param right - Right vector
146
- * @returns Right vector
145
+ * The right direction in world space.
147
146
  */
148
- getWorldRight(right: Vector3): Vector3;
147
+ get worldRight(): Vector3;
149
148
  /**
150
- * Get the up direction in world space.
151
- * @param up - Up vector
152
- * @returns Up vector
149
+ * The up direction in world space.
153
150
  */
154
- getWorldUp(up: Vector3): Vector3;
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
@@ -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;
@@ -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 = "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 = "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 = "buffer",
19
+ Buffer = "Buffer",
20
20
  /** 2D Texture. */
21
- Texture2D = "texture2d",
21
+ Texture2D = "Texture2D",
22
22
  /** Cube Texture. */
23
- TextureCube = "texture-cube",
23
+ TextureCube = "TextureCube",
24
24
  /** Material. */
25
- Material = "material",
25
+ Material = "Material",
26
26
  /** Mesh. */
27
- Mesh = "mesh",
27
+ Mesh = "Mesh",
28
28
  /** AnimationClip. */
29
29
  AnimationClip = "AnimationClip",
30
30
  /** AnimatorController. */
31
31
  AnimatorController = "AnimatorController",
32
32
  /** Prefab.*/
33
- Prefab = "prefab",
33
+ GLTF = "GLTF",
34
34
  /** Compress Texture. */
35
- KTX = "ktx",
35
+ KTX = "KTX",
36
36
  /** Cube Compress Texture. */
37
- KTXCube = "ktx-cube",
37
+ KTXCube = "KTXCube",
38
38
  /** Sprite. */
39
- Sprite = "sprite",
39
+ Sprite = "Sprite",
40
40
  /** Sprite Atlas. */
41
- SpriteAtlas = "sprite-atlas",
41
+ SpriteAtlas = "SpriteAtlas",
42
42
  /** Ambient light. */
43
- Env = "environment",
43
+ Env = "Environment",
44
44
  /** Scene. */
45
- Scene = "scene",
45
+ Scene = "Scene",
46
46
  /** HDR to cube. */
47
47
  HDR = "HDR",
48
48
  /** Font. */
49
- Font = "font",
49
+ Font = "Font",
50
50
  /** Source Font, include ttf、 otf and woff. */
51
- SourceFont = "source-font"
51
+ SourceFont = "SourceFont"
52
52
  }
@@ -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
- /** Asset path pool, key is asset ID, value is asset path */
20
+ private _loadingPromises;
21
+ /** Asset path pool, key is the `instanceID` of resource, value is asset path. */
21
22
  private _assetPool;
22
- /** Asset pool, the key is the asset path and the value is the asset. */
23
+ /** Asset url pool, key is the asset path and the value is the asset. */
23
24
  private _assetUrlPool;
24
- /** Reference counted object pool, key is the object ID, and reference counted objects are put into this pool. */
25
- private _refObjectPool;
26
- /** Loading promises. */
27
- private _loadingPromises;
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
@@ -79,6 +82,11 @@ export declare class ResourceManager {
79
82
  * @returns Asset url
80
83
  */
81
84
  getAssetPath(instanceId: number): string;
85
+ /**
86
+ * Add content restorer.
87
+ * @param restorer - The restorer
88
+ */
89
+ addContentRestorer<T extends EngineObject>(restorer: ContentRestorer<T>): void;
82
90
  private _assignDefaultOptions;
83
91
  private _loadSingleItem;
84
92
  private _gc;
@@ -90,6 +98,6 @@ export declare class ResourceManager {
90
98
  /**
91
99
  * Declare ResourceLoader's decorator.
92
100
  * @param assetType - Type of asset
93
- * @param extnames - Name of file extension
101
+ * @param extNames - Name of file extension
94
102
  */
95
- export declare function resourceLoader(assetType: string, extnames: string[], useCache?: boolean): <T extends Loader<any>>(Target: new (useCache: boolean) => T) => void;
103
+ export declare function resourceLoader(assetType: string, extNames: string[], useCache?: boolean): <T extends Loader<any>>(Target: new (useCache: boolean) => T) => void;
@@ -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;
@@ -21,4 +21,5 @@ export declare abstract class EngineObject {
21
21
  * Destroy self.
22
22
  */
23
23
  destroy(): void;
24
+ protected _onDestroy(): void;
24
25
  }
@@ -1,4 +1,3 @@
1
- import { Event } from "./Event";
2
1
  /**
3
2
  * EventDispatcher, which can be inherited as a base class.
4
3
  */
@@ -44,15 +43,6 @@ export declare class EventDispatcher {
44
43
  * @returns This
45
44
  */
46
45
  once(event: string, fn: Function): EventDispatcher;
47
- /**
48
- * @deprecated Use `on/once` instead.
49
- * Add a listener function with the specified event name.
50
- * @param event - Event name
51
- * @param fn - Function
52
- * @param once - Is it a one-time listener
53
- * @returns this
54
- */
55
- addEventListener(event: string, fn: Function, once?: boolean): EventDispatcher;
56
46
  /**
57
47
  * Remove the event listener(s) of the specified event name.
58
48
  * @param event - Event name
@@ -71,9 +61,6 @@ export declare class EventDispatcher {
71
61
  * @param event - Event name, delete all events if not passed
72
62
  */
73
63
  removeAllEventListeners(event?: string): void;
74
- /**
75
- * @deprecated Use `dispatch` instead.
76
- */
77
- trigger(e: Event): void;
64
+ private _addEventListener;
78
65
  private _clearEvent;
79
66
  }
@@ -1,41 +1,44 @@
1
1
  /**
2
- * Tools for calculating the time per frame.
2
+ * Provide time related information.
3
3
  */
4
4
  export declare class Time {
5
- private _clock;
6
- private _timeScale;
5
+ private static _elapsedTimeProperty;
6
+ private static _deltaTimeProperty;
7
+ private _frameCount;
7
8
  private _deltaTime;
8
- private _startTime;
9
- private _lastTickTime;
9
+ private _actualDeltaTime;
10
+ private _elapsedTime;
11
+ private _actualElapsedTime;
12
+ private _lastSystemTime;
13
+ private _elapsedTimeValue;
14
+ private _deltaTimeValue;
15
+ /** Maximum delta time allowed per frame in seconds. */
16
+ maximumDeltaTime: number;
17
+ /** The scale of time. */
18
+ timeScale: number;
10
19
  get frameCount(): number;
11
20
  /**
12
- * Constructor of the Time.
13
- */
14
- constructor();
15
- reset(): void;
16
- /**
17
- * Current Time
18
- */
19
- get nowTime(): number;
20
- /**
21
- * Time between two ticks
21
+ * The delta time in seconds from the last frame to the current frame.
22
+ *
23
+ * @remarks When the frame rate is low or stutter occurs, `deltaTime` will not exceed the value of `maximumDeltaTime` * `timeScale`.
22
24
  */
23
25
  get deltaTime(): number;
24
26
  /**
25
- * Scaled delta time.
27
+ * The amount of elapsed time in seconds since the start of the engine.
26
28
  */
27
- get timeScale(): number;
28
- set timeScale(s: number);
29
+ get elapsedTime(): number;
29
30
  /**
30
- * Unscaled delta time.
31
+ * The actual delta time in seconds from the last frame to the current frame.
32
+ *
33
+ * @remarks The actual delta time is not affected by `maximumDeltaTime` and `timeScale`.
31
34
  */
32
- get unscaledDeltaTime(): number;
35
+ get actualDeltaTime(): number;
33
36
  /**
34
- * The elapsed time, after the clock is initialized.
37
+ * The amount of actual elapsed time in seconds since the start of the engine.
35
38
  */
36
- get timeSinceStartup(): number;
39
+ get actualElapsedTime(): number;
37
40
  /**
38
- * Call every frame, update delta time and other data.
41
+ * Constructor of the Time.
39
42
  */
40
- tick(): void;
43
+ constructor();
41
44
  }
@@ -1,4 +1,3 @@
1
- export { Event } from "./Event";
2
1
  export { EventDispatcher } from "./EventDispatcher";
3
2
  export { Logger } from "./Logger";
4
3
  export { Time } from "./Time";
@@ -1,4 +1,4 @@
1
- import { RefObject } from "../asset/RefObject";
1
+ import { GraphicsResource } from "../asset/GraphicsResource";
2
2
  import { Engine } from "../Engine";
3
3
  import { BufferBindFlag } from "./enums/BufferBindFlag";
4
4
  import { BufferUsage } from "./enums/BufferUsage";
@@ -6,14 +6,11 @@ import { SetDataOptions } from "./enums/SetDataOptions";
6
6
  /**
7
7
  * Buffer.
8
8
  */
9
- export declare class Buffer extends RefObject {
10
- _glBindTarget: number;
11
- _glBufferUsage: number;
12
- _nativeBuffer: WebGLBuffer;
13
- private _hardwareRenderer;
9
+ export declare class Buffer extends GraphicsResource {
14
10
  private _type;
15
11
  private _byteLength;
16
12
  private _bufferUsage;
13
+ private _platformBuffer;
17
14
  /**
18
15
  * Buffer binding flag.
19
16
  */
@@ -95,11 +92,10 @@ export declare class Buffer extends RefObject {
95
92
  getData(data: ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number): void;
96
93
  /**
97
94
  * @override
98
- * Destroy.
99
95
  */
100
- _onDestroy(): void;
96
+ _rebuild(): void;
101
97
  /**
102
98
  * @deprecated
103
99
  */
104
- resize(dataLength: number): void;
100
+ resize(byteLength: number): void;
105
101
  }
@@ -1,5 +1,5 @@
1
1
  import { BoundingBox } from "@galacean/engine-math";
2
- import { RefObject } from "../asset/RefObject";
2
+ import { GraphicsResource } from "../asset/GraphicsResource";
3
3
  import { Engine } from "../Engine";
4
4
  import { MeshTopology } from "../graphic/enums/MeshTopology";
5
5
  import { IndexBufferBinding } from "../graphic/IndexBufferBinding";
@@ -8,7 +8,7 @@ import { VertexElement } from "../graphic/VertexElement";
8
8
  /**
9
9
  * Mesh.
10
10
  */
11
- export declare abstract class Mesh extends RefObject {
11
+ export declare abstract class Mesh extends GraphicsResource {
12
12
  /** Name. */
13
13
  name: string;
14
14
  private _bounds;
@@ -58,12 +58,11 @@ export declare abstract class Mesh extends RefObject {
58
58
  /**
59
59
  * @override
60
60
  */
61
- _addRefCount(value: number): void;
61
+ _addReferCount(value: number): void;
62
62
  /**
63
63
  * @override
64
- * Destroy.
65
64
  */
66
- _onDestroy(): void;
65
+ _rebuild(): void;
67
66
  protected _setVertexElements(elements: VertexElement[]): void;
68
67
  protected _setIndexBufferBinding(binding: IndexBufferBinding | null): void;
69
68
  private _onBoundsChanged;
package/types/index.d.ts CHANGED
@@ -8,23 +8,21 @@ export { Entity } from "./Entity";
8
8
  export { Component } from "./Component";
9
9
  export { Script } from "./Script";
10
10
  export { Renderer } from "./Renderer";
11
- export { dependentComponents } from "./ComponentsDependencies";
11
+ export { dependentComponents, DependentMode } from "./ComponentsDependencies";
12
12
  export { Camera } from "./Camera";
13
13
  export { Transform } from "./Transform";
14
14
  export { BoolUpdateFlag } from "./BoolUpdateFlag";
15
15
  export type { EngineSettings } from "./EngineSettings";
16
+ export type { EngineConfiguration } from "./Engine";
16
17
  export { request } from "./asset/request";
17
18
  export { Loader } from "./asset/Loader";
19
+ export { ContentRestorer } from "./asset/ContentRestorer";
18
20
  export { ResourceManager, resourceLoader } from "./asset/ResourceManager";
19
21
  export { AssetPromise } from "./asset/AssetPromise";
20
22
  export type { LoadItem } from "./asset/LoadItem";
21
23
  export { AssetType } from "./asset/AssetType";
22
- export { RefObject } from "./asset/RefObject";
23
- export { BasicRenderPipeline } from "./RenderPipeline/BasicRenderPipeline";
24
- export { RenderQueue } from "./RenderPipeline/RenderQueue";
25
- export { RenderPass } from "./RenderPipeline/RenderPass";
26
- export { MeshRenderElement } from "./RenderPipeline/MeshRenderElement";
27
- export { SpriteElement } from "./RenderPipeline/SpriteElement";
24
+ export { ReferResource } from "./asset/ReferResource";
25
+ export * from "./RenderPipeline";
28
26
  export * from "./base";
29
27
  export { Background } from "./Background";
30
28
  export { BackgroundMode } from "./enums/BackgroundMode";
@@ -51,3 +49,5 @@ export * from "./Layer";
51
49
  export * from "./clone/CloneManager";
52
50
  export * from "./renderingHardwareInterface/index";
53
51
  export * from "./physics/index";
52
+ export { Basic2DBatcher } from "./RenderPipeline/Basic2DBatcher";
53
+ export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
@@ -6,9 +6,9 @@ import { Vector3 } from "@galacean/engine-math";
6
6
  * InputManager manages device input such as mouse, touch, keyboard, etc.
7
7
  */
8
8
  export declare class InputManager {
9
+ private _engine;
9
10
  /** Sometimes the input module will not be initialized, such as off-screen rendering. */
10
11
  private _initialized;
11
- private _curFrameCount;
12
12
  private _wheelManager;
13
13
  private _pointerManager;
14
14
  private _keyboardManager;
@@ -2,7 +2,7 @@ export interface IInput {
2
2
  /**
3
3
  * Handler function updated every frame.
4
4
  */
5
- _update(frameCount?: number): void;
5
+ _update(): void;
6
6
  /**
7
7
  * Function called when the engine is destroyed.
8
8
  */
@@ -8,7 +8,6 @@ export declare class DirectLight extends Light {
8
8
  private static _colorProperty;
9
9
  private static _directionProperty;
10
10
  private static _combinedData;
11
- private _forward;
12
11
  private _reverseDirection;
13
12
  /**
14
13
  * Get direction.
@@ -18,7 +18,6 @@ export declare class SpotLight extends Light {
18
18
  angle: number;
19
19
  /** Angle, in radians, from falloff begins to ends. */
20
20
  penumbra: number;
21
- private _forward;
22
21
  private _inverseDirection;
23
22
  private _projectMatrix;
24
23
  /**
@@ -1,19 +1,19 @@
1
1
  import { Engine } from "../Engine";
2
- import { Shader } from "../shader";
2
+ import { Shader, ShaderProperty } from "../shader";
3
3
  import { ShaderMacro } from "../shader/ShaderMacro";
4
4
  import { BlendMode } from "./enums/BlendMode";
5
5
  import { RenderFace } from "./enums/RenderFace";
6
6
  import { Material } from "./Material";
7
7
  export declare class BaseMaterial extends Material {
8
- protected static _baseColorProp: import("../shader").ShaderProperty;
9
- protected static _baseTextureProp: import("../shader").ShaderProperty;
8
+ protected static _baseColorProp: ShaderProperty;
9
+ protected static _baseTextureProp: ShaderProperty;
10
10
  protected static _baseTextureMacro: ShaderMacro;
11
- protected static _tilingOffsetProp: import("../shader").ShaderProperty;
12
- protected static _normalTextureProp: import("../shader").ShaderProperty;
13
- protected static _normalIntensityProp: import("../shader").ShaderProperty;
11
+ protected static _tilingOffsetProp: ShaderProperty;
12
+ protected static _normalTextureProp: ShaderProperty;
13
+ protected static _normalIntensityProp: ShaderProperty;
14
14
  protected static _normalTextureMacro: ShaderMacro;
15
- protected static _emissiveColorProp: import("../shader").ShaderProperty;
16
- protected static _emissiveTextureProp: import("../shader").ShaderProperty;
15
+ protected static _emissiveColorProp: ShaderProperty;
16
+ protected static _emissiveTextureProp: ShaderProperty;
17
17
  protected static _emissiveTextureMacro: ShaderMacro;
18
18
  protected static _transparentMacro: ShaderMacro;
19
19
  private static _alphaCutoffProp;
@@ -1,5 +1,5 @@
1
1
  import { IClone } from "@galacean/engine-design";
2
- import { RefObject } from "../asset/RefObject";
2
+ import { ReferResource } from "../asset/ReferResource";
3
3
  import { Engine } from "../Engine";
4
4
  import { Shader } from "../shader/Shader";
5
5
  import { ShaderData } from "../shader/ShaderData";
@@ -7,7 +7,7 @@ import { RenderState } from "../shader/state/RenderState";
7
7
  /**
8
8
  * Material.
9
9
  */
10
- export declare class Material extends RefObject implements IClone {
10
+ export declare class Material extends ReferResource implements IClone {
11
11
  /** Name. */
12
12
  name: string;
13
13
  /** Shader data. */
@@ -43,9 +43,5 @@ export declare class Material extends RefObject implements IClone {
43
43
  /**
44
44
  * @override
45
45
  */
46
- _addRefCount(value: number): void;
47
- /**
48
- * @override
49
- */
50
- protected _onDestroy(): void;
46
+ _addReferCount(value: number): void;
51
47
  }
@@ -6,7 +6,6 @@ import { BlendShapeFrame } from "./BlendShapeFrame";
6
6
  export declare class BlendShape {
7
7
  /** Name of BlendShape. */
8
8
  name: string;
9
- private _dataChangeManager;
10
9
  private _frames;
11
10
  /**
12
11
  * Frames of BlendShape.
@@ -36,4 +35,5 @@ export declare class BlendShape {
36
35
  clearFrames(): void;
37
36
  private _addFrame;
38
37
  private _updateUseNormalAndTangent;
38
+ private _frameDataChangeListener;
39
39
  }
@@ -5,12 +5,28 @@ import { Vector3 } from "@galacean/engine-math";
5
5
  export declare class BlendShapeFrame {
6
6
  /** Weight of BlendShapeFrame. */
7
7
  readonly weight: number;
8
- /** Delta positions for the frame being added. */
9
- readonly deltaPositions: Readonly<Readonly<Vector3>[]>;
10
- /** Delta normals for the frame being added. */
11
- readonly deltaNormals: Readonly<Readonly<Vector3[]> | null>;
12
- /** Delta tangents for the frame being added. */
13
- readonly deltaTangents: Readonly<Readonly<Vector3[]> | null>;
8
+ private _dirty;
9
+ private _deltaPositions;
10
+ private _deltaNormals;
11
+ private _deltaTangents;
12
+ /**
13
+ * Delta positions for the frame being added.
14
+ * @remarks Need to re-assign after modification to ensure that the modification takes effect.
15
+ */
16
+ get deltaPositions(): Vector3[];
17
+ set deltaPositions(value: Vector3[]);
18
+ /**
19
+ * Delta normals for the frame being added.
20
+ * @remarks Need to re-assign after modification to ensure that the modification takes effect.
21
+ */
22
+ get deltaNormals(): Vector3[];
23
+ set deltaNormals(value: Vector3[]);
24
+ /**
25
+ * Delta tangents for the frame being added.
26
+ * @remarks Need to re-assign after modification to ensure that the modification takes effect.
27
+ */
28
+ get deltaTangents(): Vector3[];
29
+ set deltaTangents(value: Vector3[]);
14
30
  /**
15
31
  * Create a BlendShapeFrame.
16
32
  * @param weight - Weight of BlendShapeFrame
@@ -20,3 +36,9 @@ export declare class BlendShapeFrame {
20
36
  */
21
37
  constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]);
22
38
  }
39
+ export declare enum BlendShapeFrameDirty {
40
+ Position = 1,
41
+ Normal = 2,
42
+ Tangent = 4,
43
+ All = 7
44
+ }
@@ -15,7 +15,7 @@ export declare class ModelMesh extends Mesh {
15
15
  private static _tempVec3;
16
16
  private static _tempVec4;
17
17
  private _vertexCount;
18
- private _accessible;
18
+ private _readable;
19
19
  private _verticesFloat32;
20
20
  private _verticesUint8;
21
21
  private _indices;
@@ -42,9 +42,9 @@ export declare class ModelMesh extends Mesh {
42
42
  private _customVertexElements;
43
43
  private _vertexCountChanged;
44
44
  /**
45
- * Whether to access data of the mesh.
45
+ * Whether to read data of the mesh.
46
46
  */
47
- get accessible(): boolean;
47
+ get readable(): boolean;
48
48
  /**
49
49
  * Vertex count of current mesh.
50
50
  */
@@ -207,9 +207,9 @@ export declare class ModelMesh extends Mesh {
207
207
  getBlendShapeName(index: number): string;
208
208
  /**
209
209
  * Upload Mesh Data to GPU.
210
- * @param noLongerAccessible - Whether to access data later. If true, you'll never access data anymore (free memory cache)
210
+ * @param noLongerReadable - Whether to read data later. If true, you'll never read data anymore (free memory cache)
211
211
  */
212
- uploadData(noLongerAccessible: boolean): void;
212
+ uploadData(noLongerReadable: boolean): void;
213
213
  /**
214
214
  * Calculate mesh tangent.
215
215
  * @remark need to set positions(with or not with indices), normals, uv before calculation.
@@ -63,8 +63,8 @@ export declare class PrimitiveMesh {
63
63
  * @param engine - Engine
64
64
  * @param radius - The radius of cap
65
65
  * @param height - The height of torso
66
- * @param radialSegments - Cylinder radial segments
67
- * @param heightSegments - Cylinder height segments
66
+ * @param radialSegments - Cone radial segments
67
+ * @param heightSegments - Cone height segments
68
68
  * @param noLongerAccessible - No longer access the vertices of the mesh after creation
69
69
  * @returns Cone model mesh
70
70
  */
@@ -80,6 +80,8 @@ export declare class PrimitiveMesh {
80
80
  * @returns Capsule model mesh
81
81
  */
82
82
  static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
83
+ static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean): void;
84
+ static _setCapsuleData(capsuleMesh: ModelMesh, radius: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean): void;
83
85
  private static _initialize;
84
86
  private static _generateIndices;
85
87
  private static _createCapsuleCap;
@@ -7,7 +7,6 @@ import { Skin } from "./Skin";
7
7
  * SkinnedMeshRenderer.
8
8
  */
9
9
  export declare class SkinnedMeshRenderer extends MeshRenderer {
10
- private static _tempMatrix;
11
10
  private static _jointCountProperty;
12
11
  private static _jointSamplerProperty;
13
12
  private static _jointMatrixProperty;
@@ -1,6 +1,6 @@
1
- import { Vector3, Color } from "@galacean/engine-math";
2
- import { Texture } from "../texture";
1
+ import { Color, Vector3 } from "@galacean/engine-math";
3
2
  import { MeshRenderer } from "../mesh/MeshRenderer";
3
+ import { Texture } from "../texture";
4
4
  /**
5
5
  * Blend mode enums of the particle renderer's material.
6
6
  */
@@ -3,7 +3,7 @@ import { Component } from "../Component";
3
3
  import { ColliderShape } from "./shape/ColliderShape";
4
4
  /**
5
5
  * Base class for all colliders.
6
- * @decorator `@dependentComponents(Transform)`
6
+ * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
7
7
  */
8
8
  export declare class Collider extends Component {
9
9
  protected _updateFlag: BoolUpdateFlag;