mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-05 17:00:37 +01:00
its only ever going to be standard material
This commit is contained in:
1 parent
e5be69dd37
commit
523fee5010
1 file changed
+3
-12
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user