its only ever going to be standard material

This commit is contained in:
tresabhi committed 2026-10-29 11:15:28 -05:00
1 parent e5be69dd37
commit 523fee5010
1 file changed
+3 -12
+3 -12
View File
@@ -1,11 +1,5 @@
import type { ComponentProps, ReactNode } from "react"; import type { ComponentProps, ReactNode } from "react";
import { import { AdditiveBlending, Mesh, MeshStandardMaterial, Object3D } from "three";
AdditiveBlending,
Material,
Mesh,
MeshStandardMaterial,
Object3D,
} from "three";
export function jsxTree( export function jsxTree(
node: Object3D, node: Object3D,
@@ -33,14 +27,11 @@ export function jsxTree(
if (props.material instanceof MeshStandardMaterial) { if (props.material instanceof MeshStandardMaterial) {
props.material.depthWrite = true; props.material.depthWrite = true;
}
if ( if (props.material.userData.blending === "additive") {
props.material instanceof Material &&
props.material.userData.blending === "additive"
) {
props.material.blending = AdditiveBlending; props.material.blending = AdditiveBlending;
} }
}
return mergers?.mesh ? ( return mergers?.mesh ? (
mergers.mesh(node, props, node.uuid) mergers.mesh(node, props, node.uuid)