Introduce static and dynamic materials

This commit is contained in:
2023-09-11 23:09:31 +02:00
parent da9361df15
commit 6e3d68e984
8 changed files with 250 additions and 55 deletions

View File

@@ -1,4 +1,4 @@
import { Color, DirectionalLight, Material, Mesh, Node, PerspectiveCamera, PointLight, Quaternion, Scene, Submesh, Vector3 } from "../src/data/index";
import { Color, DirectionalLight, Mesh, Node, PerspectiveCamera, PointLight, Quaternion, Scene, Submesh, Vector3 } from "../src/data/index";
import { Renderer, degToRad } from "../src/oktaeder";
import "./style.css";
@@ -44,7 +44,7 @@ const submesh: Submesh = { start: 0, length: 24 };
const mesh = new Mesh({ vertexBuffer, indexBuffer, submeshes: [submesh] });
const material = new Material({
const material = renderer.createMaterial({
baseColor: Color.white(),
roughness: 0.5,
metallic: 1,