@galacean/effects-core 2.0.0-alpha.27 → 2.0.0-alpha.29
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/camera.d.ts +4 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/post-process-volume.d.ts +15 -0
- package/dist/composition-source-manager.d.ts +0 -2
- package/dist/composition.d.ts +6 -5
- package/dist/downloader.d.ts +9 -0
- package/dist/effects-package.d.ts +10 -6
- package/dist/index.js +825 -680
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +822 -680
- package/dist/index.mjs.map +1 -1
- package/dist/math/translate.d.ts +1 -1
- package/dist/plugins/interact/interact-item.d.ts +1 -0
- package/dist/plugins/particle/particle-system.d.ts +1 -0
- package/dist/plugins/sprite/sprite-item.d.ts +0 -1
- package/dist/plugins/text/text-item.d.ts +8 -0
- package/dist/render/global-volume.d.ts +4 -5
- package/dist/render/render-frame.d.ts +6 -6
- package/dist/scene.d.ts +1 -1
- package/dist/template-image.d.ts +3 -3
- package/dist/utils/device.d.ts +3 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vfx-item.d.ts +1 -7
- package/package.json +2 -2
- package/dist/asset-migrations.d.ts +0 -5
- package/dist/plugins/cal/animation-mixer-playable.d.ts +0 -4
- package/dist/plugins/cal/animation-playable-output.d.ts +0 -4
package/dist/math/translate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3 } from '@galacean/effects-math/es/core/
|
|
1
|
+
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
2
|
import type { ItemLinearVelOverLifetime } from '../plugins';
|
|
3
3
|
import type { ValueGetter } from './value-getter';
|
|
4
4
|
export declare function translatePoint(x: number, y: number): number[];
|
|
@@ -25,6 +25,7 @@ export declare class InteractComponent extends RendererComponent {
|
|
|
25
25
|
dragRatio: number[];
|
|
26
26
|
/** 是否响应点击和拖拽交互事件 */
|
|
27
27
|
private _interactive;
|
|
28
|
+
private hasBeenAddedToComposition;
|
|
28
29
|
set interactive(enable: boolean);
|
|
29
30
|
get interactive(): boolean;
|
|
30
31
|
start(): void;
|
|
@@ -193,6 +193,7 @@ export declare class ParticleSystem extends Component {
|
|
|
193
193
|
resumeParticleEmission(): void;
|
|
194
194
|
getBoundingBox(): void | BoundingBoxSphere;
|
|
195
195
|
getHitTestParams: (force?: boolean) => void | HitTestCustomParams;
|
|
196
|
+
onAttached(): void;
|
|
196
197
|
fromData(data: unknown): void;
|
|
197
198
|
}
|
|
198
199
|
export {};
|
|
@@ -78,7 +78,6 @@ export declare class SpriteColorPlayableAsset extends PlayableAsset {
|
|
|
78
78
|
}
|
|
79
79
|
export interface SpriteColorPlayableAssetData extends spec.EffectsObjectData {
|
|
80
80
|
colorOverLifetime?: spec.ColorOverLifetime;
|
|
81
|
-
startColor?: spec.RGBAColorValue;
|
|
82
81
|
}
|
|
83
82
|
export declare class SpriteComponent extends RendererComponent {
|
|
84
83
|
renderer: SpriteItemRenderer;
|
|
@@ -5,6 +5,7 @@ import { SpriteComponent } from '../sprite/sprite-item';
|
|
|
5
5
|
import { TextLayout } from './text-layout';
|
|
6
6
|
import { TextStyle } from './text-style';
|
|
7
7
|
import type { Material } from '../../material';
|
|
8
|
+
import type { VFXItem } from '../../vfx-item';
|
|
8
9
|
export declare const DEFAULT_FONTS: string[];
|
|
9
10
|
export interface TextComponent extends TextComponentBase {
|
|
10
11
|
}
|
|
@@ -35,6 +36,7 @@ export declare class TextComponentBase {
|
|
|
35
36
|
engine: Engine;
|
|
36
37
|
material: Material;
|
|
37
38
|
lineCount: number;
|
|
39
|
+
item: VFXItem;
|
|
38
40
|
/***** mix 类型兼容用 *****/
|
|
39
41
|
private char;
|
|
40
42
|
updateWithOptions(options: spec.TextContentOptions): void;
|
|
@@ -129,6 +131,12 @@ export declare class TextComponentBase {
|
|
|
129
131
|
* @returns
|
|
130
132
|
*/
|
|
131
133
|
setFontScale(value: number): void;
|
|
134
|
+
/**
|
|
135
|
+
* 设置自适应宽高开关
|
|
136
|
+
* @param value - 是否自适应宽高开关
|
|
137
|
+
* @returns
|
|
138
|
+
*/
|
|
139
|
+
setAutoWidth(value: boolean): void;
|
|
132
140
|
/**
|
|
133
141
|
* 更新文本
|
|
134
142
|
* @returns
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 后处理配置
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
5
|
-
usePostProcessing: boolean;
|
|
4
|
+
export interface PostProcessVolumeData {
|
|
6
5
|
useHDR: boolean;
|
|
7
|
-
useBloom:
|
|
6
|
+
useBloom: boolean;
|
|
8
7
|
threshold: number;
|
|
9
8
|
bloomIntensity: number;
|
|
10
9
|
brightness: number;
|
|
@@ -13,6 +12,6 @@ export interface GlobalVolume {
|
|
|
13
12
|
vignetteIntensity: number;
|
|
14
13
|
vignetteSmoothness: number;
|
|
15
14
|
vignetteRoundness: number;
|
|
16
|
-
useToneMapping:
|
|
15
|
+
useToneMapping: boolean;
|
|
17
16
|
}
|
|
18
|
-
export declare const defaultGlobalVolume:
|
|
17
|
+
export declare const defaultGlobalVolume: PostProcessVolumeData;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { vec4 } from '@galacean/effects-specification';
|
|
2
|
-
import type { Matrix4 } from '@galacean/effects-math/es/core/
|
|
3
|
-
import { Vector2
|
|
2
|
+
import type { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
3
|
+
import { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
4
|
+
import { Vector4 } from '@galacean/effects-math/es/core/vector4';
|
|
4
5
|
import type { Camera } from '../camera';
|
|
5
6
|
import type { UniformValue } from '../material';
|
|
6
7
|
import { PassTextureCache } from '../paas-texture-cache';
|
|
@@ -13,8 +14,7 @@ import { Mesh } from './mesh';
|
|
|
13
14
|
import type { RenderPassClearAction, RenderPassColorAttachmentOptions, RenderPassDepthStencilAttachment, RenderPassDestroyOptions, RenderPassStoreAction } from './render-pass';
|
|
14
15
|
import { RenderPass } from './render-pass';
|
|
15
16
|
import type { Renderer } from './renderer';
|
|
16
|
-
import type {
|
|
17
|
-
import type { RendererComponent } from '../components';
|
|
17
|
+
import type { PostProcessVolume, RendererComponent } from '../components';
|
|
18
18
|
/**
|
|
19
19
|
* 渲染数据,保存了当前渲染使用到的数据。
|
|
20
20
|
*/
|
|
@@ -127,7 +127,7 @@ export interface RenderFrameOptions {
|
|
|
127
127
|
/**
|
|
128
128
|
* 后处理渲染配置
|
|
129
129
|
*/
|
|
130
|
-
globalVolume?:
|
|
130
|
+
globalVolume?: PostProcessVolume;
|
|
131
131
|
/**
|
|
132
132
|
* 名称
|
|
133
133
|
*/
|
|
@@ -165,7 +165,7 @@ export declare class RenderFrame implements Disposable {
|
|
|
165
165
|
/**
|
|
166
166
|
* 存放后处理的属性设置
|
|
167
167
|
*/
|
|
168
|
-
globalVolume:
|
|
168
|
+
globalVolume: PostProcessVolume;
|
|
169
169
|
renderer: Renderer;
|
|
170
170
|
resource: RenderFrameResource;
|
|
171
171
|
keepColorBuffer?: boolean;
|
package/dist/scene.d.ts
CHANGED
package/dist/template-image.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare function getBackgroundImage(template: TemplateContent, variables?:
|
|
1
|
+
import type * as spec from '@galacean/effects-specification';
|
|
2
|
+
export declare function getBackgroundImage(template: spec.TemplateContent, variables?: spec.TemplateVariables): string | string[] | HTMLImageElement | HTMLImageElement[] | undefined;
|
|
3
3
|
/**
|
|
4
4
|
* @param url
|
|
5
5
|
* @param template
|
|
@@ -7,4 +7,4 @@ export declare function getBackgroundImage(template: TemplateContent, variables?
|
|
|
7
7
|
* @param options
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
export declare function combineImageTemplate(url: string | HTMLImageElement, template?: TemplateContent, variables?:
|
|
10
|
+
export declare function combineImageTemplate(url: string | HTMLImageElement, template?: spec.TemplateContent, variables?: spec.TemplateVariables): Promise<HTMLImageElement>;
|
package/dist/utils/device.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare function getPixelRatio(): number;
|
|
2
2
|
export declare function isIOS(): boolean;
|
|
3
|
+
export declare function isIOSByUA(): number;
|
|
3
4
|
export declare function isAndroid(): boolean;
|
|
4
5
|
export declare function isSimulatorCellPhone(): boolean;
|
|
6
|
+
export declare function isMiniProgram(): boolean;
|
|
5
7
|
export declare function isAlipayMiniApp(): boolean;
|
|
8
|
+
export declare function isWechatMiniApp(): boolean;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/vfx-item.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
216
216
|
/**
|
|
217
217
|
* 获取元素用于计算光线投射的面片类型和参数
|
|
218
218
|
* @override
|
|
219
|
-
* @param force 元素没有开启交互也返回参数
|
|
219
|
+
* @param force - 元素没有开启交互也返回参数
|
|
220
220
|
*/
|
|
221
221
|
getHitTestParams(force?: boolean): void | HitTestBoxParams | HitTestTriangleParams | HitTestSphereParams | HitTestCustomParams;
|
|
222
222
|
/**
|
|
@@ -245,9 +245,3 @@ export declare namespace Item {
|
|
|
245
245
|
function isParticle(item: spec.Item): item is spec.ParticleItem;
|
|
246
246
|
function isNull(item: spec.Item): item is spec.NullItem;
|
|
247
247
|
}
|
|
248
|
-
/**
|
|
249
|
-
* (待废弃) 根据元素的类型创建对应的 `VFXItem` 实例
|
|
250
|
-
* @param props
|
|
251
|
-
* @param composition
|
|
252
|
-
*/
|
|
253
|
-
export declare function createVFXItem(props: VFXItemProps, composition: Composition): VFXItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.29",
|
|
4
4
|
"description": "Galacean Effects runtime core for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registry": "https://registry.npmjs.org"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@galacean/effects-specification": "2.0.0-alpha.
|
|
45
|
+
"@galacean/effects-specification": "2.0.0-alpha.23",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1"
|