@galacean/effects-plugin-model 2.0.0-alpha.20 → 2.0.0-alpha.21

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.
@@ -292,7 +292,7 @@ export declare class PSkyboxCreator {
292
292
  * @param params - 天空盒参数
293
293
  * @returns 天空盒选项
294
294
  */
295
- static createSkyboxComponentData(engine: Engine, params: PSkyboxParams): {
295
+ static createSkyboxComponentData(params: PSkyboxParams): {
296
296
  imageList: spec.Image[];
297
297
  textureOptionsList: TextureSourceOptions[];
298
298
  component: spec.SkyboxComponentData;
@@ -304,7 +304,7 @@ export declare class PSkyboxCreator {
304
304
  * @returns 纹理
305
305
  */
306
306
  static createSpecularCubeMap(engine: Engine, params: PSkyboxParams): Promise<Texture>;
307
- static getSpecularCubeMapData(engine: Engine, params: PSkyboxParams): {
307
+ static getSpecularCubeMapData(params: PSkyboxParams): {
308
308
  images: spec.Image[];
309
309
  textureOptions: TextureSourceOptions;
310
310
  };
@@ -315,7 +315,7 @@ export declare class PSkyboxCreator {
315
315
  * @returns 纹理或未定义
316
316
  */
317
317
  static createDiffuseCubeMap(engine: Engine, params: PSkyboxParams): Promise<Texture | null>;
318
- static getDiffuseCubeMapData(engine: Engine, params: PSkyboxParams): {
318
+ static getDiffuseCubeMapData(params: PSkyboxParams): {
319
319
  images: spec.Image[];
320
320
  textureOptions: TextureSourceOptions;
321
321
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-plugin-model",
3
- "version": "2.0.0-alpha.20",
3
+ "version": "2.0.0-alpha.21",
4
4
  "description": "Galacean Effects player model plugin",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -38,15 +38,15 @@
38
38
  "registry": "https://registry.npmjs.org"
39
39
  },
40
40
  "dependencies": {
41
- "@galacean/effects-helper": "2.0.0-alpha.20"
41
+ "@galacean/effects-helper": "2.0.0-alpha.21"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@vvfx/resource-detection": "0.6.0-alpha.9",
45
45
  "@types/hammerjs": "^2.0.45",
46
46
  "fpsmeter": "^0.3.1",
47
47
  "hammerjs": "^2.0.8",
48
- "@galacean/effects": "2.0.0-alpha.20",
49
- "@galacean/effects-plugin-editor-gizmo": "2.0.0-alpha.20"
48
+ "@galacean/effects": "2.0.0-alpha.21",
49
+ "@galacean/effects-plugin-editor-gizmo": "2.0.0-alpha.21"
50
50
  },
51
51
  "scripts": {
52
52
  "dev": "vite",
@@ -1,18 +0,0 @@
1
- import type { Player } from '@galacean/effects';
2
- import type { LoadSceneOptions, LoadSceneECSResult } from './protocol';
3
- import { spec } from '@galacean/effects';
4
- import { LoaderECSImpl } from './loader-ecs';
5
- export declare class LoaderECSEx extends LoaderECSImpl {
6
- loadScene(options: LoadSceneOptions): Promise<LoadSceneECSResult>;
7
- }
8
- export interface LoadGLTFSceneECSOptions {
9
- url: string;
10
- player: Player;
11
- playAnimation?: number;
12
- playAllAnimation?: boolean;
13
- camera?: {
14
- position?: spec.vec3;
15
- rotation?: spec.vec3;
16
- };
17
- }
18
- export declare function loadGLTFSceneECS(options: LoadGLTFSceneECSOptions): Promise<spec.JSONScene>;
@@ -1,121 +0,0 @@
1
- import { spec } from '@galacean/effects';
2
- import type { Texture, Engine, TextureSourceOptions } from '@galacean/effects';
3
- import type { LoaderOptions, SkyboxType, LoadSceneOptions, LoadSceneECSResult, LoaderECS } from './protocol';
4
- import type { ModelMeshComponentData, ModelSkyboxComponentData, ModelAnimationOptions, ModelCameraOptions, ModelLightOptions, ModelTreeOptions, ModelLightComponentData, ModelCameraComponentData } from '../index';
5
- import { PSkyboxType } from '../runtime';
6
- import type { GLTFImage, GLTFTexture, GLTFScene, GLTFLight, GLTFCamera, GLTFAnimation, GLTFResources } from '@vvfx/resource-detection';
7
- export declare class LoaderECSImpl implements LoaderECS {
8
- private sceneOptions;
9
- private loaderOptions;
10
- private gltfScene;
11
- private gltfSkins;
12
- private gltfMeshs;
13
- private gltfLights;
14
- private gltfCameras;
15
- private gltfImages;
16
- private gltfTextures;
17
- private gltfMaterials;
18
- private gltfAnimations;
19
- private gltfImageBasedLights;
20
- composition: spec.CompositionData;
21
- timelineAssetId: string;
22
- images: spec.Image[];
23
- imageElements: HTMLImageElement[];
24
- textures: spec.TextureDefine[];
25
- items: spec.VFXItemData[];
26
- components: spec.ComponentData[];
27
- materials: spec.MaterialData[];
28
- shaders: spec.ShaderData[];
29
- geometries: spec.GeometryData[];
30
- animations: spec.AnimationClipData[];
31
- engine: Engine;
32
- constructor(composition?: spec.CompositionData);
33
- initial(engine: Engine, options?: LoaderOptions): void;
34
- loadScene(options: LoadSceneOptions): Promise<LoadSceneECSResult>;
35
- checkMeshComponentData(mesh: ModelMeshComponentData, resource: GLTFResources): void;
36
- processGLTFResource(resource: GLTFResources): void;
37
- processComponentData(components: spec.EffectComponentData[]): void;
38
- processLightComponentData(light: ModelLightComponentData): void;
39
- processCameraComponentData(camera: ModelCameraComponentData): void;
40
- processMeshComponentData(mesh: ModelMeshComponentData): void;
41
- processSkyboxComponentData(skybox: ModelSkyboxComponentData): void;
42
- processMaterialData(material: spec.MaterialData): void;
43
- processTextureOptions(options: TextureSourceOptions, isBaseColor: boolean, image?: {
44
- width: number;
45
- height: number;
46
- }): void;
47
- processMaterialTexture(material: spec.MaterialData, textureName: string, isBaseColor: boolean, dataMap: Record<string, TextureSourceOptions>): void;
48
- getLoadResult(): LoadSceneECSResult;
49
- addLight(data: ModelLight): void;
50
- addCamera(camera: ModelCamera): void;
51
- tryAddSkybox(skybox: ModelSkybox): Promise<void>;
52
- createTreeOptions(scene: GLTFScene): ModelTreeOptions;
53
- createAnimations(animations: GLTFAnimation[]): ModelAnimationOptions[];
54
- createTexture2D(image: GLTFImage, texture: GLTFTexture, isBaseColor: boolean): Promise<Texture>;
55
- createSkyboxComponentData(typeName: SkyboxType): {
56
- imageList: spec.Image[];
57
- textureOptionsList: TextureSourceOptions[];
58
- component: spec.SkyboxComponentData;
59
- };
60
- scaleColorVal(val: number, fromGLTF: boolean): number;
61
- scaleColorVec(vec: number[], fromGLTF: boolean): number[];
62
- createLightOptions(light: GLTFLight): ModelLightOptions;
63
- createCameraOptions(camera: GLTFCamera): ModelCameraOptions;
64
- private clear;
65
- /**
66
- * 按照传入的动画播放参数,计算需要播放的动画索引
67
- *
68
- * @param treeOptions 节点树属性,需要初始化animations列表。
69
- * @returns 返回计算的动画索引,-1表示没有动画需要播放,-88888888表示播放所有动画。
70
- */
71
- getPlayAnimationIndex(treeOptions: ModelTreeOptions): number;
72
- isPlayAnimation(): boolean;
73
- isPlayAllAnimation(): boolean;
74
- getRemarkString(): string;
75
- getCompositionDuration(): number;
76
- isTiny3dMode(): boolean;
77
- getItemDuration(): number;
78
- getItemEndBehavior(): spec.ItemEndBehavior;
79
- getSkyboxType(): PSkyboxType | undefined;
80
- isSkyboxVis(): boolean;
81
- ignoreSkybox(): boolean;
82
- isEnvironmentTest(): boolean;
83
- }
84
- export interface ModelCamera {
85
- fov: number;
86
- near: number;
87
- far: number;
88
- clipMode: spec.CameraClipMode;
89
- name: string;
90
- position: spec.vec3;
91
- rotation: spec.vec3;
92
- duration: number;
93
- endBehavior: spec.ItemEndBehavior;
94
- }
95
- export interface ModelLight {
96
- lightType: spec.LightType;
97
- color: spec.ColorData;
98
- intensity: number;
99
- range?: number;
100
- innerConeAngle?: number;
101
- outerConeAngle?: number;
102
- name: string;
103
- position: spec.vec3;
104
- rotation: spec.vec3;
105
- scale: spec.vec3;
106
- duration: number;
107
- endBehavior: spec.ItemEndBehavior;
108
- }
109
- export interface ModelSkybox {
110
- skyboxType?: string;
111
- renderable?: boolean;
112
- intensity?: number;
113
- reflectionsIntensity?: number;
114
- duration?: number;
115
- }
116
- export declare function getDefaultEffectsGLTFLoaderECS(engine: Engine, options?: LoaderOptions): LoaderECS;
117
- export declare function setDefaultEffectsGLTFLoaderECS(loader: LoaderECS): void;
118
- export declare function getPBRShaderProperties(): string;
119
- export declare function getUnlitShaderProperties(): string;
120
- export declare function getDefaultPBRMaterialData(): spec.MaterialData;
121
- export declare function getDefaultUnlitMaterialData(): spec.MaterialData;