@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
17 lines (16 loc) • 391 B
JavaScript
;
import { FrontSide, MeshStandardMaterial } from "three";
export const step = 1e-6;
const MESH_MAT = new MeshStandardMaterial({
color: 16777215,
// vertexColors: true,
side: FrontSide,
metalness: 0,
roughness: 0.9
});
export function sdfMaterialMesh(color, wireframe) {
const mat = MESH_MAT.clone();
mat.wireframe = wireframe;
mat.color = color;
return mat;
}