index.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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,
  15. body {
  16. width: 100%;
  17. height: 100%;
  18. overflow: hidden;
  19. background-color: rgba(0, 0, 0, 0.5)
  20. }
  21. canvas {
  22. width: 600px;
  23. height: 600px;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <div id="asdas">
  29. <canvas id="myCanvas" width="600" height="600"></canvas>
  30. </div>
  31. <!-- <canvas id="myCanvas" width="1400" height="1400" >
  32. Your browser does not support the HTML5 canvas tag.
  33. </canvas> -->
  34. <script src="js/CAD.js"></script>
  35. <script src="model/data.js"></script>
  36. <script>
  37. var $canvas = document.getElementById("myCanvas")
  38. var cad = grendCAD($canvas, wallData, wallCamera)
  39. cad.position({x: -5, y: -4.5}, 5)
  40. wallData[1].otherobjs = [{
  41. id: "door_1",
  42. points2d: [{
  43. "x": 1.62,
  44. "y": -4.124
  45. }, {
  46. x: 3.845,
  47. y: -4.707333333333333
  48. }]
  49. }]
  50. cad.updateComponents()
  51. </script>
  52. </body>
  53. </html>