@galacean/engine-core 1.0.0-beta.1 → 1.0.0-beta.10
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 +762 -335
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +762 -335
- package/dist/module.js +757 -336
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/SpriteAtlas.d.ts +0 -1
- package/types/2d/sprite/Sprite.d.ts +12 -3
- package/types/2d/sprite/SpriteMask.d.ts +16 -17
- package/types/2d/sprite/SpriteRenderer.d.ts +17 -11
- package/types/2d/text/Font.d.ts +0 -1
- package/types/2d/text/TextRenderer.d.ts +1 -9
- package/types/Camera.d.ts +0 -4
- package/types/Component.d.ts +0 -1
- package/types/Engine.d.ts +0 -2
- package/types/Renderer.d.ts +3 -11
- package/types/SafeLoopArray.d.ts +37 -0
- package/types/Script.d.ts +0 -1
- package/types/animation/Animator.d.ts +2 -3
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
- package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
- package/types/asset/GraphicsResource.d.ts +0 -1
- package/types/asset/ReferResource.d.ts +0 -1
- package/types/enums/ActiveChangeFlag.d.ts +6 -0
- package/types/env-probe/CubeProbe.d.ts +0 -1
- package/types/graphic/Buffer.d.ts +0 -1
- package/types/graphic/Mesh.d.ts +2 -6
- package/types/index.d.ts +1 -1
- package/types/lighting/Light.d.ts +0 -1
- package/types/material/PBRMaterial.d.ts +11 -2
- package/types/mesh/MeshRenderer.d.ts +8 -8
- package/types/mesh/ModelMesh.d.ts +0 -1
- package/types/mesh/SkinnedMeshRenderer.d.ts +0 -4
- package/types/physics/Collider.d.ts +0 -1
- package/types/physics/PhysicsScene.d.ts +75 -0
- package/types/shader/index.d.ts +1 -0
- package/types/shader/state/index.d.ts +6 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +1 -0
- package/types/sky/Sky.d.ts +12 -4
- package/types/texture/RenderTarget.d.ts +0 -1
- package/types/texture/Texture.d.ts +0 -1
- package/types/trail/TrailRenderer.d.ts +0 -2
- package/types/utils/BoolUpdateFlag.d.ts +12 -0
- package/types/utils/DisorderedArray.d.ts +18 -0
- package/types/utils/SafeLoopArray.d.ts +41 -0
- package/types/utils/UpdateFlag.d.ts +20 -0
- package/types/utils/UpdateFlagManager.d.ts +1 -0
- package/types/utils/Utils.d.ts +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "1.0.0-beta.
|
|
18
|
+
"@galacean/engine-math": "1.0.0-beta.10"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.0.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.0.0-beta.10"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -8,8 +8,10 @@ import { Texture2D } from "../../texture/Texture2D";
|
|
|
8
8
|
export declare class Sprite extends ReferResource {
|
|
9
9
|
/** The name of sprite. */
|
|
10
10
|
name: string;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
11
|
+
private _automaticWidth;
|
|
12
|
+
private _automaticHeight;
|
|
13
|
+
private _customWidth;
|
|
14
|
+
private _customHeight;
|
|
13
15
|
private _positions;
|
|
14
16
|
private _uvs;
|
|
15
17
|
private _bounds;
|
|
@@ -28,11 +30,19 @@ export declare class Sprite extends ReferResource {
|
|
|
28
30
|
set texture(value: Texture2D);
|
|
29
31
|
/**
|
|
30
32
|
* The width of the sprite (in world coordinates).
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* If width is set, return the set value,
|
|
36
|
+
* otherwise return the width calculated according to `Texture.width`, `Sprite.region`, `Sprite.atlasRegion`, `Sprite.atlasRegionOffset` and `Engine._pixelsPerUnit`.
|
|
31
37
|
*/
|
|
32
38
|
get width(): number;
|
|
33
39
|
set width(value: number);
|
|
34
40
|
/**
|
|
35
41
|
* The height of the sprite (in world coordinates).
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* If height is set, return the set value,
|
|
45
|
+
* otherwise return the height calculated according to `Texture.height`, `Sprite.region`, `Sprite.atlasRegion`, `Sprite.atlasRegionOffset` and `Engine._pixelsPerUnit`.
|
|
36
46
|
*/
|
|
37
47
|
get height(): number;
|
|
38
48
|
set height(value: number);
|
|
@@ -86,7 +96,6 @@ export declare class Sprite extends ReferResource {
|
|
|
86
96
|
* @returns Cloned sprite
|
|
87
97
|
*/
|
|
88
98
|
clone(): Sprite;
|
|
89
|
-
protected _onDestroy(): void;
|
|
90
99
|
private _calDefaultSize;
|
|
91
100
|
private _updatePositions;
|
|
92
101
|
private _updateUVs;
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
-
import { RenderContext } from "../../RenderPipeline/RenderContext";
|
|
3
1
|
import { Renderer } from "../../Renderer";
|
|
4
|
-
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
5
2
|
import { Sprite } from "./Sprite";
|
|
6
3
|
/**
|
|
7
4
|
* A component for masking Sprites.
|
|
8
5
|
*/
|
|
9
|
-
export declare class SpriteMask extends Renderer
|
|
6
|
+
export declare class SpriteMask extends Renderer {
|
|
10
7
|
/** The mask layers the sprite mask influence to. */
|
|
11
8
|
influenceLayers: number;
|
|
12
9
|
private _sprite;
|
|
13
|
-
private
|
|
14
|
-
private
|
|
10
|
+
private _automaticWidth;
|
|
11
|
+
private _automaticHeight;
|
|
12
|
+
private _customWidth;
|
|
13
|
+
private _customHeight;
|
|
15
14
|
private _flipX;
|
|
16
15
|
private _flipY;
|
|
17
16
|
private _alphaCutoff;
|
|
18
17
|
/**
|
|
19
|
-
* Render width.
|
|
18
|
+
* Render width (in world coordinates).
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* If width is set, return the set value,
|
|
22
|
+
* otherwise return `SpriteMask.sprite.width`.
|
|
20
23
|
*/
|
|
21
24
|
get width(): number;
|
|
22
25
|
set width(value: number);
|
|
23
26
|
/**
|
|
24
|
-
* Render height.
|
|
27
|
+
* Render height (in world coordinates).
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* If height is set, return the set value,
|
|
31
|
+
* otherwise return `SpriteMask.sprite.height`.
|
|
25
32
|
*/
|
|
26
33
|
get height(): number;
|
|
27
34
|
set height(value: number);
|
|
@@ -45,14 +52,6 @@ export declare class SpriteMask extends Renderer implements ICustomClone {
|
|
|
45
52
|
*/
|
|
46
53
|
get alphaCutoff(): number;
|
|
47
54
|
set alphaCutoff(value: number);
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @inheritdoc
|
|
51
|
-
*/
|
|
52
|
-
protected _render(context: RenderContext): void;
|
|
53
|
-
/**
|
|
54
|
-
* @inheritdoc
|
|
55
|
-
*/
|
|
56
|
-
protected _onDestroy(): void;
|
|
55
|
+
private _calDefaultSize;
|
|
57
56
|
private _onSpriteChange;
|
|
58
57
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RenderContext } from "../../RenderPipeline/RenderContext";
|
|
1
|
+
import { Color } from "@galacean/engine-math";
|
|
3
2
|
import { Renderer } from "../../Renderer";
|
|
4
|
-
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
5
3
|
import { SpriteDrawMode } from "../enums/SpriteDrawMode";
|
|
6
4
|
import { SpriteMaskInteraction } from "../enums/SpriteMaskInteraction";
|
|
7
5
|
import { SpriteTileMode } from "../enums/SpriteTileMode";
|
|
@@ -9,15 +7,17 @@ import { Sprite } from "./Sprite";
|
|
|
9
7
|
/**
|
|
10
8
|
* Renders a Sprite for 2D graphics.
|
|
11
9
|
*/
|
|
12
|
-
export declare class SpriteRenderer extends Renderer
|
|
10
|
+
export declare class SpriteRenderer extends Renderer {
|
|
13
11
|
private _drawMode;
|
|
14
12
|
private _assembler;
|
|
15
13
|
private _tileMode;
|
|
16
14
|
private _tiledAdaptiveThreshold;
|
|
17
15
|
private _color;
|
|
18
16
|
private _sprite;
|
|
19
|
-
private
|
|
20
|
-
private
|
|
17
|
+
private _automaticWidth;
|
|
18
|
+
private _automaticHeight;
|
|
19
|
+
private _customWidth;
|
|
20
|
+
private _customHeight;
|
|
21
21
|
private _flipX;
|
|
22
22
|
private _flipY;
|
|
23
23
|
private _maskLayer;
|
|
@@ -48,12 +48,20 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
|
|
|
48
48
|
get color(): Color;
|
|
49
49
|
set color(value: Color);
|
|
50
50
|
/**
|
|
51
|
-
* Render width.
|
|
51
|
+
* Render width (in world coordinates).
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* If width is set, return the set value,
|
|
55
|
+
* otherwise return `SpriteRenderer.sprite.width`.
|
|
52
56
|
*/
|
|
53
57
|
get width(): number;
|
|
54
58
|
set width(value: number);
|
|
55
59
|
/**
|
|
56
|
-
* Render height.
|
|
60
|
+
* Render height (in world coordinates).
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* If height is set, return the set value,
|
|
64
|
+
* otherwise return `SpriteRenderer.sprite.height`.
|
|
57
65
|
*/
|
|
58
66
|
get height(): number;
|
|
59
67
|
set height(value: number);
|
|
@@ -77,9 +85,7 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
|
|
|
77
85
|
*/
|
|
78
86
|
get maskInteraction(): SpriteMaskInteraction;
|
|
79
87
|
set maskInteraction(value: SpriteMaskInteraction);
|
|
80
|
-
|
|
81
|
-
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
82
|
-
protected _render(context: RenderContext): void;
|
|
88
|
+
private _calDefaultSize;
|
|
83
89
|
private _updateStencilState;
|
|
84
90
|
private _onSpriteChange;
|
|
85
91
|
}
|
package/types/2d/text/Font.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { BoundingBox, Color } from "@galacean/engine-math";
|
|
2
2
|
import { Entity } from "../../Entity";
|
|
3
|
-
import { RenderContext } from "../../RenderPipeline/RenderContext";
|
|
4
3
|
import { Renderer } from "../../Renderer";
|
|
5
|
-
import { TransformModifyFlags } from "../../Transform";
|
|
6
|
-
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
7
4
|
import { FontStyle } from "../enums/FontStyle";
|
|
8
5
|
import { SpriteMaskInteraction } from "../enums/SpriteMaskInteraction";
|
|
9
6
|
import { TextHorizontalAlignment, TextVerticalAlignment } from "../enums/TextAlignment";
|
|
@@ -12,7 +9,7 @@ import { Font } from "./Font";
|
|
|
12
9
|
/**
|
|
13
10
|
* Renders a text for 2D graphics.
|
|
14
11
|
*/
|
|
15
|
-
export declare class TextRenderer extends Renderer
|
|
12
|
+
export declare class TextRenderer extends Renderer {
|
|
16
13
|
private static _charRenderDataPool;
|
|
17
14
|
private static _tempVec30;
|
|
18
15
|
private static _tempVec31;
|
|
@@ -107,13 +104,8 @@ export declare class TextRenderer extends Renderer implements ICustomClone {
|
|
|
107
104
|
*/
|
|
108
105
|
get bounds(): BoundingBox;
|
|
109
106
|
constructor(entity: Entity);
|
|
110
|
-
protected _onDestroy(): void;
|
|
111
|
-
protected _updateShaderData(context: RenderContext): void;
|
|
112
|
-
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
113
|
-
protected _render(context: RenderContext): void;
|
|
114
107
|
private _updateStencilState;
|
|
115
108
|
private _resetSubFont;
|
|
116
109
|
private _updatePosition;
|
|
117
110
|
private _updateLocalData;
|
|
118
|
-
protected _onTransformChanged(bit: TransformModifyFlags): void;
|
|
119
111
|
}
|
package/types/Camera.d.ts
CHANGED
|
@@ -211,10 +211,6 @@ export declare class Camera extends Component {
|
|
|
211
211
|
* @inheritdoc
|
|
212
212
|
*/
|
|
213
213
|
_onDisable(): void;
|
|
214
|
-
/**
|
|
215
|
-
* @inheritdoc
|
|
216
|
-
*/
|
|
217
|
-
protected _onDestroy(): void;
|
|
218
214
|
private _projMatChange;
|
|
219
215
|
private _innerViewportToWorldPoint;
|
|
220
216
|
private _updateShaderData;
|
package/types/Component.d.ts
CHANGED
package/types/Engine.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export declare class Engine extends EventDispatcher {
|
|
|
17
17
|
readonly physicsManager: PhysicsManager;
|
|
18
18
|
/** Input manager of Engine. */
|
|
19
19
|
readonly inputManager: InputManager;
|
|
20
|
-
protected _canvas: Canvas;
|
|
21
20
|
private _settings;
|
|
22
21
|
private _resourceManager;
|
|
23
22
|
private _sceneManager;
|
|
@@ -115,7 +114,6 @@ export declare class Engine extends EventDispatcher {
|
|
|
115
114
|
* @remarks If call during frame execution will delay until the end of the frame
|
|
116
115
|
*/
|
|
117
116
|
destroy(): void;
|
|
118
|
-
protected _initialize(configuration: EngineConfiguration): Promise<Engine>;
|
|
119
117
|
private _createSpriteMaterial;
|
|
120
118
|
private _createSpriteMaskMaterial;
|
|
121
119
|
private _onDeviceLost;
|
package/types/Renderer.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { BoundingBox,
|
|
1
|
+
import { BoundingBox, Vector4 } from "@galacean/engine-math";
|
|
2
2
|
import { Component } from "./Component";
|
|
3
|
-
import {
|
|
4
|
-
import { TransformModifyFlags } from "./Transform";
|
|
3
|
+
import { ICustomClone } from "./clone/ComponentCloner";
|
|
5
4
|
import { Material } from "./material";
|
|
6
5
|
import { ShaderData } from "./shader/ShaderData";
|
|
7
6
|
/**
|
|
8
7
|
* Basis for all renderers.
|
|
9
8
|
* @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
|
|
10
9
|
*/
|
|
11
|
-
export declare class Renderer extends Component {
|
|
10
|
+
export declare class Renderer extends Component implements ICustomClone {
|
|
12
11
|
private static _tempVector0;
|
|
13
12
|
private static _receiveShadowMacro;
|
|
14
13
|
private static _localMatrixProperty;
|
|
@@ -108,12 +107,5 @@ export declare class Renderer extends Component {
|
|
|
108
107
|
*/
|
|
109
108
|
setMaterials(materials: Material[]): void;
|
|
110
109
|
update(deltaTime: number): void;
|
|
111
|
-
protected _updateShaderData(context: RenderContext): void;
|
|
112
|
-
protected _updateTransformShaderData(context: RenderContext, worldMatrix: Matrix): void;
|
|
113
|
-
protected _registerEntityTransformListener(): void;
|
|
114
|
-
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
115
|
-
protected _render(context: RenderContext): void;
|
|
116
|
-
private _createInstanceMaterial;
|
|
117
110
|
private _setMaterial;
|
|
118
|
-
protected _onTransformChanged(type: TransformModifyFlags): void;
|
|
119
111
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare class SafeLoopArray<T> {
|
|
2
|
+
private _array;
|
|
3
|
+
private _loopArray;
|
|
4
|
+
private _loopArrayDirty;
|
|
5
|
+
/**
|
|
6
|
+
* Get the length of the array.
|
|
7
|
+
*/
|
|
8
|
+
get length(): number;
|
|
9
|
+
/**
|
|
10
|
+
* Push item to the array.
|
|
11
|
+
* @param item - The item which want to be pushed
|
|
12
|
+
*/
|
|
13
|
+
push(item: T): void;
|
|
14
|
+
/**
|
|
15
|
+
* Splice the array.
|
|
16
|
+
* @param index - The index of the array
|
|
17
|
+
* @param deleteCount - The count of the array which want to be deleted
|
|
18
|
+
* @param item - The item which want to be added
|
|
19
|
+
*/
|
|
20
|
+
splice(index: number, deleteCount: number, item?: T): void;
|
|
21
|
+
/**
|
|
22
|
+
* The index of the item.
|
|
23
|
+
* @param item - The item which want to get the index
|
|
24
|
+
* @returns Index of the item
|
|
25
|
+
*/
|
|
26
|
+
indexOf(item: T): number;
|
|
27
|
+
/**
|
|
28
|
+
* Get the array.
|
|
29
|
+
* @returns The array
|
|
30
|
+
*/
|
|
31
|
+
getArray(): ReadonlyArray<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Get the array use for loop.
|
|
34
|
+
* @returns The array use for loop
|
|
35
|
+
*/
|
|
36
|
+
getLoopArray(): ReadonlyArray<T>;
|
|
37
|
+
}
|
package/types/Script.d.ts
CHANGED
|
@@ -14,8 +14,7 @@ export declare class Animator extends Component {
|
|
|
14
14
|
protected _animatorController: AnimatorController;
|
|
15
15
|
protected _controllerUpdateFlag: BoolUpdateFlag;
|
|
16
16
|
private _animatorLayersData;
|
|
17
|
-
private
|
|
18
|
-
private _animationCurveOwners;
|
|
17
|
+
private _curveOwnerPool;
|
|
19
18
|
private _animationEventHandlerPool;
|
|
20
19
|
private _tempAnimatorStateInfo;
|
|
21
20
|
private _controlledRenderers;
|
|
@@ -61,7 +60,7 @@ export declare class Animator extends Component {
|
|
|
61
60
|
private _saveAnimatorStateData;
|
|
62
61
|
private _saveAnimatorEventHandlers;
|
|
63
62
|
private _clearCrossData;
|
|
64
|
-
private
|
|
63
|
+
private _addCrossOwner;
|
|
65
64
|
private _prepareCrossFading;
|
|
66
65
|
private _prepareStandbyCrossFading;
|
|
67
66
|
private _prepareFixedPoseCrossFading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,7 +9,6 @@ export declare class CubeProbe extends Probe {
|
|
|
9
9
|
* The position of the probe can be set, the default is the origin [0,0,0].
|
|
10
10
|
*/
|
|
11
11
|
position: Vector3;
|
|
12
|
-
protected readonly _isCube: boolean;
|
|
13
12
|
private oriViewMatrix;
|
|
14
13
|
private _oriFieldOfView;
|
|
15
14
|
onBeginRender(camera: Camera): void;
|
package/types/graphic/Mesh.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
-
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
3
2
|
import { Engine } from "../Engine";
|
|
4
|
-
import {
|
|
5
|
-
import { IndexBufferBinding } from "../graphic/IndexBufferBinding";
|
|
3
|
+
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
6
4
|
import { SubMesh } from "../graphic/SubMesh";
|
|
7
|
-
import {
|
|
5
|
+
import { MeshTopology } from "../graphic/enums/MeshTopology";
|
|
8
6
|
/**
|
|
9
7
|
* Mesh.
|
|
10
8
|
*/
|
|
@@ -57,7 +55,5 @@ export declare abstract class Mesh extends GraphicsResource {
|
|
|
57
55
|
clearSubMesh(): void;
|
|
58
56
|
_addReferCount(value: number): void;
|
|
59
57
|
_rebuild(): void;
|
|
60
|
-
protected _setVertexElements(elements: VertexElement[]): void;
|
|
61
|
-
protected _setIndexBufferBinding(binding: IndexBufferBinding | null): void;
|
|
62
58
|
private _onBoundsChanged;
|
|
63
59
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { AssetPromise } from "./asset/AssetPromise";
|
|
|
22
22
|
export type { LoadItem } from "./asset/LoadItem";
|
|
23
23
|
export { AssetType } from "./asset/AssetType";
|
|
24
24
|
export { ReferResource } from "./asset/ReferResource";
|
|
25
|
-
export * from "./RenderPipeline";
|
|
25
|
+
export * from "./RenderPipeline/Index";
|
|
26
26
|
export * from "./base";
|
|
27
27
|
export { Background } from "./Background";
|
|
28
28
|
export { BackgroundMode } from "./enums/BackgroundMode";
|
|
@@ -8,13 +8,22 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
8
8
|
private static _metallicProp;
|
|
9
9
|
private static _roughnessProp;
|
|
10
10
|
private static _roughnessMetallicTextureProp;
|
|
11
|
+
private static _iorProp;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Index Of Refraction.
|
|
14
|
+
* @defaultValue `1.5`
|
|
15
|
+
*/
|
|
16
|
+
get ior(): number;
|
|
17
|
+
set ior(v: number);
|
|
18
|
+
/**
|
|
19
|
+
* Metallic.
|
|
20
|
+
* @defaultValue `1.0`
|
|
13
21
|
*/
|
|
14
22
|
get metallic(): number;
|
|
15
23
|
set metallic(value: number);
|
|
16
24
|
/**
|
|
17
|
-
* Roughness
|
|
25
|
+
* Roughness. default 1.0.
|
|
26
|
+
* @defaultValue `1.0`
|
|
18
27
|
*/
|
|
19
28
|
get roughness(): number;
|
|
20
29
|
set roughness(value: number);
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
-
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
1
|
import { Renderer } from "../Renderer";
|
|
4
|
-
import { ICustomClone } from "../clone/ComponentCloner";
|
|
5
2
|
import { Mesh } from "../graphic/Mesh";
|
|
6
3
|
/**
|
|
7
4
|
* MeshRenderer Component.
|
|
8
5
|
*/
|
|
9
|
-
export declare class MeshRenderer extends Renderer
|
|
6
|
+
export declare class MeshRenderer extends Renderer {
|
|
10
7
|
private static _uvMacro;
|
|
11
8
|
private static _uv1Macro;
|
|
12
9
|
private static _normalMacro;
|
|
13
10
|
private static _tangentMacro;
|
|
14
|
-
private static
|
|
11
|
+
private static _enableVertexColorMacro;
|
|
12
|
+
private _enableVertexColor;
|
|
15
13
|
/**
|
|
16
14
|
* Mesh assigned to the renderer.
|
|
17
15
|
*/
|
|
18
16
|
get mesh(): Mesh;
|
|
19
17
|
set mesh(value: Mesh);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Whether enable vertex color.
|
|
20
|
+
*/
|
|
21
|
+
get enableVertexColor(): boolean;
|
|
22
|
+
set enableVertexColor(value: boolean);
|
|
23
23
|
private _setMesh;
|
|
24
24
|
private _onMeshChanged;
|
|
25
25
|
}
|
|
@@ -216,7 +216,6 @@ export declare class ModelMesh extends Mesh {
|
|
|
216
216
|
* @remark based on http://foundationsofgameenginedev.com/FGED2-sample.pdf
|
|
217
217
|
*/
|
|
218
218
|
calculateTangents(): void;
|
|
219
|
-
protected _onDestroy(): void;
|
|
220
219
|
private _supplementaryVertexElements;
|
|
221
220
|
private _updateVertexElements;
|
|
222
221
|
private _updateVertices;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
2
|
import { Entity } from "../Entity";
|
|
3
|
-
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
3
|
import { MeshRenderer } from "./MeshRenderer";
|
|
5
4
|
import { Skin } from "./Skin";
|
|
6
5
|
/**
|
|
@@ -41,9 +40,6 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
|
|
|
41
40
|
*/
|
|
42
41
|
get rootBone(): Entity;
|
|
43
42
|
set rootBone(value: Entity);
|
|
44
|
-
protected _updateShaderData(context: RenderContext): void;
|
|
45
|
-
protected _registerEntityTransformListener(): void;
|
|
46
|
-
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
47
43
|
private _initSkin;
|
|
48
44
|
private _computeApproximateBindMatrix;
|
|
49
45
|
private _findByEntityName;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Ray, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Layer } from "../Layer";
|
|
3
|
+
import { Scene } from "../Scene";
|
|
4
|
+
import { HitResult } from "./HitResult";
|
|
5
|
+
/**
|
|
6
|
+
* A physics scene is a collection of colliders and constraints which can interact.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PhysicsScene {
|
|
9
|
+
private static _collision;
|
|
10
|
+
private _scene;
|
|
11
|
+
private _restTime;
|
|
12
|
+
private _colliders;
|
|
13
|
+
private _gravity;
|
|
14
|
+
private _nativePhysicsScene;
|
|
15
|
+
private _onContactEnter;
|
|
16
|
+
private _onContactExit;
|
|
17
|
+
private _onContactStay;
|
|
18
|
+
private _onTriggerEnter;
|
|
19
|
+
private _onTriggerExit;
|
|
20
|
+
private _onTriggerStay;
|
|
21
|
+
/** The fixed time step in seconds at which physics are performed. */
|
|
22
|
+
fixedTimeStep: number;
|
|
23
|
+
/**
|
|
24
|
+
* The gravity of physics scene.
|
|
25
|
+
*/
|
|
26
|
+
get gravity(): Vector3;
|
|
27
|
+
set gravity(value: Vector3);
|
|
28
|
+
constructor(scene: Scene);
|
|
29
|
+
/**
|
|
30
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
31
|
+
* @param ray - The ray
|
|
32
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
33
|
+
*/
|
|
34
|
+
raycast(ray: Ray): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
37
|
+
* @param ray - The ray
|
|
38
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
39
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
40
|
+
*/
|
|
41
|
+
raycast(ray: Ray, outHitResult: HitResult): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
44
|
+
* @param ray - The ray
|
|
45
|
+
* @param distance - The max distance the ray should check
|
|
46
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
47
|
+
*/
|
|
48
|
+
raycast(ray: Ray, distance: number): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
51
|
+
* @param ray - The ray
|
|
52
|
+
* @param distance - The max distance the ray should check
|
|
53
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
54
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
55
|
+
*/
|
|
56
|
+
raycast(ray: Ray, distance: number, outHitResult: HitResult): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
59
|
+
* @param ray - The ray
|
|
60
|
+
* @param distance - The max distance the ray should check
|
|
61
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
62
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
63
|
+
*/
|
|
64
|
+
raycast(ray: Ray, distance: number, layerMask: Layer): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
67
|
+
* @param ray - The ray
|
|
68
|
+
* @param distance - The max distance the ray should check
|
|
69
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
70
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
71
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false.
|
|
72
|
+
*/
|
|
73
|
+
raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
|
|
74
|
+
private _setGravity;
|
|
75
|
+
}
|
package/types/shader/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BlendState } from "./BlendState";
|
|
2
|
+
export { DepthState } from "./DepthState";
|
|
3
|
+
export { RasterState } from "./RasterState";
|
|
4
|
+
export { RenderState } from "./RenderState";
|
|
5
|
+
export { RenderTargetBlendState } from "./RenderTargetBlendState";
|
|
6
|
+
export { StencilState } from "./StencilState";
|
|
@@ -12,6 +12,7 @@ export declare class CascadedShadowCasterPass {
|
|
|
12
12
|
private static _shadowSplitSpheresProperty;
|
|
13
13
|
private static _maxCascades;
|
|
14
14
|
private static _cascadesSplitDistance;
|
|
15
|
+
private static _viewport;
|
|
15
16
|
private static _clearColor;
|
|
16
17
|
private static _tempVector;
|
|
17
18
|
private static _tempMatrix0;
|