build environment
CreateJS render
<body onload="init()">
<canvas id="cav"></canvas>
</body>
The most important thing is, canvas should be spelled rightly!
stageGL
use stageGL to genrate a createJS object which allow WebGL.
let s = new createjs.StageGL(' canvas's ID')
it can’t render Shape object, because it is vector graphic, so we use Cache to translate it to bitmap.
before cache, the shape object must be appended to stage
let shape = new createjs.Shape()
let cache = shape.cache(x,y,width,height)
cache object can be moved position / rotation and opacity It will have high performance because memory has saved the shape.