Skip to content

Instantly share code, notes, and snippets.

View hayesmaker's full-sized avatar

hayesmaker hayesmaker

View GitHub Profile
var build = function(){
var args = Array.prototype.slice.call(arguments)
var obj = {}
for ( var i = 0, len = args.length; i < len; i += 2 ) obj[args[i]] = args[i + 1]
return obj
}
var name1 = 'x'
var name2 = 'y'
export default class Camera {
constructor(stage, renderer) {
this.stage = stage;
this.renderer = renderer;
this.target = null;
this.world = new Container();
this.stage.addChild(this.world);
this.worldSize();
this.viewSize();