@galacean/effects-plugin-model 2.0.0-alpha.8 → 2.0.0-beta.0

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.
Files changed (47) hide show
  1. package/dist/alipay.js +13901 -0
  2. package/dist/alipay.js.map +1 -0
  3. package/dist/alipay.mjs +13782 -0
  4. package/dist/alipay.mjs.map +1 -0
  5. package/dist/douyin.js +13901 -0
  6. package/dist/douyin.js.map +1 -0
  7. package/dist/douyin.mjs +13782 -0
  8. package/dist/douyin.mjs.map +1 -0
  9. package/dist/gesture/index.d.ts +3 -3
  10. package/dist/gltf/index.d.ts +2 -1
  11. package/dist/gltf/json-converter.d.ts +54 -0
  12. package/dist/gltf/loader-ext.d.ts +6 -37
  13. package/dist/gltf/loader-impl.d.ts +76 -60
  14. package/dist/gltf/protocol.d.ts +51 -23
  15. package/dist/helper/index.d.ts +0 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +3840 -2024
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.min.js +2 -2
  20. package/dist/index.min.js.map +1 -1
  21. package/dist/index.mjs +3602 -1824
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/loader.mjs +11280 -9499
  24. package/dist/loader.mjs.map +1 -1
  25. package/dist/plugin/model-item.d.ts +60 -11
  26. package/dist/plugin/model-plugin.d.ts +4 -3
  27. package/dist/plugin/model-tree-item.d.ts +5 -9
  28. package/dist/runtime/animation.d.ts +22 -15
  29. package/dist/runtime/cache.d.ts +1 -2
  30. package/dist/runtime/camera.d.ts +7 -2
  31. package/dist/runtime/index.d.ts +1 -0
  32. package/dist/runtime/material.d.ts +76 -93
  33. package/dist/runtime/math.d.ts +2 -1
  34. package/dist/runtime/mesh.d.ts +17 -24
  35. package/dist/runtime/scene.d.ts +15 -2
  36. package/dist/runtime/shader-libs/standard-shader-source.d.ts +1 -2
  37. package/dist/runtime/shader-libs/standard-shader.d.ts +2 -2
  38. package/dist/runtime/skybox.d.ts +22 -3
  39. package/dist/utility/plugin-helper.d.ts +13 -15
  40. package/dist/utility/shader-helper.d.ts +2 -2
  41. package/dist/weapp.js +13901 -0
  42. package/dist/weapp.js.map +1 -0
  43. package/dist/weapp.mjs +13782 -0
  44. package/dist/weapp.mjs.map +1 -0
  45. package/package.json +22 -7
  46. package/dist/gltf/loader-ecs-ext.d.ts +0 -24
  47. package/dist/gltf/loader-ecs.d.ts +0 -86
@@ -1,7 +1,7 @@
1
1
  import type { Scene, Composition, Attribute, GeometryProps, TextureSourceOptions, TextureSourceCubeData, TextureConfigOptions, Engine, math } from '@galacean/effects';
2
- import { Player, spec, Transform, Mesh, Texture, Geometry, Renderer, RenderPass } from '@galacean/effects';
2
+ import { Player, spec, Transform, Material, Mesh, Texture, Geometry, Renderer, RenderPass } from '@galacean/effects';
3
3
  import type { GLTFCamera, GLTFImage, GLTFLight, GLTFTexture } from '@vvfx/resource-detection';
4
- import type { ModelAnimationOptions, ModelMeshOptions, ModelMaterialOptions, ModelLightOptions, ModelCameraOptions, ModelSkyboxOptions, ModelSkinOptions, ModelPrimitiveOptions, ModelTextureTransform, ModelTreeOptions, ModelAnimTrackOptions } from '../index';
4
+ import type { ModelAnimationOptions, ModelMeshOptions, ModelMaterialOptions, ModelLightOptions, ModelCameraOptions, ModelSkyboxOptions, ModelSkinOptions, ModelPrimitiveOptions, ModelTextureTransform, ModelTreeOptions, ModelAnimTrackOptions, ModelMeshComponent } from '../index';
5
5
  import { Matrix3, Matrix4, Vector3, Vector4 } from '../runtime/math';
6
6
  import type { FBOOptions } from './ri-helper';
7
7
  import type { PMaterialBase } from '../runtime/material';
@@ -86,7 +86,7 @@ export declare class WebGLHelper {
86
86
  * @param textures - 纹理数组
87
87
  * @returns 纹理获取或 undefined
88
88
  */
89
- static getTexture(index: number, textures: Texture[]): Texture | undefined;
89
+ static getTexture(index: number, textures: Texture[]): Texture | null;
90
90
  /**
91
91
  * 从图像创建纹理
92
92
  * @param engine - 引擎
@@ -126,10 +126,10 @@ export declare class WebGLHelper {
126
126
  static deleteRenderPass(pass: RenderPass): void;
127
127
  /**
128
128
  * 返回 Mesh 是否半透明
129
- * @param mesh - gl mesh 对象
129
+ * @param component - ModelMeshComponent 对象
130
130
  * @return 是否半透明
131
131
  */
132
- static isTransparentMesh(mesh: Mesh): boolean;
132
+ static isTransparentMesh(component: ModelMeshComponent): boolean;
133
133
  /**
134
134
  * renderer 是否支持 Float 纹理
135
135
  * @param engine - 引擎对象
@@ -157,12 +157,9 @@ export declare class MeshHelper {
157
157
  * @param engine - 引擎
158
158
  * @param name - 名称
159
159
  * @param material - 3D 材质
160
- * @param uniformSemantics - 传入的 Uniform 数据
161
160
  * @returns Mesh 对象
162
161
  */
163
- static createFilterMesh(engine: Engine, name: string, material: PMaterialBase, uniformSemantics: {
164
- [k: string]: any;
165
- }): Mesh;
162
+ static createFilterMesh(engine: Engine, name: string, material: PMaterialBase): Mesh;
166
163
  /**
167
164
  * 获取平面的几何参数
168
165
  * @returns 几何参数
@@ -219,10 +216,11 @@ export declare class PluginHelper {
219
216
  static toPluginColor4(color: spec.vec4): spec.vec4;
220
217
  /**
221
218
  * 创建 UV 变换矩阵,从 UV 变换参数中
222
- * @param transform - 变换参数
219
+ * @param stValue - UV 的缩放和平移参数
220
+ * @param rotateValue - UV 的旋转参数
223
221
  * @returns 3阶变换矩阵
224
222
  */
225
- static createUVTransform(transform?: spec.ModelTextureTransform): Matrix3 | undefined;
223
+ static createUVTransform(material: Material, stName: string, rotateName: string): Matrix3;
226
224
  /**
227
225
  * 获取截断后的数值
228
226
  * @param val - 数值
@@ -260,7 +258,7 @@ export declare class PluginHelper {
260
258
  * @param autoAdjustScene - 是否自动调整
261
259
  * @returns 场景信息描述
262
260
  */
263
- static preprocessScene(scene: Scene, runtimeEnv: string, compatibleMode: string, autoAdjustScene: boolean): EffectsSceneInfo;
261
+ static preprocessScene(scene: Scene, runtimeEnv: string, compatibleMode: string): EffectsSceneInfo;
264
262
  /**
265
263
  * 纹理参数预处理,设置环绕模式和滤波器
266
264
  * @param index - 纹理索引
@@ -269,7 +267,7 @@ export declare class PluginHelper {
269
267
  * @param tiny3dMode - 是否 Tiny3d 模式
270
268
  * @returns
271
269
  */
272
- static preprocessTextureOptions(index: number, textures: Array<TextureSourceOptions>, isBaseColor: boolean, tiny3dMode: boolean): void;
270
+ static preprocessTextureOptions(dataMap: Record<string, TextureSourceOptions>, textureInfo: spec.MaterialTextureProperty | spec.DataPath, isBaseColor: boolean, tiny3dMode: boolean): void;
273
271
  /**
274
272
  * 设置 3D 元素参数,在播放器创建 3D 元素前
275
273
  * @param scene - 场景
@@ -305,7 +303,7 @@ export declare class PluginHelper {
305
303
  * @param index - 索引
306
304
  * @returns
307
305
  */
308
- static getTextureObj(textures: Texture[], index?: number): Texture | undefined;
306
+ static getTextureObj(textures: Texture[], index?: number): Texture | null;
309
307
  }
310
308
  /**
311
309
  * Web 辅助类,负责 Web 相关的基础功能
@@ -549,7 +547,7 @@ export declare class HitTestingProxy {
549
547
  * @param vec4 - 临时变量,用于骨骼动画时的计算
550
548
  * @returns 顶点位置
551
549
  */
552
- getPosition(index: number, vec3: Vector3, vec4: Vector4): Vector3 | undefined;
550
+ getPosition(index: number, vec3: Vector3, vec4: Vector4): Vector3 | null;
553
551
  }
554
552
  /**
555
553
  * 检查辅助类,负责 3D 插件元素数据格式检查和报错
@@ -1,6 +1,6 @@
1
1
  import type { PShaderContext, PShaderResults } from '../runtime/shader';
2
- export declare function fetchPBRShaderCode(isWebGL2?: boolean): PShaderResults;
3
- export declare function fetchUnlitShaderCode(isWebGL2?: boolean): PShaderResults;
2
+ export declare function fetchPBRShaderCode(): PShaderResults;
3
+ export declare function fetchUnlitShaderCode(): PShaderResults;
4
4
  /**
5
5
  * 获取 PBR 材质着色器代码
6
6
  * @param context - 着色器上下文