@galacean/effects-core 2.4.0-beta.0 → 2.4.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.
@@ -1,7 +1,7 @@
1
1
  import * as spec from '@galacean/effects-specification';
2
- import { Behaviour } from '../../components';
2
+ import { Component } from '../../components';
3
3
  import type { Engine } from '../../engine';
4
- export declare class CameraController extends Behaviour {
4
+ export declare class CameraController extends Component {
5
5
  private options;
6
6
  constructor(engine: Engine, props?: spec.CameraContent);
7
7
  onUpdate(): void;
@@ -11,7 +11,7 @@ export type TrailMeshProps = {
11
11
  maxTrailCount: number;
12
12
  pointCountPerTrail: number;
13
13
  colorOverLifetime?: Array<GradientStop>;
14
- texture: 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
  }
@@ -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 { RendererComponent } from './components';
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
- rendererComponents: RendererComponent[];
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.0",
3
+ "version": "2.4.0-beta.1",
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.0",
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",