index.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta content="text/html; charset=windows-1252" http-equiv="content-type"/>
  5. <title>ObJS</title>
  6. <!--Script files -->
  7. <script type="text/javascript" src="script/ObJS.js"></script>
  8. <!-- CSS files -->
  9. </head>
  10. <body onload="objs = new ObJS(); objs.initCanvas();objs.load(document.getElementById('objSelector').value);">
  11. <table>
  12. <tr>
  13. <td>
  14. <canvas id="ObJSCanvas" width="500" height="500">
  15. Your browser does not support the HTML5 canvas tag.
  16. </canvas>
  17. </td>
  18. <td>
  19. Choose a model:
  20. <select id="objSelector" name="objSelector" onChange="objs.load(this.value)">
  21. <option value="obj/rainbow.obj" selected="selected">Rainbow</option>
  22. <option value="obj/cube.obj">Cube</option>
  23. <option value="obj/sphere.obj">Sphere</option>
  24. <option value="obj/monkey.obj">Monkey</option>
  25. <option value="obj/bolt.obj">Bolt</option>
  26. <option value="obj/multiple.obj">Multiple Objects</option>
  27. </select>
  28. <br/><br/><br/>
  29. <pre><input type="checkbox" name="drawElement" value="backg" checked onChange="objs.drawElement('backg', this.checked);"/>Background <input type="color" id="colorBackg" value="#C8C8C8" onChange="objs.colorElement('backg', this.value);"/></pre>
  30. <br/>
  31. <pre><input type="checkbox" name="drawElement" value="verts" checked onChange="objs.drawElement('verts', this.checked);"/>Vertices <input type="color" id="colorVerts" value="#0A0A0A" onChange="objs.colorElement('verts', this.value);"/></pre>
  32. <br/>
  33. <pre><input type="checkbox" name="drawElement" value="edges" checked onChange="objs.drawElement('edges', this.checked);"/>Edges <input type="color" id="colorEdges" value="#644646" onChange="objs.colorElement('edges', this.value);"/></pre>
  34. <br/>
  35. <pre><input type="checkbox" name="drawElement" value="faces" checked onChange="objs.drawElement('faces', this.checked);"/>Faces <input type="color" id="colorFaces" value="#B4B4FF" onChange="objs.colorElement('faces', this.value);"/></pre>
  36. <pre> Alpha:<br/> 0% <input type="range" min="0" max="100" step="1" value="60" onInput="objs.setAlpha(this.value);" onChange="objs.setAlpha(this.value);"/>100%</pre>
  37. <br/>
  38. Rotation speed:<br/>
  39. 0% <input type="range" min="0" max="10" step="1" value="3" onInput="objs.setRotationSpeed(this.value);" onChange="objs.setRotationSpeed(this.value);"/>100%
  40. <br/>Zoom speed:<br/>
  41. 0% <input type="range" min="0" max="10" step="1" value="2" onInput="objs.setZoomSpeed(this.value);" onChange="objs.setZoomSpeed(this.value);"/>100%
  42. </td>
  43. </tr>
  44. </table>
  45. </body>
  46. </html>