Fixed rendering test.rhai

This commit is contained in:
STP
2023-11-20 00:14:00 -05:00
parent 1afb1a8e19
commit 47276e1bdc
6 changed files with 42 additions and 32 deletions

View File

@@ -7,8 +7,14 @@ let cam = Camera(eye, target, up, 70.0, 1.0);
let material = Material(V(0.5,0.5,0.5), V(0.8, 0.1, 0.2), 0.25);
let sphere = Sphere(P(0.0,0.0,0.0), 0.5, material);
let light = Light(P(2.0, 2.0, 2.0), V(0.8, 0.7, 0.3), V(1.0, 0.007, 0.0));
let light2 = Light(P(2.0, -2.0, 2.0), V(0.3, 0.4, 0.8), V(1.0, 0.007, 0.0));
scene.addLight(light);
scene.addLight(light2);
let sphere = Sphere(P(0.0,0.0,0.0), 1.0, material);
let node = Node(sphere);
scene.addNode(node);
scene.render();
scene