@galacean/effects-core 2.4.0-beta.0 → 2.4.0-beta.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/asset-loader.d.ts +1 -2
- package/dist/binary-asset.d.ts +0 -2
- package/dist/comp-vfx-item.d.ts +2 -2
- package/dist/components/base-render-component.d.ts +1 -0
- package/dist/components/component.d.ts +1 -0
- package/dist/components/post-process-volume.d.ts +2 -2
- package/dist/components/renderer-component.d.ts +0 -5
- package/dist/composition.d.ts +2 -8
- package/dist/effects-object.d.ts +1 -1
- package/dist/engine.d.ts +5 -3
- package/dist/fallback/migration.d.ts +1 -0
- package/dist/index.js +752 -1028
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +748 -1022
- package/dist/index.mjs.map +1 -1
- package/dist/material/mask-ref-manager.d.ts +4 -1
- package/dist/material/material.d.ts +6 -1
- package/dist/material/types.d.ts +2 -0
- package/dist/plugins/camera/camera-controller-node.d.ts +2 -2
- package/dist/plugins/interact/interact-item.d.ts +1 -0
- package/dist/plugins/particle/particle-system-renderer.d.ts +2 -0
- package/dist/plugins/particle/particle-system.d.ts +1 -1
- package/dist/plugins/particle/trail-mesh.d.ts +1 -1
- package/dist/serialization-helper.d.ts +0 -4
- package/dist/vfx-item.d.ts +10 -4
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Engine } from '../engine';
|
|
2
|
-
import type { MaskProps } from './types';
|
|
2
|
+
import type { MaskProps, Maskable } from './types';
|
|
3
3
|
import { MaskMode } from './types';
|
|
4
|
+
import type { Renderer } from '../render/renderer';
|
|
4
5
|
export declare class MaskRefManager {
|
|
5
6
|
currentRef: number;
|
|
6
7
|
constructor(initRef?: number);
|
|
@@ -9,7 +10,9 @@ export declare class MaskRefManager {
|
|
|
9
10
|
export declare class MaskProcessor {
|
|
10
11
|
engine: Engine;
|
|
11
12
|
maskRef: number;
|
|
13
|
+
maskable?: Maskable;
|
|
12
14
|
constructor(engine: Engine);
|
|
13
15
|
getRefValue(): number;
|
|
14
16
|
getMaskMode(data: MaskProps): MaskMode;
|
|
17
|
+
drawStencilMask(renderer: Renderer): void;
|
|
15
18
|
}
|
|
@@ -177,7 +177,12 @@ export declare abstract class Material extends EffectsObject implements Disposab
|
|
|
177
177
|
* 设置 Material 颜色缓冲区的写入开关
|
|
178
178
|
* @param value
|
|
179
179
|
*/
|
|
180
|
-
set colorMask(value:
|
|
180
|
+
abstract set colorMask(value: boolean);
|
|
181
|
+
/**
|
|
182
|
+
* 获取 Material 颜色缓冲区的写入开关
|
|
183
|
+
* @param value
|
|
184
|
+
*/
|
|
185
|
+
abstract get colorMask(): boolean;
|
|
181
186
|
/**
|
|
182
187
|
* 分别指定 Material 的模板测试掩码
|
|
183
188
|
* @param value - 模板测试写入掩码参数
|
package/dist/material/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Matrix3, Matrix4, Vector2, Vector3, Vector4 } from '@galacean/effe
|
|
|
3
3
|
import type { Texture } from '../texture';
|
|
4
4
|
import type { DestroyOptions } from '../utils';
|
|
5
5
|
import type { MaskProcessor } from './mask-ref-manager';
|
|
6
|
+
import type { Renderer } from '../render';
|
|
6
7
|
export type UniformSemantic = 'VIEW' | 'MODEL' | 'MODELVIEW' | 'PROJECTION' | 'VIEWPROJECTION' | 'VIEWINVERSE' | 'EDITOR_TRANSFORM' | 'MODELVIEWPROJECTION';
|
|
7
8
|
export interface MaterialBlendingStates {
|
|
8
9
|
blending?: boolean;
|
|
@@ -72,6 +73,7 @@ export interface MaskProps {
|
|
|
72
73
|
*/
|
|
73
74
|
export interface Maskable {
|
|
74
75
|
readonly maskManager: MaskProcessor;
|
|
76
|
+
drawStencilMask: (renderer: Renderer) => void;
|
|
75
77
|
}
|
|
76
78
|
export declare enum MaskMode {
|
|
77
79
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import {
|
|
2
|
+
import { Component } from '../../components';
|
|
3
3
|
import type { Engine } from '../../engine';
|
|
4
|
-
export declare class CameraController extends
|
|
4
|
+
export declare class CameraController extends Component {
|
|
5
5
|
private options;
|
|
6
6
|
constructor(engine: Engine, props?: spec.CameraContent);
|
|
7
7
|
onUpdate(): void;
|
|
@@ -33,6 +33,7 @@ export declare class InteractComponent extends RendererComponent {
|
|
|
33
33
|
private duringPlay;
|
|
34
34
|
/** 是否响应点击和拖拽交互事件 */
|
|
35
35
|
private _interactive;
|
|
36
|
+
private lastTime;
|
|
36
37
|
set interactive(enable: boolean);
|
|
37
38
|
get interactive(): boolean;
|
|
38
39
|
getDragRangeX(): [min: number, max: number];
|
|
@@ -7,12 +7,14 @@ import { ParticleMesh } from './particle-mesh';
|
|
|
7
7
|
import type { Mesh, Renderer } from '../../render';
|
|
8
8
|
import type { Engine } from '../../engine';
|
|
9
9
|
import { RendererComponent } from '../../components';
|
|
10
|
+
import type { MaskProcessor } from '../../material/mask-ref-manager';
|
|
10
11
|
/**
|
|
11
12
|
* @since 2.0.0
|
|
12
13
|
*/
|
|
13
14
|
export declare class ParticleSystemRenderer extends RendererComponent {
|
|
14
15
|
meshes: Mesh[];
|
|
15
16
|
particleMesh: ParticleMesh;
|
|
17
|
+
maskManager: MaskProcessor;
|
|
16
18
|
private trailMesh?;
|
|
17
19
|
constructor(engine: Engine, particleMeshProps?: ParticleMeshProps, trailMeshProps?: TrailMeshProps);
|
|
18
20
|
onStart(): void;
|
|
@@ -139,7 +139,7 @@ export interface ParticleTrailProps extends Omit<spec.ParticleTrail, 'texture' |
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
export type ParticleContent = [number, number, number, Point];
|
|
142
|
-
export declare class ParticleSystem extends Component
|
|
142
|
+
export declare class ParticleSystem extends Component {
|
|
143
143
|
renderer: ParticleSystemRenderer;
|
|
144
144
|
options: ParticleOptions;
|
|
145
145
|
shape: ShapeGenerator;
|
|
@@ -11,7 +11,7 @@ export type TrailMeshProps = {
|
|
|
11
11
|
maxTrailCount: number;
|
|
12
12
|
pointCountPerTrail: number;
|
|
13
13
|
colorOverLifetime?: Array<GradientStop>;
|
|
14
|
-
texture
|
|
14
|
+
texture?: Texture;
|
|
15
15
|
minimumVertexDistance: number;
|
|
16
16
|
blending: number;
|
|
17
17
|
widthOverTrail: ValueGetter<number>;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { EffectsObject } from './effects-object';
|
|
3
3
|
export declare class SerializationHelper {
|
|
4
|
-
static collectSerializableObject(effectsObject: EffectsObject, res: Record<string, EffectsObject>): void;
|
|
5
|
-
static serializeEffectObject(effectsObject: EffectsObject): Record<string, any>;
|
|
6
4
|
static serialize(effectsObject: EffectsObject, serializedData?: Record<string, any>): Record<string, any>;
|
|
7
5
|
static deserialize(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): void;
|
|
8
|
-
static deserializeAsync(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): Promise<void>;
|
|
9
6
|
static checkTypedArray(obj: unknown): boolean;
|
|
10
7
|
static checkDataPath(value: unknown): value is spec.DataPath;
|
|
11
8
|
static checkGLTFNode(value: any): boolean;
|
|
12
9
|
static checkImageSource(value: HTMLCanvasElement): boolean;
|
|
13
10
|
private static deserializeProperty;
|
|
14
|
-
private static deserializePropertyAsync;
|
|
15
11
|
private static serializeObjectProperty;
|
|
16
12
|
private static serializeArrayProperty;
|
|
17
13
|
}
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
2
|
import * as spec from '@galacean/effects-specification';
|
|
3
3
|
import type { Component } from './components';
|
|
4
|
-
import {
|
|
5
|
-
import { type Composition } from './composition';
|
|
4
|
+
import { Composition } from './composition';
|
|
6
5
|
import { EffectsObject } from './effects-object';
|
|
7
6
|
import type { Engine } from './engine';
|
|
8
7
|
import type { EventEmitterListener, EventEmitterOptions, ItemEvent } from './events';
|
|
@@ -61,9 +60,8 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
61
60
|
_content?: VFXItemContent;
|
|
62
61
|
type: spec.ItemType;
|
|
63
62
|
props: spec.VFXItemData;
|
|
64
|
-
isDuringPlay: boolean;
|
|
65
63
|
components: Component[];
|
|
66
|
-
|
|
64
|
+
isDuringPlay: boolean;
|
|
67
65
|
/**
|
|
68
66
|
* 元素是否激活
|
|
69
67
|
*/
|
|
@@ -295,6 +293,12 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
295
293
|
*/
|
|
296
294
|
getCurrentPosition(): Vector3;
|
|
297
295
|
find(name: string): VFXItem | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* 复制 VFXItem,返回一个新的 VFXItem
|
|
298
|
+
* @since 2.4.0
|
|
299
|
+
* @returns 复制的新 VFXItem
|
|
300
|
+
*/
|
|
301
|
+
duplicate(): VFXItem;
|
|
298
302
|
fromData(data: spec.VFXItemData): void;
|
|
299
303
|
toData(): void;
|
|
300
304
|
translateByPixel(x: number, y: number): void;
|
|
@@ -304,6 +308,8 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
304
308
|
dispose(): void;
|
|
305
309
|
private resetChildrenParent;
|
|
306
310
|
private instantiatePreComposition;
|
|
311
|
+
private resetGUID;
|
|
312
|
+
private gatherPreviousObjectID;
|
|
307
313
|
}
|
|
308
314
|
export declare namespace Item {
|
|
309
315
|
function is<T extends spec.Item>(item: spec.Item, type: spec.ItemType): item is T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.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.3.
|
|
45
|
+
"@galacean/effects-specification": "2.3.1",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|