예제 #1
0
        public void exec()
        {
            J(document.body).append("<canvas></canvas");
            var canv = document.getElementsByTagName("canvas")[0].As <HtmlCanvasElement>();

            canv.width  = 256;
            canv.height = 256;
            var ctx       = canv.getContext("2d").As <CanvasRenderingContext2D>();
            var rayTracer = new RayTracer();

            rayTracer.render(defaultScene(), ctx, canv.width, canv.height);
        }
예제 #2
0
 public void exec() 
 {
     J(document.body).append("<canvas></canvas");
     var canv = document.getElementsByTagName("canvas")[0].As<HtmlCanvasElement>();
     canv.width = 256;
     canv.height = 256;
     var ctx = canv.getContext("2d").As<CanvasRenderingContext2D>();
     var rayTracer = new RayTracer();
     rayTracer.render(defaultScene(), ctx, canv.width, canv.height);
 }