@galacean/engine-core 0.0.0-experimental-shaderlab.0 → 0.0.0-experimental-uploadSameBuffer.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 +328 -91
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +328 -91
- package/dist/module.js +328 -91
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/mesh/PrimitiveMesh.d.ts +22 -0
- package/types/physics/PhysicsManager.d.ts +2 -4
- package/types/shader/Shader.d.ts +2 -15
- package/types/2d/data/RenderData2D.d.ts +0 -1
- package/types/RenderPipeline/MeshRenderElement.d.ts +0 -19
- package/types/RenderPipeline/SpriteElement.d.ts +0 -15
- package/types/RenderPipeline/SpriteMaskElement.d.ts +0 -12
- package/types/RenderPipeline/TextRenderElement.d.ts +0 -8
- package/types/animation/AnimatorLayerMask.d.ts +0 -45
- package/types/animation/LayerPathMask.d.ts +0 -16
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +0 -7
- package/types/asset/IRefObject.d.ts +0 -2
- package/types/asset/RefObject.d.ts +0 -27
- package/types/base/Event.d.ts +0 -24
- package/types/base/Util.d.ts +0 -14
- package/types/enums/CameraType.d.ts +0 -1
- package/types/xr/XRManager.d.ts +0 -5
- /package/types/RenderPipeline/{index.d.ts → Index.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-uploadSameBuffer.0",
|
|
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": "0.0.0-experimental-
|
|
18
|
+
"@galacean/engine-math": "0.0.0-experimental-uploadSameBuffer.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "0.0.0-experimental-
|
|
21
|
+
"@galacean/engine-design": "0.0.0-experimental-uploadSameBuffer.0"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -6,6 +6,10 @@ import { ModelMesh } from "./ModelMesh";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class PrimitiveMesh {
|
|
8
8
|
private static _tempVec30;
|
|
9
|
+
private static readonly _sphereSeedPositions;
|
|
10
|
+
private static readonly _sphereSeedCells;
|
|
11
|
+
private static _sphereEdgeIdx;
|
|
12
|
+
private static _spherePoleIdx;
|
|
9
13
|
/**
|
|
10
14
|
* Create a sphere mesh.
|
|
11
15
|
* @param engine - Engine
|
|
@@ -15,6 +19,16 @@ export declare class PrimitiveMesh {
|
|
|
15
19
|
* @returns Sphere model mesh
|
|
16
20
|
*/
|
|
17
21
|
static createSphere(engine: Engine, radius?: number, segments?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
22
|
+
/**
|
|
23
|
+
* Create a sphere mesh by implementing Catmull-Clark Surface Subdivision Algorithm.
|
|
24
|
+
* Max step is limited to 6.
|
|
25
|
+
* @param engine - Engine
|
|
26
|
+
* @param radius - Sphere radius
|
|
27
|
+
* @param step - Number of subdiv steps
|
|
28
|
+
* @param noLongerAccessible - No longer access the vertices of the mesh after creation
|
|
29
|
+
* @returns Sphere model mesh
|
|
30
|
+
*/
|
|
31
|
+
static createSubdivisionSurfaceSphere(engine: Engine, radius?: number, step?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
18
32
|
/**
|
|
19
33
|
* Create a cuboid mesh.
|
|
20
34
|
* @param engine - Engine
|
|
@@ -82,6 +96,14 @@ export declare class PrimitiveMesh {
|
|
|
82
96
|
* @returns Capsule model mesh
|
|
83
97
|
*/
|
|
84
98
|
static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
99
|
+
/**
|
|
100
|
+
* Duplicate vertices at the poles and adjust their UV coordinates.
|
|
101
|
+
*/
|
|
102
|
+
private static _generateAndReplacePoleUV;
|
|
103
|
+
/**
|
|
104
|
+
* Get edge point index for subdivision surface sphere.
|
|
105
|
+
*/
|
|
106
|
+
private static _calculateEdgeIndex;
|
|
85
107
|
static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
86
108
|
static _setCapsuleData(capsuleMesh: ModelMesh, radius: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
87
109
|
private static _initialize;
|
|
@@ -9,7 +9,6 @@ export declare class PhysicsManager {
|
|
|
9
9
|
private static _collision;
|
|
10
10
|
private _engine;
|
|
11
11
|
private _restTime;
|
|
12
|
-
private _fixedTimeStep;
|
|
13
12
|
private _colliders;
|
|
14
13
|
private _gravity;
|
|
15
14
|
private _nativePhysicsManager;
|
|
@@ -20,14 +19,13 @@ export declare class PhysicsManager {
|
|
|
20
19
|
private _onTriggerEnter;
|
|
21
20
|
private _onTriggerExit;
|
|
22
21
|
private _onTriggerStay;
|
|
22
|
+
/** The fixed time step in seconds at which physics are performed. */
|
|
23
|
+
fixedTimeStep: number;
|
|
23
24
|
/**
|
|
24
25
|
* The gravity of physics scene.
|
|
25
26
|
*/
|
|
26
27
|
get gravity(): Vector3;
|
|
27
28
|
set gravity(value: Vector3);
|
|
28
|
-
/** The fixed time step in seconds at which physics are performed. */
|
|
29
|
-
get fixedTimeStep(): number;
|
|
30
|
-
set fixedTimeStep(value: number);
|
|
31
29
|
constructor(engine: Engine);
|
|
32
30
|
/**
|
|
33
31
|
* Casts a ray through the Scene and returns the first hit.
|
package/types/shader/Shader.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Engine } from "../Engine";
|
|
2
|
-
import { IReferable } from "../asset/IReferable";
|
|
3
2
|
import { ShaderMacro } from "./ShaderMacro";
|
|
4
3
|
import { ShaderPass } from "./ShaderPass";
|
|
5
4
|
import { ShaderProperty } from "./ShaderProperty";
|
|
@@ -7,7 +6,7 @@ import { SubShader } from "./SubShader";
|
|
|
7
6
|
/**
|
|
8
7
|
* Shader for rendering.
|
|
9
8
|
*/
|
|
10
|
-
export declare class Shader
|
|
9
|
+
export declare class Shader {
|
|
11
10
|
readonly name: string;
|
|
12
11
|
private static _shaderMap;
|
|
13
12
|
/**
|
|
@@ -58,18 +57,11 @@ export declare class Shader implements IReferable {
|
|
|
58
57
|
* @param name - Name of the shader
|
|
59
58
|
*/
|
|
60
59
|
static find(name: string): Shader;
|
|
61
|
-
private static _applyConstRenderStates;
|
|
62
|
-
private _refCount;
|
|
63
|
-
private _destroyed;
|
|
64
60
|
private _subShaders;
|
|
65
61
|
/**
|
|
66
62
|
* Sub shaders of the shader.
|
|
67
63
|
*/
|
|
68
64
|
get subShaders(): ReadonlyArray<SubShader>;
|
|
69
|
-
/**
|
|
70
|
-
* Whether it has been destroyed.
|
|
71
|
-
*/
|
|
72
|
-
get destroyed(): boolean;
|
|
73
65
|
private constructor();
|
|
74
66
|
/**
|
|
75
67
|
* Compile shader variant by macro name list.
|
|
@@ -82,12 +74,7 @@ export declare class Shader implements IReferable {
|
|
|
82
74
|
* @returns Is the compiled shader variant valid
|
|
83
75
|
*/
|
|
84
76
|
compileVariant(engine: Engine, macros: string[]): boolean;
|
|
85
|
-
|
|
86
|
-
* Destroy the shader.
|
|
87
|
-
* @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
|
|
88
|
-
* @returns Whether the release was successful.
|
|
89
|
-
*/
|
|
90
|
-
destroy(force?: boolean): boolean;
|
|
77
|
+
private static _applyConstRenderStates;
|
|
91
78
|
/**
|
|
92
79
|
* @deprecated Please use `ShaderMacro.getByName` instead
|
|
93
80
|
*
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Mesh } from "../graphic/Mesh";
|
|
2
|
-
import { SubMesh } from "../graphic/SubMesh";
|
|
3
|
-
import { Material } from "../material/Material";
|
|
4
|
-
import { Renderer } from "../Renderer";
|
|
5
|
-
import { ShaderPass } from "../shader/ShaderPass";
|
|
6
|
-
import { RenderState } from "../shader/state/RenderState";
|
|
7
|
-
import { IPoolElement } from "./IPoolElement";
|
|
8
|
-
import { RenderElement } from "./RenderElement";
|
|
9
|
-
/**
|
|
10
|
-
* Render element.
|
|
11
|
-
*/
|
|
12
|
-
export declare class MeshRenderElement extends RenderElement implements IPoolElement {
|
|
13
|
-
/** Mesh. */
|
|
14
|
-
mesh: Mesh;
|
|
15
|
-
/** Sub mesh. */
|
|
16
|
-
subMesh: SubMesh;
|
|
17
|
-
setValue(component: Renderer, mesh: Mesh, subMesh: SubMesh, material: Material, renderState: RenderState, shaderPass: ShaderPass): void;
|
|
18
|
-
dispose(): void;
|
|
19
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RenderData2D } from "../2d/data/RenderData2D";
|
|
2
|
-
import { Material } from "../material/Material";
|
|
3
|
-
import { Renderer } from "../Renderer";
|
|
4
|
-
import { ShaderPass } from "../shader";
|
|
5
|
-
import { RenderState } from "../shader/state/RenderState";
|
|
6
|
-
import { Texture2D } from "../texture";
|
|
7
|
-
import { IPoolElement } from "./IPoolElement";
|
|
8
|
-
import { RenderElement } from "./RenderElement";
|
|
9
|
-
export declare class SpriteElement extends RenderElement implements IPoolElement {
|
|
10
|
-
renderData: RenderData2D;
|
|
11
|
-
texture: Texture2D;
|
|
12
|
-
constructor();
|
|
13
|
-
setValue(component: Renderer, renderDate: RenderData2D, material: Material, texture: Texture2D, renderState: RenderState, shaderPass: ShaderPass): void;
|
|
14
|
-
dispose(): void;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RenderData2D } from "../2d/data/RenderData2D";
|
|
2
|
-
import { Material } from "../material/Material";
|
|
3
|
-
import { Renderer } from "../Renderer";
|
|
4
|
-
import { IPoolElement } from "./IPoolElement";
|
|
5
|
-
import { RenderElement } from "./RenderElement";
|
|
6
|
-
export declare class SpriteMaskElement extends RenderElement implements IPoolElement {
|
|
7
|
-
renderData: RenderData2D;
|
|
8
|
-
isAdd: boolean;
|
|
9
|
-
constructor();
|
|
10
|
-
setValue(component: Renderer, renderData: RenderData2D, material: Material): void;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IPoolElement } from "./IPoolElement";
|
|
2
|
-
import { RenderElement } from "./RenderElement";
|
|
3
|
-
import { SpriteElement } from "./SpriteElement";
|
|
4
|
-
export declare class TextRenderElement extends RenderElement implements IPoolElement {
|
|
5
|
-
charElements: SpriteElement[];
|
|
6
|
-
constructor();
|
|
7
|
-
dispose(): void;
|
|
8
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Entity } from "../Entity";
|
|
2
|
-
import { LayerPathMask } from "./LayerPathMask";
|
|
3
|
-
/**
|
|
4
|
-
* AnimatorLayerMask is used to mask out certain entities from being animated by an AnimatorLayer.
|
|
5
|
-
*/
|
|
6
|
-
export declare class AnimatorLayerMask {
|
|
7
|
-
/**
|
|
8
|
-
* Creates an AnimatorLayerMask instance by specifying an entity.
|
|
9
|
-
* This will automatically add path masks for the entity and all its children.
|
|
10
|
-
* @param entity - The root entity to create path masks for
|
|
11
|
-
*/
|
|
12
|
-
static createByEntity(entity: Entity): AnimatorLayerMask;
|
|
13
|
-
private static _addPathMaskWithChildren;
|
|
14
|
-
private _pathMasks;
|
|
15
|
-
private _pathMaskMap;
|
|
16
|
-
/**
|
|
17
|
-
* The list of path masks.
|
|
18
|
-
*/
|
|
19
|
-
get pathMasks(): Readonly<LayerPathMask[]>;
|
|
20
|
-
/**
|
|
21
|
-
* Adds a path mask to the AnimatorLayerMask, the root path is "".
|
|
22
|
-
* @param path - The path to add a mask for
|
|
23
|
-
* @returns The created or existing LayerPathMask
|
|
24
|
-
*/
|
|
25
|
-
addPathMask(path: string): LayerPathMask;
|
|
26
|
-
/**
|
|
27
|
-
* Removes a path mask from the AnimatorLayerMask.
|
|
28
|
-
* @param path - The path of the mask to remove
|
|
29
|
-
*/
|
|
30
|
-
removePathMask(path: any): void;
|
|
31
|
-
/**
|
|
32
|
-
* Get a path mask based on the given path.
|
|
33
|
-
* @param path - The path of the mask to get
|
|
34
|
-
* @returns The LayerPathMask for the given path
|
|
35
|
-
*/
|
|
36
|
-
getPathMask(path: string): LayerPathMask;
|
|
37
|
-
/**
|
|
38
|
-
* Sets the active state of a path mask.
|
|
39
|
-
* If recursive is true, it also sets the active state of all child path masks.
|
|
40
|
-
* @param path - The path of the mask to modify
|
|
41
|
-
* @param active - The active state to set
|
|
42
|
-
* @param withChildren - Whether to apply the active state recursively to child paths
|
|
43
|
-
*/
|
|
44
|
-
setPathMaskActive(path: string, active: boolean, withChildren?: boolean): void;
|
|
45
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LayerPathMask represents a mask for a specific entity in an animation layer.
|
|
3
|
-
* It is used to control the animation whether to be applied to the entity or not.
|
|
4
|
-
*/
|
|
5
|
-
export declare class LayerPathMask {
|
|
6
|
-
/**
|
|
7
|
-
* It identifies a particular entity in the hierarchy.
|
|
8
|
-
* Example: "arm/left/hand" could be a path to the left hand of a character.
|
|
9
|
-
*/
|
|
10
|
-
path: string;
|
|
11
|
-
/**
|
|
12
|
-
* The active property is indicating whether the animation at this path is active or not.
|
|
13
|
-
* When true, the animation for this path is applied; when false, the animation for this path is ignored.
|
|
14
|
-
*/
|
|
15
|
-
active: boolean;
|
|
16
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EngineObject } from "../base/EngineObject";
|
|
2
|
-
import { Engine } from "../Engine";
|
|
3
|
-
import { IRefObject } from "./IRefObject";
|
|
4
|
-
/**
|
|
5
|
-
* The base class of assets, with reference counting capability.
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class RefObject extends EngineObject implements IRefObject {
|
|
8
|
-
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */
|
|
9
|
-
isGCIgnored: boolean;
|
|
10
|
-
private _refCount;
|
|
11
|
-
/**
|
|
12
|
-
* Counted by valid references.
|
|
13
|
-
*/
|
|
14
|
-
get refCount(): number;
|
|
15
|
-
protected constructor(engine: Engine);
|
|
16
|
-
/**
|
|
17
|
-
* Destroy self.
|
|
18
|
-
* @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
|
|
19
|
-
* @returns Whether the release was successful.
|
|
20
|
-
*/
|
|
21
|
-
destroy(force?: boolean): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Called when the resource is destroyed.
|
|
24
|
-
* Subclasses can override this function.
|
|
25
|
-
*/
|
|
26
|
-
protected abstract _onDestroy(): void;
|
|
27
|
-
}
|
package/types/base/Event.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { EventDispatcher } from "./EventDispatcher";
|
|
2
|
-
export type Listener = ((e: Event) => any) & {
|
|
3
|
-
once?: boolean;
|
|
4
|
-
};
|
|
5
|
-
/** Event Object. * @class */
|
|
6
|
-
export declare class Event {
|
|
7
|
-
get propagationStopped(): boolean;
|
|
8
|
-
get target(): EventDispatcher;
|
|
9
|
-
set target(t: EventDispatcher);
|
|
10
|
-
get timeStamp(): number;
|
|
11
|
-
get currentTarget(): EventDispatcher;
|
|
12
|
-
set currentTarget(t: EventDispatcher);
|
|
13
|
-
get bubbles(): boolean;
|
|
14
|
-
get type(): string | number;
|
|
15
|
-
data: any;
|
|
16
|
-
private _timeStamp;
|
|
17
|
-
private _target;
|
|
18
|
-
private _currentTarget;
|
|
19
|
-
private _bubbles;
|
|
20
|
-
private _propagationStopped;
|
|
21
|
-
private _type;
|
|
22
|
-
constructor(type: string | number, target?: EventDispatcher, data?: any, bubbles?: boolean);
|
|
23
|
-
stopPropagation(): void;
|
|
24
|
-
}
|
package/types/base/Util.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const Util: {
|
|
2
|
-
isArray: (value: any) => boolean;
|
|
3
|
-
isArrayLike(x: any): boolean;
|
|
4
|
-
clone<T>(obj: T): T;
|
|
5
|
-
downloadBlob(blob: Blob, fileName?: string): void;
|
|
6
|
-
};
|
|
7
|
-
export declare const isArrayLike: <T>(x: any) => x is ArrayLike<T>;
|
|
8
|
-
/**
|
|
9
|
-
* Fastly remove an element from array.
|
|
10
|
-
* @param array - Array
|
|
11
|
-
* @param item - Element
|
|
12
|
-
*/
|
|
13
|
-
export declare function removeFromArray(array: any[], item: any): boolean;
|
|
14
|
-
export declare function ObjectValues(obj: any): any[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/xr/XRManager.d.ts
DELETED
|
File without changes
|