index.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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/cube.obj" selected="selected">Cube</option>
  22. <option value="obj/sphere.obj">Sphere</option>
  23. <option value="obj/monkey.obj">Monkey</option>
  24. <option value="obj/bolt.obj">Bolt</option>
  25. <option value="obj/multiple.obj">Multiple Objects</option>
  26. </select>
  27. <br/><br/><br/>
  28. <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>
  29. <br/>
  30. <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>
  31. <br/>
  32. <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>
  33. <br/>
  34. <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>
  35. <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>
  36. <br/>
  37. Rotation speed:<br/>
  38. 0% <input type="range" min="0" max="10" step="1" value="3" onInput="objs.setRotationSpeed(this.value);" onChange="objs.setRotationSpeed(this.value);"/>100%
  39. <br/>Zoom speed:<br/>
  40. 0% <input type="range" min="0" max="10" step="1" value="2" onInput="objs.setZoomSpeed(this.value);" onChange="objs.setZoomSpeed(this.value);"/>100%
  41. </td>
  42. </tr>
  43. </table>
  44. </body>
  45. </html>