/JScene

A JavaScript 3D library that renders 3D objects. It covers the methods needed to construct the Camera, Light, Material, Objects, and TringleSoup, including graphics canvas, optics, illumination, reflectance, radiometry, curves, and ray tracing without dependency on any outside source.

Primary LanguageHTML

Landing Page: jscene.netlify.app

Documentation: jscene.netlify.app/api

Getting Started

To use JScene API, you need to download and reference JScene.js in the HTML file.

<script src="/path/to/JScene.js"></script>

Add the HTML <canvas> tag, which will be our 3D viewport.

<canvas id="canvas"></canvas>

Create a Scene object, then draw it to the canvas.

<script>
	var canvas= document.getElementById('canvas');
	var scene = new Scene();
	var recur_depth = 5;//how many time lights can reflect between objects
	render_canvas_native(canvas,scene,recur_depth);
</script>