@galacean/effects-core 2.0.0-beta.0 → 2.0.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/camera.d.ts +1 -1
- package/dist/components/component.d.ts +6 -1
- package/dist/composition.d.ts +1 -0
- package/dist/effects-object.d.ts +1 -3
- package/dist/index.js +183 -109
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +183 -109
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/particle/particle-system.d.ts +0 -1
- package/dist/vfx-item.d.ts +39 -2
- package/package.json +1 -1
|
@@ -199,7 +199,6 @@ export declare class ParticleSystem extends Component {
|
|
|
199
199
|
resumeParticleEmission(): void;
|
|
200
200
|
getBoundingBox(): void | BoundingBoxSphere;
|
|
201
201
|
getHitTestParams: (force?: boolean) => void | HitTestCustomParams;
|
|
202
|
-
onAttached(): void;
|
|
203
202
|
fromData(data: unknown): void;
|
|
204
203
|
}
|
|
205
204
|
export {};
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
2
|
import * as spec from '@galacean/effects-specification';
|
|
3
3
|
import type { VFXItemData } from './asset-loader';
|
|
4
|
-
import type { Component
|
|
4
|
+
import type { Component } from './components';
|
|
5
|
+
import { RendererComponent, Behaviour } from './components';
|
|
5
6
|
import type { Composition } from './composition';
|
|
6
7
|
import { EffectsObject } from './effects-object';
|
|
7
8
|
import type { Engine } from './engine';
|
|
8
|
-
import type { BoundingBoxData, CameraController, HitTestBoxParams, HitTestCustomParams, HitTestSphereParams, HitTestTriangleParams, InteractComponent,
|
|
9
|
+
import type { BoundingBoxData, CameraController, HitTestBoxParams, HitTestCustomParams, HitTestSphereParams, HitTestTriangleParams, InteractComponent, SpriteComponent } from './plugins';
|
|
10
|
+
import { ParticleSystem } from './plugins';
|
|
9
11
|
import { Transform } from './transform';
|
|
10
12
|
import type { Constructor, Disposable } from './utils';
|
|
13
|
+
import type { EventEmitterListener, EventEmitterOptions, ItemEvent } from './events';
|
|
11
14
|
export type VFXItemContent = ParticleSystem | SpriteComponent | CameraController | InteractComponent | undefined | {};
|
|
12
15
|
export type VFXItemConstructor = new (engine: Engine, props: VFXItemProps, composition: Composition) => VFXItem;
|
|
13
16
|
export type VFXItemProps = spec.Item & {
|
|
@@ -86,6 +89,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
86
89
|
*/
|
|
87
90
|
private speed;
|
|
88
91
|
private listIndex;
|
|
92
|
+
private eventProcessor;
|
|
89
93
|
static isComposition(item: VFXItem): boolean;
|
|
90
94
|
static isSprite(item: VFXItem): boolean;
|
|
91
95
|
static isParticle(item: VFXItem): boolean;
|
|
@@ -107,6 +111,39 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
107
111
|
*/
|
|
108
112
|
get renderOrder(): number;
|
|
109
113
|
set renderOrder(value: number);
|
|
114
|
+
/**
|
|
115
|
+
* 元素监听事件
|
|
116
|
+
* @param eventName - 事件名称
|
|
117
|
+
* @param listener - 事件监听器
|
|
118
|
+
* @param options - 事件监听器选项
|
|
119
|
+
* @returns
|
|
120
|
+
*/
|
|
121
|
+
on<E extends keyof ItemEvent>(eventName: E, listener: EventEmitterListener<ItemEvent[E]>, options?: EventEmitterOptions): void;
|
|
122
|
+
/**
|
|
123
|
+
* 移除事件监听器
|
|
124
|
+
* @param eventName - 事件名称
|
|
125
|
+
* @param listener - 事件监听器
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
off<E extends keyof ItemEvent>(eventName: E, listener: EventEmitterListener<ItemEvent[E]>): void;
|
|
129
|
+
/**
|
|
130
|
+
* 一次性监听事件
|
|
131
|
+
* @param eventName - 事件名称
|
|
132
|
+
* @param listener - 事件监听器
|
|
133
|
+
*/
|
|
134
|
+
once<E extends keyof ItemEvent>(eventName: E, listener: EventEmitterListener<ItemEvent[E]>): void;
|
|
135
|
+
/**
|
|
136
|
+
* 触发事件
|
|
137
|
+
* @param eventName - 事件名称
|
|
138
|
+
* @param args - 事件参数
|
|
139
|
+
*/
|
|
140
|
+
emit<E extends keyof ItemEvent>(eventName: E, ...args: ItemEvent[E]): void;
|
|
141
|
+
/**
|
|
142
|
+
* 获取事件名称对应的所有监听器
|
|
143
|
+
* @param eventName - 事件名称
|
|
144
|
+
* @returns - 返回事件名称对应的所有监听器
|
|
145
|
+
*/
|
|
146
|
+
getListeners<E extends keyof ItemEvent>(eventName: E): EventEmitterListener<ItemEvent[E]>[];
|
|
110
147
|
/**
|
|
111
148
|
* 设置元素的动画速度
|
|
112
149
|
* @param speed - 速度
|