v4.2.1 WebGL: sprite batch corruption when an angle tween runs on a GameObject whose position is also written every frame
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript
- Ambito
- computer-graphics, game-dev
Direzione di ricerca
Inizia con la scena Repro minima, concentrandoti sulla configurazione del tween e sulla scrittura imperativa della posizione in scene.update(). Riproduci il problema con Phaser 4.2.1 usando il renderer WebGL e confronta il caso angolo più movimento con i casi di controllo nella matrice di riproduzione, inclusa la variante Container/child Image. Il lavoro è completo quando gli sprite in movimento vengono renderizzati senza cunei, sezioni spostate o altra corruzione geometrica mentre è in esecuzione il tween dell’angolo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
- Phaser 4.2.1 ("Giedi"), WebGL renderer (
type: AUTO) - Observed on Linux, Chromium 149 (Playwright headless shell) — also reproduced through several independent scene setups in the same environment. Not yet verified in headed browsers.
Description
When a GameObject has a continuous angle tween running while its position is written imperatively every frame (in scene.update()), sprites in the scene render with corrupted geometry: wedge-shaped chunks missing, or the quad drawn as displaced slices — it looks like one vertex/triangle of the sprite's quad (or its UVs) is wrong for a frame.
Either behavior alone renders perfectly. The combination corrupts.
Reproduction matrix (all with 152×136 PNG textures)
| angle | position | result |
|---|---|---|
| static (0° or any fixed angle) | written every frame in update() |
✅ renders fine |
tweened (yoyo/repeat: -1) |
static | ✅ renders fine |
| tweened | written every frame | ❌ corrupted (wedges/slices) |
The corruption also reproduces when the moving object is a Container and the angle tween targets a child Image (container position written per frame, child angle tweened).
Minimal repro sketch
class Repro extends Phaser.Scene {
create() {
this.img = this.add.image(400, 300, 'anyTexture');
this.tweens.add({
targets: this.img,
angle: { from: -4, to: 4 },
duration: 1500,
yoyo: true,
repeat: -1,
});
}
update(time, delta) {
this.img.x += 20 * (delta / 1000); // any imperative per-frame movement
if (this.img.x > 900) this.img.x = 100;
}
}
With the tween removed (or replaced by a scale/y tween), rendering is clean. With movement removed, rendering is clean.
Workaround
Express "float/wobble" effects on moving objects with scale or child-y tweens instead of angle tweens, or keep rotation static while moving. That fully avoids the artifacts.
Happy to provide screenshots of the corrupted frames or a fuller runnable repro if useful.
- Lingua principale
- JavaScript
- Stelle
- 40.7k
- Fork
- 7.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 3 giorni
-
Type definition for TilemapLayer.getTileAt is wrongForse già presa @hkbughk l’ha presa 34 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 3 giorni
-
Shader.preDestroy leaks its ShaderQuad's vertex buffer and VAO on every create/destroy cycle (4.2.1)Forse già presa @k1epg01ng129-eng l’ha presa 32 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 3 giorni
-
Black opaque background on transparent Phaser.Text textures in Phaser 4.2.1 on older iOS WebGLForse già presa @SamuelMalmfors l’ha presa 14 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
phaserjs/phaser#7392 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di phaserjs/phaser
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