55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
66 < title > Down with canvas!</ title >
77 < script type ="module " src ="/src/main.ts "> </ script >
8+ < script >
9+ function toggle_panel ( id ) {
10+ const el = document . getElementById ( id ) ;
11+ el . hidden = ! el . hidden ;
12+ resize_workspace ( ) ;
13+ window . dispatchEvent ( new Event ( 'resize' ) ) ;
14+ }
15+
16+ function resize_workspace ( ) {
17+ const svg = document . getElementById ( 'container' ) ;
18+ if ( svg ) {
19+ svg . setAttribute ( "height" , window . innerHeight - 36 ) ;
20+ }
21+ }
22+
23+ window . addEventListener ( 'resize' , resize_workspace ) ;
24+ window . addEventListener ( 'load' , resize_workspace ) ;
25+ </ script >
826</ head >
9- < body bgcolor ="grey " text ="white ">
10- < center >
11- < h1 > < font face ="Arial "> Down with canvas</ font > </ h1 >
12-
13- < table border ="1 " cellpadding ="10 " cellspacing ="0 " width ="900 " bgcolor ="#111111 ">
14-
27+
28+ < body topmargin ="0 " leftmargin ="0 " marginheight ="0 " marginwidth ="0 " bgcolor ="#000000 " text ="white ">
29+
30+ < table width ="100% " height ="35 " border ="0 " cellpadding ="0 " cellspacing ="0 " bgcolor ="#222222 ">
1531 < tr >
16- < td colspan ="3 " align ="right " bgcolor ="#222222 ">
17- < font face ="monospace "> Triangles: < b id ="poly-count "> 0</ b > / 100000</ font >
32+ < td width ="300 " align ="left " valign ="middle ">
33+ < button onclick ="toggle_panel('left-panel') "> < b > ☰ Create Tools</ b > </ button >
34+ </ td >
35+ < td align ="center " valign ="middle ">
36+ < font face ="Arial " size ="4 "> < b > Down with canvas</ b > </ font >
37+
38+ < a href ="what.html " target ="_blank " style ="text-decoration: none; ">
39+ < font face ="Arial " size ="2 " color ="#aaaaaa "> [ What is this? ]</ font >
40+ </ a >
41+
42+
43+ < font face ="Arial " size ="2 " color ="gray "> |</ font >
44+
45+ < font face ="Arial " size ="2 "> < b > Wireframe:</ b > </ font >
46+ < input type ="checkbox " id ="wireframe-mode ">
47+ </ td >
48+ < td width ="300 " align ="right " valign ="middle ">
49+ < font face ="monospace " size ="2 " color ="#aaaaaa "> Triangles: < b id ="poly-count "> < font color ="white "> 0</ font > </ b > / 100000</ font >
50+
51+ < button onclick ="toggle_panel('right-panel') "> < b > ☰ Inspector</ b > </ button >
1852 </ td >
1953 </ tr >
54+ </ table >
55+
56+ < table width ="100% " height ="1 " border ="0 " cellpadding ="0 " cellspacing ="0 " bgcolor ="#333333 ">
57+ < tr > < td > </ td > </ tr >
58+ </ table >
2059
60+ < table width ="100% " border ="0 " cellpadding ="0 " cellspacing ="0 ">
2161 < tr valign ="top ">
2262
23- < td nowrap width ="25% " bgcolor ="#1a1a1a ">
24- < h3 > < font face ="Arial "> Create</ font > </ h3 >
25- < div id ="primitive-toolbar "> </ div >
26- < hr >
27- < div id ="primitive-options "> </ div >
28- < hr >
63+ < td id ="left-panel " width ="300 " bgcolor ="#1a1a1a ">
64+ < table width ="300 " border ="0 " cellpadding ="0 " cellspacing ="0 "> < tr > < td height ="1 "> </ td > </ tr > </ table >
65+
66+ < table width ="100% " cellpadding ="15 " cellspacing ="0 " border ="0 ">
67+ < tr >
68+ < td >
69+ < h3 > < font face ="Arial "> Create</ font > </ h3 >
70+ < div id ="primitive-toolbar "> </ div >
71+ < hr color ="#333333 " size ="1 ">
72+ < div id ="primitive-options "> </ div >
73+ </ td >
74+ </ tr >
75+ </ table >
2976 </ td >
3077
31- < td width =" 50% " align =" center " bgcolor ="black ">
78+ < td align =" center " valign =" top " bgcolor ="black ">
3279 < svg
33- width ="800px "
34- height ="600px "
80+ width ="100% "
3581 viewBox ="-1 -1 2 2 "
3682 preserveAspectRatio ="none "
37- stroke-width ="0.01 "
83+ stroke-width ="0.01 "
3884 id ="container "
39- shape-rendering ="optimizeSpeed "
85+ shape-rendering ="optimizeSpeed "
4086 >
4187 < path id ="render-target " fill ="none " stroke ="white " stroke-width ="0.005 " stroke-linejoin ="round " />
4288 </ svg >
43- < br > < br >
44- < table border ="0 " width ="100% ">
89+ </ td >
90+
91+ < td id ="right-panel " width ="300 " bgcolor ="#1a1a1a ">
92+ < table width ="300 " border ="0 " cellpadding ="0 " cellspacing ="0 "> < tr > < td height ="1 "> </ td > </ tr > </ table >
93+
94+ < table width ="100% " cellpadding ="15 " cellspacing ="0 " border ="0 ">
4595 < tr >
46- < td align ="center ">
47- < font face ="Arial "> Wireframe mode?</ font > < input type ="checkbox " id ="wireframe-mode ">
96+ < td >
97+ < div id ="inspector-panel ">
98+ < font color ="gray " face ="Arial "> Select an object to inspect.</ font >
99+ </ div >
48100 </ td >
49101 </ tr >
50102 </ table >
51103 </ td >
52104
53- < td width ="25% " bgcolor ="#1a1a1a ">
54- < h3 > < font face ="Arial "> Inspector</ font > </ h3 >
55- < div id ="inspector-panel ">
56- < font color ="gray "> Select an object to inspect.</ font >
57- </ div >
58- </ td >
59-
60105 </ tr >
61106 </ table >
62107
63- < br > < br >
64-
65- </ center >
66108</ body >
67109</ html >
0 commit comments