@galacean/engine-core 1.0.0-beta.17 → 1.0.0-beta.19
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 +231 -180
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +231 -180
- package/dist/module.js +231 -180
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Entity.d.ts +1 -1
- package/types/RenderPipeline/CullingResults.d.ts +1 -0
- package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
- package/types/Transform.d.ts +1 -0
- package/types/asset/LoadItem.d.ts +16 -9
- package/types/asset/request.d.ts +7 -3
- package/types/base/EventDispatcher.d.ts +1 -1
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/index.d.ts +1 -1
- package/types/shader/enums/RenderStateElementKey.d.ts +58 -0
- package/types/SafeLoopArray.d.ts +0 -37
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.19",
|
|
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.19"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.0.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.0.0-beta.19"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
package/types/Entity.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare class Entity extends EngineObject {
|
|
|
65
65
|
* @param type - The type of the component
|
|
66
66
|
* @returns The first component which match type
|
|
67
67
|
*/
|
|
68
|
-
getComponent<T extends Component>(type: new (entity: Entity) => T): T;
|
|
68
|
+
getComponent<T extends Component>(type: new (entity: Entity) => T): T | null;
|
|
69
69
|
/**
|
|
70
70
|
* Get components which match the type.
|
|
71
71
|
* @param type - The type of the component
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { CullingResults } from "../RenderPipeline/CullingResults";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
|
+
/**
|
|
5
|
+
* PipelinePass is a base class for all pipeline passes.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class PipelinePass {
|
|
8
|
+
protected _engine: Engine;
|
|
9
|
+
constructor(engine: Engine);
|
|
10
|
+
/**
|
|
11
|
+
* Called before rendering a camera, override this method to configure the camera If you need to configure the camera clear flag or render target.
|
|
12
|
+
* @param context - Rendering context
|
|
13
|
+
* @param cullingResults - Culling results
|
|
14
|
+
*/
|
|
15
|
+
abstract onRender(context: RenderContext, cullingResults: CullingResults): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/Transform.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ export declare class Transform extends Component {
|
|
|
195
195
|
* @returns Change flag
|
|
196
196
|
*/
|
|
197
197
|
registerWorldChangeFlag(): BoolUpdateFlag;
|
|
198
|
+
protected _onDestroy(): void;
|
|
198
199
|
/**
|
|
199
200
|
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
200
201
|
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
+
type PickOnlyOne<T extends {}, Keys extends keyof T = keyof T> = Keys extends unknown ? {
|
|
2
|
+
[K in Keys]: T[Keys];
|
|
3
|
+
} & {
|
|
4
|
+
[K in Exclude<keyof T, Keys>]?: never;
|
|
5
|
+
} : never;
|
|
1
6
|
/**
|
|
2
7
|
* Used to describe loading asset.
|
|
3
8
|
*/
|
|
4
9
|
export type LoadItem = {
|
|
5
|
-
/**
|
|
6
|
-
* Loading url.
|
|
7
|
-
*/
|
|
8
|
-
url?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Available when AssetType is TextureCube.
|
|
11
|
-
*/
|
|
12
|
-
urls?: string[];
|
|
13
10
|
/**
|
|
14
11
|
* Asset Type.
|
|
15
12
|
*/
|
|
@@ -30,4 +27,14 @@ export type LoadItem = {
|
|
|
30
27
|
* Additional parameters for specified loader.
|
|
31
28
|
*/
|
|
32
29
|
params?: Record<string, any>;
|
|
33
|
-
}
|
|
30
|
+
} & PickOnlyOne<{
|
|
31
|
+
/**
|
|
32
|
+
* Loading url.
|
|
33
|
+
*/
|
|
34
|
+
url: string;
|
|
35
|
+
/**
|
|
36
|
+
* Available when AssetType is TextureCube.
|
|
37
|
+
*/
|
|
38
|
+
urls: string[];
|
|
39
|
+
}>;
|
|
40
|
+
export {};
|
package/types/asset/request.d.ts
CHANGED
|
@@ -17,9 +17,13 @@ export declare class MultiExecutor {
|
|
|
17
17
|
private interval;
|
|
18
18
|
private _timeoutId;
|
|
19
19
|
private _currentCount;
|
|
20
|
+
private _onComplete;
|
|
21
|
+
private _onError;
|
|
22
|
+
private _error;
|
|
20
23
|
constructor(execFunc: (count?: number) => Promise<any>, totalCount: number, interval: number);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
start(): this;
|
|
25
|
+
onComplete(func: Function): this;
|
|
26
|
+
onError(func: Function): this;
|
|
27
|
+
cancel(): void;
|
|
24
28
|
private exec;
|
|
25
29
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* EventDispatcher, which can be inherited as a base class.
|
|
3
3
|
*/
|
|
4
4
|
export declare class EventDispatcher {
|
|
5
|
+
private static _dispatchingListenersPool;
|
|
5
6
|
private _events;
|
|
6
7
|
private _eventCount;
|
|
7
|
-
private _dispatchingListeners;
|
|
8
8
|
/**
|
|
9
9
|
* Determine whether there is event listening.
|
|
10
10
|
* @param event - Event name
|
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";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare enum RenderStateElementKey {
|
|
2
|
+
/** Blend state enabled for target 0 key. */
|
|
3
|
+
BlendStateEnabled0 = 0,
|
|
4
|
+
/** Blend state color blend operation for target 0 key. */
|
|
5
|
+
BlendStateColorBlendOperation0 = 1,
|
|
6
|
+
/** Blend state alpha blend operation for target 0 key. */
|
|
7
|
+
BlendStateAlphaBlendOperation0 = 2,
|
|
8
|
+
/** Blend state source color blend factor for target 0 key. */
|
|
9
|
+
BlendStateSourceColorBlendFactor0 = 3,
|
|
10
|
+
/** Blend state source alpha blend factor for target 0 key. */
|
|
11
|
+
BlendStateSourceAlphaBlendFactor0 = 4,
|
|
12
|
+
/** Blend state destination color blend factor for target 0 key. */
|
|
13
|
+
BlendStateDestinationColorBlendFactor0 = 5,
|
|
14
|
+
/** Blend state destination alpha blend factor for target 0 key. */
|
|
15
|
+
BlendStateDestinationAlphaBlendFactor0 = 6,
|
|
16
|
+
/** Blend state color write mask for target 0 key. */
|
|
17
|
+
BlendStateColorWriteMask0 = 7,
|
|
18
|
+
/** Blend state blend color key. */
|
|
19
|
+
BlendStateBlendColor = 8,
|
|
20
|
+
/** Blend state alpha to coverage key. */
|
|
21
|
+
BlendStateAlphaToCoverage = 9,
|
|
22
|
+
/** Depth state enabled key. */
|
|
23
|
+
DepthStateEnabled = 10,
|
|
24
|
+
/** Depth state write enabled key. */
|
|
25
|
+
DepthStateWriteEnabled = 11,
|
|
26
|
+
/** Depth state compare function key. */
|
|
27
|
+
DepthStateCompareFunction = 12,
|
|
28
|
+
/** Stencil state enabled key. */
|
|
29
|
+
StencilStateEnabled = 13,
|
|
30
|
+
/** Stencil state reference value key. */
|
|
31
|
+
StencilStateReferenceValue = 14,
|
|
32
|
+
/** Stencil state read mask key. */
|
|
33
|
+
StencilStateMask = 15,
|
|
34
|
+
/** Stencil state write mask key. */
|
|
35
|
+
StencilStateWriteMask = 16,
|
|
36
|
+
/** Stencil state compare function front key. */
|
|
37
|
+
StencilStateCompareFunctionFront = 17,
|
|
38
|
+
/** Stencil state compare function back key. */
|
|
39
|
+
StencilStateCompareFunctionBack = 18,
|
|
40
|
+
/** Stencil state pass operation front key. */
|
|
41
|
+
StencilStatePassOperationFront = 19,
|
|
42
|
+
/** Stencil state pass operation back key. */
|
|
43
|
+
StencilStatePassOperationBack = 20,
|
|
44
|
+
/** Stencil state fail operation front key. */
|
|
45
|
+
StencilStateFailOperationFront = 21,
|
|
46
|
+
/** Stencil state fail operation back key. */
|
|
47
|
+
StencilStateFailOperationBack = 22,
|
|
48
|
+
/** Stencil state z fail operation front key. */
|
|
49
|
+
StencilStateZFailOperationFront = 23,
|
|
50
|
+
/** Stencil state z fail operation back key. */
|
|
51
|
+
StencilStateZFailOperationBack = 24,
|
|
52
|
+
/** Raster state fill mode key. */
|
|
53
|
+
RasterStateCullMode = 25,
|
|
54
|
+
/** Raster state cull mode key. */
|
|
55
|
+
RasterStateDepthBias = 26,
|
|
56
|
+
/** Raster state depth bias key. */
|
|
57
|
+
RasterStateSlopeScaledDepthBias = 27
|
|
58
|
+
}
|
package/types/SafeLoopArray.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|