Open yuweilan opened 7 years ago
我在下面打了个console,就一直在运行 console.info(this,888);
ImgTouchCanvas.prototype = { animate: function() { //set scale such as image cover all the canvas if(!this.init) { if(this.imgTexture.width) { var scaleRatio = null; if(this.canvas.clientWidth > this.canvas.clientHeight) { scaleRatio = this.canvas.clientWidth / this.imgTexture.width; } else { scaleRatio = this.canvas.clientHeight / this.imgTexture.height; }
this.scale.x = scaleRatio; this.scale.y = scaleRatio; this.init = true; } } this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); console.info(this,888);
我在下面打了个console,就一直在运行 console.info(this,888);
ImgTouchCanvas.prototype = { animate: function() { //set scale such as image cover all the canvas if(!this.init) { if(this.imgTexture.width) { var scaleRatio = null; if(this.canvas.clientWidth > this.canvas.clientHeight) { scaleRatio = this.canvas.clientWidth / this.imgTexture.width; } else { scaleRatio = this.canvas.clientHeight / this.imgTexture.height; }