common-game
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -40,4 +40,4 @@ Component({ | ||
checkVersion() { | ||
let res = my.getSystemInfoSync() | ||
this.pixelRatio = res.pixelRatio; | ||
let res = my.getSystemInfoSync(); | ||
this.windowWidth = res.windowWidth; | ||
let bl = false; | ||
@@ -91,9 +91,9 @@ try { | ||
canvasDom.data = { | ||
width: 700 / this.pixelRatio, | ||
height: 800 / this.pixelRatio | ||
width: 700 / (750 / this.windowWidth), | ||
height: 800 / (750 / this.windowWidth) | ||
}; | ||
my.showToast({ content: `pc工具调试默认容器宽高(${canvasDom.data.width}*${canvasDom.data.height})` }); | ||
} | ||
let windowWidth = canvasDom.data.width * this.pixelRatio; | ||
let windowHeight = canvasDom.data.height * this.pixelRatio; | ||
let windowWidth = canvasDom.data.width * (750 / this.windowWidth); | ||
let windowHeight = canvasDom.data.height * (750 / this.windowWidth); | ||
@@ -100,0 +100,0 @@ let options = Object.assign({ |
{ | ||
"name": "common-game", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "common-game.js", |
@@ -57,2 +57,3 @@ import * as PIXI from "@tbminiapp/pixi-miniprogram-engine"; | ||
} | ||
this.setData({ | ||
@@ -125,3 +126,3 @@ isRunCanvas: true, | ||
if (this.mainCanvas && event.changedTouches && event.changedTouches.length) { | ||
console.log('event----->', event); | ||
// console.log('event----->', event); | ||
this.mainCanvas.dispatchEvent(event); | ||
@@ -128,0 +129,0 @@ } |
40062