@galacean/effects-plugin-model 2.1.0-alpha.1 → 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/alipay.js +106 -615
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +108 -612
- package/dist/alipay.mjs.map +1 -1
- package/dist/douyin.js +106 -615
- package/dist/douyin.js.map +1 -1
- package/dist/douyin.mjs +108 -612
- package/dist/douyin.mjs.map +1 -1
- package/dist/gesture/index.d.ts +1 -0
- package/dist/gltf/loader-impl.d.ts +8 -18
- package/dist/gltf/protocol.d.ts +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +107 -616
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +109 -613
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +107 -889
- package/dist/loader.mjs.map +1 -1
- package/dist/plugin/index.d.ts +1 -2
- package/dist/plugin/model-tree-component.d.ts +26 -0
- package/dist/runtime/animation.d.ts +0 -131
- package/dist/runtime/common.d.ts +2 -2
- package/dist/runtime/light.d.ts +4 -0
- package/dist/runtime/scene.d.ts +4 -0
- package/dist/weapp.js +106 -615
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +108 -612
- package/dist/weapp.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/plugin/model-tree-item.d.ts +0 -132
- package/dist/plugin/model-tree-plugin.d.ts +0 -14
package/dist/gesture/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare class CameraGestureHandlerImp implements CameraGestureHandler {
|
|
|
8
8
|
private cameraCoordiante;
|
|
9
9
|
private startParams;
|
|
10
10
|
constructor(composition: Composition);
|
|
11
|
+
updateComposition(composition: Composition): void;
|
|
11
12
|
getItem(): VFXItem | undefined;
|
|
12
13
|
getCurrentTarget(): string;
|
|
13
14
|
getCurrentType(): CameraGestureType;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { spec, Geometry } from '@galacean/effects';
|
|
2
2
|
import type { TextureSourceOptions, math, Engine, Texture } from '@galacean/effects';
|
|
3
|
-
import type { SkyboxType, LoadSceneOptions, LoadSceneResult, Loader, ModelCamera, ModelLight,
|
|
4
|
-
import type { ModelMeshComponentData, ModelSkyboxComponentData, ModelLightComponentData, ModelCameraComponentData, ModelAnimationOptions, ModelMaterialOptions, ModelSkyboxOptions
|
|
3
|
+
import type { SkyboxType, LoadSceneOptions, LoadSceneResult, Loader, ModelCamera, ModelLight, ModelImageLike } from './protocol';
|
|
4
|
+
import type { ModelMeshComponentData, ModelSkyboxComponentData, ModelLightComponentData, ModelCameraComponentData, ModelAnimationOptions, ModelMaterialOptions, ModelSkyboxOptions } from '../index';
|
|
5
5
|
import { PSkyboxType } from '../runtime';
|
|
6
|
-
import type {
|
|
6
|
+
import type { PSkyboxURLParams } from '../runtime/skybox';
|
|
7
|
+
import type { GLTFImage, GLTFMaterial, GLTFTexture, GLTFLight, GLTFCamera, GLTFAnimation, GLTFResources, GLTFImageBasedLight, GLTFPrimitive } from '@vvfx/resource-detection';
|
|
7
8
|
import type { CubeImage } from '@vvfx/resource-detection/dist/src/gltf-tools/gltf-image-based-light';
|
|
8
9
|
export interface LoaderOptions {
|
|
9
10
|
compatibleMode?: 'gltf' | 'tiny3d';
|
|
@@ -13,12 +14,7 @@ export declare function setDefaultEffectsGLTFLoader(loader: Loader): void;
|
|
|
13
14
|
export declare class LoaderImpl implements Loader {
|
|
14
15
|
private sceneOptions;
|
|
15
16
|
private loaderOptions;
|
|
16
|
-
private gltfScene;
|
|
17
|
-
private gltfSkins;
|
|
18
17
|
private gltfMeshs;
|
|
19
|
-
private gltfLights;
|
|
20
|
-
private gltfCameras;
|
|
21
|
-
private gltfImages;
|
|
22
18
|
private gltfTextures;
|
|
23
19
|
private gltfMaterials;
|
|
24
20
|
private gltfAnimations;
|
|
@@ -51,21 +47,16 @@ export declare class LoaderImpl implements Loader {
|
|
|
51
47
|
getLoadResult(): LoadSceneResult;
|
|
52
48
|
addLight(data: ModelLight): void;
|
|
53
49
|
addCamera(camera: ModelCamera): void;
|
|
54
|
-
|
|
50
|
+
addSkybox(skybox: PSkyboxURLParams): void;
|
|
51
|
+
private tryAddSkybox;
|
|
55
52
|
createSkyboxComponentData(typeName: SkyboxType): {
|
|
56
53
|
imageList: spec.Image[];
|
|
57
54
|
textureOptionsList: TextureSourceOptions[];
|
|
58
55
|
component: spec.SkyboxComponentData;
|
|
59
56
|
};
|
|
60
|
-
|
|
57
|
+
dispose(): void;
|
|
58
|
+
clear(): void;
|
|
61
59
|
private computeSceneAABB;
|
|
62
|
-
/**
|
|
63
|
-
* 按照传入的动画播放参数,计算需要播放的动画索引
|
|
64
|
-
*
|
|
65
|
-
* @param treeOptions 节点树属性,需要初始化animations列表。
|
|
66
|
-
* @returns 返回计算的动画索引,-1表示没有动画需要播放,-88888888表示播放所有动画。
|
|
67
|
-
*/
|
|
68
|
-
getPlayAnimationIndex(treeOptions: ModelTreeOptions): number;
|
|
69
60
|
isPlayAnimation(): boolean;
|
|
70
61
|
isPlayAllAnimation(): boolean;
|
|
71
62
|
getRemarkString(): string;
|
|
@@ -83,7 +74,6 @@ export declare class LoaderImpl implements Loader {
|
|
|
83
74
|
processLight(lights: GLTFLight[], fromGLTF: boolean): void;
|
|
84
75
|
processCamera(cameras: GLTFCamera[], fromGLTF: boolean): void;
|
|
85
76
|
processMaterial(materials: GLTFMaterial[], fromGLTF: boolean): void;
|
|
86
|
-
createTreeOptions(scene: GLTFScene): ModelTreeOptions;
|
|
87
77
|
createAnimations(animations: GLTFAnimation[]): ModelAnimationOptions[];
|
|
88
78
|
createGeometry(primitive: GLTFPrimitive, hasSkinAnim: boolean): Geometry;
|
|
89
79
|
createMaterial(material: GLTFMaterial): ModelMaterialOptions;
|
package/dist/gltf/protocol.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { GLTFResources, GLTFMaterial, GLTFPrimitive, GLTFLight,
|
|
1
|
+
import type { GLTFResources, GLTFMaterial, GLTFPrimitive, GLTFLight, GLTFImage, GLTFTexture, GLTFCamera, GLTFAnimation, GLTFImageBasedLight } from '@vvfx/resource-detection';
|
|
2
2
|
import type { CubeImage } from '@vvfx/resource-detection/dist/src/gltf-tools/gltf-image-based-light';
|
|
3
3
|
import type { spec, TextureSourceOptions, EffectComponentData, Texture, Geometry } from '@galacean/effects';
|
|
4
|
-
import type { ModelAnimationOptions, ModelMaterialOptions, ModelSkyboxOptions,
|
|
4
|
+
import type { ModelAnimationOptions, ModelMaterialOptions, ModelSkyboxOptions, ModelLightComponentData, ModelCameraComponentData, ModelSkyboxComponentData } from '../index';
|
|
5
5
|
/**
|
|
6
6
|
* glTF 场景文件加载选项,主要用于 Demo 测试或外部测试调用
|
|
7
7
|
*/
|
|
@@ -82,6 +82,7 @@ export interface ModelLight {
|
|
|
82
82
|
range?: number;
|
|
83
83
|
innerConeAngle?: number;
|
|
84
84
|
outerConeAngle?: number;
|
|
85
|
+
followCamera?: boolean;
|
|
85
86
|
name: string;
|
|
86
87
|
position: spec.vec3;
|
|
87
88
|
rotation: spec.vec3;
|
|
@@ -113,7 +114,6 @@ export interface Loader {
|
|
|
113
114
|
processLight(lights: GLTFLight[], fromGLTF: boolean): void;
|
|
114
115
|
processCamera(cameras: GLTFCamera[], fromGLTF: boolean): void;
|
|
115
116
|
processMaterial(materials: GLTFMaterial[], fromGLTF: boolean): void;
|
|
116
|
-
createTreeOptions(scene: GLTFScene): ModelTreeOptions;
|
|
117
117
|
createAnimations(animations: GLTFAnimation[]): ModelAnimationOptions[];
|
|
118
118
|
createGeometry(primitive: GLTFPrimitive, hasSkinAnim: boolean): Geometry;
|
|
119
119
|
createMaterial(material: GLTFMaterial): ModelMaterialOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { spec } from '@galacean/effects';
|
|
2
|
+
/**
|
|
3
|
+
* 插件版本号
|
|
4
|
+
*/
|
|
2
5
|
export declare const version: string;
|
|
3
6
|
export type BaseTransform = spec.BaseItemTransform;
|
|
4
7
|
export type ModelBaseItem = spec.BaseItem;
|
|
@@ -19,7 +22,6 @@ export type ModelAmbientLightOptions = spec.ModelAmbientLightOptions;
|
|
|
19
22
|
export type ModelLightOptions = spec.ModelLightOptions;
|
|
20
23
|
export type ModelItemMesh = spec.ModelMeshItem<'studio'>;
|
|
21
24
|
export type ModelItemSkybox = spec.ModelSkyboxItem<'studio'>;
|
|
22
|
-
export type ModelItemTree = spec.ModelTreeItem<'studio'>;
|
|
23
25
|
export type ModelMeshContent = spec.ModelMeshItemContent<'studio'>;
|
|
24
26
|
export type ModelSkyboxContent = spec.SkyboxContent<'studio'>;
|
|
25
27
|
export type ModelMeshOptions = spec.ModelMeshOptions<'studio'>;
|