@onerjs/core 8.52.3 → 8.52.4
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/Materials/PBR/openpbrMaterial.pure.d.ts +13 -0
- package/Materials/PBR/openpbrMaterial.pure.js +17 -0
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +17 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +21 -2
- package/Meshes/abstractMesh.pure.js +55 -8
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js +2 -3
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
- package/package.json +1 -1
|
@@ -1340,6 +1340,19 @@ export declare class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1340
1340
|
* @returns whether or not there is a usable alpha channel for transparency.
|
|
1341
1341
|
*/
|
|
1342
1342
|
protected _hasAlphaChannel(): boolean;
|
|
1343
|
+
/**
|
|
1344
|
+
* @returns true when the material needs alpha blending — i.e. when geometry_opacity < 1
|
|
1345
|
+
* or a geometry opacity texture is present.
|
|
1346
|
+
*/
|
|
1347
|
+
needAlphaBlending(): boolean;
|
|
1348
|
+
/**
|
|
1349
|
+
* Specifies if the mesh will require alpha blending.
|
|
1350
|
+
* Overridden to check geometry_opacity before the _hasTransparencyMode short-circuit in the
|
|
1351
|
+
* base class, which would otherwise always return false when _transparencyMode is MATERIAL_OPAQUE.
|
|
1352
|
+
* @param mesh The mesh to check
|
|
1353
|
+
* @returns true if alpha blending is needed for the mesh
|
|
1354
|
+
*/
|
|
1355
|
+
needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
|
|
1343
1356
|
/**
|
|
1344
1357
|
* Makes a duplicate of the current material.
|
|
1345
1358
|
* @param name - name to use for the new material.
|
|
@@ -1240,6 +1240,23 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1240
1240
|
_hasAlphaChannel() {
|
|
1241
1241
|
return (this.baseColorTexture != null && this.baseColorTexture.hasAlpha && this._useAlphaFromBaseColorTexture) || this.geometryOpacityTexture != null;
|
|
1242
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* @returns true when the material needs alpha blending — i.e. when geometry_opacity < 1
|
|
1245
|
+
* or a geometry opacity texture is present.
|
|
1246
|
+
*/
|
|
1247
|
+
needAlphaBlending() {
|
|
1248
|
+
return this.geometryOpacity < 1.0 || this.geometryOpacityTexture != null;
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* Specifies if the mesh will require alpha blending.
|
|
1252
|
+
* Overridden to check geometry_opacity before the _hasTransparencyMode short-circuit in the
|
|
1253
|
+
* base class, which would otherwise always return false when _transparencyMode is MATERIAL_OPAQUE.
|
|
1254
|
+
* @param mesh The mesh to check
|
|
1255
|
+
* @returns true if alpha blending is needed for the mesh
|
|
1256
|
+
*/
|
|
1257
|
+
needAlphaBlendingForMesh(mesh) {
|
|
1258
|
+
return this.geometryOpacity < 1.0 || this.geometryOpacityTexture != null || super.needAlphaBlendingForMesh(mesh);
|
|
1259
|
+
}
|
|
1243
1260
|
/**
|
|
1244
1261
|
* Makes a duplicate of the current material.
|
|
1245
1262
|
* @param name - name to use for the new material.
|