This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |