()
| 206 | } |
| 207 | } |
| 208 | getRenderRect() { |
| 209 | const { params = { width: 300, height: 300 } } = this.game.getSystem(RendererSystem); |
| 210 | const { height: renderHeight, width: renderWidth } = params; |
| 211 | return { renderWidth, renderHeight }; |
| 212 | } |
| 213 | getCanvasBoundingClientRect() { |
| 214 | // 渲染画布相对于视口的实际宽高以及位置,实际的像素 |
| 215 | const { width, height, left, top } = this.game.canvas.getBoundingClientRect(); |