@galacean/effects-core 2.5.0-alpha.0 → 2.5.0-alpha.2
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/components/base-render-component.d.ts +1 -3
- package/dist/composition.d.ts +1 -2
- package/dist/index.js +100 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +100 -62
- package/dist/index.mjs.map +1 -1
- package/dist/material/mask-ref-manager.d.ts +5 -2
- package/dist/material/types.d.ts +0 -7
- package/dist/plugins/particle/particle-system.d.ts +2 -8
- package/dist/plugins/text/text-item.d.ts +3 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/promise-util.d.ts +9 -0
- package/package.json +2 -2
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { Engine } from '../engine';
|
|
2
|
-
import type
|
|
2
|
+
import type * as spec from '@galacean/effects-specification';
|
|
3
|
+
import type { Maskable } from './types';
|
|
3
4
|
import { MaskMode } from './types';
|
|
4
5
|
import type { Renderer } from '../render/renderer';
|
|
5
6
|
export declare class MaskProcessor {
|
|
6
7
|
engine: Engine;
|
|
8
|
+
alphaMaskEnabled: boolean;
|
|
9
|
+
maskMode: MaskMode;
|
|
7
10
|
maskable: Maskable | null;
|
|
8
11
|
private stencilClearAction;
|
|
9
12
|
constructor(engine: Engine);
|
|
10
13
|
getRefValue(): number;
|
|
11
|
-
getMaskMode(data:
|
|
14
|
+
getMaskMode(data: spec.MaskOptions): MaskMode.MASK | MaskMode.OBSCURED | MaskMode.REVERSE_OBSCURED;
|
|
12
15
|
drawStencilMask(renderer: Renderer): void;
|
|
13
16
|
}
|
package/dist/material/types.d.ts
CHANGED
|
@@ -120,10 +120,7 @@ export interface ParticleSystemProps extends Omit<spec.ParticleContent, 'options
|
|
|
120
120
|
options: ParticleSystemOptions;
|
|
121
121
|
renderer: ParticleSystemRendererOptions;
|
|
122
122
|
trails?: ParticleTrailProps;
|
|
123
|
-
mask?:
|
|
124
|
-
mode: MaskMode;
|
|
125
|
-
ref: Maskable;
|
|
126
|
-
};
|
|
123
|
+
mask?: spec.MaskOptions;
|
|
127
124
|
}
|
|
128
125
|
export interface ParticleSystemRendererOptions extends Required<Omit<spec.RendererOptions, 'texture' | 'anchor' | 'particleOrigin'>> {
|
|
129
126
|
texture: Texture;
|
|
@@ -133,10 +130,7 @@ export interface ParticleSystemRendererOptions extends Required<Omit<spec.Render
|
|
|
133
130
|
export interface ParticleTrailProps extends Omit<spec.ParticleTrail, 'texture' | 'mask'> {
|
|
134
131
|
texture: Texture;
|
|
135
132
|
textureMap: vec4;
|
|
136
|
-
mask?:
|
|
137
|
-
mode: MaskMode;
|
|
138
|
-
ref: Maskable;
|
|
139
|
-
};
|
|
133
|
+
mask?: spec.MaskOptions;
|
|
140
134
|
}
|
|
141
135
|
export type ParticleContent = [number, number, number, Point];
|
|
142
136
|
export declare class ParticleSystem extends Component implements Maskable {
|
|
@@ -2,7 +2,7 @@ import * as spec from '@galacean/effects-specification';
|
|
|
2
2
|
import type { ItemRenderer } from '../../components';
|
|
3
3
|
import { BaseRenderComponent } from '../../components';
|
|
4
4
|
import type { Engine } from '../../engine';
|
|
5
|
-
import type {
|
|
5
|
+
import type { Material } from '../../material';
|
|
6
6
|
import { Texture } from '../../texture';
|
|
7
7
|
import type { VFXItem } from '../../vfx-item';
|
|
8
8
|
import { TextLayout } from './text-layout';
|
|
@@ -10,8 +10,9 @@ import { TextStyle } from './text-style';
|
|
|
10
10
|
/**
|
|
11
11
|
* 用于创建 textItem 的数据类型, 经过处理后的 spec.TextContentOptions
|
|
12
12
|
*/
|
|
13
|
-
export interface TextItemProps extends Omit<spec.TextContent, 'renderer' | 'mask'
|
|
13
|
+
export interface TextItemProps extends Omit<spec.TextContent, 'renderer' | 'mask'> {
|
|
14
14
|
listIndex?: number;
|
|
15
|
+
mask?: spec.MaskOptions;
|
|
15
16
|
renderer: {
|
|
16
17
|
texture: Texture;
|
|
17
18
|
} & Omit<spec.RendererOptions, 'texture'>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './image-data';
|
|
|
5
5
|
export * from './sortable';
|
|
6
6
|
export * from './asserts';
|
|
7
7
|
export * from './text';
|
|
8
|
+
export * from './promise-util';
|
|
8
9
|
export * from './logger';
|
|
9
10
|
export type Immutable<O> = O extends Record<any, any> ? {
|
|
10
11
|
readonly [key in keyof O]: Immutable<O[key]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple implementation of the deferred pattern.
|
|
3
|
+
* An object that exposes a promise and functions to resolve and reject it.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Deferred<T> {
|
|
6
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
7
|
+
reject: (err?: any) => void;
|
|
8
|
+
promise: Promise<T>;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.5.0-alpha.
|
|
3
|
+
"version": "2.5.0-alpha.2",
|
|
4
4
|
"description": "Galacean Effects runtime core for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registry": "https://registry.npmjs.org"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@galacean/effects-specification": "2.
|
|
45
|
+
"@galacean/effects-specification": "2.4.0",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|