@galacean/engine-core 2.0.0-alpha.2 → 2.0.0-alpha.5
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 +8775 -8402
- package/dist/main.js.map +1 -1
- package/dist/module.js +8771 -8403
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/text/TextRenderer.d.ts +7 -1
- package/types/ComponentsManager.d.ts +0 -4
- package/types/Engine.d.ts +6 -1
- package/types/RenderPipeline/RenderTargetPool.d.ts +1 -0
- package/types/animation/Animator.d.ts +1 -5
- package/types/animation/AnimatorState.d.ts +4 -0
- package/types/animation/AnimatorStateMachine.d.ts +1 -0
- package/types/animation/StateMachineScript.d.ts +4 -5
- package/types/asset/AssetType.d.ts +3 -12
- package/types/asset/BufferAsset.d.ts +9 -0
- package/types/asset/JSONAsset.d.ts +9 -0
- package/types/asset/RenderingStatistics.d.ts +17 -0
- package/types/asset/ResourceManager.d.ts +14 -14
- package/types/asset/TextAsset.d.ts +9 -0
- package/types/base/EngineObject.d.ts +7 -3
- package/types/index.d.ts +4 -0
- package/types/physics/DynamicCollider.d.ts +13 -7
- package/types/physics/enums/MeshColliderShapeCookingFlag.d.ts +9 -0
- package/types/physics/enums/index.d.ts +1 -0
- package/types/physics/shape/MeshColliderShape.d.ts +27 -41
- package/types/texture/RenderTarget.d.ts +1 -0
- package/types/trail/TrailRenderer.d.ts +7 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"types/**/*"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@galacean/engine-math": "2.0.0-alpha.
|
|
21
|
+
"@galacean/engine-math": "2.0.0-alpha.5"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "2.0.0-alpha.
|
|
24
|
+
"@galacean/engine-design": "2.0.0-alpha.5"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
|
@@ -29,6 +29,7 @@ export declare class TextRenderer extends Renderer implements ITextRenderer {
|
|
|
29
29
|
private _fontSize;
|
|
30
30
|
private _fontStyle;
|
|
31
31
|
private _lineSpacing;
|
|
32
|
+
private _characterSpacing;
|
|
32
33
|
private _horizontalAlignment;
|
|
33
34
|
private _verticalAlignment;
|
|
34
35
|
private _enableWrapping;
|
|
@@ -69,10 +70,15 @@ export declare class TextRenderer extends Renderer implements ITextRenderer {
|
|
|
69
70
|
get fontStyle(): FontStyle;
|
|
70
71
|
set fontStyle(value: FontStyle);
|
|
71
72
|
/**
|
|
72
|
-
* The space between two lines
|
|
73
|
+
* The space between two lines, in em (ratio of fontSize).
|
|
73
74
|
*/
|
|
74
75
|
get lineSpacing(): number;
|
|
75
76
|
set lineSpacing(value: number);
|
|
77
|
+
/**
|
|
78
|
+
* The space between two characters, in em (ratio of fontSize).
|
|
79
|
+
*/
|
|
80
|
+
get characterSpacing(): number;
|
|
81
|
+
set characterSpacing(value: number);
|
|
76
82
|
/**
|
|
77
83
|
* The horizontal alignment.
|
|
78
84
|
*/
|
|
@@ -12,8 +12,6 @@ export declare class ComponentsManager {
|
|
|
12
12
|
private _onUpdateScripts;
|
|
13
13
|
private _onLateUpdateScripts;
|
|
14
14
|
private _onPhysicsUpdateScripts;
|
|
15
|
-
private _pendingDestroyScripts;
|
|
16
|
-
private _disposeDestroyScripts;
|
|
17
15
|
private _onUpdateAnimations;
|
|
18
16
|
private _onUpdateRenderers;
|
|
19
17
|
private _componentsContainerPool;
|
|
@@ -37,14 +35,12 @@ export declare class ComponentsManager {
|
|
|
37
35
|
removeOnUpdateAnimations(animation: Animator): void;
|
|
38
36
|
addOnUpdateRenderers(renderer: Renderer): void;
|
|
39
37
|
removeOnUpdateRenderers(renderer: Renderer): void;
|
|
40
|
-
addPendingDestroyScript(component: Script): void;
|
|
41
38
|
callScriptOnStart(): void;
|
|
42
39
|
callScriptOnUpdate(deltaTime: number): void;
|
|
43
40
|
callScriptOnLateUpdate(deltaTime: number): void;
|
|
44
41
|
callScriptOnPhysicsUpdate(): void;
|
|
45
42
|
callAnimationUpdate(deltaTime: number): void;
|
|
46
43
|
callRendererOnUpdate(deltaTime: number): void;
|
|
47
|
-
handlingInvalidScripts(): void;
|
|
48
44
|
callCameraOnBeginRender(camera: Camera): void;
|
|
49
45
|
callCameraOnEndRender(camera: Camera): void;
|
|
50
46
|
getActiveChangedTempList(): Component[];
|
package/types/Engine.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Canvas } from "./Canvas";
|
|
|
3
3
|
import { EngineSettings } from "./EngineSettings";
|
|
4
4
|
import { Entity } from "./Entity";
|
|
5
5
|
import { SceneManager } from "./SceneManager";
|
|
6
|
+
import { RenderingStatistics } from "./asset/RenderingStatistics";
|
|
6
7
|
import { ResourceManager } from "./asset/ResourceManager";
|
|
7
8
|
import { EventDispatcher, Time } from "./base";
|
|
8
9
|
import { InputManager } from "./input";
|
|
@@ -30,7 +31,6 @@ export declare class Engine extends EventDispatcher {
|
|
|
30
31
|
private _vSyncCounter;
|
|
31
32
|
private _targetFrameInterval;
|
|
32
33
|
private _destroyed;
|
|
33
|
-
private _frameInProcess;
|
|
34
34
|
private _waitingDestroy;
|
|
35
35
|
private _waitingGC;
|
|
36
36
|
private _postProcessPasses;
|
|
@@ -56,6 +56,10 @@ export declare class Engine extends EventDispatcher {
|
|
|
56
56
|
* The time information of the engine.
|
|
57
57
|
*/
|
|
58
58
|
get time(): Time;
|
|
59
|
+
/**
|
|
60
|
+
* Rendering statistics.
|
|
61
|
+
*/
|
|
62
|
+
get renderingStatistics(): RenderingStatistics;
|
|
59
63
|
/**
|
|
60
64
|
* Whether the engine is paused.
|
|
61
65
|
*/
|
|
@@ -120,6 +124,7 @@ export declare class Engine extends EventDispatcher {
|
|
|
120
124
|
* @param pass - Post process pass to add
|
|
121
125
|
*/
|
|
122
126
|
addPostProcessPass(pass: PostProcessPass): void;
|
|
127
|
+
private _processPendingDestroyObjects;
|
|
123
128
|
private _destroy;
|
|
124
129
|
/**
|
|
125
130
|
* Destroy engine.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -133,8 +133,7 @@ export declare class Animator extends Component {
|
|
|
133
133
|
private _updateCrossFadeData;
|
|
134
134
|
private _preparePlayOwner;
|
|
135
135
|
private _applyStateTransitions;
|
|
136
|
-
private
|
|
137
|
-
private _checkCrossFadeInterrupt;
|
|
136
|
+
private _tryCrossFadeInterrupt;
|
|
138
137
|
private _checkNoExitTimeTransitions;
|
|
139
138
|
private _checkSubTransition;
|
|
140
139
|
private _checkBackwardsSubTransition;
|
|
@@ -146,9 +145,6 @@ export declare class Animator extends Component {
|
|
|
146
145
|
private _fireAnimationEvents;
|
|
147
146
|
private _fireSubAnimationEvents;
|
|
148
147
|
private _fireBackwardSubAnimationEvents;
|
|
149
|
-
private _callAnimatorScriptOnEnter;
|
|
150
|
-
private _callAnimatorScriptOnUpdate;
|
|
151
|
-
private _callAnimatorScriptOnExit;
|
|
152
148
|
private _checkAnyAndEntryState;
|
|
153
149
|
private _checkRevertOwner;
|
|
154
150
|
private _fireAnimationEventsAndCallScripts;
|
|
@@ -11,6 +11,10 @@ export declare class AnimatorState {
|
|
|
11
11
|
speed: number;
|
|
12
12
|
/** The wrap mode used in the state. */
|
|
13
13
|
wrapMode: WrapMode;
|
|
14
|
+
private _onStateEnterScripts;
|
|
15
|
+
private _onStateUpdateScripts;
|
|
16
|
+
private _onStateExitScripts;
|
|
17
|
+
private _engine;
|
|
14
18
|
private _clipStartTime;
|
|
15
19
|
private _clipEndTime;
|
|
16
20
|
private _clip;
|
|
@@ -9,6 +9,7 @@ export interface AnimatorStateMap {
|
|
|
9
9
|
export declare class AnimatorStateMachine {
|
|
10
10
|
/** The list of states. */
|
|
11
11
|
readonly states: AnimatorState[];
|
|
12
|
+
private _engine;
|
|
12
13
|
/**
|
|
13
14
|
* The state will be played automatically.
|
|
14
15
|
* @remarks When the Animator's AnimatorController changed or the Animator's onEnable be triggered.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Animator } from "../animation/Animator";
|
|
2
2
|
import { AnimatorState } from "../animation/AnimatorState";
|
|
3
|
+
import { EngineObject } from "../base/EngineObject";
|
|
3
4
|
/**
|
|
4
5
|
* StateMachineScript is a component that can be added to a animator state. It's the base class every script on a state derives from.
|
|
5
6
|
*/
|
|
6
|
-
export declare class StateMachineScript {
|
|
7
|
+
export declare class StateMachineScript extends EngineObject {
|
|
8
|
+
constructor();
|
|
7
9
|
/**
|
|
8
10
|
* onStateEnter is called when a transition starts and the state machine starts to evaluate this state.
|
|
9
11
|
* @param animator - The animator
|
|
@@ -25,8 +27,5 @@ export declare class StateMachineScript {
|
|
|
25
27
|
* @param layerIndex - The index of the layer where the state is located
|
|
26
28
|
*/
|
|
27
29
|
onStateExit(animator: Animator, animatorState: AnimatorState, layerIndex: number): void;
|
|
28
|
-
|
|
29
|
-
* Destroy this instance.
|
|
30
|
-
*/
|
|
31
|
-
destroy(): void;
|
|
30
|
+
protected _onDestroy(): void;
|
|
32
31
|
}
|
|
@@ -2,20 +2,11 @@
|
|
|
2
2
|
* Asset Type.
|
|
3
3
|
*/
|
|
4
4
|
export declare enum AssetType {
|
|
5
|
-
/**
|
|
6
|
-
* Plain text.
|
|
7
|
-
* @remarks Will not be cached based on url in ResourceManager.
|
|
8
|
-
*/
|
|
5
|
+
/** Plain text. */
|
|
9
6
|
Text = "Text",
|
|
10
|
-
/**
|
|
11
|
-
* JSON.
|
|
12
|
-
* @remarks Will not be cached based on url in ResourceManager.
|
|
13
|
-
*/
|
|
7
|
+
/** JSON. */
|
|
14
8
|
JSON = "JSON",
|
|
15
|
-
/**
|
|
16
|
-
* ArrayBuffer.
|
|
17
|
-
* @remarks Will not be cached based on url in ResourceManager.
|
|
18
|
-
*/
|
|
9
|
+
/** ArrayBuffer. */
|
|
19
10
|
Buffer = "Buffer",
|
|
20
11
|
/** 2D Texture. */
|
|
21
12
|
Texture2D = "Texture2D",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rendering statistics.
|
|
3
|
+
*/
|
|
4
|
+
export declare class RenderingStatistics {
|
|
5
|
+
/**
|
|
6
|
+
* Memory used by all textures, in bytes.
|
|
7
|
+
*/
|
|
8
|
+
get textureMemory(): number;
|
|
9
|
+
/**
|
|
10
|
+
* Memory used by all buffers, in bytes.
|
|
11
|
+
*/
|
|
12
|
+
get bufferMemory(): number;
|
|
13
|
+
/**
|
|
14
|
+
* Total memory used, in bytes.
|
|
15
|
+
*/
|
|
16
|
+
get totalMemory(): number;
|
|
17
|
+
}
|
|
@@ -34,30 +34,30 @@ export declare class ResourceManager {
|
|
|
34
34
|
* @param engine - Engine to which the current ResourceManager belongs
|
|
35
35
|
*/
|
|
36
36
|
constructor(engine: Engine);
|
|
37
|
-
/**
|
|
38
|
-
* Load asset asynchronously through the path.
|
|
39
|
-
* @param path - Path
|
|
40
|
-
* @returns Asset promise
|
|
41
|
-
*/
|
|
42
|
-
load<T>(path: string): AssetPromise<T>;
|
|
43
|
-
/**
|
|
44
|
-
* Load asset collection asynchronously through urls.
|
|
45
|
-
* @param paths - Path collections
|
|
46
|
-
* @returns Asset Promise
|
|
47
|
-
*/
|
|
48
|
-
load(paths: string[]): AssetPromise<Object[]>;
|
|
49
37
|
/**
|
|
50
38
|
* Load the asset asynchronously by asset item information.
|
|
51
39
|
* @param assetItem - AssetItem
|
|
52
40
|
* @returns AssetPromise
|
|
53
41
|
*/
|
|
54
|
-
load<T>(assetItem: LoadItem): AssetPromise<T>;
|
|
42
|
+
load<T extends EngineObject>(assetItem: LoadItem): AssetPromise<T>;
|
|
55
43
|
/**
|
|
56
44
|
* Load the asset collection asynchronously by loading the information collection.
|
|
57
45
|
* @param assetItems - Asset collection
|
|
58
46
|
* @returns AssetPromise
|
|
59
47
|
*/
|
|
60
|
-
load(assetItems: LoadItem[]): AssetPromise<
|
|
48
|
+
load<T extends EngineObject[]>(assetItems: LoadItem[]): AssetPromise<T>;
|
|
49
|
+
/**
|
|
50
|
+
* Load asset collection asynchronously through urls.
|
|
51
|
+
* @param paths - Path collections
|
|
52
|
+
* @returns Asset Promise
|
|
53
|
+
*/
|
|
54
|
+
load<T extends EngineObject[]>(paths: string[]): AssetPromise<T>;
|
|
55
|
+
/**
|
|
56
|
+
* Load asset asynchronously through the path.
|
|
57
|
+
* @param path - Path
|
|
58
|
+
* @returns Asset promise
|
|
59
|
+
*/
|
|
60
|
+
load<T extends EngineObject>(path: string): AssetPromise<T>;
|
|
61
61
|
/**
|
|
62
62
|
* Get the resource from cache by asset url, return the resource object if it loaded, otherwise return null.
|
|
63
63
|
* @param url - Resource url
|
|
@@ -2,16 +2,20 @@ import { Engine } from "../Engine";
|
|
|
2
2
|
/**
|
|
3
3
|
* EngineObject.
|
|
4
4
|
*/
|
|
5
|
-
export declare
|
|
5
|
+
export declare class EngineObject {
|
|
6
6
|
private static _instanceIdCounter;
|
|
7
|
-
/** Engine unique id. */
|
|
8
7
|
readonly instanceId: number;
|
|
9
|
-
protected _engine: Engine;
|
|
10
8
|
protected _destroyed: boolean;
|
|
11
9
|
/**
|
|
12
10
|
* Get the engine which the object belongs.
|
|
13
11
|
*/
|
|
14
12
|
get engine(): Engine;
|
|
13
|
+
/**
|
|
14
|
+
* Whether this object is pending destruction.
|
|
15
|
+
* @remarks `destroy()` has been called but the actual destruction is deferred until end of frame,
|
|
16
|
+
* during this period all properties are still accessible.
|
|
17
|
+
*/
|
|
18
|
+
get pendingDestroy(): boolean;
|
|
15
19
|
/**
|
|
16
20
|
* Whether it has been destroyed.
|
|
17
21
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -20,11 +20,15 @@ export { request } from "./asset/request";
|
|
|
20
20
|
export type { RequestConfig } from "./asset/request";
|
|
21
21
|
export { Loader } from "./asset/Loader";
|
|
22
22
|
export { ContentRestorer } from "./asset/ContentRestorer";
|
|
23
|
+
export { RenderingStatistics } from "./asset/RenderingStatistics";
|
|
23
24
|
export { ResourceManager, resourceLoader } from "./asset/ResourceManager";
|
|
24
25
|
export { AssetPromise } from "./asset/AssetPromise";
|
|
25
26
|
export type { LoadItem } from "./asset/LoadItem";
|
|
26
27
|
export { AssetType } from "./asset/AssetType";
|
|
27
28
|
export { ReferResource } from "./asset/ReferResource";
|
|
29
|
+
export { TextAsset } from "./asset/TextAsset";
|
|
30
|
+
export { JSONAsset } from "./asset/JSONAsset";
|
|
31
|
+
export { BufferAsset } from "./asset/BufferAsset";
|
|
28
32
|
export * from "./RenderPipeline/index";
|
|
29
33
|
export * from "./base";
|
|
30
34
|
export { Background } from "./Background";
|
|
@@ -124,19 +124,25 @@ export declare class DynamicCollider extends Collider {
|
|
|
124
124
|
*/
|
|
125
125
|
applyTorque(torque: Vector3): void;
|
|
126
126
|
/**
|
|
127
|
-
* Moves
|
|
128
|
-
* @
|
|
127
|
+
* Moves the kinematic collider to the specified position.
|
|
128
|
+
* @remarks Only available when {@link isKinematic} is true.
|
|
129
|
+
* Unlike setting the transform directly (teleport), this method affects dynamic colliders along the movement path.
|
|
130
|
+
* @param position - The desired position for the kinematic collider
|
|
129
131
|
*/
|
|
130
132
|
move(position: Vector3): void;
|
|
131
133
|
/**
|
|
132
|
-
* Moves
|
|
133
|
-
* @
|
|
134
|
+
* Moves the kinematic collider to the specified rotation.
|
|
135
|
+
* @remarks Only available when {@link isKinematic} is true.
|
|
136
|
+
* Unlike setting the transform directly (teleport), this method affects dynamic colliders along the movement path.
|
|
137
|
+
* @param rotation - The desired rotation for the kinematic collider
|
|
134
138
|
*/
|
|
135
139
|
move(rotation: Quaternion): void;
|
|
136
140
|
/**
|
|
137
|
-
* Moves
|
|
138
|
-
* @
|
|
139
|
-
*
|
|
141
|
+
* Moves the kinematic collider to the specified position and rotation.
|
|
142
|
+
* @remarks Only available when {@link isKinematic} is true.
|
|
143
|
+
* Unlike setting the transform directly (teleport), this method affects dynamic colliders along the movement path.
|
|
144
|
+
* @param position - The desired position for the kinematic collider
|
|
145
|
+
* @param rotation - The desired rotation for the kinematic collider
|
|
140
146
|
*/
|
|
141
147
|
move(position: Vector3, rotation: Quaternion): void;
|
|
142
148
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cooking flags for {@link MeshColliderShape}.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum MeshColliderShapeCookingFlag {
|
|
5
|
+
/** Remove degenerate triangles and coincident vertices. */
|
|
6
|
+
Cleaning = 1,
|
|
7
|
+
/** Weld vertices that are close to each other. Requires {@link MeshColliderShapeCookingFlag.Cleaning} to be enabled. */
|
|
8
|
+
VertexWelding = 2
|
|
9
|
+
}
|
|
@@ -1,59 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModelMesh } from "../../mesh/ModelMesh";
|
|
2
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
+
import { MeshColliderShapeCookingFlag } from "../enums/MeshColliderShapeCookingFlag";
|
|
2
4
|
import { ColliderShape } from "./ColliderShape";
|
|
3
5
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* - Triangle mesh (isConvex=false) works with StaticCollider or kinematic DynamicCollider
|
|
7
|
-
* - Convex mesh (isConvex=true) works with both StaticCollider and DynamicCollider
|
|
8
|
-
* @see https://nvidia-omniverse.github.io/PhysX/physx/5.4.1/docs/Geometry.html#triangle-meshes
|
|
6
|
+
* Collider shape based on mesh geometry, supporting both convex hull and triangle mesh modes.
|
|
9
7
|
*/
|
|
10
8
|
export declare class MeshColliderShape extends ColliderShape {
|
|
9
|
+
private _mesh;
|
|
11
10
|
private _isConvex;
|
|
12
|
-
private
|
|
11
|
+
private _positions;
|
|
13
12
|
private _indices;
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
|
|
13
|
+
private _cookingFlags;
|
|
14
|
+
private _isShapeAttached;
|
|
15
|
+
/**
|
|
16
|
+
* Cooking flags for this mesh collider shape.
|
|
17
|
+
*/
|
|
18
|
+
get cookingFlags(): MeshColliderShapeCookingFlag;
|
|
19
|
+
set cookingFlags(value: MeshColliderShapeCookingFlag);
|
|
17
20
|
/**
|
|
18
21
|
* Whether to use convex mesh mode.
|
|
19
22
|
* @remarks
|
|
20
|
-
* -
|
|
21
|
-
* -
|
|
22
|
-
* - After changing this property, you must call {@link setMesh} or {@link setMeshData} again to apply the change
|
|
23
|
+
* - When true, generates a convex hull from the mesh vertices. Works with all collider types.
|
|
24
|
+
* - When false, uses the original triangle mesh. Only works with StaticCollider or kinematic DynamicCollider, and the mesh must have indices.
|
|
23
25
|
*/
|
|
24
26
|
get isConvex(): boolean;
|
|
25
27
|
set isConvex(value: boolean);
|
|
26
28
|
/**
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
*/
|
|
30
|
-
get doubleSided(): boolean;
|
|
31
|
-
set doubleSided(value: boolean);
|
|
32
|
-
/**
|
|
33
|
-
* Whether to use tight bounds for convex mesh.
|
|
34
|
-
* @remarks Only applies to convex mesh.
|
|
35
|
-
*/
|
|
36
|
-
get tightBounds(): boolean;
|
|
37
|
-
set tightBounds(value: boolean);
|
|
38
|
-
/**
|
|
39
|
-
* Create a MeshColliderShape.
|
|
40
|
-
* @param isConvex - Whether to use convex mesh mode (default: false)
|
|
41
|
-
*/
|
|
42
|
-
constructor(isConvex?: boolean);
|
|
43
|
-
/**
|
|
44
|
-
* Set mesh data directly from arrays.
|
|
45
|
-
* @param vertices - Vertex positions as Float32Array (x, y, z per vertex)
|
|
46
|
-
* @param indices - Triangle indices (required for triangle mesh, optional for convex)
|
|
29
|
+
* The mesh used for collision detection.
|
|
30
|
+
* @remarks The mesh must have accessible data (not released after upload).
|
|
47
31
|
*/
|
|
48
|
-
|
|
32
|
+
get mesh(): ModelMesh;
|
|
33
|
+
set mesh(value: ModelMesh);
|
|
49
34
|
/**
|
|
50
|
-
*
|
|
51
|
-
* @param mesh - The mesh to extract vertex and index data from
|
|
52
|
-
* @remarks The mesh must have accessible data (not released after upload)
|
|
35
|
+
* {@inheritDoc ColliderShape.getClosestPoint}
|
|
53
36
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
getClosestPoint(point: Vector3, outClosestPoint: Vector3): number;
|
|
38
|
+
private _clearMeshData;
|
|
39
|
+
private _destroyNativeShape;
|
|
56
40
|
private _extractMeshData;
|
|
57
|
-
private
|
|
58
|
-
private
|
|
41
|
+
private _updateNativeShapeData;
|
|
42
|
+
private _detachFromCollider;
|
|
43
|
+
private _attachToCollider;
|
|
44
|
+
private _createNativeShape;
|
|
59
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoundingBox } from "@galacean/engine-math";
|
|
1
|
+
import { BoundingBox, Vector2 } from "@galacean/engine-math";
|
|
2
2
|
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
3
|
import { Renderer } from "../Renderer";
|
|
4
4
|
import { ParticleCurve } from "../particle/modules/ParticleCurve";
|
|
@@ -31,6 +31,7 @@ export declare class TrailRenderer extends Renderer {
|
|
|
31
31
|
/** The gradient describing the trail color from start to end. */
|
|
32
32
|
colorGradient: ParticleGradient;
|
|
33
33
|
private _trailParams;
|
|
34
|
+
private _textureScale;
|
|
34
35
|
private _distanceParams;
|
|
35
36
|
private _curveMaxTime;
|
|
36
37
|
private _time;
|
|
@@ -55,21 +56,17 @@ export declare class TrailRenderer extends Renderer {
|
|
|
55
56
|
*/
|
|
56
57
|
get time(): number;
|
|
57
58
|
set time(value: number);
|
|
58
|
-
/**
|
|
59
|
-
* The width of the trail.
|
|
60
|
-
*/
|
|
61
|
-
get width(): number;
|
|
62
|
-
set width(value: number);
|
|
63
59
|
/**
|
|
64
60
|
* The texture mapping mode for the trail.
|
|
65
61
|
*/
|
|
66
62
|
get textureMode(): TrailTextureMode;
|
|
67
63
|
set textureMode(value: TrailTextureMode);
|
|
68
64
|
/**
|
|
69
|
-
*
|
|
65
|
+
* Scale of the UV coordinates.
|
|
66
|
+
* x scales the coordinate along the trail, y scales the coordinate across the trail.
|
|
70
67
|
*/
|
|
71
|
-
get textureScale():
|
|
72
|
-
set textureScale(value:
|
|
68
|
+
get textureScale(): Vector2;
|
|
69
|
+
set textureScale(value: Vector2);
|
|
73
70
|
/**
|
|
74
71
|
* Clear all trail points.
|
|
75
72
|
*/
|
|
@@ -89,4 +86,5 @@ export declare class TrailRenderer extends Renderer {
|
|
|
89
86
|
private _getActivePointCount;
|
|
90
87
|
private _addActivePointsToVertexBuffer;
|
|
91
88
|
private _addSubRenderElement;
|
|
89
|
+
private _onTextureScaleChanged;
|
|
92
90
|
}
|