TilemapLayer crops its rendered image if width/height are less than game's width/height

Đang mở
#267 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
frontend, game-dev

Hướng nghiên cứu

Start by reproducing the crop in the linked CodePen with Phaser 2.6.2 or 2.8.1, moving the camera and comparing the two TilemapLayers. Then trace how TilemapLayer rendering handles camera offsets and layer bounds; done means both layers render without cropping as the camera moves, including when a layer is smaller than the game view.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

help wanted

Hi!

Sorry for my English.

This Issue is about rendering TilemapLayer if its cameraOffset.x/y not zero, or if TilemapLayer has width and height less than game's width/height. TilemapLayer crops its rendered image.

  • A bug in the API:
    • Phaser version(s): 2.6.2, 2.8.1
    • Live example: https://codepen.io/DrDerico/pen/yXoaKy You'll see two white rectangles (they are TilemapLayers). First layer (rectangle) has cameraOffset (0,0), the second one has cameraOffset (200, 200). Press cursor LEFT/RIGHT/UP/DOWN. The second rectangle disappears behind its left top corner.
      Also the second layer manually resized to 160x160 pixels. And when moving the camera the second layer disappears behind its bounds (160x160)

I can't make my game with infinite scrolling, because TilemapLayers, that I use, disappear when the camera moves.

Thank you!

Ngôn ngữ chính
JavaScript
Star
1.4k
Fork
485
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của phaserjs/phaser-ce

Tất cả issue của phaserjs/phaser-ce

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.