@galacean/engine-core 1.6.0-alpha.2 → 1.6.0-beta.1
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 +242 -250
- package/dist/main.js.map +1 -1
- package/dist/module.js +241 -249
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/physics/PhysicsScene.d.ts +116 -4
- package/types/shader/Shader.d.ts +5 -2
- package/types/shader/ShaderPass.d.ts +0 -9
- package/types/shader/enums/ShaderLanguage.d.ts +9 -0
- package/types/shader/index.d.ts +3 -3
- package/types/shader/enums/ShaderPlatformTarget.d.ts +0 -4
- package/types/shader/enums/ShaderType.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.6.0-
|
|
3
|
+
"version": "1.6.0-beta.1",
|
|
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.6.0-
|
|
21
|
+
"@galacean/engine-math": "1.6.0-beta.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "1.6.0-
|
|
24
|
+
"@galacean/engine-design": "1.6.0-beta.1"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
|
@@ -91,6 +91,42 @@ export declare class PhysicsScene {
|
|
|
91
91
|
* @returns Returns True if the ray intersects with a collider, otherwise false.
|
|
92
92
|
*/
|
|
93
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
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
100
|
+
*/
|
|
101
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
104
|
+
* @param center - The center of the box
|
|
105
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
106
|
+
* @param direction - The direction to sweep along
|
|
107
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
108
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
109
|
+
*/
|
|
110
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, outHitResult: HitResult): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
113
|
+
* @param center - The center of the box
|
|
114
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
115
|
+
* @param direction - The direction to sweep along
|
|
116
|
+
* @param distance - The max distance to sweep
|
|
117
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
118
|
+
*/
|
|
119
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, distance: number): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
122
|
+
* @param center - The center of the box
|
|
123
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
124
|
+
* @param direction - The direction to sweep along
|
|
125
|
+
* @param distance - The max distance to sweep
|
|
126
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
127
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
128
|
+
*/
|
|
129
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
|
|
94
130
|
/**
|
|
95
131
|
* Casts a box through the Scene and returns true if there is any hit.
|
|
96
132
|
* @param center - The center of the box
|
|
@@ -102,7 +138,43 @@ export declare class PhysicsScene {
|
|
|
102
138
|
* @param outHitResult - Optional HitResult object to store detailed hit information
|
|
103
139
|
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
104
140
|
*/
|
|
105
|
-
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, orientation
|
|
141
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, orientation: Quaternion, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
144
|
+
* @param center - The center of the sphere
|
|
145
|
+
* @param radius - The radius of the sphere
|
|
146
|
+
* @param direction - The direction to sweep along
|
|
147
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
148
|
+
*/
|
|
149
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
152
|
+
* @param center - The center of the sphere
|
|
153
|
+
* @param radius - The radius of the sphere
|
|
154
|
+
* @param direction - The direction to sweep along
|
|
155
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
156
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
157
|
+
*/
|
|
158
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, outHitResult: HitResult): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
161
|
+
* @param center - The center of the sphere
|
|
162
|
+
* @param radius - The radius of the sphere
|
|
163
|
+
* @param direction - The direction to sweep along
|
|
164
|
+
* @param distance - The max distance to sweep
|
|
165
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
166
|
+
*/
|
|
167
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
170
|
+
* @param center - The center of the sphere
|
|
171
|
+
* @param radius - The radius of the sphere
|
|
172
|
+
* @param direction - The direction to sweep along
|
|
173
|
+
* @param distance - The max distance to sweep
|
|
174
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
175
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
176
|
+
*/
|
|
177
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
|
|
106
178
|
/**
|
|
107
179
|
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
108
180
|
* @param center - The center of the sphere
|
|
@@ -111,9 +183,49 @@ export declare class PhysicsScene {
|
|
|
111
183
|
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
112
184
|
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
113
185
|
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
114
|
-
* @returns Returns
|
|
186
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
187
|
+
*/
|
|
188
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
191
|
+
* @param center - The center of the capsule
|
|
192
|
+
* @param radius - The radius of the capsule
|
|
193
|
+
* @param height - The height of the capsule
|
|
194
|
+
* @param direction - The direction to sweep along
|
|
195
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
196
|
+
*/
|
|
197
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
200
|
+
* @param center - The center of the capsule
|
|
201
|
+
* @param radius - The radius of the capsule
|
|
202
|
+
* @param height - The height of the capsule
|
|
203
|
+
* @param direction - The direction to sweep along
|
|
204
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
205
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
206
|
+
*/
|
|
207
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, outHitResult: HitResult): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
210
|
+
* @param center - The center of the capsule
|
|
211
|
+
* @param radius - The radius of the capsule
|
|
212
|
+
* @param height - The height of the capsule
|
|
213
|
+
* @param direction - The direction to sweep along
|
|
214
|
+
* @param distance - The max distance to sweep
|
|
215
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
216
|
+
*/
|
|
217
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, distance: number): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
220
|
+
* @param center - The center of the capsule
|
|
221
|
+
* @param radius - The radius of the capsule
|
|
222
|
+
* @param height - The height of the capsule
|
|
223
|
+
* @param direction - The direction to sweep along
|
|
224
|
+
* @param distance - The max distance to sweep
|
|
225
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
226
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
115
227
|
*/
|
|
116
|
-
|
|
228
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
|
|
117
229
|
/**
|
|
118
230
|
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
119
231
|
* @param center - The center of the capsule
|
|
@@ -126,7 +238,7 @@ export declare class PhysicsScene {
|
|
|
126
238
|
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
127
239
|
* @returns Returns True if the capsule intersects with any collider, otherwise false
|
|
128
240
|
*/
|
|
129
|
-
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, orientation
|
|
241
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, orientation: Quaternion, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
|
|
130
242
|
/**
|
|
131
243
|
* Get all colliders that overlap with a box in the scene.
|
|
132
244
|
* @param center - The center of the box
|
package/types/shader/Shader.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ShaderMacro } from "./ShaderMacro";
|
|
|
4
4
|
import { ShaderPass } from "./ShaderPass";
|
|
5
5
|
import { ShaderProperty } from "./ShaderProperty";
|
|
6
6
|
import { SubShader } from "./SubShader";
|
|
7
|
+
import { ShaderLanguage } from "./enums/ShaderLanguage";
|
|
7
8
|
/**
|
|
8
9
|
* Shader for rendering.
|
|
9
10
|
*/
|
|
@@ -24,13 +25,15 @@ export declare class Shader implements IReferable {
|
|
|
24
25
|
* ...
|
|
25
26
|
* ```
|
|
26
27
|
*
|
|
27
|
-
* @param shaderSource -
|
|
28
|
+
* @param shaderSource - Shader code
|
|
29
|
+
* @param platformTarget - Shader platform target, @defaultValue ShaderLanguage.GLSLES300
|
|
30
|
+
* @param path - Shader location path
|
|
28
31
|
* @returns Shader
|
|
29
32
|
*
|
|
30
33
|
* @throws
|
|
31
34
|
* Throw string exception if shaderLab has not been enabled properly.
|
|
32
35
|
*/
|
|
33
|
-
static create(shaderSource: string): Shader;
|
|
36
|
+
static create(shaderSource: string, platformTarget?: ShaderLanguage, path?: string): Shader;
|
|
34
37
|
/**
|
|
35
38
|
* Create a shader.
|
|
36
39
|
* @param name - Name of the shader
|
|
@@ -6,11 +6,6 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
6
6
|
private static _shaderPassCounter;
|
|
7
7
|
private _vertexSource;
|
|
8
8
|
private _fragmentSource;
|
|
9
|
-
private readonly _type;
|
|
10
|
-
private readonly _shaderLabSource;
|
|
11
|
-
private readonly _vertexEntry;
|
|
12
|
-
private readonly _fragmentEntry;
|
|
13
|
-
private _platformMacros;
|
|
14
9
|
/**
|
|
15
10
|
* Create a shader pass.
|
|
16
11
|
* @param name - Shader pass name
|
|
@@ -26,9 +21,5 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
26
21
|
* @param tags - Tags
|
|
27
22
|
*/
|
|
28
23
|
constructor(vertexSource: string, fragmentSource: string, tags?: Record<string, number | string | boolean>);
|
|
29
|
-
/**
|
|
30
|
-
* Shader Lab compilation
|
|
31
|
-
*/
|
|
32
|
-
private _compileShaderProgram;
|
|
33
24
|
private _getCanonicalShaderProgram;
|
|
34
25
|
}
|
package/types/shader/index.d.ts
CHANGED
|
@@ -3,17 +3,17 @@ export { BlendOperation } from "./enums/BlendOperation";
|
|
|
3
3
|
export { ColorWriteMask } from "./enums/ColorWriteMask";
|
|
4
4
|
export { CompareFunction } from "./enums/CompareFunction";
|
|
5
5
|
export { CullMode } from "./enums/CullMode";
|
|
6
|
-
export { RenderStateElementKey as RenderStateDataKey } from "./enums/RenderStateElementKey";
|
|
7
6
|
export { RenderQueueType } from "./enums/RenderQueueType";
|
|
7
|
+
export { RenderStateElementKey } from "./enums/RenderStateElementKey";
|
|
8
8
|
export { ShaderDataGroup } from "./enums/ShaderDataGroup";
|
|
9
|
+
export { ShaderLanguage } from "./enums/ShaderLanguage";
|
|
9
10
|
export { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
10
11
|
export { StencilOperation } from "./enums/StencilOperation";
|
|
11
|
-
export { ShaderPlatformTarget } from "./enums/ShaderPlatformTarget";
|
|
12
12
|
export { Shader } from "./Shader";
|
|
13
13
|
export { ShaderData } from "./ShaderData";
|
|
14
14
|
export { ShaderMacro } from "./ShaderMacro";
|
|
15
15
|
export { ShaderPass } from "./ShaderPass";
|
|
16
16
|
export { ShaderProperty } from "./ShaderProperty";
|
|
17
17
|
export { ShaderTagKey } from "./ShaderTagKey";
|
|
18
|
-
export { SubShader } from "./SubShader";
|
|
19
18
|
export * from "./state";
|
|
19
|
+
export { SubShader } from "./SubShader";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|