@galacean/effects-plugin-model 2.0.0-alpha.2 → 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.
- package/dist/alipay.js +13071 -0
- package/dist/alipay.js.map +1 -0
- package/dist/alipay.mjs +12952 -0
- package/dist/alipay.mjs.map +1 -0
- package/dist/gesture/index.d.ts +2 -2
- package/dist/gltf/index.d.ts +2 -1
- package/dist/gltf/json-converter.d.ts +53 -0
- package/dist/gltf/loader-ext.d.ts +6 -37
- package/dist/gltf/loader-impl.d.ts +61 -63
- package/dist/gltf/protocol.d.ts +51 -29
- package/dist/index.d.ts +9 -0
- package/dist/index.js +8118 -6773
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +7974 -6665
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +10761 -9510
- package/dist/loader.mjs.map +1 -1
- package/dist/plugin/model-item.d.ts +73 -37
- package/dist/plugin/model-plugin.d.ts +4 -3
- package/dist/plugin/model-tree-item.d.ts +4 -8
- package/dist/runtime/animation.d.ts +18 -15
- package/dist/runtime/camera.d.ts +7 -6
- package/dist/runtime/common.d.ts +2 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/light.d.ts +6 -5
- package/dist/runtime/material.d.ts +74 -92
- package/dist/runtime/math.d.ts +2 -1
- package/dist/runtime/mesh.d.ts +20 -22
- package/dist/runtime/scene.d.ts +2 -1
- package/dist/runtime/shader-libs/standard-shader-source.d.ts +1 -0
- package/dist/runtime/shader-libs/standard-shader.d.ts +8 -0
- package/dist/runtime/skybox.d.ts +25 -6
- package/dist/utility/plugin-helper.d.ts +12 -11
- package/dist/utility/shader-helper.d.ts +2 -0
- package/package.json +12 -7
|
@@ -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 |
|
|
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
|
|
129
|
+
* @param component - ModelMeshComponent 对象
|
|
130
130
|
* @return 是否半透明
|
|
131
131
|
*/
|
|
132
|
-
static isTransparentMesh(
|
|
132
|
+
static isTransparentMesh(component: ModelMeshComponent): boolean;
|
|
133
133
|
/**
|
|
134
134
|
* renderer 是否支持 Float 纹理
|
|
135
135
|
* @param engine - 引擎对象
|
|
@@ -219,10 +219,11 @@ export declare class PluginHelper {
|
|
|
219
219
|
static toPluginColor4(color: spec.vec4): spec.vec4;
|
|
220
220
|
/**
|
|
221
221
|
* 创建 UV 变换矩阵,从 UV 变换参数中
|
|
222
|
-
* @param
|
|
222
|
+
* @param stValue - UV 的缩放和平移参数
|
|
223
|
+
* @param rotateValue - UV 的旋转参数
|
|
223
224
|
* @returns 3阶变换矩阵
|
|
224
225
|
*/
|
|
225
|
-
static createUVTransform(
|
|
226
|
+
static createUVTransform(material: Material, stName: string, rotateName: string): Matrix3;
|
|
226
227
|
/**
|
|
227
228
|
* 获取截断后的数值
|
|
228
229
|
* @param val - 数值
|
|
@@ -260,7 +261,7 @@ export declare class PluginHelper {
|
|
|
260
261
|
* @param autoAdjustScene - 是否自动调整
|
|
261
262
|
* @returns 场景信息描述
|
|
262
263
|
*/
|
|
263
|
-
static preprocessScene(scene: Scene, runtimeEnv: string, compatibleMode: string
|
|
264
|
+
static preprocessScene(scene: Scene, runtimeEnv: string, compatibleMode: string): EffectsSceneInfo;
|
|
264
265
|
/**
|
|
265
266
|
* 纹理参数预处理,设置环绕模式和滤波器
|
|
266
267
|
* @param index - 纹理索引
|
|
@@ -269,7 +270,7 @@ export declare class PluginHelper {
|
|
|
269
270
|
* @param tiny3dMode - 是否 Tiny3d 模式
|
|
270
271
|
* @returns
|
|
271
272
|
*/
|
|
272
|
-
static preprocessTextureOptions(
|
|
273
|
+
static preprocessTextureOptions(dataMap: Record<string, TextureSourceOptions>, textureInfo: spec.MaterialTextureProperty | spec.DataPath, isBaseColor: boolean, tiny3dMode: boolean): void;
|
|
273
274
|
/**
|
|
274
275
|
* 设置 3D 元素参数,在播放器创建 3D 元素前
|
|
275
276
|
* @param scene - 场景
|
|
@@ -305,7 +306,7 @@ export declare class PluginHelper {
|
|
|
305
306
|
* @param index - 索引
|
|
306
307
|
* @returns
|
|
307
308
|
*/
|
|
308
|
-
static getTextureObj(textures: Texture[], index?: number): Texture |
|
|
309
|
+
static getTextureObj(textures: Texture[], index?: number): Texture | null;
|
|
309
310
|
}
|
|
310
311
|
/**
|
|
311
312
|
* Web 辅助类,负责 Web 相关的基础功能
|
|
@@ -549,7 +550,7 @@ export declare class HitTestingProxy {
|
|
|
549
550
|
* @param vec4 - 临时变量,用于骨骼动画时的计算
|
|
550
551
|
* @returns 顶点位置
|
|
551
552
|
*/
|
|
552
|
-
getPosition(index: number, vec3: Vector3, vec4: Vector4): Vector3 |
|
|
553
|
+
getPosition(index: number, vec3: Vector3, vec4: Vector4): Vector3 | null;
|
|
553
554
|
}
|
|
554
555
|
/**
|
|
555
556
|
* 检查辅助类,负责 3D 插件元素数据格式检查和报错
|
|
@@ -1,4 +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
4
|
/**
|
|
3
5
|
* 获取 PBR 材质着色器代码
|
|
4
6
|
* @param context - 着色器上下文
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-plugin-model",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
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",
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"import": "./dist/*.mjs",
|
|
20
20
|
"require": "./dist/*.js",
|
|
21
21
|
"types": "./dist/*.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./alipay": {
|
|
24
|
+
"import": "./dist/alipay.mjs",
|
|
25
|
+
"require": "./dist/alipay.js",
|
|
26
|
+
"types": "./dist/index.d.ts"
|
|
22
27
|
}
|
|
23
28
|
},
|
|
24
29
|
"contributors": [
|
|
@@ -33,15 +38,15 @@
|
|
|
33
38
|
"registry": "https://registry.npmjs.org"
|
|
34
39
|
},
|
|
35
40
|
"dependencies": {
|
|
36
|
-
"@galacean/effects-helper": "2.0.0-alpha.
|
|
41
|
+
"@galacean/effects-helper": "2.0.0-alpha.21"
|
|
37
42
|
},
|
|
38
43
|
"devDependencies": {
|
|
39
|
-
"@vvfx/resource-detection": "0.
|
|
44
|
+
"@vvfx/resource-detection": "0.6.0-alpha.9",
|
|
40
45
|
"@types/hammerjs": "^2.0.45",
|
|
41
46
|
"fpsmeter": "^0.3.1",
|
|
42
47
|
"hammerjs": "^2.0.8",
|
|
43
|
-
"@galacean/effects": "2.0.0-alpha.
|
|
44
|
-
"@galacean/effects-plugin-editor-gizmo": "2.0.0-alpha.
|
|
48
|
+
"@galacean/effects": "2.0.0-alpha.21",
|
|
49
|
+
"@galacean/effects-plugin-editor-gizmo": "2.0.0-alpha.21"
|
|
45
50
|
},
|
|
46
51
|
"scripts": {
|
|
47
52
|
"dev": "vite",
|
|
@@ -49,8 +54,8 @@
|
|
|
49
54
|
"prebuild": "pnpm clean",
|
|
50
55
|
"build": "pnpm build:declaration && pnpm build:module",
|
|
51
56
|
"build:module": "rollup -c",
|
|
52
|
-
"build:declaration": "tsc -d --
|
|
57
|
+
"build:declaration": "tsc -d --emitDeclarationOnly",
|
|
53
58
|
"build:demo": "rimraf dist && vite build",
|
|
54
|
-
"clean": "rimraf dist && rimraf
|
|
59
|
+
"clean": "rimraf dist && rimraf \"*+(.tsbuildinfo)\""
|
|
55
60
|
}
|
|
56
61
|
}
|