@galacean/effects-core 2.0.0-alpha.15 → 2.0.0-alpha.16
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/composition-source-manager.d.ts +2 -2
- package/dist/composition.d.ts +0 -4
- package/dist/index.js +69 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -42
- package/dist/index.mjs.map +1 -1
- package/dist/pass-render-level.d.ts +3 -1
- package/dist/plugins/cal/calculate-vfx-item.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +1 -1
- package/dist/plugins/sprite/sprite-item.d.ts +1 -1
- package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +0 -1
- package/dist/scene.d.ts +5 -3
- package/dist/utils/index.d.ts +3 -0
- package/dist/vfx-item.d.ts +8 -7
- package/package.json +1 -1
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type { SceneRenderLevel } from './scene';
|
|
3
|
+
export declare function passRenderLevel(l?: spec.RenderLevel, renderLevel?: SceneRenderLevel): boolean;
|
|
@@ -7,7 +7,7 @@ import type { ItemBasicTransform, ItemLinearVelOverLifetime } from './calculate-
|
|
|
7
7
|
import type { FrameContext, PlayableGraph } from './playable-graph';
|
|
8
8
|
import { Playable, PlayableAsset } from './playable-graph';
|
|
9
9
|
import { EffectsObject } from '../../effects-object';
|
|
10
|
-
import
|
|
10
|
+
import { VFXItem } from '../../vfx-item';
|
|
11
11
|
/**
|
|
12
12
|
* @since 2.0.0
|
|
13
13
|
* @internal
|
|
@@ -28,7 +28,7 @@ export interface SpriteItemProps extends Omit<spec.SpriteContent, 'renderer'> {
|
|
|
28
28
|
*/
|
|
29
29
|
export type SpriteItemOptions = {
|
|
30
30
|
startColor: vec4;
|
|
31
|
-
renderLevel?:
|
|
31
|
+
renderLevel?: spec.RenderLevel;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* 图层元素渲染属性, 经过处理后的 spec.SpriteContent.renderer
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
2
|
import { Playable } from '../../cal/playable-graph';
|
|
3
3
|
export declare class ActivationMixerPlayable extends Playable {
|
|
4
|
-
private bindingItem;
|
|
5
4
|
processFrame(context: FrameContext): void;
|
|
6
5
|
private hideRendererComponents;
|
|
7
6
|
private showRendererComponents;
|
package/dist/scene.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { Texture } from './texture';
|
|
3
3
|
import type { PluginSystem } from './plugin-system';
|
|
4
|
+
import type { PickEnum } from './utils';
|
|
4
5
|
export type ImageSource = spec.TemplateImage | spec.Image | spec.CompressedImage;
|
|
6
|
+
export type SceneRenderLevel = PickEnum<spec.RenderLevel, spec.RenderLevel.A | spec.RenderLevel.B | spec.RenderLevel.S>;
|
|
5
7
|
/**
|
|
6
8
|
* 场景类型
|
|
7
9
|
*/
|
|
@@ -9,7 +11,7 @@ export interface Scene {
|
|
|
9
11
|
readonly jsonScene: spec.JSONScene;
|
|
10
12
|
readonly bins: ArrayBuffer[];
|
|
11
13
|
readonly pluginSystem: PluginSystem;
|
|
12
|
-
readonly renderLevel?:
|
|
14
|
+
readonly renderLevel?: SceneRenderLevel;
|
|
13
15
|
readonly storage: Record<string, any>;
|
|
14
16
|
textureOptions: Record<string, any>[];
|
|
15
17
|
images: ImageSource[];
|
|
@@ -57,9 +59,9 @@ export interface SceneLoadOptions {
|
|
|
57
59
|
* 渲染分级。
|
|
58
60
|
* 分级之后,只会加载当前渲染等级的资源。
|
|
59
61
|
* 当渲染等级被设置为 B 后,player 的 fps 会降到 30 帧
|
|
60
|
-
* @default '
|
|
62
|
+
* @default 'S'
|
|
61
63
|
*/
|
|
62
|
-
renderLevel?:
|
|
64
|
+
renderLevel?: SceneRenderLevel;
|
|
63
65
|
/**
|
|
64
66
|
* 资源加载超时,时间单位秒
|
|
65
67
|
* @default 10s
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export * from './logger';
|
|
|
9
9
|
export type Immutable<O> = O extends Record<any, any> ? {
|
|
10
10
|
readonly [key in keyof O]: Immutable<O[key]>;
|
|
11
11
|
} : O extends Array<infer X> ? ReadonlyArray<X> : O;
|
|
12
|
+
export type PickEnum<T, K extends T> = {
|
|
13
|
+
[P in keyof K]: P extends K ? P : never;
|
|
14
|
+
};
|
|
12
15
|
export declare enum DestroyOptions {
|
|
13
16
|
destroy = 0,
|
|
14
17
|
keep = 1,
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
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 {
|
|
5
|
-
import
|
|
6
|
-
import { ItemBehaviour } from './components/component';
|
|
4
|
+
import type { Component } from './components';
|
|
5
|
+
import { RendererComponent, ItemBehaviour } from './components';
|
|
7
6
|
import type { Composition } from './composition';
|
|
8
7
|
import { EffectsObject } from './effects-object';
|
|
9
8
|
import type { Engine } from './engine';
|
|
@@ -60,10 +59,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
60
59
|
* 元素是否可用
|
|
61
60
|
*/
|
|
62
61
|
ended: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* 元素在合成中的索引
|
|
65
|
-
*/
|
|
66
|
-
listIndex: number;
|
|
67
62
|
/**
|
|
68
63
|
* 元素名称
|
|
69
64
|
*/
|
|
@@ -92,6 +87,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
92
87
|
* 元素动画的速度
|
|
93
88
|
*/
|
|
94
89
|
private speed;
|
|
90
|
+
private listIndex;
|
|
95
91
|
static isComposition(item: VFXItem): boolean;
|
|
96
92
|
static isSprite(item: VFXItem): boolean;
|
|
97
93
|
static isParticle(item: VFXItem): boolean;
|
|
@@ -108,6 +104,11 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
108
104
|
* 播放完成后是否需要再使用,是的话生命周期结束后不会 dispose
|
|
109
105
|
*/
|
|
110
106
|
get compositionReusable(): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* 元素在合成中的索引
|
|
109
|
+
*/
|
|
110
|
+
get renderOrder(): number;
|
|
111
|
+
set renderOrder(value: number);
|
|
111
112
|
/**
|
|
112
113
|
* 设置元素的动画速度
|
|
113
114
|
* @param speed - 速度
|