Remove unnecessary onBeforeRender assignment in configureFogVolumeMesh methods
This commit is contained in:
@@ -399,7 +399,6 @@ export class RuntimeHost {
|
||||
configureFogVolumeMesh(mesh, materials) {
|
||||
const fogMaterials = materials.filter((material) => material instanceof ShaderMaterial && material.uniforms["localCameraPosition"] !== undefined);
|
||||
if (fogMaterials.length === 0) {
|
||||
mesh.onBeforeRender = null;
|
||||
return;
|
||||
}
|
||||
mesh.onBeforeRender = (_renderer, _scene, camera) => {
|
||||
|
||||
@@ -592,7 +592,6 @@ export class RuntimeHost {
|
||||
);
|
||||
|
||||
if (fogMaterials.length === 0) {
|
||||
mesh.onBeforeRender = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1738,7 +1738,6 @@ export class ViewportHost {
|
||||
configureFogVolumeMesh(mesh, materials) {
|
||||
const fogMaterials = materials.filter((material) => material instanceof ShaderMaterial && material.uniforms["localCameraPosition"] !== undefined);
|
||||
if (fogMaterials.length === 0) {
|
||||
mesh.onBeforeRender = null;
|
||||
return;
|
||||
}
|
||||
mesh.onBeforeRender = (_renderer, _scene, camera) => {
|
||||
|
||||
@@ -2363,7 +2363,6 @@ export class ViewportHost {
|
||||
);
|
||||
|
||||
if (fogMaterials.length === 0) {
|
||||
mesh.onBeforeRender = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user