@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.
- package/dist/main.js +17814 -16665
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +17814 -16665
- package/dist/module.js +17808 -16663
- 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/SpriteDrawMode.d.ts +4 -2
- package/types/2d/index.d.ts +1 -0
- package/types/2d/sprite/Sprite.d.ts +2 -6
- package/types/2d/sprite/SpriteMask.d.ts +4 -4
- package/types/2d/sprite/SpriteRenderer.d.ts +18 -1
- package/types/2d/text/Font.d.ts +2 -7
- package/types/2d/text/TextRenderer.d.ts +4 -0
- package/types/2d/text/index.d.ts +1 -0
- package/types/Camera.d.ts +28 -2
- package/types/Component.d.ts +0 -8
- package/types/ComponentsDependencies.d.ts +17 -9
- package/types/Engine.d.ts +31 -39
- package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +8 -6
- package/types/RenderPipeline/RenderElement.d.ts +5 -7
- 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 +2 -2
- package/types/Script.d.ts +18 -15
- package/types/Transform.d.ts +9 -12
- package/types/animation/AnimationClip.d.ts +2 -1
- package/types/asset/AssetType.d.ts +16 -16
- package/types/asset/ResourceManager.d.ts +17 -9
- package/types/base/Constant.d.ts +2 -1
- package/types/base/EngineObject.d.ts +1 -0
- package/types/base/EventDispatcher.d.ts +1 -14
- package/types/base/Time.d.ts +27 -24
- package/types/base/index.d.ts +0 -1
- package/types/graphic/Buffer.d.ts +5 -9
- package/types/graphic/Mesh.d.ts +4 -5
- package/types/index.d.ts +7 -7
- package/types/input/InputManager.d.ts +1 -1
- package/types/input/interface/IInput.d.ts +1 -1
- package/types/lighting/DirectLight.d.ts +0 -1
- package/types/lighting/SpotLight.d.ts +0 -1
- package/types/material/BaseMaterial.d.ts +8 -8
- package/types/material/Material.d.ts +3 -7
- package/types/mesh/BlendShape.d.ts +1 -1
- package/types/mesh/BlendShapeFrame.d.ts +28 -6
- package/types/mesh/ModelMesh.d.ts +5 -5
- package/types/mesh/PrimitiveMesh.d.ts +4 -2
- package/types/mesh/SkinnedMeshRenderer.d.ts +0 -1
- package/types/particle/ParticleRenderer.d.ts +2 -2
- package/types/physics/Collider.d.ts +1 -1
- package/types/physics/PhysicsManager.d.ts +1 -20
- package/types/physics/joint/Joint.d.ts +2 -2
- 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/index.d.ts +4 -1
- package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
- package/types/texture/RenderTarget.d.ts +4 -4
- package/types/texture/Texture.d.ts +2 -6
- package/types/texture/Texture2DArray.d.ts +4 -0
- package/types/texture/TextureCube.d.ts +4 -0
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
|
|
@@ -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 = "
|
|
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,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
|
|
@@ -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
|
|
101
|
+
* @param extNames - Name of file extension
|
|
94
102
|
*/
|
|
95
|
-
export declare function resourceLoader(assetType: string,
|
|
103
|
+
export declare function resourceLoader(assetType: string, extNames: string[], useCache?: boolean): <T extends Loader<any>>(Target: new (useCache: boolean) => T) => void;
|
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;
|
|
@@ -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
|
}
|
package/types/base/Time.d.ts
CHANGED
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provide time related information.
|
|
3
3
|
*/
|
|
4
4
|
export declare class Time {
|
|
5
|
-
private
|
|
6
|
-
private
|
|
5
|
+
private static _elapsedTimeProperty;
|
|
6
|
+
private static _deltaTimeProperty;
|
|
7
|
+
private _frameCount;
|
|
7
8
|
private _deltaTime;
|
|
8
|
-
private
|
|
9
|
-
private
|
|
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
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
*
|
|
27
|
+
* The amount of elapsed time in seconds since the start of the engine.
|
|
26
28
|
*/
|
|
27
|
-
get
|
|
28
|
-
set timeScale(s: number);
|
|
29
|
+
get elapsedTime(): number;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
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
|
|
35
|
+
get actualDeltaTime(): number;
|
|
33
36
|
/**
|
|
34
|
-
* The elapsed time
|
|
37
|
+
* The amount of actual elapsed time in seconds since the start of the engine.
|
|
35
38
|
*/
|
|
36
|
-
get
|
|
39
|
+
get actualElapsedTime(): number;
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* Constructor of the Time.
|
|
39
42
|
*/
|
|
40
|
-
|
|
43
|
+
constructor();
|
|
41
44
|
}
|
package/types/base/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
-
|
|
96
|
+
_rebuild(): void;
|
|
101
97
|
/**
|
|
102
98
|
* @deprecated
|
|
103
99
|
*/
|
|
104
|
-
resize(
|
|
100
|
+
resize(byteLength: number): void;
|
|
105
101
|
}
|
package/types/graphic/Mesh.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
-
import {
|
|
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
|
|
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
|
-
|
|
61
|
+
_addReferCount(value: number): void;
|
|
62
62
|
/**
|
|
63
63
|
* @override
|
|
64
|
-
* Destroy.
|
|
65
64
|
*/
|
|
66
|
-
|
|
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 {
|
|
23
|
-
export
|
|
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;
|
|
@@ -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:
|
|
9
|
-
protected static _baseTextureProp:
|
|
8
|
+
protected static _baseColorProp: ShaderProperty;
|
|
9
|
+
protected static _baseTextureProp: ShaderProperty;
|
|
10
10
|
protected static _baseTextureMacro: ShaderMacro;
|
|
11
|
-
protected static _tilingOffsetProp:
|
|
12
|
-
protected static _normalTextureProp:
|
|
13
|
-
protected static _normalIntensityProp:
|
|
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:
|
|
16
|
-
protected static _emissiveTextureProp:
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
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
|
|
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
|
|
45
|
+
* Whether to read data of the mesh.
|
|
46
46
|
*/
|
|
47
|
-
get
|
|
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
|
|
210
|
+
* @param noLongerReadable - Whether to read data later. If true, you'll never read data anymore (free memory cache)
|
|
211
211
|
*/
|
|
212
|
-
uploadData(
|
|
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 -
|
|
67
|
-
* @param heightSegments -
|
|
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 {
|
|
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;
|