rysefgf
1
this is the code , i just changed text origin , but cause text blur .
export default class Scene1 extends Phaser.Scene {
constructor() {
super("Scene1")
}
init() { }
preload() { }
create() {
this.add.text(400, 200, "text", { color: "#000000" }).setOrigin(0, 0);
this.add.text(400, 300, "text", { color: "#000000" }).setOrigin(0.5,0.5);
}
}
const gameConfig = {
width:800,
height:600,
type:Phaser.AUTO,
parent:"game-container",
backgroundColor: 0xffffff,
scene:[Scene1]
};
const game = new Phaser.Game(gameConfig);
this is the picture.
i don’t know why , please help me!
samme
2
I’ve seen that too, it may be unavoidable.
No problem appears. Tested in Phaser v3.55.2.
rysefgf
4
thank you for your reply, but it really apper, i used Phaser v3.55.2 too, and the code run in chrome v105.0.5195.54. all of code is here:
import Phaser from "./phaser.js"
class scene1 extends Phaser.Scene {
constructor() {
super("scene1");
}
create() {
const text1 = this.add.text(400, 200, "text1"); // default origin value
const text2 = this.add.text(400, 300, "text2").setOrigin(0, 0); // set origin to (0,0)
const text3 = this.add.text(400, 400, "text3").setOrigin(0.5, 0.5); // this should be default origin value, but text3 is blur.
}
}
const gameConfig = {
width: 800,
height: 600,
type: Phaser.AUTO,
parent: "game-container",
backgroundColor: 0xcccccc,
scene: [scene1]
};
const game = new Phaser.Game(gameConfig);
this is result:
and this is a part of Text Object document:
i don’t know why it was happened, maybe it’s a bug.
rysefgf
5
thank you for your reply. i was confused because i just changed Text.origin, and changed to default value, but it was blur.