Explore CreateJS

build environment

CreateJS render tag by JS, so the script should run after the load of html.

<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.


For LCC MA.IVM Reflective Journal
/ Home / Archives / Heyao.art

Made by Heyao / Site by HEXO