nidza
Version:
Nidza.js is ultimate canvas2d+3d solution (Easy port any webgl or webgl2 script). In context of 3d graphics it is used for GLSL manipulation. Objective is low CPU usage price.
15 lines (14 loc) • 358 B
JavaScript
/**
* @description No need class for this.
* Use bind is easy in ECMA6.
*/
export function setReferent (canvasDom) {
this.canvasDom = canvasDom;
// this.pIdentity = canvasDom.id;
this.referentCanvasWidth = () => {
return this.canvasDom.width;
};
this.referentCanvasHeight = () => {
return this.canvasDom.height;
};
}