@galacean/effects-plugin-model 2.0.0-alpha.17 → 2.0.0-alpha.19

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.
@@ -5,16 +5,6 @@ import type { Matrix3 } from './math';
5
5
  import { Vector3, Vector4, Color } from './math';
6
6
  import { PMaterialType } from './common';
7
7
  import { PObject } from './object';
8
- export declare enum RenderType {
9
- Opaque = "Opaque",
10
- Mask = "Mask",
11
- Blend = "Blend"
12
- }
13
- export declare enum CullMode {
14
- Front = "Front",
15
- Back = "Back",
16
- Double = "Double"
17
- }
18
8
  /**
19
9
  * 3D 材质基础类,支持公共的材质功能
20
10
  */
@@ -43,15 +33,19 @@ export declare abstract class PMaterialBase extends PObject {
43
33
  /**
44
34
  * 渲染类型,默认是不透明
45
35
  */
46
- renderType: RenderType;
36
+ renderType: spec.RenderType;
37
+ /**
38
+ * 是否 Alpha 裁剪,默认关闭
39
+ */
40
+ alphaClip: boolean;
47
41
  /**
48
42
  * Alpha 测试截断值
49
43
  */
50
- alphaCutOff: number;
44
+ alphaCutoff: number;
51
45
  /**
52
46
  * 面侧模式,默认是正面
53
47
  */
54
- cullMode: CullMode;
48
+ renderFace: spec.RenderFace;
55
49
  /**
56
50
  * 获取着色器特性列表,根据材质状态
57
51
  * @returns 特性列表
@@ -92,15 +86,15 @@ export declare abstract class PMaterialBase extends PObject {
92
86
  */
93
87
  isOpaque(): boolean;
94
88
  /**
95
- * 是否遮罩
89
+ * 是否 Alpha 裁剪
96
90
  * @returns
97
91
  */
98
- isMasked(): boolean;
92
+ isAlphaClip(): boolean;
99
93
  /**
100
94
  * 是否半透明
101
95
  * @returns
102
96
  */
103
- isBlend(): boolean;
97
+ isTransparent(): boolean;
104
98
  /**
105
99
  * 是否正面模式
106
100
  * @returns
@@ -115,7 +109,7 @@ export declare abstract class PMaterialBase extends PObject {
115
109
  * 是否双面模式
116
110
  * @returns
117
111
  */
118
- isDoubleSide(): boolean;
112
+ isBothSide(): boolean;
119
113
  }
120
114
  /**
121
115
  * 无光照材质类,负责无关照或者不接受光照情况下的物体材质效果
@@ -4,7 +4,8 @@ import { PMesh } from './mesh';
4
4
  import type { PCamera } from './camera';
5
5
  import { PCameraManager } from './camera';
6
6
  import { PLight, PLightManager } from './light';
7
- import { Vector3, Matrix4, Box3 } from './math';
7
+ import type { Vector3 } from './math';
8
+ import { Matrix4, Box3 } from './math';
8
9
  import { PSkybox } from './skybox';
9
10
  import type { CompositionCache } from './cache';
10
11
  import type { PEntity } from './object';
@@ -1,7 +1,7 @@
1
1
  import type { Scene, Composition, Attribute, GeometryProps, TextureSourceOptions, TextureSourceCubeData, TextureConfigOptions, Engine, math } from '@galacean/effects';
2
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';
@@ -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 - 引擎对象
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-plugin-model",
3
- "version": "2.0.0-alpha.17",
3
+ "version": "2.0.0-alpha.19",
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.17"
41
+ "@galacean/effects-helper": "2.0.0-alpha.19"
42
42
  },
43
43
  "devDependencies": {
44
- "@vvfx/resource-detection": "0.6.0-alpha.8",
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.17",
49
- "@galacean/effects-plugin-editor-gizmo": "2.0.0-alpha.17"
48
+ "@galacean/effects": "2.0.0-alpha.19",
49
+ "@galacean/effects-plugin-editor-gizmo": "2.0.0-alpha.19"
50
50
  },
51
51
  "scripts": {
52
52
  "dev": "vite",