Lines Matching refs:scene
642 renderScene: function(scene, canvas){ argument
659 var ray = scene.camera.getRay(xp, yp);
661 var color = this.getPixelColor(ray, scene);
671 getPixelColor: function(ray, scene){ argument
672 var info = this.testIntersection(ray, scene, null);
674 var color = this.rayTrace(info, ray, scene, 0);
677 return scene.background.color;
680 testIntersection: function(ray, scene, exclude){ argument
685 for(var i=0; i<scene.shapes.length; i++){
686 var shape = scene.shapes[i];
709 rayTrace: function(info, ray, scene, depth){ argument
711 … var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
715 for(var i=0; i<scene.lights.length; i++){
716 var light = scene.lights[i];
747 var refl = this.testIntersection(reflectionRay, scene, info.shape);
750 refl.color = this.rayTrace(refl, reflectionRay, scene, depth + 1);
752 refl.color = scene.background.color;
773 shadowInfo = this.testIntersection(shadowRay, scene, info.shape);
789 scene.camera.position,
812 var scene = new Flog.RayTracer.Scene();
814 scene.camera = new Flog.RayTracer.Camera(
820 scene.background = new Flog.RayTracer.Background(
862 scene.shapes.push(plane);
863 scene.shapes.push(sphere);
864 scene.shapes.push(sphere1);
877 scene.lights.push(light);
878 scene.lights.push(light1);
903 raytracer.renderScene(scene, null, 0);