@galacean/effects-core 2.2.2 → 2.2.3

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.
@@ -5,6 +5,7 @@ import { TextLayout } from './text-layout';
5
5
  import { TextStyle } from './text-style';
6
6
  import type { Material } from '../../material';
7
7
  import type { VFXItem } from '../../vfx-item';
8
+ import type { ItemRenderer } from '../../components';
8
9
  import { BaseRenderComponent } from '../../components';
9
10
  /**
10
11
  * 用于创建 textItem 的数据类型, 经过处理后的 spec.TextContentOptions
@@ -48,6 +49,7 @@ export declare class TextComponentBase {
48
49
  material: Material;
49
50
  lineCount: number;
50
51
  item: VFXItem;
52
+ renderer: ItemRenderer;
51
53
  /***** mix 类型兼容用 *****/
52
54
  private char;
53
55
  updateWithOptions(options: spec.TextContentOptions): void;
@@ -1,24 +1,17 @@
1
1
  import { Vector3 } from '@galacean/effects-math/es/core/vector3';
2
2
  import * as spec from '@galacean/effects-specification';
3
- import type { VFXItemData } from './asset-loader';
4
3
  import type { Component } from './components';
5
4
  import { RendererComponent } from './components';
6
5
  import type { Composition } from './composition';
7
6
  import { EffectsObject } from './effects-object';
8
7
  import type { Engine } from './engine';
8
+ import type { EventEmitterListener, EventEmitterOptions, ItemEvent } from './events';
9
9
  import type { BoundingBoxData, CameraController, HitTestBoxParams, HitTestCustomParams, HitTestSphereParams, HitTestTriangleParams, InteractComponent, SpriteComponent } from './plugins';
10
10
  import { ParticleSystem } from './plugins';
11
11
  import { Transform } from './transform';
12
12
  import type { Constructor, Disposable } from './utils';
13
- import type { EventEmitterListener, EventEmitterOptions, ItemEvent } from './events';
14
13
  export type VFXItemContent = ParticleSystem | SpriteComponent | CameraController | InteractComponent | undefined | {};
15
- export type VFXItemConstructor = new (engine: Engine, props: VFXItemProps, composition: Composition) => VFXItem;
16
- export type VFXItemProps = spec.Item & {
17
- items: VFXItemProps[];
18
- startTime: number;
19
- relative?: boolean;
20
- refId?: string;
21
- };
14
+ export type VFXItemConstructor = new (engine: Engine, props: spec.Item, composition: Composition) => VFXItem;
22
15
  /**
23
16
  * 所有元素的继承的抽象类
24
17
  */
@@ -71,7 +64,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
71
64
  */
72
65
  _content?: VFXItemContent;
73
66
  type: spec.ItemType;
74
- props: VFXItemProps;
67
+ props: spec.VFXItemData;
75
68
  isDuringPlay: boolean;
76
69
  components: Component[];
77
70
  rendererComponents: RendererComponent[];
@@ -138,7 +131,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
138
131
  * @param engine
139
132
  * @param props
140
133
  */
141
- constructor(engine: Engine, props?: VFXItemProps);
134
+ constructor(engine: Engine, props?: spec.Item);
142
135
  /**
143
136
  * 返回元素创建的数据
144
137
  */
@@ -294,7 +287,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
294
287
  */
295
288
  getCurrentPosition(): Vector3;
296
289
  find(name: string): VFXItem | undefined;
297
- fromData(data: VFXItemData): void;
290
+ fromData(data: spec.VFXItemData): void;
298
291
  toData(): void;
299
292
  translateByPixel(x: number, y: number): void;
300
293
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",