MCPcopy Create free account
hub / github.com/eva-engine/eva.js / getRenderRect

Method getRenderRect

packages/plugin-a11y/lib/A11ySystem.ts:208–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

setRatioMethod · 0.95

Calls 1

getSystemMethod · 0.80

Tested by

no test coverage detected