1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <title>Page Title</title>
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <style>
- * {
- margin: 0;
- padding: 0;
- border: 0;
- }
- html,
- body {
- width: 100%;
- height: 100%;
- overflow: hidden;
- background-color: rgba(0, 0, 0, 0.5)
- }
- canvas {
- width: 600px;
- height: 600px;
- position: absolute;
- left: 50%;
- top: 50%;
- margin-left: -300px;
- margin-top: -300px;
- }
- </style>
- </head>
- <body>
- <div id="asdas">
- <canvas id="myCanvas" width="600" height="600"></canvas>
- </div>
- <!-- <canvas id="myCanvas" width="1400" height="1400" >
- Your browser does not support the HTML5 canvas tag.
- </canvas> -->
- <script src="js/CAD.js"></script>
- <script src="model/data.js"></script>
- <script>
- var $canvas = document.getElementById("myCanvas")
- var cad = grendCAD($canvas, wallData, wallCamera)
- cad.position({x: -5, y: -4.5}, 5)
- wallData[1].otherobjs = [
- {
- id: "door_1",
- points2d: [{
- "x": 1.62,
- "y": -4.124
- }, {
- x: 3.845,
- y: -4.707333333333333
- }]
- }
- ]
- // wallData[4].otherobjs = [
- // {
- // id: 'column_1',
- // points2d: [
- // {x: -6, y: -10.924},
- // {x: 0, y: -10.924},
- // { x: 0, y: -8 },
- // { x: -6, y: -8 },
- // ]
- // },
- // {
- // id: 'column_1',
- // points2d: [
- // { x: -8, y: -10.924 },
- // { x: -10, y: -10.924 },
- // { x: -10, y: -8 },
- // { x: -8, y: -8 },
- // ]
- // }
- // ]
- cad.updateComponents()
- </script>
- </body>
- </html>
|