@galacean/engine-core 1.5.13 → 1.6.0-alpha.0
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 +425 -316
- package/dist/main.js.map +1 -1
- package/dist/module.js +425 -315
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Engine.d.ts +0 -1
- package/types/Transform.d.ts +46 -10
- package/types/asset/AssetPromise.d.ts +6 -5
- package/types/base/Constant.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/material/PBRMaterial.d.ts +116 -3
- package/types/material/index.d.ts +0 -2
- package/types/physics/PhysicsScene.d.ts +72 -1
- package/types/texture/enums/TextureFormat.d.ts +2 -0
- package/types/material/PBRBaseMaterial.d.ts +0 -101
- package/types/material/PBRSpecularMaterial.d.ts +0 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-alpha.0",
|
|
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": "1.
|
|
21
|
+
"@galacean/engine-math": "1.6.0-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "1.
|
|
24
|
+
"@galacean/engine-design": "1.6.0-alpha.0"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
package/types/Engine.d.ts
CHANGED
package/types/Transform.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class Transform extends Component {
|
|
|
29
29
|
private _worldForward;
|
|
30
30
|
private _worldRight;
|
|
31
31
|
private _worldUp;
|
|
32
|
-
|
|
32
|
+
protected _isParentDirty: boolean;
|
|
33
33
|
private _parentTransformCache;
|
|
34
34
|
private _dirtyFlag;
|
|
35
35
|
/**
|
|
@@ -192,7 +192,16 @@ export declare class Transform extends Component {
|
|
|
192
192
|
* @param worldUp - Up direction in world space, default is Vector3(0, 1, 0)
|
|
193
193
|
*/
|
|
194
194
|
lookAt(targetPosition: Vector3, worldUp?: Vector3): void;
|
|
195
|
-
protected
|
|
195
|
+
protected _onLocalMatrixChanging?(): void;
|
|
196
|
+
protected _onWorldMatrixChange(): void;
|
|
197
|
+
protected _isContainDirtyFlags(targetDirtyFlags: number): boolean;
|
|
198
|
+
protected _isContainDirtyFlag(type: number): boolean;
|
|
199
|
+
protected _setDirtyFlagTrue(type: number): void;
|
|
200
|
+
protected _setDirtyFlagFalse(type: number): void;
|
|
201
|
+
protected _worldAssociatedChange(type: number): void;
|
|
202
|
+
protected _getParentTransform(): Transform | null;
|
|
203
|
+
protected _onPositionChanged(): void;
|
|
204
|
+
protected _onWorldPositionChanged(): void;
|
|
196
205
|
/**
|
|
197
206
|
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
198
207
|
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
@@ -239,18 +248,10 @@ export declare class Transform extends Component {
|
|
|
239
248
|
* @param flags - Dirty flag
|
|
240
249
|
*/
|
|
241
250
|
private _updateAllWorldFlag;
|
|
242
|
-
private _getParentTransform;
|
|
243
251
|
private _getScaleMatrix;
|
|
244
|
-
private _isContainDirtyFlags;
|
|
245
|
-
private _isContainDirtyFlag;
|
|
246
|
-
private _setDirtyFlagTrue;
|
|
247
|
-
private _setDirtyFlagFalse;
|
|
248
|
-
private _worldAssociatedChange;
|
|
249
252
|
private _rotateByQuat;
|
|
250
253
|
private _translate;
|
|
251
254
|
private _rotateXYZ;
|
|
252
|
-
private _onPositionChanged;
|
|
253
|
-
private _onWorldPositionChanged;
|
|
254
255
|
private _onRotationChanged;
|
|
255
256
|
private _onWorldRotationChanged;
|
|
256
257
|
private _onRotationQuaternionChanged;
|
|
@@ -264,3 +265,38 @@ export declare class Transform extends Component {
|
|
|
264
265
|
*/
|
|
265
266
|
registerWorldChangeFlag(): BoolUpdateFlag;
|
|
266
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Dirty flag of transform.
|
|
270
|
+
*/
|
|
271
|
+
export declare enum TransformModifyFlags {
|
|
272
|
+
LocalEuler = 1,
|
|
273
|
+
LocalQuat = 2,
|
|
274
|
+
WorldPosition = 4,
|
|
275
|
+
WorldEuler = 8,
|
|
276
|
+
WorldQuat = 16,
|
|
277
|
+
WorldScale = 32,
|
|
278
|
+
LocalMatrix = 64,
|
|
279
|
+
WorldMatrix = 128,
|
|
280
|
+
/** This is an internal flag used to assist in determining the dispatch
|
|
281
|
+
* of world scaling dirty flags in the case of non-uniform scaling.
|
|
282
|
+
*/
|
|
283
|
+
IsWorldUniformScaling = 256,
|
|
284
|
+
/** WorldMatrix | WorldPosition */
|
|
285
|
+
WmWp = 132,
|
|
286
|
+
/** WorldMatrix | WorldEuler | WorldQuat */
|
|
287
|
+
WmWeWq = 152,
|
|
288
|
+
/** WorldMatrix | WorldEuler | WorldQuat | WorldScale*/
|
|
289
|
+
WmWeWqWs = 184,
|
|
290
|
+
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat */
|
|
291
|
+
WmWpWeWq = 156,
|
|
292
|
+
/** WorldMatrix | WorldScale */
|
|
293
|
+
WmWs = 160,
|
|
294
|
+
/** WorldMatrix | WorldScale | WorldUniformScaling */
|
|
295
|
+
WmWsWus = 416,
|
|
296
|
+
/** WorldMatrix | WorldPosition | WorldScale */
|
|
297
|
+
WmWpWs = 164,
|
|
298
|
+
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale */
|
|
299
|
+
WmWpWeWqWs = 188,
|
|
300
|
+
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */
|
|
301
|
+
WmWpWeWqWsWus = 444
|
|
302
|
+
}
|
|
@@ -66,12 +66,13 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
|
66
66
|
*/
|
|
67
67
|
catch(onRejected: (reason: any) => any): AssetPromise<T>;
|
|
68
68
|
/**
|
|
69
|
-
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected).
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @
|
|
69
|
+
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected).
|
|
70
|
+
* The callback result is ignored and the original value/reason is preserved per Promise spec.
|
|
71
|
+
* Returns an AssetPromise to keep chainability with AssetPromise methods.
|
|
72
|
+
* @param onFinally - The callback to execute when the Promise is settled.
|
|
73
|
+
* @returns An AssetPromise for the completion of the callback.
|
|
73
74
|
*/
|
|
74
|
-
finally(onFinally?: () => void):
|
|
75
|
+
finally(onFinally?: () => void): AssetPromise<T>;
|
|
75
76
|
/**
|
|
76
77
|
* Cancel promise request.
|
|
77
78
|
* @returns Asset promise
|
package/types/base/Constant.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export declare enum GLCapabilityType {
|
|
|
99
99
|
fragDepth = "EXT_frag_depth",
|
|
100
100
|
astc = "WEBGL_compressed_texture_astc",
|
|
101
101
|
astc_webkit = "WEBKIT_WEBGL_compressed_texture_astc",
|
|
102
|
+
astc_hdr = "WEBGL_compressed_texture_astc_hdr",
|
|
102
103
|
etc = "WEBGL_compressed_texture_etc",
|
|
103
104
|
etc_webkit = "WEBKIT_WEBGL_compressed_texture_etc",
|
|
104
105
|
etc1 = "WEBGL_compressed_texture_etc1",
|
package/types/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { Script } from "./Script";
|
|
|
11
11
|
export { Renderer, RendererUpdateFlags } from "./Renderer";
|
|
12
12
|
export { dependentComponents, DependentMode } from "./ComponentsDependencies";
|
|
13
13
|
export { Camera } from "./Camera";
|
|
14
|
-
export { Transform } from "./Transform";
|
|
14
|
+
export { Transform, TransformModifyFlags } from "./Transform";
|
|
15
15
|
export { BoolUpdateFlag } from "./BoolUpdateFlag";
|
|
16
16
|
export type { EngineSettings } from "./EngineSettings";
|
|
17
17
|
export type { EngineConfiguration } from "./Engine";
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { Color, Vector2 } from "@galacean/engine-math";
|
|
1
|
+
import { Color, Vector2, Vector4 } from "@galacean/engine-math";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
3
|
import { Texture2D } from "../texture/Texture2D";
|
|
4
|
-
import {
|
|
4
|
+
import { BaseMaterial } from "./BaseMaterial";
|
|
5
5
|
import { RefractionMode } from "./enums/Refraction";
|
|
6
|
+
import { TextureCoordinate } from "./enums/TextureCoordinate";
|
|
6
7
|
/**
|
|
7
8
|
* PBR (Metallic-Roughness Workflow) Material.
|
|
8
9
|
*/
|
|
9
|
-
export declare class PBRMaterial extends
|
|
10
|
+
export declare class PBRMaterial extends BaseMaterial {
|
|
11
|
+
private static _occlusionTextureIntensityProp;
|
|
12
|
+
private static _occlusionTextureCoordProp;
|
|
13
|
+
private static _occlusionTextureProp;
|
|
14
|
+
private static _clearCoatProp;
|
|
15
|
+
private static _clearCoatTextureProp;
|
|
16
|
+
private static _clearCoatRoughnessProp;
|
|
17
|
+
private static _clearCoatRoughnessTextureProp;
|
|
18
|
+
private static _clearCoatNormalTextureProp;
|
|
10
19
|
private static _metallicProp;
|
|
11
20
|
private static _roughnessProp;
|
|
12
21
|
private static _roughnessMetallicTextureProp;
|
|
@@ -30,10 +39,92 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
30
39
|
private static _attenuationDistanceProp;
|
|
31
40
|
private static _thicknessProp;
|
|
32
41
|
private static _thicknessTextureProp;
|
|
42
|
+
private static _specularTextureMacro;
|
|
43
|
+
private static _specularColorTextureMacro;
|
|
44
|
+
private static _specularIntensityProp;
|
|
45
|
+
private static _specularColorProp;
|
|
46
|
+
private static _specularIntensityTextureProp;
|
|
47
|
+
private static _specularColorTextureProp;
|
|
33
48
|
private _refractionMode;
|
|
34
49
|
private _anisotropyRotation;
|
|
35
50
|
private _iridescenceRange;
|
|
36
51
|
private _sheenEnabled;
|
|
52
|
+
/**
|
|
53
|
+
* Base color.
|
|
54
|
+
*/
|
|
55
|
+
get baseColor(): Color;
|
|
56
|
+
set baseColor(value: Color);
|
|
57
|
+
/**
|
|
58
|
+
* Base texture.
|
|
59
|
+
*/
|
|
60
|
+
get baseTexture(): Texture2D;
|
|
61
|
+
set baseTexture(value: Texture2D);
|
|
62
|
+
/**
|
|
63
|
+
* Normal texture.
|
|
64
|
+
*/
|
|
65
|
+
get normalTexture(): Texture2D;
|
|
66
|
+
set normalTexture(value: Texture2D);
|
|
67
|
+
/**
|
|
68
|
+
* Normal texture intensity.
|
|
69
|
+
*/
|
|
70
|
+
get normalTextureIntensity(): number;
|
|
71
|
+
set normalTextureIntensity(value: number);
|
|
72
|
+
/**
|
|
73
|
+
* Emissive color.
|
|
74
|
+
*/
|
|
75
|
+
get emissiveColor(): Color;
|
|
76
|
+
set emissiveColor(value: Color);
|
|
77
|
+
/**
|
|
78
|
+
* Emissive texture.
|
|
79
|
+
*/
|
|
80
|
+
get emissiveTexture(): Texture2D;
|
|
81
|
+
set emissiveTexture(value: Texture2D);
|
|
82
|
+
/**
|
|
83
|
+
* Occlusion texture.
|
|
84
|
+
*/
|
|
85
|
+
get occlusionTexture(): Texture2D;
|
|
86
|
+
set occlusionTexture(value: Texture2D);
|
|
87
|
+
/**
|
|
88
|
+
* Occlusion texture intensity.
|
|
89
|
+
*/
|
|
90
|
+
get occlusionTextureIntensity(): number;
|
|
91
|
+
set occlusionTextureIntensity(value: number);
|
|
92
|
+
/**
|
|
93
|
+
* Occlusion texture uv coordinate.
|
|
94
|
+
* @remarks Must be UV0 or UV1.
|
|
95
|
+
*/
|
|
96
|
+
get occlusionTextureCoord(): TextureCoordinate;
|
|
97
|
+
set occlusionTextureCoord(value: TextureCoordinate);
|
|
98
|
+
/**
|
|
99
|
+
* Tiling and offset of main textures.
|
|
100
|
+
*/
|
|
101
|
+
get tilingOffset(): Vector4;
|
|
102
|
+
set tilingOffset(value: Vector4);
|
|
103
|
+
/**
|
|
104
|
+
* The clearCoat layer intensity, default 0.
|
|
105
|
+
*/
|
|
106
|
+
get clearCoat(): number;
|
|
107
|
+
set clearCoat(value: number);
|
|
108
|
+
/**
|
|
109
|
+
* The clearCoat layer intensity texture.
|
|
110
|
+
*/
|
|
111
|
+
get clearCoatTexture(): Texture2D;
|
|
112
|
+
set clearCoatTexture(value: Texture2D);
|
|
113
|
+
/**
|
|
114
|
+
* The clearCoat layer roughness, default 0.
|
|
115
|
+
*/
|
|
116
|
+
get clearCoatRoughness(): number;
|
|
117
|
+
set clearCoatRoughness(value: number);
|
|
118
|
+
/**
|
|
119
|
+
* The clearCoat layer roughness texture.
|
|
120
|
+
*/
|
|
121
|
+
get clearCoatRoughnessTexture(): Texture2D;
|
|
122
|
+
set clearCoatRoughnessTexture(value: Texture2D);
|
|
123
|
+
/**
|
|
124
|
+
* The clearCoat normal map texture.
|
|
125
|
+
*/
|
|
126
|
+
get clearCoatNormalTexture(): Texture2D;
|
|
127
|
+
set clearCoatNormalTexture(value: Texture2D);
|
|
37
128
|
/**
|
|
38
129
|
* Index Of Refraction.
|
|
39
130
|
* @defaultValue `1.5`
|
|
@@ -184,6 +275,28 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
184
275
|
*/
|
|
185
276
|
get thicknessTexture(): Texture2D;
|
|
186
277
|
set thicknessTexture(value: Texture2D);
|
|
278
|
+
/**
|
|
279
|
+
* The intensity of the specular reflection.
|
|
280
|
+
* @defaultValue `1.0`
|
|
281
|
+
*/
|
|
282
|
+
get specularIntensity(): number;
|
|
283
|
+
set specularIntensity(value: number);
|
|
284
|
+
/**
|
|
285
|
+
* The F0 color of the specular reflection.
|
|
286
|
+
* @defaultValue `[1,1,1]`
|
|
287
|
+
*/
|
|
288
|
+
get specularColor(): Color;
|
|
289
|
+
set specularColor(value: Color);
|
|
290
|
+
/**
|
|
291
|
+
* The intensity of the specular reflection, stored in alpha(A) channel. This will be multiplied by `specularIntensity`.
|
|
292
|
+
*/
|
|
293
|
+
get specularIntensityTexture(): Texture2D;
|
|
294
|
+
set specularIntensityTexture(value: Texture2D);
|
|
295
|
+
/**
|
|
296
|
+
* The F0 color of the specular reflection, stored in the RGB channels. This will be multiplied by `specularColor`.
|
|
297
|
+
*/
|
|
298
|
+
get specularColorTexture(): Texture2D;
|
|
299
|
+
set specularColorTexture(value: Texture2D);
|
|
187
300
|
/**
|
|
188
301
|
* Create a pbr metallic-roughness workflow material instance.
|
|
189
302
|
* @param engine - Engine to which the material belongs
|
|
@@ -4,8 +4,6 @@ export { BlendMode } from "./enums/BlendMode";
|
|
|
4
4
|
export { RenderFace } from "./enums/RenderFace";
|
|
5
5
|
export { TextureCoordinate } from "./enums/TextureCoordinate";
|
|
6
6
|
export { Material } from "./Material";
|
|
7
|
-
export { PBRBaseMaterial } from "./PBRBaseMaterial";
|
|
8
7
|
export { PBRMaterial } from "./PBRMaterial";
|
|
9
|
-
export { PBRSpecularMaterial } from "./PBRSpecularMaterial";
|
|
10
8
|
export { UnlitMaterial } from "./UnlitMaterial";
|
|
11
9
|
export { RefractionMode } from "./enums/Refraction";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Ray, Vector3 } from "@galacean/engine-math";
|
|
1
|
+
import { Ray, Vector3, Quaternion } from "@galacean/engine-math";
|
|
2
2
|
import { Layer } from "../Layer";
|
|
3
3
|
import { Scene } from "../Scene";
|
|
4
4
|
import { HitResult } from "./HitResult";
|
|
5
|
+
import { ColliderShape } from "./shape";
|
|
5
6
|
/**
|
|
6
7
|
* A physics scene is a collection of colliders and constraints which can interact.
|
|
7
8
|
*/
|
|
8
9
|
export declare class PhysicsScene {
|
|
9
10
|
private static _collision;
|
|
11
|
+
private static _identityQuaternion;
|
|
10
12
|
private _scene;
|
|
11
13
|
private _restTime;
|
|
12
14
|
private _fixedTimeStep;
|
|
@@ -89,5 +91,74 @@ export declare class PhysicsScene {
|
|
|
89
91
|
* @returns Returns True if the ray intersects with a collider, otherwise false.
|
|
90
92
|
*/
|
|
91
93
|
raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
96
|
+
* @param center - The center of the box
|
|
97
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
98
|
+
* @param direction - The direction to sweep along
|
|
99
|
+
* @param orientation - The rotation of the box. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
100
|
+
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
101
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
102
|
+
* @param outHitResult - Optional HitResult object to store detailed hit information
|
|
103
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
104
|
+
*/
|
|
105
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, orientation?: Quaternion, distance?: number, layerMask?: Layer, outHitResult?: HitResult): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
108
|
+
* @param center - The center of the sphere
|
|
109
|
+
* @param radius - The radius of the sphere
|
|
110
|
+
* @param direction - The direction to sweep along
|
|
111
|
+
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
112
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
113
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
114
|
+
* @returns Returns True if the sphere intersects with any collider, otherwise false
|
|
115
|
+
*/
|
|
116
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance?: number, layerMask?: Layer, outHitResult?: HitResult): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
119
|
+
* @param center - The center of the capsule
|
|
120
|
+
* @param radius - The radius of the capsule
|
|
121
|
+
* @param height - The height of the capsule
|
|
122
|
+
* @param direction - The direction to sweep along
|
|
123
|
+
* @param orientation - The rotation of the capsule. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
124
|
+
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
125
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
126
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
127
|
+
* @returns Returns True if the capsule intersects with any collider, otherwise false
|
|
128
|
+
*/
|
|
129
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, orientation?: Quaternion, distance?: number, layerMask?: Layer, outHitResult?: HitResult): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Get all colliders that overlap with a box in the scene.
|
|
132
|
+
* @param center - The center of the box
|
|
133
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
134
|
+
* @param orientation - The rotation of the box. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
135
|
+
* @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
|
|
136
|
+
* @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
|
|
137
|
+
* @returns The collider shapes overlapping with the box
|
|
138
|
+
*/
|
|
139
|
+
overlapBoxAll(center: Vector3, halfExtents: Vector3, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
140
|
+
/**
|
|
141
|
+
* Get all colliders that overlap with a sphere in the scene.
|
|
142
|
+
* @param center - The center of the sphere
|
|
143
|
+
* @param radius - The radius of the sphere
|
|
144
|
+
* @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
|
|
145
|
+
* @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
|
|
146
|
+
* @returns The collider shapes overlapping with the sphere
|
|
147
|
+
*/
|
|
148
|
+
overlapSphereAll(center: Vector3, radius: number, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
149
|
+
/**
|
|
150
|
+
* Get all colliders that overlap with a capsule in the scene.
|
|
151
|
+
* @param center - The center of the capsule
|
|
152
|
+
* @param radius - The radius of the capsule
|
|
153
|
+
* @param height - The height of the capsule
|
|
154
|
+
* @param orientation - The rotation of the capsule. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
155
|
+
* @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
|
|
156
|
+
* @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
|
|
157
|
+
* @returns The collider shapes overlapping with the capsule
|
|
158
|
+
*/
|
|
159
|
+
overlapCapsuleAll(center: Vector3, radius: number, height: number, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
92
160
|
private _setGravity;
|
|
161
|
+
private _createPreFilter;
|
|
162
|
+
private _createHitCallback;
|
|
163
|
+
private _clearHitResult;
|
|
93
164
|
}
|
|
@@ -30,6 +30,8 @@ export declare enum TextureFormat {
|
|
|
30
30
|
BC3 = 11,
|
|
31
31
|
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
32
32
|
BC7 = 12,
|
|
33
|
+
/** RGB HDR compressed format, 8 bits per pixel. */
|
|
34
|
+
BC6H = 100,
|
|
33
35
|
/** RGB compressed format, 4 bits per pixel. */
|
|
34
36
|
ETC1_RGB = 13,
|
|
35
37
|
/** RGB compressed format, 4 bits per pixel. */
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { Color, Vector4 } from "@galacean/engine-math";
|
|
2
|
-
import { Engine } from "../Engine";
|
|
3
|
-
import { Shader } from "../shader/Shader";
|
|
4
|
-
import { Texture2D } from "../texture/Texture2D";
|
|
5
|
-
import { BaseMaterial } from "./BaseMaterial";
|
|
6
|
-
import { TextureCoordinate } from "./enums/TextureCoordinate";
|
|
7
|
-
/**
|
|
8
|
-
* PBR (Physically-Based Rendering) Material.
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class PBRBaseMaterial extends BaseMaterial {
|
|
11
|
-
private static _occlusionTextureIntensityProp;
|
|
12
|
-
private static _occlusionTextureCoordProp;
|
|
13
|
-
private static _occlusionTextureProp;
|
|
14
|
-
private static _clearCoatProp;
|
|
15
|
-
private static _clearCoatTextureProp;
|
|
16
|
-
private static _clearCoatRoughnessProp;
|
|
17
|
-
private static _clearCoatRoughnessTextureProp;
|
|
18
|
-
private static _clearCoatNormalTextureProp;
|
|
19
|
-
/**
|
|
20
|
-
* Base color.
|
|
21
|
-
*/
|
|
22
|
-
get baseColor(): Color;
|
|
23
|
-
set baseColor(value: Color);
|
|
24
|
-
/**
|
|
25
|
-
* Base texture.
|
|
26
|
-
*/
|
|
27
|
-
get baseTexture(): Texture2D;
|
|
28
|
-
set baseTexture(value: Texture2D);
|
|
29
|
-
/**
|
|
30
|
-
* Normal texture.
|
|
31
|
-
*/
|
|
32
|
-
get normalTexture(): Texture2D;
|
|
33
|
-
set normalTexture(value: Texture2D);
|
|
34
|
-
/**
|
|
35
|
-
* Normal texture intensity.
|
|
36
|
-
*/
|
|
37
|
-
get normalTextureIntensity(): number;
|
|
38
|
-
set normalTextureIntensity(value: number);
|
|
39
|
-
/**
|
|
40
|
-
* Emissive color.
|
|
41
|
-
*/
|
|
42
|
-
get emissiveColor(): Color;
|
|
43
|
-
set emissiveColor(value: Color);
|
|
44
|
-
/**
|
|
45
|
-
* Emissive texture.
|
|
46
|
-
*/
|
|
47
|
-
get emissiveTexture(): Texture2D;
|
|
48
|
-
set emissiveTexture(value: Texture2D);
|
|
49
|
-
/**
|
|
50
|
-
* Occlusion texture.
|
|
51
|
-
*/
|
|
52
|
-
get occlusionTexture(): Texture2D;
|
|
53
|
-
set occlusionTexture(value: Texture2D);
|
|
54
|
-
/**
|
|
55
|
-
* Occlusion texture intensity.
|
|
56
|
-
*/
|
|
57
|
-
get occlusionTextureIntensity(): number;
|
|
58
|
-
set occlusionTextureIntensity(value: number);
|
|
59
|
-
/**
|
|
60
|
-
* Occlusion texture uv coordinate.
|
|
61
|
-
* @remarks Must be UV0 or UV1.
|
|
62
|
-
*/
|
|
63
|
-
get occlusionTextureCoord(): TextureCoordinate;
|
|
64
|
-
set occlusionTextureCoord(value: TextureCoordinate);
|
|
65
|
-
/**
|
|
66
|
-
* Tiling and offset of main textures.
|
|
67
|
-
*/
|
|
68
|
-
get tilingOffset(): Vector4;
|
|
69
|
-
set tilingOffset(value: Vector4);
|
|
70
|
-
/**
|
|
71
|
-
* The clearCoat layer intensity, default 0.
|
|
72
|
-
*/
|
|
73
|
-
get clearCoat(): number;
|
|
74
|
-
set clearCoat(value: number);
|
|
75
|
-
/**
|
|
76
|
-
* The clearCoat layer intensity texture.
|
|
77
|
-
*/
|
|
78
|
-
get clearCoatTexture(): Texture2D;
|
|
79
|
-
set clearCoatTexture(value: Texture2D);
|
|
80
|
-
/**
|
|
81
|
-
* The clearCoat layer roughness, default 0.
|
|
82
|
-
*/
|
|
83
|
-
get clearCoatRoughness(): number;
|
|
84
|
-
set clearCoatRoughness(value: number);
|
|
85
|
-
/**
|
|
86
|
-
* The clearCoat layer roughness texture.
|
|
87
|
-
*/
|
|
88
|
-
get clearCoatRoughnessTexture(): Texture2D;
|
|
89
|
-
set clearCoatRoughnessTexture(value: Texture2D);
|
|
90
|
-
/**
|
|
91
|
-
* The clearCoat normal map texture.
|
|
92
|
-
*/
|
|
93
|
-
get clearCoatNormalTexture(): Texture2D;
|
|
94
|
-
set clearCoatNormalTexture(value: Texture2D);
|
|
95
|
-
/**
|
|
96
|
-
* Create a pbr base material instance.
|
|
97
|
-
* @param engine - Engine to which the material belongs
|
|
98
|
-
* @param shader - Shader used by the material
|
|
99
|
-
*/
|
|
100
|
-
protected constructor(engine: Engine, shader: Shader);
|
|
101
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Color } from "@galacean/engine-math";
|
|
2
|
-
import { Engine } from "../Engine";
|
|
3
|
-
import { Texture2D } from "../texture/Texture2D";
|
|
4
|
-
import { PBRBaseMaterial } from "./PBRBaseMaterial";
|
|
5
|
-
/**
|
|
6
|
-
* PBR (Specular-Glossiness Workflow) Material.
|
|
7
|
-
*/
|
|
8
|
-
export declare class PBRSpecularMaterial extends PBRBaseMaterial {
|
|
9
|
-
private static _specularColorProp;
|
|
10
|
-
private static _glossinessProp;
|
|
11
|
-
private static _specularGlossinessTextureProp;
|
|
12
|
-
private static _specularGlossinessTextureMacro;
|
|
13
|
-
/**
|
|
14
|
-
* Specular color.
|
|
15
|
-
*/
|
|
16
|
-
get specularColor(): Color;
|
|
17
|
-
set specularColor(value: Color);
|
|
18
|
-
/**
|
|
19
|
-
* Glossiness.
|
|
20
|
-
*/
|
|
21
|
-
get glossiness(): number;
|
|
22
|
-
set glossiness(value: number);
|
|
23
|
-
/**
|
|
24
|
-
* Specular glossiness texture.
|
|
25
|
-
* @remarks RGB is specular, A is glossiness
|
|
26
|
-
*/
|
|
27
|
-
get specularGlossinessTexture(): Texture2D;
|
|
28
|
-
set specularGlossinessTexture(value: Texture2D);
|
|
29
|
-
/**
|
|
30
|
-
* Create a pbr specular-glossiness workflow material instance.
|
|
31
|
-
* @param engine - Engine to which the material belongs
|
|
32
|
-
*/
|
|
33
|
-
constructor(engine: Engine);
|
|
34
|
-
/**
|
|
35
|
-
* @inheritdoc
|
|
36
|
-
*/
|
|
37
|
-
clone(): PBRSpecularMaterial;
|
|
38
|
-
}
|