Closed DaVince closed 2 years ago
This issue hasn't had any recent activity lately and is being marked as stale automatically.
@DaVince we added some more Screen api's to adjust the viewport/resolution of the graphics dynamically. Does that provide what you were looking for?
https://excaliburjs.com/docs/screens#advanced-viewport-and-resolution-manipulation
Screen also supports getting the current resolution width/height
const game = new ex.Engine({...});
await game.start();
const actor = new ex.Actor({
x: 0,
y: 0,
width: game.screen.resolution.width,
height: game.screen.resolution.height,
color: ex.Color.Blue
});
actor.graphics.anchor = ex.Vector.Zero;
game.add(actor);
Doing some backlog cleanup, closing for now let me know if we need to re-open 👍
Context
Drawable objects (like actors) can be scaled by a ratio, but not by an exact pixel value. In some cases, I'd like to be able to set the size of an actor to something very specific (like the size of the game screen).
Proposal
It would be nice if we could not just read, but also set the
drawWidth
anddrawHeight
properties. Excalibur should scale the graphical content appropriately.