Tinting BitmapText characters separately not working after setting anchor
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
Direzione di ricerca
Start by reproducing the issue with the supplied example and compare the two BitmapText instances in Phaser 2.8.0: only the second sets an anchor before tinting its characters. Trace how BitmapText applies its own tint to child characters when the anchor changes. Done means per character tints remain visible after setting the anchor; the payload names no source files or tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Basically what in the title is. You can tint a BitmapText's characters separately, but if you set anchor (or maybe some other properties too), the tinting is not working on per character. I guess the engine overwrites all the children elements (the characters) tint values with the BitmapText's tint value.
Here is a small example demonstrating the problem:
http://icedevel.com/phaser-bug/character-tinting/index.html
My opinion is that the children elements should retain tint values if the BitmapText's tint value is not modified.
And the code:
var game;
function preload() {
this.game.load.bitmapFont("font", "font_simple.png", "font_simple.fnt");
}
function create() {
var txt1 = this.game.add.bitmapText(50, 50, "font", "012345", 28);
txt1.children[0].tint = 0xFF0000;
txt1.children[1].tint = 0xFFFF00;
txt1.children[2].tint = 0xFF00FF;
txt1.children[3].tint = 0x0000FF;
txt1.children[4].tint = 0x00FFFF;
txt1.children[5].tint = 0xFF0FF0;
var txt2 = this.game.add.bitmapText(50, 250, "font", "012345", 28);
txt2.anchor.setTo(0, 1);
txt2.children[0].tint = 0xFF0000;
txt2.children[1].tint = 0xFFFF00;
txt2.children[2].tint = 0xFF00FF;
txt2.children[3].tint = 0x0000FF;
txt2.children[4].tint = 0x00FFFF;
txt2.children[5].tint = 0xFF0FF0;
}
function update() {
}
window.onload = function(){
var config = {
width: 800,
height: 600,
renderer: Phaser.AUTO,
antialias: true,
state: {
preload: preload,
create: create,
update: update
}
}
game = new Phaser.Game(config);
};
Tested it on Phaser 2.8.0
- Lingua principale
- JavaScript
- Stelle
- 1.4k
- Fork
- 485
- Merge medio
- 1g 2h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di phaserjs/phaser-ce
-
Web audio stops playing in iOS 17 and 18 after refocusingForse di nuovo libera @samme l’ha presa 633 giorni fa e non c’è nessuna pull request aperta. Aperta
phaserjs/phaser-ce#748 · 2 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
phaserjs/phaser-ce#740 · 9 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
phaserjs/phaser-ce#724 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
phaserjs/phaser-ce#711 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di phaserjs/phaser-ce
Issue simili
-
enhancement ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DCGM/semant-demo#708 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the moduleForse già presa @MalithaPrabhashana l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
jaseci-labs/jac#10756 ·
I maintainer di solito rispondono entro 1 giorno