@galacean/effects-core 2.1.0-alpha.0 → 2.1.0-alpha.10
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/animation/color-playable.d.ts +26 -0
- package/dist/animation/index.d.ts +1 -0
- package/dist/asset-manager.d.ts +15 -11
- package/dist/asset.d.ts +4 -0
- package/dist/binary-asset.d.ts +2 -2
- package/dist/comp-vfx-item.d.ts +4 -5
- package/dist/components/base-render-component.d.ts +108 -0
- package/dist/components/effect-component.d.ts +3 -34
- package/dist/components/fake-3d-component.d.ts +28 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/mesh-component.d.ts +21 -0
- package/dist/components/post-process-volume.d.ts +5 -3
- package/dist/components/shape-component.d.ts +291 -0
- package/dist/composition/scene-ticking.d.ts +15 -1
- package/dist/composition-source-manager.d.ts +5 -6
- package/dist/composition.d.ts +29 -25
- package/dist/downloader.d.ts +0 -3
- package/dist/effects-object.d.ts +23 -0
- package/dist/engine.d.ts +9 -0
- package/dist/events/event-emitter.d.ts +6 -0
- package/dist/events/types.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +22670 -19350
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22678 -19361
- package/dist/index.mjs.map +1 -1
- package/dist/math/index.d.ts +1 -1
- package/dist/math/translate.d.ts +1 -1
- package/dist/math/value-getters/color-curve.d.ts +12 -0
- package/dist/math/value-getters/index.d.ts +4 -0
- package/dist/math/value-getters/value-getter-map.d.ts +2 -0
- package/dist/math/{value-getter.d.ts → value-getters/value-getter.d.ts} +8 -5
- package/dist/math/value-getters/vector4-curve.d.ts +12 -0
- package/dist/plugin-system.d.ts +7 -5
- package/dist/plugins/cal/calculate-item.d.ts +5 -3
- package/dist/plugins/cal/calculate-loader.d.ts +1 -1
- package/dist/plugins/cal/calculate-vfx-item.d.ts +1 -1
- package/dist/plugins/cal/playable-graph.d.ts +1 -2
- package/dist/plugins/camera/camera-vfx-item-loader.d.ts +1 -1
- package/dist/plugins/index.d.ts +2 -7
- package/dist/plugins/interact/interact-item.d.ts +12 -0
- package/dist/plugins/interact/interact-loader.d.ts +1 -1
- package/dist/plugins/interact/mesh-collider.d.ts +15 -0
- package/dist/plugins/particle/burst.d.ts +2 -0
- package/dist/plugins/particle/particle-mesh.d.ts +10 -0
- package/dist/plugins/particle/particle-system.d.ts +4 -4
- package/dist/plugins/plugin.d.ts +14 -3
- package/dist/plugins/shape/build-adaptive-bezier.d.ts +1 -0
- package/dist/plugins/shape/ellipse.d.ts +79 -0
- package/dist/plugins/shape/graphics-path.d.ts +65 -0
- package/dist/plugins/shape/point-data.d.ts +6 -0
- package/dist/plugins/shape/point-like.d.ts +31 -0
- package/dist/plugins/shape/point.d.ts +58 -0
- package/dist/plugins/shape/poly-star.d.ts +42 -0
- package/dist/plugins/shape/polygon.d.ts +67 -0
- package/dist/plugins/shape/rectangle.d.ts +129 -0
- package/dist/plugins/shape/shape-path.d.ts +75 -0
- package/dist/plugins/shape/shape-primitive.d.ts +15 -0
- package/dist/plugins/shape/triangle.d.ts +89 -0
- package/dist/plugins/shape/triangulate.d.ts +1 -0
- package/dist/plugins/sprite/sprite-item.d.ts +15 -116
- package/dist/plugins/sprite/sprite-loader.d.ts +1 -1
- package/dist/plugins/sprite/sprite-mesh.d.ts +3 -4
- package/dist/plugins/text/text-item.d.ts +15 -5
- package/dist/plugins/timeline/index.d.ts +3 -0
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playable-assets/float-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playable-assets/index.d.ts +3 -0
- package/dist/plugins/{cal → timeline/playable-assets}/timeline-asset.d.ts +9 -9
- package/dist/plugins/timeline/playable-assets/vector4-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/playables/index.d.ts +7 -0
- package/dist/plugins/timeline/playables/property-clip-playable.d.ts +8 -0
- package/dist/plugins/timeline/playables/sub-composition-mixer-playable.d.ts +5 -0
- package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/track-instance.d.ts +14 -0
- package/dist/plugins/timeline/track.d.ts +6 -4
- package/dist/plugins/timeline/tracks/color-property-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +6 -0
- package/dist/plugins/timeline/tracks/index.d.ts +9 -0
- package/dist/plugins/timeline/tracks/material-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/property-track.d.ts +8 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +3 -1
- package/dist/plugins/timeline/tracks/vector4-property-track.d.ts +5 -0
- package/dist/render/gpu-capability.d.ts +1 -1
- package/dist/render/index.d.ts +0 -1
- package/dist/render/mesh.d.ts +1 -1
- package/dist/render/render-frame.d.ts +5 -1
- package/dist/render/renderer.d.ts +1 -1
- package/dist/render/semantic-map.d.ts +1 -1
- package/dist/render/shader.d.ts +1 -1
- package/dist/scene.d.ts +17 -18
- package/dist/serialization-helper.d.ts +3 -3
- package/dist/shape/geometry.d.ts +4 -4
- package/dist/texture/texture.d.ts +11 -2
- package/dist/texture/utils.d.ts +1 -2
- package/dist/transform.d.ts +8 -0
- package/dist/utils/color.d.ts +4 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/vfx-item.d.ts +45 -9
- package/package.json +4 -3
- package/dist/image-asset.d.ts +0 -5
- package/dist/render/global-volume.d.ts +0 -17
- /package/dist/plugins/timeline/{playables → playable-assets}/sub-composition-playable-asset.d.ts +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { RuntimeClip, TrackAsset } from '../
|
|
3
|
-
import type { FrameContext, PlayableGraph } from '
|
|
4
|
-
import { Playable, PlayableAsset } from '
|
|
5
|
-
import type { Constructor } from '
|
|
6
|
-
|
|
7
|
-
tracks: DataPath[];
|
|
8
|
-
}
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type { RuntimeClip, TrackAsset } from '../track';
|
|
3
|
+
import type { FrameContext, PlayableGraph } from '../../cal/playable-graph';
|
|
4
|
+
import { Playable, PlayableAsset } from '../../cal/playable-graph';
|
|
5
|
+
import type { Constructor } from '../../../utils';
|
|
6
|
+
import { TrackInstance } from '../track-instance';
|
|
9
7
|
export declare class TimelineAsset extends PlayableAsset {
|
|
10
8
|
tracks: TrackAsset[];
|
|
11
9
|
createPlayable(graph: PlayableGraph): Playable;
|
|
12
10
|
createTrack<T extends TrackAsset>(classConstructor: Constructor<T>, parent: TrackAsset, name?: string): T;
|
|
13
|
-
fromData(data: TimelineAssetData): void;
|
|
11
|
+
fromData(data: spec.TimelineAssetData): void;
|
|
14
12
|
}
|
|
15
13
|
export declare class TimelinePlayable extends Playable {
|
|
16
14
|
clips: RuntimeClip[];
|
|
15
|
+
masterTrackInstances: TrackInstance[];
|
|
17
16
|
prepareFrame(context: FrameContext): void;
|
|
18
17
|
evaluate(): void;
|
|
19
18
|
compileTracks(graph: PlayableGraph, tracks: TrackAsset[]): void;
|
|
19
|
+
private updateTrackAnimatedObject;
|
|
20
20
|
private sortTracks;
|
|
21
21
|
private addSubTracksRecursive;
|
|
22
22
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Playable, PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import { PlayableAsset } from '../../cal/playable-graph';
|
|
3
|
+
import type * as spec from '@galacean/effects-specification';
|
|
4
|
+
export declare class Vector4PropertyPlayableAsset extends PlayableAsset {
|
|
5
|
+
curveData: spec.Vector4CurveData;
|
|
6
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './activation-mixer-playable';
|
|
2
|
+
export * from './property-clip-playable';
|
|
3
|
+
export * from './float-property-mixer-playable';
|
|
4
|
+
export * from './sub-composition-clip-playable';
|
|
5
|
+
export * from './sub-composition-mixer-playable';
|
|
6
|
+
export * from './vector4-property-mixer-playable';
|
|
7
|
+
export * from './color-property-mixer-playable';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ValueGetter } from '../../../math';
|
|
2
|
+
import type { FrameContext } from '../../cal/playable-graph';
|
|
3
|
+
import { Playable } from '../../cal/playable-graph';
|
|
4
|
+
export declare class PropertyClipPlayable<T> extends Playable {
|
|
5
|
+
value: T;
|
|
6
|
+
curve: ValueGetter<T>;
|
|
7
|
+
processFrame(context: FrameContext): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Playable, PlayableOutput } from '../cal/playable-graph';
|
|
2
|
+
import type { TrackAsset } from './track';
|
|
3
|
+
/**
|
|
4
|
+
* A class that stores track assets and the generated mixer playables and playable outputs.
|
|
5
|
+
* It is used to query the corresponding playable object based on the track asset.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TrackInstance {
|
|
8
|
+
trackAsset: TrackAsset;
|
|
9
|
+
mixer: Playable;
|
|
10
|
+
output: PlayableOutput;
|
|
11
|
+
children: TrackInstance[];
|
|
12
|
+
constructor(trackAsset: TrackAsset, mixer: Playable, output: PlayableOutput);
|
|
13
|
+
addChild(trackInstance: TrackInstance): void;
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { PlayableGraph } from '../cal/playable-graph';
|
|
3
3
|
import { Playable, PlayableAsset, PlayableOutput } from '../cal/playable-graph';
|
|
4
4
|
import { ParticleSystem } from '../particle/particle-system';
|
|
@@ -12,7 +12,7 @@ export declare class TimelineClip {
|
|
|
12
12
|
start: number;
|
|
13
13
|
duration: number;
|
|
14
14
|
asset: PlayableAsset;
|
|
15
|
-
endBehavior: EndBehavior;
|
|
15
|
+
endBehavior: spec.EndBehavior;
|
|
16
16
|
constructor();
|
|
17
17
|
toLocalTime(time: number): number;
|
|
18
18
|
}
|
|
@@ -21,7 +21,8 @@ export declare class TimelineClip {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class TrackAsset extends PlayableAsset {
|
|
23
23
|
name: string;
|
|
24
|
-
|
|
24
|
+
boundObject: object;
|
|
25
|
+
parent: TrackAsset;
|
|
25
26
|
trackType: TrackType;
|
|
26
27
|
private clipSeed;
|
|
27
28
|
private clips;
|
|
@@ -29,7 +30,7 @@ export declare class TrackAsset extends PlayableAsset {
|
|
|
29
30
|
/**
|
|
30
31
|
* 重写该方法以获取自定义对象绑定
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
updateAnimatedObject(): void;
|
|
33
34
|
/**
|
|
34
35
|
* 重写该方法以创建自定义混合器
|
|
35
36
|
*/
|
|
@@ -46,6 +47,7 @@ export declare class TrackAsset extends PlayableAsset {
|
|
|
46
47
|
findClip(name: string): TimelineClip | undefined;
|
|
47
48
|
addClip(clip: TimelineClip): void;
|
|
48
49
|
private createClipPlayable;
|
|
50
|
+
fromData(data: spec.EffectsObjectData): void;
|
|
49
51
|
}
|
|
50
52
|
export declare enum TrackType {
|
|
51
53
|
MasterTrack = 0,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
2
|
+
import { PropertyTrack } from './property-track';
|
|
3
|
+
export declare class FloatPropertyTrack extends PropertyTrack {
|
|
4
|
+
createTrackMixer(graph: PlayableGraph): Playable;
|
|
5
|
+
updateAnimatedObject(): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './activation-track';
|
|
2
|
+
export * from './float-property-track';
|
|
3
|
+
export * from './sprite-color-track';
|
|
4
|
+
export * from './sub-composition-track';
|
|
5
|
+
export * from './transform-track';
|
|
6
|
+
export * from './material-track';
|
|
7
|
+
export * from './property-track';
|
|
8
|
+
export * from './vector4-property-track';
|
|
9
|
+
export * from './color-property-track';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EffectsObjectData } from '@galacean/effects-specification';
|
|
2
|
+
import { TrackAsset } from '../track';
|
|
3
|
+
export declare class PropertyTrack extends TrackAsset {
|
|
4
|
+
protected propertyNames: string[];
|
|
5
|
+
private path;
|
|
6
|
+
updateAnimatedObject(): void;
|
|
7
|
+
fromData(data: EffectsObjectData): void;
|
|
8
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { TrackAsset } from '../track';
|
|
2
|
+
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
2
3
|
export declare class SubCompositionTrack extends TrackAsset {
|
|
3
|
-
|
|
4
|
+
updateAnimatedObject(): void;
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): Playable;
|
|
4
6
|
}
|
|
@@ -16,7 +16,7 @@ export interface GPUCapabilityDetail {
|
|
|
16
16
|
shaderTextureLod: boolean;
|
|
17
17
|
instanceDraw?: boolean;
|
|
18
18
|
drawBuffers?: boolean;
|
|
19
|
-
asyncShaderCompile
|
|
19
|
+
asyncShaderCompile: boolean;
|
|
20
20
|
intIndexElementBuffer?: boolean;
|
|
21
21
|
readableDepthStencilTextures?: boolean;
|
|
22
22
|
writableFragDepth?: boolean;
|
package/dist/render/index.d.ts
CHANGED
package/dist/render/mesh.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Material, MaterialDestroyOptions } from '../material';
|
|
|
4
4
|
import type { Geometry, Renderer } from '../render';
|
|
5
5
|
import type { Disposable } from '../utils';
|
|
6
6
|
import { DestroyOptions } from '../utils';
|
|
7
|
-
import { RendererComponent } from '../components
|
|
7
|
+
import { RendererComponent } from '../components';
|
|
8
8
|
export interface MeshOptionsBase {
|
|
9
9
|
material: Material;
|
|
10
10
|
name?: string;
|
|
@@ -128,6 +128,10 @@ export interface RenderFrameOptions {
|
|
|
128
128
|
* 后处理渲染配置
|
|
129
129
|
*/
|
|
130
130
|
globalVolume?: PostProcessVolume;
|
|
131
|
+
/**
|
|
132
|
+
* 后处理是否开启
|
|
133
|
+
*/
|
|
134
|
+
postProcessingEnabled?: boolean;
|
|
131
135
|
/**
|
|
132
136
|
* 名称
|
|
133
137
|
*/
|
|
@@ -165,7 +169,7 @@ export declare class RenderFrame implements Disposable {
|
|
|
165
169
|
/**
|
|
166
170
|
* 存放后处理的属性设置
|
|
167
171
|
*/
|
|
168
|
-
globalVolume
|
|
172
|
+
globalVolume?: PostProcessVolume;
|
|
169
173
|
renderer: Renderer;
|
|
170
174
|
resource: RenderFrameResource;
|
|
171
175
|
keepColorBuffer?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Matrix4, Vector4 } from '@galacean/effects-math/es/core/index';
|
|
2
|
-
import type { RendererComponent } from '../components
|
|
2
|
+
import type { RendererComponent } from '../components';
|
|
3
3
|
import type { Engine } from '../engine';
|
|
4
4
|
import type { Material } from '../material';
|
|
5
5
|
import type { LostHandler, RestoreHandler } from '../utils';
|
|
@@ -8,7 +8,7 @@ export declare class SemanticMap implements Disposable {
|
|
|
8
8
|
constructor(semantics?: Record<string, SemanticGetter>);
|
|
9
9
|
toObject(): Record<string, SemanticGetter>;
|
|
10
10
|
setSemantic(name: string, value?: SemanticGetter): void;
|
|
11
|
-
getSemanticValue(name: string, state: RenderingData):
|
|
11
|
+
getSemanticValue(name: string, state: RenderingData): UniformValue | undefined;
|
|
12
12
|
hasSemanticValue(name: string): boolean;
|
|
13
13
|
dispose(): void;
|
|
14
14
|
}
|
package/dist/render/shader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { EffectsObject } from '../effects-object';
|
|
3
3
|
import type { Engine } from '../engine';
|
|
4
4
|
export type ShaderMacros = [key: string, value: string | number | boolean][];
|
package/dist/scene.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type * as spec from '@galacean/effects-specification';
|
|
|
2
2
|
import type { Texture } from './texture';
|
|
3
3
|
import type { PluginSystem } from './plugin-system';
|
|
4
4
|
import type { PickEnum } from './utils';
|
|
5
|
-
export type
|
|
5
|
+
export type ImageLike = spec.HTMLImageLike | ArrayBuffer | Texture;
|
|
6
6
|
export type SceneRenderLevel = PickEnum<spec.RenderLevel, spec.RenderLevel.A | spec.RenderLevel.B | spec.RenderLevel.S>;
|
|
7
7
|
/**
|
|
8
8
|
* 场景类型
|
|
@@ -14,7 +14,7 @@ export interface Scene {
|
|
|
14
14
|
readonly renderLevel?: SceneRenderLevel;
|
|
15
15
|
readonly storage: Record<string, any>;
|
|
16
16
|
textureOptions: Record<string, any>[];
|
|
17
|
-
images:
|
|
17
|
+
images: ImageLike[];
|
|
18
18
|
consumed?: boolean;
|
|
19
19
|
textures?: Texture[];
|
|
20
20
|
/**
|
|
@@ -29,8 +29,21 @@ export interface Scene {
|
|
|
29
29
|
* 加载分段时长
|
|
30
30
|
*/
|
|
31
31
|
timeInfos: Record<string, number>;
|
|
32
|
-
url:
|
|
33
|
-
|
|
32
|
+
url: Scene.LoadType;
|
|
33
|
+
}
|
|
34
|
+
export declare namespace Scene {
|
|
35
|
+
type URLType = {
|
|
36
|
+
url: string;
|
|
37
|
+
options?: SceneLoadOptions;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 接受用于加载的数据类型
|
|
41
|
+
*/
|
|
42
|
+
export type LoadType = string | Scene | URLType | spec.JSONScene | Record<string, unknown>;
|
|
43
|
+
export function isJSONObject(scene: any): scene is Scene;
|
|
44
|
+
export function isURL(scene: any): scene is URLType;
|
|
45
|
+
export function isWithOptions(scene: any): scene is URLType;
|
|
46
|
+
export {};
|
|
34
47
|
}
|
|
35
48
|
/**
|
|
36
49
|
* 场景加载参数
|
|
@@ -96,17 +109,3 @@ export interface SceneLoadOptions {
|
|
|
96
109
|
*/
|
|
97
110
|
speed?: number;
|
|
98
111
|
}
|
|
99
|
-
/**
|
|
100
|
-
* 接受用于加载的数据类型
|
|
101
|
-
*/
|
|
102
|
-
export type SceneURLType = {
|
|
103
|
-
url: string;
|
|
104
|
-
};
|
|
105
|
-
export type SceneType = string | Scene | SceneURLType | Record<string, any>;
|
|
106
|
-
export type SceneWithOptionsType = {
|
|
107
|
-
options: SceneLoadOptions;
|
|
108
|
-
};
|
|
109
|
-
export type SceneLoadType = SceneType | SceneWithOptionsType;
|
|
110
|
-
export declare function isSceneJSON(scene: any): scene is Scene;
|
|
111
|
-
export declare function isSceneURL(scene: any): scene is Scene;
|
|
112
|
-
export declare function isSceneWithOptions(scene: any): scene is SceneWithOptionsType;
|
|
@@ -3,9 +3,9 @@ import { EffectsObject } from './effects-object';
|
|
|
3
3
|
export declare class SerializationHelper {
|
|
4
4
|
static collectSerializableObject(effectsObject: EffectsObject, res: Record<string, EffectsObject>): void;
|
|
5
5
|
static serializeEffectObject(effectsObject: EffectsObject): Record<string, any>;
|
|
6
|
-
static
|
|
7
|
-
static
|
|
8
|
-
static
|
|
6
|
+
static serialize(effectsObject: EffectsObject, serializedData?: Record<string, any>): Record<string, any>;
|
|
7
|
+
static deserialize(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): void;
|
|
8
|
+
static deserializeAsync(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): Promise<void>;
|
|
9
9
|
static checkTypedArray(obj: unknown): boolean;
|
|
10
10
|
static checkDataPath(value: unknown): value is spec.DataPath;
|
|
11
11
|
static checkGLTFNode(value: any): boolean;
|
package/dist/shape/geometry.d.ts
CHANGED
|
@@ -13,11 +13,11 @@ type ShapeGeometryPre = {
|
|
|
13
13
|
p: spec.ShapePoints[1];
|
|
14
14
|
s: spec.ShapeSplits[1];
|
|
15
15
|
};
|
|
16
|
-
export type
|
|
16
|
+
export type ShapeGeometryData = {
|
|
17
17
|
gs: ShapeGeometryPre[];
|
|
18
|
-
}
|
|
18
|
+
} | {
|
|
19
19
|
g: ShapeGeometryPre;
|
|
20
|
-
}
|
|
20
|
+
} | spec.ShapeGeometry;
|
|
21
21
|
export declare function getGeometryTriangles(geometry: spec.ShapeGeometry, options: {
|
|
22
22
|
indexBase?: number;
|
|
23
23
|
uvTransform?: number[];
|
|
@@ -25,6 +25,6 @@ export declare function getGeometryTriangles(geometry: spec.ShapeGeometry, optio
|
|
|
25
25
|
aPoint: Float32Array;
|
|
26
26
|
index: Uint16Array;
|
|
27
27
|
};
|
|
28
|
-
export declare function getGeometryByShape(shape:
|
|
28
|
+
export declare function getGeometryByShape(shape: ShapeGeometryData, uvTransform?: number[]): GeometryFromShape;
|
|
29
29
|
export declare function rotateVec2(out: vec2 | number[], vec2: vec2, angleInRad: number): vec2;
|
|
30
30
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextureSourceType } from './types';
|
|
2
|
-
import type { TextureFactorySourceFrom, TextureSourceOptions, TextureDataType } from './types';
|
|
2
|
+
import type { TextureFactorySourceFrom, TextureSourceOptions, TextureDataType, TextureOptionsBase } from './types';
|
|
3
3
|
import type { Engine } from '../engine';
|
|
4
4
|
import { EffectsObject } from '../effects-object';
|
|
5
5
|
/**
|
|
@@ -36,7 +36,16 @@ export declare abstract class Texture extends EffectsObject {
|
|
|
36
36
|
* @param url - 要创建的 Texture URL
|
|
37
37
|
* @since 2.0.0
|
|
38
38
|
*/
|
|
39
|
-
static fromImage(url: string, engine: Engine): Promise<Texture>;
|
|
39
|
+
static fromImage(url: string, engine: Engine, options?: TextureOptionsBase): Promise<Texture>;
|
|
40
|
+
/**
|
|
41
|
+
* 通过视频 URL 创建 Texture 对象。
|
|
42
|
+
* @param url - 要创建的 Texture URL
|
|
43
|
+
* @param engine - 引擎对象
|
|
44
|
+
* @param options - 可选的 Texture 选项
|
|
45
|
+
* @since 2.1.0
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
static fromVideo(url: string, engine: Engine, options?: TextureOptionsBase): Promise<Texture>;
|
|
40
49
|
/**
|
|
41
50
|
* 通过数据创建 Texture 对象。
|
|
42
51
|
* @param data - 要创建的 Texture 数据
|
package/dist/texture/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { Texture2DSourceOptions, TextureCubeSourceOptions } from './types';
|
|
3
|
-
import type { Engine } from '../engine';
|
|
4
3
|
type TextureJSONOptions = spec.SerializedTextureSource & spec.TextureConfigOptionsBase & spec.TextureFormatOptions;
|
|
5
|
-
export declare function deserializeMipmapTexture(textureOptions: TextureJSONOptions, bins: ArrayBuffer[],
|
|
4
|
+
export declare function deserializeMipmapTexture(textureOptions: TextureJSONOptions, bins: ArrayBuffer[], assets: Record<string, any>, files?: spec.BinaryFile[]): Promise<Texture2DSourceOptions | TextureCubeSourceOptions>;
|
|
6
5
|
export {};
|
package/dist/transform.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ export interface TransformProps {
|
|
|
12
12
|
anchor?: spec.vec2 | Vector2;
|
|
13
13
|
valid?: boolean;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
15
18
|
export declare class Transform implements Disposable {
|
|
16
19
|
/**
|
|
17
20
|
* 转换右手坐标系左手螺旋对应的四元数到对应的旋转角
|
|
@@ -79,6 +82,11 @@ export declare class Transform implements Disposable {
|
|
|
79
82
|
* 最终模型矩阵对应变换的缓存,当自身矩阵或父矩阵有修改时需要更新
|
|
80
83
|
*/
|
|
81
84
|
private readonly worldTRSCache;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @param props
|
|
88
|
+
* @param parent
|
|
89
|
+
*/
|
|
82
90
|
constructor(props?: TransformProps, parent?: Transform);
|
|
83
91
|
set parentTransform(transform: Transform | null);
|
|
84
92
|
get parentTransform(): Transform | null;
|
package/dist/utils/color.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export type color = [r: number, g: number, b: number, a: number];
|
|
2
1
|
export interface ColorStop {
|
|
3
2
|
stop: number;
|
|
4
|
-
color:
|
|
3
|
+
color: number[];
|
|
5
4
|
}
|
|
6
|
-
export declare function colorToArr(hex: string | number[], normalized?: boolean):
|
|
7
|
-
export declare function getColorFromGradientStops(stops: ColorStop[], key: number, normalize?: boolean):
|
|
5
|
+
export declare function colorToArr(hex: string | number[], normalized?: boolean): number[];
|
|
6
|
+
export declare function getColorFromGradientStops(stops: ColorStop[], key: number, normalize?: boolean): number[];
|
|
8
7
|
export declare function colorStopsFromGradient(gradient: number[][] | Record<string, string | number[]>): ColorStop[];
|
|
9
|
-
export declare function interpolateColor(a:
|
|
8
|
+
export declare function interpolateColor(a: number[], b: number[], s: number, origin?: boolean): number[];
|
|
10
9
|
export declare function parsePercent(c: string): number;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare const isArray: (arg: any) => arg is any[];
|
|
|
60
60
|
* @param obj - 要判断的对象
|
|
61
61
|
* @return
|
|
62
62
|
*/
|
|
63
|
-
export declare function isFunction(obj: unknown):
|
|
63
|
+
export declare function isFunction(obj: unknown): obj is Function;
|
|
64
64
|
/**
|
|
65
65
|
* 判断对象是否是`Object`类型
|
|
66
66
|
*
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -28,8 +28,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
28
28
|
* 元素绑定的父元素,
|
|
29
29
|
* 1. 当元素没有绑定任何父元素时,parent为空,transform.parentTransform 为 composition.transform
|
|
30
30
|
* 2. 当元素绑定 nullItem 时,parent 为 nullItem, transform.parentTransform 为 nullItem.transform
|
|
31
|
-
* 3. 当元素绑定 TreeItem 的node时,parent为treeItem, transform.parentTransform 为 tree.nodes[i].transform(绑定的node节点上的transform)
|
|
32
|
-
* 4. 当元素绑定 TreeItem 本身时,行为表现和绑定 nullItem 相同
|
|
33
31
|
*/
|
|
34
32
|
parent?: VFXItem;
|
|
35
33
|
children: VFXItem[];
|
|
@@ -41,6 +39,10 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
41
39
|
* 合成属性
|
|
42
40
|
*/
|
|
43
41
|
composition: Composition | null;
|
|
42
|
+
/**
|
|
43
|
+
* 元素动画的当前时间
|
|
44
|
+
*/
|
|
45
|
+
time: number;
|
|
44
46
|
/**
|
|
45
47
|
* 元素动画的持续时间
|
|
46
48
|
*/
|
|
@@ -91,14 +93,54 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
91
93
|
private listIndex;
|
|
92
94
|
private isEnabled;
|
|
93
95
|
private eventProcessor;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @param item
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
94
101
|
static isComposition(item: VFXItem): boolean;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param item
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
95
107
|
static isSprite(item: VFXItem): boolean;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @param item
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
96
113
|
static isParticle(item: VFXItem): boolean;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param item
|
|
117
|
+
* @returns
|
|
118
|
+
*/
|
|
97
119
|
static isNull(item: VFXItem): boolean;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @param item
|
|
123
|
+
* @returns
|
|
124
|
+
*/
|
|
98
125
|
static isTree(item: VFXItem): boolean;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @param item
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
99
131
|
static isCamera(item: VFXItem): boolean;
|
|
100
|
-
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @param ancestorCandidate
|
|
135
|
+
* @param descendantCandidate
|
|
136
|
+
* @returns
|
|
137
|
+
*/
|
|
101
138
|
static isAncestor(ancestorCandidate: VFXItem, descendantCandidate: VFXItem): boolean;
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @param engine
|
|
142
|
+
* @param props
|
|
143
|
+
*/
|
|
102
144
|
constructor(engine: Engine, props?: VFXItemProps);
|
|
103
145
|
/**
|
|
104
146
|
* 返回元素创建的数据
|
|
@@ -198,12 +240,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
198
240
|
* @returns 元素变换的拷贝
|
|
199
241
|
*/
|
|
200
242
|
getWorldTransform(transform?: Transform): Transform;
|
|
201
|
-
/**
|
|
202
|
-
* 获取元素内部节点的变换,目前只有场景树元素在使用
|
|
203
|
-
* @param itemId 元素id信息,如果带^就返回内部节点变换,否则返回自己的变换
|
|
204
|
-
* @returns 元素变换或内部节点变换
|
|
205
|
-
*/
|
|
206
|
-
getNodeTransform(itemId: string): Transform;
|
|
207
243
|
/**
|
|
208
244
|
* 设置元素在 3D 坐标轴上相对移动
|
|
209
245
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.10",
|
|
4
4
|
"description": "Galacean Effects runtime core for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
"registry": "https://registry.npmjs.org"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@galacean/effects-specification": "2.0.
|
|
45
|
+
"@galacean/effects-specification": "2.1.0-alpha.2",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
|
-
"uuid": "9.0.1"
|
|
48
|
+
"uuid": "9.0.1",
|
|
49
|
+
"libtess": "1.2.2"
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
51
52
|
"prebuild": "pnpm clean",
|
package/dist/image-asset.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 后处理配置
|
|
3
|
-
*/
|
|
4
|
-
export interface PostProcessVolumeData {
|
|
5
|
-
useHDR: boolean;
|
|
6
|
-
useBloom: boolean;
|
|
7
|
-
threshold: number;
|
|
8
|
-
bloomIntensity: number;
|
|
9
|
-
brightness: number;
|
|
10
|
-
saturation: number;
|
|
11
|
-
contrast: number;
|
|
12
|
-
vignetteIntensity: number;
|
|
13
|
-
vignetteSmoothness: number;
|
|
14
|
-
vignetteRoundness: number;
|
|
15
|
-
useToneMapping: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const defaultGlobalVolume: PostProcessVolumeData;
|
/package/dist/plugins/timeline/{playables → playable-assets}/sub-composition-playable-asset.d.ts
RENAMED
|
File without changes
|