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); }
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); }