@galacean/effects-plugin-model 0.0.1-alpha.0 → 0.0.1-alpha.2

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.
@@ -1,7 +1,7 @@
1
1
  import { Transform } from '@galacean/effects';
2
2
  import { PAnimationManager } from '../runtime';
3
3
  import type { ModelTreeVFXItem } from './model-tree-vfx-item';
4
- import type { MarsTreeOptions } from '../index';
4
+ import type { ModelTreeOptions } from '../index';
5
5
  export interface ModelTreeNode {
6
6
  name?: string;
7
7
  transform: Transform;
@@ -15,7 +15,7 @@ export declare class ModelTreeItem {
15
15
  private cacheMap;
16
16
  readonly baseTransform: Transform;
17
17
  animationManager: PAnimationManager;
18
- constructor(props: MarsTreeOptions, owner: ModelTreeVFXItem);
18
+ constructor(props: ModelTreeOptions, owner: ModelTreeVFXItem);
19
19
  tick(dt: number): void;
20
20
  getNodes(): ModelTreeNode[];
21
21
  getNodeById(nodeId: string | number): ModelTreeNode | undefined;
@@ -1,12 +1,12 @@
1
1
  import type { spec, Transform, Composition } from '@galacean/effects';
2
2
  import { VFXItem, TimelineComponent } from '@galacean/effects';
3
3
  import { ModelTreeItem } from './model-tree-item';
4
- import type { MarsItemTree, MarsTreeOptions } from '../index';
4
+ import type { ModelItemTree, ModelTreeOptions } from '../index';
5
5
  export declare class ModelTreeVFXItem extends VFXItem<ModelTreeItem> {
6
- options: MarsTreeOptions;
6
+ options: ModelTreeOptions;
7
7
  timeline?: TimelineComponent;
8
8
  get type(): spec.ItemType;
9
- onConstructed(props: MarsItemTree): void;
9
+ onConstructed(props: ModelItemTree): void;
10
10
  onLifetimeBegin(): void;
11
11
  protected onItemRemoved(composition: Composition, content?: ModelTreeItem | undefined): void;
12
12
  onItemUpdate(dt: number, lifetime: number): void;
@@ -1,13 +1,13 @@
1
1
  import type { HitTestBoxParams, HitTestCustomParams, HitTestSphereParams, Composition } from '@galacean/effects';
2
2
  import { VFXItem, spec, TimelineComponent } from '@galacean/effects';
3
- import type { MarsItemBounding, MarsItemCamera, MarsItemLight, MarsItemMesh, MarsItemSkybox } from '../index';
3
+ import type { ModelItemBounding, ModelItemCamera, ModelItemLight, ModelItemMesh, ModelItemSkybox } from '../index';
4
4
  import { PCamera, PLight, PSkybox } from '../runtime';
5
5
  import { PMesh } from '../runtime';
6
6
  export type ModelItem = PMesh | PCamera | PLight | PSkybox;
7
- export type ModelItemOptions = MarsItemMesh | MarsItemCamera | MarsItemLight | MarsItemSkybox;
7
+ export type ModelItemOptions = ModelItemMesh | ModelItemCamera | ModelItemLight | ModelItemSkybox;
8
8
  export declare class ModelVFXItem extends VFXItem<ModelItem> {
9
9
  options?: ModelItemOptions;
10
- bounding?: MarsItemBounding;
10
+ bounding?: ModelItemBounding;
11
11
  timeline?: TimelineComponent;
12
12
  get type(): spec.ItemType;
13
13
  set type(v: spec.ItemType);
@@ -15,7 +15,7 @@ export declare class ModelVFXItem extends VFXItem<ModelItem> {
15
15
  handleVisibleChanged(visible: boolean): void;
16
16
  doCreateContent(composition: Composition): PLight | PMesh | PCamera | PSkybox;
17
17
  private overwriteSkyboxFromCache;
18
- computeBoundingBox(): MarsItemBounding | undefined;
18
+ computeBoundingBox(): ModelItemBounding | undefined;
19
19
  updateTransform(): void;
20
20
  updateTransformPosition(x: number, y: number, z: number): void;
21
21
  onLifetimeBegin(composition: Composition, content: ModelItem): void;
@@ -1,6 +1,6 @@
1
1
  import type { Geometry, Engine } from '@galacean/effects';
2
2
  import { Texture } from '@galacean/effects';
3
- import type { MarsSkinOptions, MarsAnimTrackOptions, MarsAnimationOptions, MarsTreeOptions } from '../index';
3
+ import type { ModelSkinOptions, ModelAnimTrackOptions, ModelAnimationOptions, ModelTreeOptions } from '../index';
4
4
  import { Matrix4 } from '../math';
5
5
  import { PObject } from './object';
6
6
  import type { PSceneManager } from './scene';
@@ -17,7 +17,7 @@ export declare class PSkin extends PObject {
17
17
  inverseBindMatrices: Matrix4[];
18
18
  animationMatrices: Matrix4[];
19
19
  textureDataMode: TextureDataMode;
20
- create(options: MarsSkinOptions, engine: Engine, parentItem?: ModelTreeVFXItem): void;
20
+ create(options: ModelSkinOptions, engine: Engine, parentItem?: ModelTreeVFXItem): void;
21
21
  updateSkinMatrices(): void;
22
22
  computeMeshAnimMatrices(worldMatrix: Matrix4, matrixList: Float32Array, normalMatList: Float32Array): void;
23
23
  updateParentItem(parentItem: ModelTreeVFXItem): void;
@@ -56,7 +56,7 @@ export declare class PMorph extends PObject {
56
56
  */
57
57
  hasTangentMorph: boolean;
58
58
  /**
59
- * 通过 Mars 的 Geometry 数据创建 Morph 动画相关状态,并进行必要的正确性检查
59
+ * 通过 Geometry 数据创建 Morph 动画相关状态,并进行必要的正确性检查
60
60
  *
61
61
  * @param geometry - Mesh 的几何对象,是否包含 Morph 动画都是可以的
62
62
  */
@@ -89,7 +89,7 @@ export declare class PMorph extends PObject {
89
89
  * 主要用于统计 Morph 动画中新增的 Attribute 名称的个数,会作为最终的 weights 数组长度使用
90
90
  *
91
91
  * @param attributeNameList - Attribute 名数组列表,只与 Morph Target 中的属性有关
92
- * @param geometry - Mars 的 Geometry 对象,是否有 Morph 动画都可以
92
+ * @param geometry - Geometry 对象,是否有 Morph 动画都可以
93
93
  * @returns 存在的 Attribute 名称数目
94
94
  */
95
95
  getAttributeMorphCount(attributeNameList: string[], geometry: Geometry): number;
@@ -125,13 +125,12 @@ export declare class PAnimTrack {
125
125
  interp: PAnimInterpType;
126
126
  component: number;
127
127
  private sampler?;
128
- constructor(options: MarsAnimTrackOptions);
128
+ constructor(options: ModelAnimTrackOptions);
129
129
  dispose(): void;
130
130
  tick(time: number, treeItem: ModelTreeVFXItem, sceneManager?: PSceneManager): void;
131
131
  getEndTime(): number;
132
132
  /**
133
133
  * 生成 Mesh 元素的父节点
134
- * 为 Mesh 元素生成 Mars 中的父节点,这里是和燃燃确定的生成方式
135
134
  *
136
135
  * @param parentId - 父节点 id 名称
137
136
  * @param nodeIndex - Mesh 节点索引
@@ -160,7 +159,7 @@ export declare class PAnimation extends PObject {
160
159
  private time;
161
160
  private duration;
162
161
  private tracks;
163
- create(options: MarsAnimationOptions): void;
162
+ create(options: ModelAnimationOptions): void;
164
163
  tick(time: number, treeItem: ModelTreeVFXItem, sceneManager?: PSceneManager): void;
165
164
  dispose(): void;
166
165
  }
@@ -172,8 +171,8 @@ export declare class PAnimationManager extends PObject {
172
171
  private time;
173
172
  private animations;
174
173
  private sceneManager;
175
- constructor(treeOptions: MarsTreeOptions, ownerItem: ModelTreeVFXItem);
176
- createAnimation(animationOpts: MarsAnimationOptions): PAnimation;
174
+ constructor(treeOptions: ModelTreeOptions, ownerItem: ModelTreeVFXItem);
175
+ createAnimation(animationOpts: ModelAnimationOptions): PAnimation;
177
176
  tick(deltaSeconds: number): void;
178
177
  dispose(): void;
179
178
  getTreeItem(): ModelTreeVFXItem;
@@ -1,6 +1,6 @@
1
1
  import type { Mesh, Geometry, TextureSourceOptions, RenderPass, spec, Engine } from '@galacean/effects';
2
2
  import { Texture } from '@galacean/effects';
3
- import type { MarsSkyboxOptions } from '../index';
3
+ import type { ModelSkyboxOptions } from '../index';
4
4
  import type { FBOOptions } from '../utility/ri-helper';
5
5
  import type { PMaterialBase } from './material';
6
6
  import type { PSkyboxParams } from './skybox';
@@ -15,7 +15,7 @@ export declare class CompositionCache {
15
15
  private static brdfLutTexOptions?;
16
16
  private static skyboxOptions?;
17
17
  static loadStaticResources(): Promise<void>;
18
- static genSkyboxOptions(engine: Engine, params?: PSkyboxParams): Promise<MarsSkyboxOptions>;
18
+ static genSkyboxOptions(engine: Engine, params?: PSkyboxParams): Promise<ModelSkyboxOptions>;
19
19
  constructor(engine: Engine);
20
20
  setup(loadSkybox: boolean): void;
21
21
  getTexture(name: string): Texture | undefined;
@@ -30,5 +30,5 @@ export declare class CompositionCache {
30
30
  dispose(): void;
31
31
  getRenderPasses(): RenderPass[];
32
32
  getBrdfLutTexture(): Texture | undefined;
33
- getSkyboxOptions(): MarsSkyboxOptions | undefined;
33
+ getSkyboxOptions(): ModelSkyboxOptions | undefined;
34
34
  }
@@ -1,6 +1,6 @@
1
1
  import { spec } from '@galacean/effects';
2
2
  import type { ModelVFXItem } from '../plugin/model-vfx-item';
3
- import type { MarsItemCamera } from '../index';
3
+ import type { ModelItemCamera } from '../index';
4
4
  import type { Quaternion, Box3 } from '../math';
5
5
  import { Vector2, Vector3, Matrix4 } from '../math';
6
6
  import { PEntity } from './object';
@@ -14,7 +14,7 @@ export declare class PCamera extends PEntity {
14
14
  clipMode: spec.CameraClipMode;
15
15
  projectionMatrix: Matrix4;
16
16
  viewMatrix: Matrix4;
17
- constructor(camera: MarsItemCamera, width: number, height: number, ownerItem?: ModelVFXItem);
17
+ constructor(camera: ModelItemCamera, width: number, height: number, ownerItem?: ModelVFXItem);
18
18
  update(): void;
19
19
  getNewProjectionMatrix(fov: number): Matrix4;
20
20
  computeViewAABB(box: Box3): Box3;
@@ -30,7 +30,7 @@ export declare class PCameraManager {
30
30
  private defaultCamera;
31
31
  constructor();
32
32
  initial(width: number, height: number): void;
33
- insert(inCamera: MarsItemCamera, ownerItem?: ModelVFXItem): PCamera;
33
+ insert(inCamera: ModelItemCamera, ownerItem?: ModelVFXItem): PCamera;
34
34
  insertCamera(camera: PCamera): void;
35
35
  remove(camera: PCamera | number): void;
36
36
  dispose(): void;
@@ -1,4 +1,4 @@
1
- import { Transform as MarsTransform, spec } from '@galacean/effects';
1
+ import { Transform as EffectsTransform, spec } from '@galacean/effects';
2
2
  import { Quaternion, Euler, Vector3, Matrix4 } from '../math';
3
3
  import type { BaseTransform } from '../index';
4
4
  export declare enum PObjectType {
@@ -60,8 +60,8 @@ export declare class PTransform {
60
60
  private rotation;
61
61
  private scale;
62
62
  fromMatrix4(matrix: Matrix4): this;
63
- fromMarsTransform(trans: MarsTransform | BaseTransform): this;
64
- toMarsTransform(transform: MarsTransform): MarsTransform;
63
+ fromEffectsTransform(trans: EffectsTransform | BaseTransform): this;
64
+ toEffectsTransform(transform: EffectsTransform): EffectsTransform;
65
65
  fromBaseTransform(trans: BaseTransform): this;
66
66
  getTranslation(): Vector3;
67
67
  setTranslation(val: Vector3 | spec.vec3): void;
@@ -1,4 +1,4 @@
1
- import type { MarsItemLight } from '../index';
1
+ import type { ModelItemLight } from '../index';
2
2
  import { Vector2, Vector3 } from '../math';
3
3
  import { PLightType } from './common';
4
4
  import { PEntity } from './object';
@@ -12,7 +12,7 @@ export declare class PLight extends PEntity {
12
12
  innerConeAngle: number;
13
13
  lightType: PLightType;
14
14
  padding: Vector2;
15
- constructor(light: MarsItemLight, ownerItem?: ModelVFXItem);
15
+ constructor(light: ModelItemLight, ownerItem?: ModelVFXItem);
16
16
  tick(deltaSeconds: number): void;
17
17
  isDirectional(): boolean;
18
18
  isPoint(): boolean;
@@ -26,7 +26,7 @@ export declare class PLightManager {
26
26
  lightList: PLight[];
27
27
  constructor();
28
28
  tick(deltaSeconds: number): void;
29
- insertItem(inLight: MarsItemLight, ownerItem?: ModelVFXItem): PLight;
29
+ insertItem(inLight: ModelItemLight, ownerItem?: ModelVFXItem): PLight;
30
30
  insertLight(inLight: PLight): PLight;
31
31
  remove(inLight: PLight): void;
32
32
  dispose(): void;
@@ -1,6 +1,6 @@
1
1
  import type { Material, Texture } from '@galacean/effects';
2
2
  import { spec } from '@galacean/effects';
3
- import type { MarsMaterialOptions, MarsMaterialUnlitOptions, MarsMaterialPBROptions } from '../index';
3
+ import type { ModelMaterialOptions, ModelMaterialUnlitOptions, ModelMaterialPBROptions } from '../index';
4
4
  import { Vector3, Vector4, Matrix3 } from '../math';
5
5
  import { PMaterialType, PBlendMode, PFaceSideMode } from './common';
6
6
  import { PObject } from './object';
@@ -37,7 +37,7 @@ export declare abstract class PMaterialBase extends PObject {
37
37
  export declare class PMaterialUnlit extends PMaterialBase {
38
38
  private baseColorFactor;
39
39
  private baseColorTexture?;
40
- create(options: MarsMaterialUnlitOptions): void;
40
+ create(options: ModelMaterialUnlitOptions): void;
41
41
  dispose(): void;
42
42
  getShaderFeatures(): string[];
43
43
  updateUniforms(material: Material): void;
@@ -67,7 +67,7 @@ export declare class PMaterialPBR extends PMaterialBase {
67
67
  emissiveFactor: Vector3;
68
68
  emissiveIntensity: number;
69
69
  enableShadow: boolean;
70
- create(options: MarsMaterialPBROptions): void;
70
+ create(options: ModelMaterialPBROptions): void;
71
71
  dispose(): void;
72
72
  getShaderFeatures(): string[];
73
73
  updateUniforms(material: Material): void;
@@ -97,5 +97,5 @@ export declare class PMaterialPBR extends PMaterialBase {
97
97
  setEmissiveFactor(val: Vector3 | spec.vec3): void;
98
98
  }
99
99
  export type PMaterial = PMaterialUnlit | PMaterialPBR;
100
- export declare function createPluginMaterial(options: MarsMaterialOptions): PMaterial;
100
+ export declare function createPluginMaterial(options: ModelMaterialOptions): PMaterial;
101
101
  export declare function createInternalMaterial(options: {}): {};
@@ -1,6 +1,6 @@
1
1
  import type { Geometry, Engine } from '@galacean/effects';
2
2
  import { spec, Mesh, Material } from '@galacean/effects';
3
- import type { MarsItemMesh, MarsMaterialOptions, MarsPrimitiveOptions } from '../index';
3
+ import type { ModelItemMesh, ModelMaterialOptions, ModelPrimitiveOptions } from '../index';
4
4
  import { PShadowType } from './common';
5
5
  import { PEntity } from './object';
6
6
  import type { PMaterial } from './material';
@@ -19,11 +19,11 @@ export declare class PMesh extends PEntity {
19
19
  */
20
20
  parentIndex: number;
21
21
  /**
22
- * Mars 元素的父节点
22
+ * 元素的父节点
23
23
  */
24
24
  parentItem?: ModelTreeVFXItem;
25
25
  /**
26
- * Mars 元素的父节点 Id
26
+ * 元素的父节点 Id
27
27
  */
28
28
  parentItemId?: string;
29
29
  skin?: PSkin;
@@ -39,7 +39,7 @@ export declare class PMesh extends PEntity {
39
39
  boundingBoxMesh?: BoxMesh;
40
40
  isBuilt: boolean;
41
41
  isDisposed: boolean;
42
- constructor(engine: Engine, itemMesh: MarsItemMesh, ownerItem?: ModelVFXItem, parentItem?: ModelTreeVFXItem);
42
+ constructor(engine: Engine, itemMesh: ModelItemMesh, ownerItem?: ModelVFXItem, parentItem?: ModelTreeVFXItem);
43
43
  build(lightCount: number, uniformSemantics: {
44
44
  [k: string]: any;
45
45
  }, skybox?: PSkybox): void;
@@ -82,15 +82,15 @@ export declare class PPrimitive {
82
82
  private jointMatrixTexture?;
83
83
  private jointNormalMatTexture?;
84
84
  name: string;
85
- marsMesh: Mesh;
86
- marsPriority: number;
85
+ effectsMesh: Mesh;
86
+ effectsPriority: number;
87
87
  boundingBox: Box3;
88
88
  isCompressed: boolean;
89
89
  shadowType: PShadowType;
90
90
  shadowMesh?: Mesh;
91
91
  shadowMaterial?: PMaterialShadowBase;
92
92
  constructor(engine: Engine);
93
- create(options: MarsPrimitiveOptions, parent: PMesh): void;
93
+ create(options: ModelPrimitiveOptions, parent: PMesh): void;
94
94
  build(lightCount: number, uniformSemantics: {
95
95
  [k: string]: any;
96
96
  }, skybox?: PSkybox): void;
@@ -111,11 +111,11 @@ export declare class PPrimitive {
111
111
  private updateUniformsByAnimation;
112
112
  private updateUniformsByScene;
113
113
  hasSkin(): boolean;
114
- getMarsGeometry(): Geometry;
114
+ getEffectsGeometry(): Geometry;
115
115
  setGeometry(val: PGeometry | Geometry): void;
116
- setMaterial(val: PMaterial | MarsMaterialOptions): void;
117
- getMarsMaterial(): Material;
118
- getShadowMarsMaterial(): Material | undefined;
116
+ setMaterial(val: PMaterial | ModelMaterialOptions): void;
117
+ getModelMaterial(): Material;
118
+ getShadowModelMaterial(): Material | undefined;
119
119
  isEnableShadow(): boolean;
120
120
  isUnlitMaterial(): boolean;
121
121
  /**
@@ -101,16 +101,16 @@ export declare class PSceneManager {
101
101
  updateDefaultRenderPass(frame: RenderFrame): void;
102
102
  /**
103
103
  * 动态调整 Mesh 渲染优先级
104
- * 主要是为了和 Tiny 渲染对齐,正常 Mars 渲染不进行调整
104
+ * 主要是为了和 Tiny 渲染对齐,正常渲染不进行调整
105
105
  *
106
106
  * @param states - 场景中的状态数据
107
107
  */
108
108
  dynamicSortMeshes(states: PSceneStates): void;
109
109
  /**
110
110
  * 查询场景中的 Mesh
111
- * 通过 Mars 的 parentId 查询 Mesh 对象,可能找不到 Mesh 对象
111
+ * 通过 parentId 查询 Mesh 对象,可能找不到 Mesh 对象
112
112
  *
113
- * @param parentId - Mars Item 中定义的 parentId
113
+ * @param parentId - Item 中定义的 parentId
114
114
  * @returns 查询到的 PMesh,或者是没找到。如果 Mesh 不可见,也是没找到。
115
115
  */
116
116
  queryMesh(parentId: string): PMesh | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { Mesh, Material, TextureSourceOptions, Engine } from '@galacean/effects';
2
2
  import { Texture } from '@galacean/effects';
3
- import type { MarsItemSkybox, MarsSkyboxOptions } from '../index';
3
+ import type { ModelItemSkybox, ModelSkyboxOptions } from '../index';
4
4
  import { PEntity } from './object';
5
5
  import { PMaterialBase } from './material';
6
6
  import type { CompositionCache } from './cache';
@@ -20,7 +20,7 @@ export declare class PSkybox extends PEntity {
20
20
  skyboxMesh?: Mesh;
21
21
  skyboxMaterial?: PMaterialSkyboxFilter;
22
22
  isBuilt: boolean;
23
- constructor(skybox: MarsItemSkybox, ownerItem?: ModelVFXItem);
23
+ constructor(skybox: ModelItemSkybox, ownerItem?: ModelVFXItem);
24
24
  setup(brdfLUT?: Texture): void;
25
25
  build(sceneCache: CompositionCache): void;
26
26
  dispose(): void;
@@ -78,7 +78,7 @@ export declare enum PSkyboxType {
78
78
  export declare class PSkyboxCreator {
79
79
  static getBrdfLutTextureOptions(): Promise<TextureSourceOptions>;
80
80
  static createBrdfLutTexture(engine: Engine): Promise<Texture>;
81
- static createSkyboxOptions(engine: Engine, params: PSkyboxParams): Promise<MarsSkyboxOptions>;
81
+ static createSkyboxOptions(engine: Engine, params: PSkyboxParams): Promise<ModelSkyboxOptions>;
82
82
  static createSpecularCubeMap(engine: Engine, params: PSkyboxParams): Promise<Texture>;
83
83
  static createDiffuseCubeMap(engine: Engine, params: PSkyboxParams): Promise<Texture | undefined>;
84
84
  static getSkyboxParams(skyboxType?: PSkyboxType): PSkyboxURLParams;
@@ -1,7 +1,7 @@
1
1
  import type { Composition, Ray, Region, spec } from '@galacean/effects';
2
2
  import { Vector3 } from '../math';
3
- import type { MarsItemBounding } from '../index';
4
- declare function RayIntersectsBoxWithRotation(ray: Ray, matrixData: spec.mat4, bounding: MarsItemBounding): number[][] | undefined;
3
+ import type { ModelItemBounding } from '../index';
4
+ declare function RayIntersectsBoxWithRotation(ray: Ray, matrixData: spec.mat4, bounding: ModelItemBounding): number[][] | undefined;
5
5
  declare function RayBoxTesting(ro: Vector3, rd: Vector3, bmin: Vector3, bmax: Vector3): number | undefined;
6
6
  declare function RayTriangleTesting(ro: Vector3, rd: Vector3, a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean): number | undefined;
7
7
  declare function CompositionHitTest(composition: Composition, x: number, y: number): Region[];
@@ -1,15 +1,15 @@
1
1
  import type { Scene, Composition, Attribute, GeometryProps, TextureSourceOptions, TextureSourceCubeData, TextureConfigOptions, Engine } from '@galacean/effects';
2
2
  import { Player, spec, Transform, Mesh, Texture, Geometry, Renderer, RenderPass } from '@galacean/effects';
3
3
  import type { GLTFCamera, GLTFImage, GLTFLight, GLTFTexture } from '@vvfx/resource-detection';
4
- import type { MarsAnimationOptions, MarsMeshOptions, MarsMaterialOptions, MarsLightOptions, MarsCameraOptions, MarsSkyboxOptions, MarsSkinOptions, MarsPrimitiveOptions, MarsTextureTransform, MarsTreeOptions, MarsAnimTrackOptions } from '../index';
4
+ import type { ModelAnimationOptions, ModelMeshOptions, ModelMaterialOptions, ModelLightOptions, ModelCameraOptions, ModelSkyboxOptions, ModelSkinOptions, ModelPrimitiveOptions, ModelTextureTransform, ModelTreeOptions, ModelAnimTrackOptions } from '../index';
5
5
  import type { Box3 } from '../math';
6
6
  import { Matrix3, Matrix4, Vector3, Vector4 } from '../math';
7
7
  import type { FBOOptions } from './ri-helper';
8
8
  import type { PMaterialBase } from '../runtime/material';
9
9
  import type { PImageBufferData } from '../runtime/skybox';
10
10
  import type { CompositionCache } from '../runtime/cache';
11
- type MarsRIVertexArray = Float32Array | Int32Array | Int16Array | Int8Array | Uint32Array | Uint16Array | Uint8Array;
12
- export declare class MarsRIHelper {
11
+ type VertexArray = Float32Array | Int32Array | Int16Array | Int8Array | Uint32Array | Uint16Array | Uint8Array;
12
+ export declare class WebGLHelper {
13
13
  static cubemapTexConfig: TextureConfigOptions;
14
14
  static cubemapMipTexConfig: TextureConfigOptions;
15
15
  static createTexture2D(engine: Engine, image: GLTFImage, texture: GLTFTexture, isBaseColor?: boolean, tiny3dMode?: boolean): Promise<Texture>;
@@ -47,18 +47,18 @@ export declare class MarsRIHelper {
47
47
  static isPow2(v: number): boolean;
48
48
  }
49
49
  export declare class MeshHelper {
50
- static createMarsFilterMesh(engine: Engine, name: string, material: PMaterialBase, uniformSemantics: {
50
+ static createFilterMesh(engine: Engine, name: string, material: PMaterialBase, uniformSemantics: {
51
51
  [k: string]: any;
52
52
  }): Mesh;
53
53
  static getPlaneGeometry(): GeometryProps;
54
54
  static getPlaneVertexArray(): Float32Array;
55
55
  }
56
- export interface MarsSceneInfo {
56
+ export interface EffectsSceneInfo {
57
57
  loadSkybox?: boolean;
58
58
  }
59
59
  export declare class PluginHelper {
60
- static createLightOptions(light: GLTFLight): MarsLightOptions;
61
- static createCameraOptions(camera: GLTFCamera): MarsCameraOptions | undefined;
60
+ static createLightOptions(light: GLTFLight): ModelLightOptions;
61
+ static createCameraOptions(camera: GLTFCamera): ModelCameraOptions | undefined;
62
62
  static toPlayerColor3(color: spec.vec3): spec.vec3;
63
63
  static toPlayerColor4(color: spec.vec4): spec.vec4;
64
64
  static toPluginColor3(color: spec.vec3): spec.vec3;
@@ -68,7 +68,7 @@ export declare class PluginHelper {
68
68
  static scaleTo255(val: number): number;
69
69
  static scaleTo1(val: number): number;
70
70
  static focusOnPoint(cameraPosition: spec.vec3, YRotationAngle: number, targetPoint: spec.vec3): Transform;
71
- static preprocessMarsScene(scene: Scene, runtimeEnv: string, compatibleMode: string, autoAdjustScene: boolean): MarsSceneInfo;
71
+ static preprocessEffectsScene(scene: Scene, runtimeEnv: string, compatibleMode: string, autoAdjustScene: boolean): EffectsSceneInfo;
72
72
  static preprocessTextureOptions(index: number, textures: Array<TextureSourceOptions>, isBaseColor: boolean, tiny3dMode: boolean): void;
73
73
  static setupItem3DOptions(scene: Scene, cache: CompositionCache, composition: Composition): void;
74
74
  static createGeometry(engine: Engine, geomJson: spec.GeometryOptionsJSON, bins: ArrayBuffer[]): Geometry;
@@ -80,7 +80,7 @@ export declare class WebHelper {
80
80
  static getImageFileName(url: string, ext?: string): string;
81
81
  static getCurrnetTimeStr(): string;
82
82
  static saveFileForURL(url: string, filename: string): void;
83
- static createPlayer(): Player;
83
+ static createPlayer(manualRender?: boolean): Player;
84
84
  static sleep(ms: number): Promise<unknown>;
85
85
  static loadImageFromGLTFImage(image: GLTFImage): Promise<HTMLImageElement>;
86
86
  static loadImageFromImageData(image: PImageBufferData): Promise<HTMLImageElement>;
@@ -92,7 +92,7 @@ export declare class WebHelper {
92
92
  static getWebGLCanvasImageBuffer(canvas: HTMLCanvasElement): Uint8Array;
93
93
  }
94
94
  export declare class VertexAttribBuffer {
95
- data: MarsRIVertexArray;
95
+ data: VertexArray;
96
96
  component: number;
97
97
  length: number;
98
98
  offset: number;
@@ -165,25 +165,25 @@ export declare class CheckerHelper {
165
165
  static checkNumberArray(v: number[]): boolean;
166
166
  static checkTexture(v: Texture): boolean;
167
167
  static checkTextureUndef(v: Texture | undefined): boolean;
168
- static checkMarsTexTransform(v: MarsTextureTransform): boolean;
169
- static checkMarsTexTransformUndef(v: MarsTextureTransform | undefined): boolean;
170
- static checkMarsMatBlending(v: spec.MaterialBlending | undefined): boolean;
171
- static checkMarsMatSide(v: spec.SideMode | undefined): boolean;
168
+ static checkTexTransform(v: ModelTextureTransform): boolean;
169
+ static checkTexTransformUndef(v: ModelTextureTransform | undefined): boolean;
170
+ static checkMatBlending(v: spec.MaterialBlending | undefined): boolean;
171
+ static checkMatSide(v: spec.SideMode | undefined): boolean;
172
172
  static checkAnimPath(v: string): boolean;
173
173
  static checkAnimInterp(v: string): boolean;
174
- static assertGeometry(v: Geometry, s?: MarsSkinOptions): void;
174
+ static assertGeometry(v: Geometry, s?: ModelSkinOptions): void;
175
175
  static assertGeometryBuffer(v: Geometry, name: string, drawCount: number): void;
176
176
  static createAttributeArray(v: Geometry, name: string): AttributeArray | undefined;
177
- static assertMarsSkinOptions(v: MarsSkinOptions): void;
178
- static assertMarsMatOptions(v: MarsMaterialOptions): void;
179
- static assertMarsPrimOptions(v: MarsPrimitiveOptions, s?: MarsSkinOptions): boolean;
180
- static assertMarsMeshOptions(v: MarsMeshOptions): void;
181
- static assertMarsCameraOptions(v: MarsCameraOptions): void;
182
- static assertMarsLightOptions(v: MarsLightOptions): void;
183
- static assertMarsSkyboxOptions(v: MarsSkyboxOptions): void;
184
- static checkMarsAnimTrackOptions(v: MarsAnimTrackOptions): boolean;
185
- static assertMarsAnimOptions(v: MarsAnimationOptions): void;
186
- static assertTreeOptions(v: MarsTreeOptions): void;
177
+ static assertModelSkinOptions(v: ModelSkinOptions): void;
178
+ static assertMatOptions(v: ModelMaterialOptions): void;
179
+ static assertPrimOptions(v: ModelPrimitiveOptions, s?: ModelSkinOptions): boolean;
180
+ static assertModelMeshOptions(v: ModelMeshOptions): void;
181
+ static assertModelCameraOptions(v: ModelCameraOptions): void;
182
+ static assertModelLightOptions(v: ModelLightOptions): void;
183
+ static assertModelSkyboxOptions(v: ModelSkyboxOptions): void;
184
+ static checkModelAnimTrackOptions(v: ModelAnimTrackOptions): boolean;
185
+ static assertModelAnimOptions(v: ModelAnimationOptions): void;
186
+ static assertTreeOptions(v: ModelTreeOptions): void;
187
187
  static stringify(object: any): string;
188
188
  static pow2(index: number): number;
189
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-plugin-model",
3
- "version": "0.0.1-alpha.0",
3
+ "version": "0.0.1-alpha.2",
4
4
  "description": "Galacean Effects player model plugin",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -33,15 +33,15 @@
33
33
  "registry": "https://registry.npmjs.org"
34
34
  },
35
35
  "dependencies": {
36
- "@galacean/effects-helper": "0.0.1-alpha.0"
36
+ "@galacean/effects-helper": "0.0.1-alpha.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@vvfx/resource-detection": "0.4.2-alpha.22",
40
40
  "@types/hammerjs": "^2.0.41",
41
41
  "fpsmeter": "^0.3.1",
42
42
  "hammerjs": "^2.0.6",
43
- "@galacean/effects-plugin-editor-gizmo": "0.0.1-alpha.0",
44
- "@galacean/effects": "0.0.1-alpha.0"
43
+ "@galacean/effects": "0.0.1-alpha.2",
44
+ "@galacean/effects-plugin-editor-gizmo": "0.0.1-alpha.2"
45
45
  },
46
46
  "scripts": {
47
47
  "dev": "vite",