Replies: 8 comments 8 replies
-
I want to know what the drawing approach is in this regard @rexrainbow |
Beta Was this translation helpful? Give feedback.
-
It seems that size of Text and Image game objects are too small. Text and Image game object in sizer will layout by current size usually. For text game object, might try
For Image game object, might try
|
Beta Was this translation helpful? Give feedback.
-
Mainly, after changing the resolution, the positioning of the elements changes. Do we need to write a fixed value for the positioning coordinates? |
Beta Was this translation helpful? Give feedback.
-
This is the scaling configuration in the game. I have found that some other Phaser3 game source codes directly set fixed values to the width and height, which I do not have here. I set the scaled width and height based on the design draft and the width and height of the current game container, Is there any problem with me doing this? How should I set it under normal circumstances const container = document.getElementById(parentID)
const containerWidth = container.clientWidth
const containerHeight = container.clientHeight
const config = {
type: Phaser.AUTO,
scene: [SideScrollingScene],
physics: {
default: 'arcade',
arcade: {
gravity: { y: 0 },
debug: false
}
},
parent: parentID
}
let designHeight = 800
let height = designHeight
let width = (height * containerWidth) / containerHeight
config.scale = {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH,
width: width,
height: height,
parent: parentID
}
this.game = new Phaser.Game(config) |
Beta Was this translation helpful? Give feedback.
-
With |
Beta Was this translation helpful? Give feedback.
-
@rexrainbow I would like to ask you a question, such as how to use Phaser's API to implement some rounded bubble boxes, nineSlice? Or graphics, as it involves a transition animation of height |
Beta Was this translation helpful? Give feedback.
-
When I use Nineslice, I find that the same effect cannot be achieved This is what I have achieved, use |
Beta Was this translation helpful? Give feedback.
-
use 180*150 image |
Beta Was this translation helpful? Give feedback.
-
This may not be closely related to the current library, but as a beginner, I have indeed encountered such a problem
For example, how to locate each element and ensure that they maintain the correct display size and positioning at any resolution
Beta Was this translation helpful? Give feedback.
All reactions