-
Notifications
You must be signed in to change notification settings - Fork 65
/
index.html
executable file
·87 lines (77 loc) · 4.43 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>litescene.js</title>
<link type="text/css" rel="stylesheet" media="all" href="examples/style.css" />
<style type="text/css">
#usage p {
margin-bottom: 0;
}
</style>
</head>
<body>
<div class="container">
<h1>litescene.js</h1>
<div class="content">
<p>Litescene is a scene graph library for WebGL with a component based hierarchical node system.
It comes with a realistic rendering pipeline and some interesting components to make it easier to build and share scenes.</p>
<ul>
<li>Component based node system</li>
<li>Realistic rendering pipeline, it supports shadows, reflections, textures for all properties, etc</li>
<li>Material system that automatically computes the best shader, making it easy to control properties</li>
<li>Resources Manager to load and store any kind of resource ( textures, meshes, etc)</li>
<li>Serializing methods to convert any Scene to JSON</li>
<li>Parser for most common file formats</li>
<li>Easy to embed</li>
</ul>
<p>It uses its own low-level library called <a href="https://github.com/jagenjo/litegl.js">litegl.js</a></p>
<p><img src="litescene-screenshot.png" alt="litescene-screenshot" /></p>
<h3>WebGLStudio</h3>
<p>Litescene has been created to work together with <a href="https://webglstudio.org">WebGLStudio</a>, an open source online 3D editor.
From WebGLStudio you can export the JSON file containing all the info and use it in your LiteScene.</p>
<div id="usage">
<h3>Usage</h3>
<p>Include the library and dependencies</p>
<pre>
<script src="external/gl-matrix-min.js"></script>
<script src="external/litegl.min.js"></script>
<script src="js/litescene.js"></script>
</pre>
<p>Create the context</p>
<pre>
var player = new LS.Player({
width:800, height:600,
resources: "resources/",
shaders: "data/shaders.xml"
});
</pre>
<p>Attach to Canvas to the DOM:</p>
<pre>
document.getElementById("mycontainer").appendChild( player.canvas )
</pre>
<p>or you can pass the canvas in the player settings as { canvas: my_canvas_element }</p>
<br/>
<p>Load the scene and play it:</p>
<pre>
player.loadScene("scene.json");
</pre>
</div>
<h3>Basic Examples</h3>
<ul>
<li><a href="examples/simple.html">Simple scene</a>: events are captured manually and only takes advantage of the render engine</li>
<li><a href="examples/advanced.html">Complex scene</a>: using the LS.Player</li>
<li><a href="examples/load_scene.html">Loaded scene</a>: loading an existing scene created with WebGLStudio</li>
</ul>
<h3>Documentation</h3>
<p>Check the <a href="guides">guides</a> folder for a better explanation of how does it works.The doc folder contains the documentation.<br/>
For info about <a href="https://github.com/jagenjo/litegl.js">litegl.js</a> check the documentation in its repository.
For info about <a href="http://glmatrix.com">glMatrix</a> check the documentation in its website.</p>
<h3>Utils</h3>
<p>It includes several commands in the utils folder to generate doc, check errors and build minifyed version.</p>
<h3>Feedback</h3>
<p>You can write any feedback to <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
</body>
</html>