@galacean/effects-core 1.1.0-alpha.0 → 1.1.0-alpha.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/comp-vfx-item.d.ts +5 -1
- package/dist/composition.d.ts +20 -8
- package/dist/index.js +164 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -123
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/cal/calculate-item.d.ts +1 -0
- package/dist/plugins/camera/camera-vfx-item.d.ts +1 -1
- package/dist/plugins/interact/click-handler.d.ts +2 -0
- package/dist/plugins/sprite/sprite-vfx-item.d.ts +0 -1
- package/dist/plugins/text/text-item.d.ts +14 -14
- package/dist/plugins/text/text-vfx-item.d.ts +0 -1
- package/dist/semantic-map.d.ts +1 -1
- package/dist/vfx-item.d.ts +1 -0
- package/package.json +1 -1
package/dist/comp-vfx-item.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Ray } from '@galacean/effects-math/es';
|
|
1
2
|
import * as spec from '@galacean/effects-specification';
|
|
2
3
|
import { CalculateItem } from './plugins';
|
|
4
|
+
import type { Region } from './plugins';
|
|
3
5
|
import type { VFXItemContent, VFXItemProps } from './vfx-item';
|
|
4
6
|
import { VFXItem } from './vfx-item';
|
|
5
|
-
import type { Composition } from './composition';
|
|
7
|
+
import type { Composition, CompositionHitTestOptions } from './composition';
|
|
6
8
|
export interface ItemNode {
|
|
7
9
|
id: string;
|
|
8
10
|
item: VFXItem<VFXItemContent>;
|
|
@@ -31,6 +33,7 @@ export declare class CompVFXItem extends VFXItem<void | CalculateItem> {
|
|
|
31
33
|
private itemsToRemove;
|
|
32
34
|
private tempQueue;
|
|
33
35
|
private extraCamera;
|
|
36
|
+
private refId;
|
|
34
37
|
get type(): spec.ItemType;
|
|
35
38
|
onConstructed(props: VFXItemProps): void;
|
|
36
39
|
createContent(): void;
|
|
@@ -57,6 +60,7 @@ export declare class CompVFXItem extends VFXItem<void | CalculateItem> {
|
|
|
57
60
|
*/
|
|
58
61
|
getItemCurrentParent(item: VFXItem<VFXItemContent>): VFXItem<VFXItemContent> | void;
|
|
59
62
|
getItemByName(name: string): VFXItem<VFXItemContent>[];
|
|
63
|
+
hitTest(ray: Ray, x: number, y: number, regions: Region[], force?: boolean, options?: CompositionHitTestOptions): Region[];
|
|
60
64
|
protected isEnded(now: number): boolean;
|
|
61
65
|
/**
|
|
62
66
|
* 构建父子树,同时保存到 itemCacheMap 中便于查找
|
package/dist/composition.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ import type { Disposable, LostHandler } from './utils';
|
|
|
6
6
|
import { Transform } from './transform';
|
|
7
7
|
import type { VFXItem, VFXItemContent, VFXItemProps } from './vfx-item';
|
|
8
8
|
import { CompVFXItem } from './comp-vfx-item';
|
|
9
|
-
import type { InteractVFXItem, EventSystem
|
|
9
|
+
import type { InteractVFXItem, EventSystem } from './plugins';
|
|
10
10
|
import type { PluginSystem } from './plugin-system';
|
|
11
11
|
import type { MeshRendererOptions, Renderer } from './render';
|
|
12
|
-
import { RenderFrame } from './render';
|
|
13
12
|
import type { Texture } from './texture';
|
|
13
|
+
import { RenderFrame } from './render';
|
|
14
14
|
import { Camera } from './camera';
|
|
15
|
+
import type { Region } from './plugins';
|
|
15
16
|
import { CompositionSourceManager } from './composition-source-manager';
|
|
16
17
|
export interface CompositionStatistic {
|
|
17
18
|
loadTime: number;
|
|
@@ -27,7 +28,7 @@ export interface MessageItem {
|
|
|
27
28
|
/**
|
|
28
29
|
*
|
|
29
30
|
*/
|
|
30
|
-
interface CompositionHitTestOptions {
|
|
31
|
+
export interface CompositionHitTestOptions {
|
|
31
32
|
maxCount?: number;
|
|
32
33
|
stop?: (region: Region) => boolean;
|
|
33
34
|
skip?: (item: VFXItem<VFXItemContent>) => boolean;
|
|
@@ -309,7 +310,7 @@ export declare class Composition implements Disposable, LostHandler {
|
|
|
309
310
|
*/
|
|
310
311
|
itemLifetimeEvent(item: VFXItem<any>, start: boolean): void;
|
|
311
312
|
/**
|
|
312
|
-
*
|
|
313
|
+
* 获取指定位置和相机连成的射线
|
|
313
314
|
* @param x
|
|
314
315
|
* @param y
|
|
315
316
|
* @returns
|
|
@@ -370,17 +371,29 @@ export declare class Composition implements Disposable, LostHandler {
|
|
|
370
371
|
*/
|
|
371
372
|
translateByPixel(x: number, y: number): void;
|
|
372
373
|
/**
|
|
373
|
-
* 设置合成在 3D
|
|
374
|
+
* 设置合成在 3D 坐标轴上相对当前的位移
|
|
374
375
|
*/
|
|
375
376
|
translate(x: number, y: number, z: number): void;
|
|
376
377
|
/**
|
|
377
|
-
* 设置合成在 3D
|
|
378
|
+
* 设置合成在 3D 坐标轴上相对原点的位移
|
|
379
|
+
*/
|
|
380
|
+
setPosition(x: number, y: number, z: number): void;
|
|
381
|
+
/**
|
|
382
|
+
* 设置合成在 3D 坐标轴上相对当前的旋转(角度)
|
|
378
383
|
*/
|
|
379
384
|
rotate(x: number, y: number, z: number): void;
|
|
380
385
|
/**
|
|
381
|
-
* 设置合成在 3D
|
|
386
|
+
* 设置合成在 3D 坐标轴上的相对原点的旋转(角度)
|
|
387
|
+
*/
|
|
388
|
+
setRotation(x: number, y: number, z: number): void;
|
|
389
|
+
/**
|
|
390
|
+
* 设置合成在 3D 坐标轴上相对当前的缩放
|
|
382
391
|
*/
|
|
383
392
|
scale(x: number, y: number, z: number): void;
|
|
393
|
+
/**
|
|
394
|
+
* 设置合成在 3D 坐标轴上的缩放
|
|
395
|
+
*/
|
|
396
|
+
setScale(x: number, y: number, z: number): void;
|
|
384
397
|
/**
|
|
385
398
|
* 卸载贴图纹理方法,减少内存
|
|
386
399
|
*/
|
|
@@ -391,4 +404,3 @@ export declare class Composition implements Disposable, LostHandler {
|
|
|
391
404
|
*/
|
|
392
405
|
reloadTexture(): Promise<void>;
|
|
393
406
|
}
|
|
394
|
-
export {};
|