File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > Wavepaint</ title >
6+ </ head >
7+ < body >
8+
9+ < div >
10+ < canvas id ="canvas " width ="550 " height ="500 "> </ canvas >
11+ </ div >
12+ < a href ="https://createjs.com/ " target ="_blank "> < div class ="logo "> </ div > </ a >
13+
14+ <!-- Badges -->
15+ < div id ="badges ">
16+ < div class ="badge click "> </ div >
17+ < div class ="badge click white "> </ div >
18+ </ div >
19+
20+ < script >
21+ var canvas = document . getElementById ( "canvas" ) ,
22+ stage = new createjs . Stage ( canvas ) ;
23+ createjs . Ticker . on ( "tick" , tick ) ;
24+ createjs . Ticker . timingMode = createjs . Ticker . RAF ;
25+
26+ // Init Code
27+ handleResize ( ) ;
28+
29+ // Tick Code
30+ function tick ( event ) {
31+ }
32+
33+ // Resize Code
34+ window . addEventListener ( "resize" , handleResize , false ) ;
35+ function handleResize ( event ) {
36+ var w = window . innerWidth ,
37+ h = window . innerHeight ;
38+ canvas . width = w ; canvas . height = h ;
39+ // Layout other assets
40+
41+ let waveGraphArea = new createjs . Shape ( ) ;
42+ let paintedWave = new createjs . Shape ( ) ;
43+ let g = null ;
44+
45+ g = waveGraphArea . graphics ;
46+ g . beginFill ( "lightgrey" ) ;
47+ g . drawRect ( 100 , 100 , 100 , 100 ) ;
48+ g . endFill ( ) ;
49+ stage . addChild ( waveGraphArea ) ;
50+
51+ stage . update ( ) ;
52+ }
53+
54+
55+ </ script >
56+ </ body >
57+ </ html >
You can’t perform that action at this time.
0 commit comments