@galacean/effects-threejs 2.0.0-alpha.9 → 2.0.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.
- package/README.md +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19999 -16874
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -7
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +19962 -16851
- package/dist/index.mjs.map +1 -1
- package/dist/material/three-material.d.ts +1 -1
- package/dist/three-composition.d.ts +2 -23
- package/dist/three-display-object.d.ts +4 -2
- package/dist/three-geometry.d.ts +7 -1
- package/dist/three-text-component.d.ts +19 -0
- package/dist/three-texture.d.ts +5 -0
- package/package.json +4 -4
|
@@ -167,7 +167,7 @@ export declare class ThreeMaterial extends Material {
|
|
|
167
167
|
isMacroEnabled(keyword: string): boolean;
|
|
168
168
|
clone(props?: MaterialProps): Material;
|
|
169
169
|
cloneUniforms(sourceMaterial: Material): void;
|
|
170
|
-
fromData(data:
|
|
170
|
+
fromData(data: unknown): void;
|
|
171
171
|
dispose(destroyOptions?: MaterialDestroyOptions): void;
|
|
172
172
|
}
|
|
173
173
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Scene, ShaderLibrary, Transform, MeshRendererOptions, EventSystem,
|
|
1
|
+
import type { Scene, ShaderLibrary, Transform, MeshRendererOptions, EventSystem, CompositionProps } from '@galacean/effects-core';
|
|
2
2
|
import { Composition } from '@galacean/effects-core';
|
|
3
3
|
import type THREE from 'three';
|
|
4
4
|
/**
|
|
@@ -28,27 +28,6 @@ export interface CompositionBaseProps {
|
|
|
28
28
|
* Shader 库
|
|
29
29
|
*/
|
|
30
30
|
shaderLibrary?: ShaderLibrary;
|
|
31
|
-
/**
|
|
32
|
-
* end 状态监听函数
|
|
33
|
-
*
|
|
34
|
-
* @param composition - composition 对象
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
onEnd?: (composition: Composition) => void;
|
|
38
|
-
/**
|
|
39
|
-
* 交互元素监听函数
|
|
40
|
-
*
|
|
41
|
-
* @param item
|
|
42
|
-
* @returns
|
|
43
|
-
*/
|
|
44
|
-
onMessageItem?: (item: MessageItem) => void;
|
|
45
|
-
/**
|
|
46
|
-
* player 暂停监听函授
|
|
47
|
-
*
|
|
48
|
-
* @param item
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
onPlayerPause?: (item: VFXItem<VFXItemContent>) => void;
|
|
52
31
|
}
|
|
53
32
|
export interface ThreeCompositionProps extends CompositionProps {
|
|
54
33
|
/**
|
|
@@ -68,7 +47,7 @@ export declare class ThreeComposition extends Composition {
|
|
|
68
47
|
* 发射器形状缓存 map
|
|
69
48
|
*/
|
|
70
49
|
static shape: Record<string, number>;
|
|
71
|
-
constructor(props: ThreeCompositionProps, scene: Scene
|
|
50
|
+
constructor(props: ThreeCompositionProps, scene: Scene);
|
|
72
51
|
/**
|
|
73
52
|
* 更新 video texture 数据
|
|
74
53
|
*/
|
|
@@ -25,11 +25,11 @@ export declare class ThreeDisplayObject extends THREE.Group {
|
|
|
25
25
|
compositions: ThreeComposition[];
|
|
26
26
|
camera?: THREE.Camera;
|
|
27
27
|
renderer: Renderer;
|
|
28
|
+
assetManager: AssetManager;
|
|
29
|
+
env: string;
|
|
28
30
|
readonly width: number;
|
|
29
31
|
readonly height: number;
|
|
30
|
-
assetManager: AssetManager;
|
|
31
32
|
private baseCompositionIndex;
|
|
32
|
-
env: string;
|
|
33
33
|
/**
|
|
34
34
|
*
|
|
35
35
|
* @param context
|
|
@@ -47,6 +47,8 @@ export declare class ThreeDisplayObject extends THREE.Group {
|
|
|
47
47
|
*/
|
|
48
48
|
loadScene(scene: SceneLoadType, options?: SceneLoadOptions): Promise<Composition>;
|
|
49
49
|
loadScene(scene: SceneLoadType[], options?: SceneLoadOptions): Promise<Composition[]>;
|
|
50
|
+
pause(): void;
|
|
51
|
+
resume(): void;
|
|
50
52
|
private createComposition;
|
|
51
53
|
/**
|
|
52
54
|
*
|
package/dist/three-geometry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Engine, GeometryProps, spec } from '@galacean/effects-core';
|
|
1
|
+
import type { Engine, GeometryProps, SkinProps, spec } from '@galacean/effects-core';
|
|
2
2
|
import { Geometry } from '@galacean/effects-core';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
/**
|
|
@@ -139,6 +139,12 @@ export declare class ThreeGeometry extends Geometry {
|
|
|
139
139
|
* @returns 返回绘制数量
|
|
140
140
|
*/
|
|
141
141
|
getDrawCount(): number;
|
|
142
|
+
/**
|
|
143
|
+
* 获取蒙皮数据
|
|
144
|
+
*
|
|
145
|
+
* @returns 返回蒙皮数据
|
|
146
|
+
*/
|
|
147
|
+
getSkinProps(): SkinProps;
|
|
142
148
|
/**
|
|
143
149
|
* 销毁方法
|
|
144
150
|
*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Engine, SpriteItemProps } from '@galacean/effects-core';
|
|
2
|
+
import { spec, TextComponentBase } from '@galacean/effects-core';
|
|
3
|
+
import { ThreeSpriteComponent } from './three-sprite-component';
|
|
4
|
+
export interface ThreeTextComponent extends TextComponentBase {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare class ThreeTextComponent extends ThreeSpriteComponent {
|
|
11
|
+
isDirty: boolean;
|
|
12
|
+
canvas: HTMLCanvasElement;
|
|
13
|
+
context: CanvasRenderingContext2D | null;
|
|
14
|
+
constructor(engine: Engine, props?: spec.TextContent);
|
|
15
|
+
update(dt: number): void;
|
|
16
|
+
fromData(data: SpriteItemProps): void;
|
|
17
|
+
updateWithOptions(options: spec.TextContentOptions): void;
|
|
18
|
+
updateTexture(flipY?: boolean): void;
|
|
19
|
+
}
|
package/dist/three-texture.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-threejs",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "Galacean Effects runtime threejs plugin for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
|
-
"
|
|
7
|
+
"browser": "./dist/index.min.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"registry": "https://registry.npmjs.org"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@galacean/effects-core": "2.0.0-
|
|
46
|
+
"@galacean/effects-core": "2.0.0-beta.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"three": "^0.149.0",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"build": "pnpm build:declaration && pnpm build:module",
|
|
55
55
|
"build:module": "rollup -c",
|
|
56
56
|
"build:declaration": "tsc -d --emitDeclarationOnly",
|
|
57
|
-
"clean": "rimraf dist && rimraf
|
|
57
|
+
"clean": "rimraf dist && rimraf \"*+(.tsbuildinfo)\""
|
|
58
58
|
}
|
|
59
59
|
}
|