Finally got a chance to look at my sizing issue. H...
# korge
a
Finally got a chance to look at my sizing issue. Here's a screen shot of the "Hello world" Korge project running on the JVM and in the browser. I only added the yellow circle centered on the stage sized to the width; all other code is the same. *Might be worth mentioning that I have a 1440p monitor (Seems like the JS canvas gets a size pretty close to my monitor)
d
Can you put the code that adds the circle here?
Also, which version are you using?
a
I'm using version
1.13.2.3
And the code to generate the circle is:
Copy code
stage.circle(stage.width / 2, color = Colors.YELLOW).anchor(0.5, 0.5).position(stage.width / 2, stage.height / 2)
r
instead of
stage.width
try to use
stage.virtualWidth
also I suggest you use either
anchor
or
position
but not both
d
stage.width
before 1.13.3.0 was
stage.actualVirtualWidth
(that changes depending on the window size), changed after that version to avoid this kind of problems. https://github.com/korlibs/korge/commit/ad6173dc27801b2c103615710f44eb1269e0df5d#diff-c553c1062490fbfda39a291b5714f74eL33-R33