@galacean/effects-core 1.5.2 → 1.6.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.
@@ -52,7 +52,7 @@ export type Region = {
52
52
  position: Vector3;
53
53
  behavior?: spec.InteractBehavior;
54
54
  parentId?: string;
55
- hitPositions?: Vector3[];
55
+ hitPositions: Vector3[];
56
56
  };
57
57
  export type HitTestParams = {
58
58
  camera: {
@@ -1,13 +1,22 @@
1
1
  import * as spec from '@galacean/effects-specification';
2
+ import type { Composition } from '../../composition';
3
+ import type { Engine } from '../../engine';
2
4
  import type { VFXItemProps } from '../../vfx-item';
3
5
  import { VFXItem } from '../../vfx-item';
4
- import type { HitTestTriangleParams, BoundingBoxTriangle } from './click-handler';
5
- import type { Composition } from '../../composition';
6
- import { InteractMesh } from './interact-mesh';
6
+ import type { BoundingBoxTriangle, HitTestTriangleParams } from './click-handler';
7
7
  import type { InteractItem } from './interact-item';
8
- import type { Engine } from '../../engine';
8
+ import { InteractMesh } from './interact-mesh';
9
9
  export declare class InteractVFXItem extends VFXItem<InteractItem> {
10
10
  previewContent: InteractMesh | null;
11
+ /**
12
+ * 拖拽的惯性衰减系数,范围[0, 1], 越大惯性越强
13
+ */
14
+ downgrade: number;
15
+ /**
16
+ * 拖拽的距离映射系数,越大越容易拖动
17
+ */
18
+ dragRatio: number[];
19
+ private enabled;
11
20
  private ui;
12
21
  private clickable;
13
22
  private dragEvent;
@@ -15,15 +24,18 @@ export declare class InteractVFXItem extends VFXItem<InteractItem> {
15
24
  engine?: Engine;
16
25
  constructor(props: VFXItemProps, composition: Composition);
17
26
  get type(): spec.ItemType;
27
+ set enable(enable: boolean);
28
+ get enable(): boolean;
18
29
  onConstructed(options: spec.InteractItem): void;
19
30
  onLifetimeBegin(composition: Composition): void;
20
31
  onItemUpdate(): void;
21
32
  onEnd(): void;
22
33
  onItemRemoved(): void;
23
34
  getBoundingBox(): BoundingBoxTriangle | void;
24
- getHitTestParams(): HitTestTriangleParams | void;
35
+ getHitTestParams(): HitTestTriangleParams | undefined;
25
36
  protected doCreateContent(composition: Composition): InteractItem;
26
37
  private beginDragTarget;
27
38
  private endDragTarget;
28
39
  private handleDragMove;
40
+ private canInteract;
29
41
  }
package/dist/scene.d.ts CHANGED
@@ -24,6 +24,10 @@ export interface Scene {
24
24
  * 加载开始时间
25
25
  */
26
26
  startTime?: number;
27
+ /**
28
+ * 加载分段时长
29
+ */
30
+ timeInfos: Record<string, number>;
27
31
  url: SceneType;
28
32
  usedImages: Record<number, boolean>;
29
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "1.5.2",
3
+ "version": "1.6.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",