index.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <title>Page Title</title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1" />
  8. <style>
  9. *{
  10. margin: 0;
  11. padding: 0;
  12. border: 0;
  13. }
  14. html, body {
  15. width: 100%;
  16. height: 100%;
  17. overflow: hidden;
  18. }
  19. #myCanvas {
  20. position: absolute;
  21. left: 100px;
  22. top: 100px;
  23. width: 400px;
  24. height: 400px;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <canvas id="myCanvas" width="700" height="700" >
  30. Your browser does not support the HTML5 canvas tag.
  31. </canvas>
  32. <script src="js/CAD.js"></script>
  33. <script src="model/data.js"></script>
  34. <script>
  35. var $canvas = document.getElementById("myCanvas")
  36. // $canvas.setAttribute('width', window.innerWidth)
  37. // $canvas.setAttribute('height', window.innerHeight)
  38. // $canvas.style.width = window.innerWidth + 'px'
  39. // $canvas.style.height = window.innerHeight + 'px'
  40. var wall = grendCAD($canvas, wallData, wallCamera)
  41. </script>
  42. </body>
  43. </html>