Richard Davey
5ada70409e
Modified tile sizes.
2018-07-16 15:20:46 +01:00
Richard Davey
0cc52f6002
Swapped 4 ternaries for a single conditional #3834
2018-07-16 14:55:51 +01:00
tarsupin
ad24a0b8ec
Removed repetative code.
2018-07-14 20:09:36 -05:00
tarsupin
00a38f744a
Switching tabs to spaces
2018-07-14 14:41:13 -05:00
tarsupin
9ac505d5cc
Build is requiring me to pre-declare x, y, tile.
2018-07-14 14:38:19 -05:00
tarsupin
4fa3dc7159
Update CullTiles.js
2018-07-14 14:30:15 -05:00
tarsupin
e3d64c63b3
Major Optimization for Culling Tilemaps
...
Refine the loop to only scan through the drawn boundaries that are being tested against (except when skipping cull). This eliminates a huge bottleneck / lookup time from the original loop each frame.
The update should affect tilemaps exponentially based on their size. It reduced my culling time to 1/70th for 1000x1000 tilemaps, and by about 1/20th on 250x250 tilemaps. It also reduced my requestAnimationFrame time from over 16ms per frame to ~1ms for the larger map.
2018-07-14 14:14:55 -05:00
Richard Davey
8981cf4a03
Swapped from vec2 to explicit values for cullPadding
2018-07-12 16:51:54 +01:00
Richard Davey
b03d3ff783
Added support for cull padding
2018-07-12 16:44:36 +01:00
Richard Davey
e66cf4e00b
Adjusted bounds +- 1 tile
2018-07-12 16:32:25 +01:00
Richard Davey
12c6736c67
Stats recorded in tilesDrawn
and tilesTotal
.
2018-07-12 16:12:55 +01:00
Richard Davey
89db84377e
Added skipCull
property and setSkipCull
method
2018-07-12 15:31:25 +01:00
Richard Davey
a447d85401
CullTiles recoded to use Camera worldView - finally, properly culling, regardless of layer scale or camera zoom! Fix #3818
2018-07-12 15:07:45 +01:00
Richard Davey
869087044b
Starting work on proper tile culling
2018-07-12 01:14:34 +01:00
Craig Whiteside
375b1f8f18
Pulled out calculation for tile pixel position amended with tilemapLayer position
2018-06-23 21:20:54 +01:00
Craig Whiteside
ac82e39314
Fix whitespace
2018-06-23 16:40:19 +01:00
Craig Whiteside
86f1cbcabf
Made it more specific to the tile offset.
2018-06-23 16:34:45 +01:00
Craig Whiteside
a73e47e508
Account for position of tilemapLayer when culling tiles
2018-06-23 16:28:45 +01:00
Richard Davey
3d9da060c5
Camera.shake would not effect dynamic tilemap layers. Fix #3669
2018-05-24 23:02:59 +01:00
Richard Davey
cd288b33c2
eslint fixes
2018-04-23 23:52:57 +01:00
Felipe Alfonso
1ce2311465
tile culling and clipping progress
2018-04-23 13:45:42 -03:00
Richard Davey
f02eb5874f
Marked all Tilemap components as private
2018-04-16 15:25:22 +01:00
Bugi Görtz
077d933bbb
Fixed Tile-Culling for Zoomed Camera
...
The fix from https://github.com/photonstorm/phaser/pull/3354/ leads to some tiles getting culled when camera is zoomed as the camera.scrollX/camera.scrollY-Properties are needed in unscaled Coordinates (World-Coordinates?) in CullTile.js
Error gets bigger with distance from (0|0)
2018-03-15 20:32:09 +01:00
Richard Davey
d1f5f8a82b
Added jsdocs
2018-02-12 16:01:21 +00:00
Richard Davey
ed89e48b4d
Updated jsdocs
2018-02-08 02:02:37 +00:00
Richard Davey
cf6bbbd0fb
Added jsdocs
2018-02-08 01:08:59 +00:00
Richard Davey
5dffe21858
Updated jsdocs
2018-02-07 23:27:01 +00:00
Richard Davey
89fe7123e1
Moved to its own top-level folder.
2018-02-07 16:29:48 +00:00