mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-02 15:30:37 +01:00
its only ever going to be standard material
This commit is contained in:
1 parent
e5be69dd37
commit
523fee5010
1 file changed
+4
-13
@@ -1,11 +1,5 @@
|
||||
import type { ComponentProps, ReactNode } from "react";
|
||||
import {
|
||||
AdditiveBlending,
|
||||
Material,
|
||||
Mesh,
|
||||
MeshStandardMaterial,
|
||||
Object3D,
|
||||
} from "three";
|
||||
import { AdditiveBlending, Mesh, MeshStandardMaterial, Object3D } from "three";
|
||||
|
||||
export function jsxTree(
|
||||
node: Object3D,
|
||||
@@ -33,13 +27,10 @@ export function jsxTree(
|
||||
|
||||
if (props.material instanceof MeshStandardMaterial) {
|
||||
props.material.depthWrite = true;
|
||||
}
|
||||
|
||||
if (
|
||||
props.material instanceof Material &&
|
||||
props.material.userData.blending === "additive"
|
||||
) {
|
||||
props.material.blending = AdditiveBlending;
|
||||
if (props.material.userData.blending === "additive") {
|
||||
props.material.blending = AdditiveBlending;
|
||||
}
|
||||
}
|
||||
|
||||
return mergers?.mesh ? (
|
||||
|
||||
Reference in new issue
Block a user