v4.2.1 WebGL: sprite batch corruption when an angle tween runs on a GameObject whose position is also written every frame
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript
- Lĩnh vực
- computer-graphics, game-dev
Hướng nghiên cứu
Bắt đầu với scene Repro tối thiểu, tập trung vào thiết lập tween và thao tác ghi vị trí theo mệnh lệnh trong scene.update(). Tái hiện với Phaser 4.2.1 bằng renderer WebGL và so sánh trường hợp góc cộng chuyển động với các trường hợp đối chứng trong ma trận tái hiện, bao gồm cả biến thể Container/child Image. Được xem là hoàn tất khi các sprite đang di chuyển được render mà không có các hình nêm, các lát bị lệch hoặc lỗi hình học nào khác trong khi tween góc đang chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 40.7k
- Fork
- 7.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của phaserjs/phaser
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Type definition for TilemapLayer.getTileAt is wrongCó thể đã có người làm @hkbughk đã nhận 34 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Shader.preDestroy leaks its ShaderQuad's vertex buffer and VAO on every create/destroy cycle (4.2.1)Có thể đã có người làm @k1epg01ng129-eng đã nhận 32 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Black opaque background on transparent Phaser.Text textures in Phaser 4.2.1 on older iOS WebGLCó thể đã có người làm @SamuelMalmfors đã nhận 14 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
phaserjs/phaser#7392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của phaserjs/phaser
Issue tương tự
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DCGM/semant-demo#708 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 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
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the moduleCó thể đã có người làm @MalithaPrabhashana đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
jaseci-labs/jac#10756 ·
Maintainer thường phản hồi trong vòng 1 ngày