Commit graph

64 commits

Author SHA1 Message Date
Svipal
fbe3345e54 Updated RemoveTileAtWorldXy, PutTileAtWorldXY, GetTilesWithinShape and GetTilesWithinWorldXY 2020-01-19 20:50:57 +01:00
No
1a88ff95ba updated dynamic layer and tilemap 2020-01-17 16:15:59 +01:00
Josh Soref
315d43f893 spelling: receive 2019-10-29 02:33:06 -04:00
Richard Davey
6b973dcf58 DynamicTilemapLayer.setCollision would cause an indexOf error when trying to access the layer data. Fix #4800 2019-10-15 11:34:32 +01:00
Richard Davey
312797dc8e JSDoc fixes 2019-10-11 18:29:55 +01:00
Richard Davey
3a3ce8b914
Merge branch 'master' into tile-collision-update 2019-10-02 15:15:18 +01:00
Richard Davey
0aaa67957a Tilemap Canvas Render functions now respect game pixel art settings 2019-10-01 16:10:29 +01:00
Richard Davey
e012115df4 DynamicTilemapLayer.destroy will now no longer run its destroy sequence again if it has already been run once. Fix #4634 2019-07-03 15:53:47 +01:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
a6341a97a8 Fixed Types references 2019-05-09 15:32:53 +01:00
Richard Davey
44faa01578 Tilemap Types 2019-05-09 12:39:19 +01:00
Richard Davey
0514d27efc Added new argument removeFromTilemap 2019-04-08 15:59:30 +01:00
Richard Davey
d63321eba5 Layers now remove themselves from the Tilemap when destroyed. Fix #4319 2019-04-08 15:45:43 +01:00
Richard Davey
780b0bca90 Removed missing component 2019-03-25 12:54:49 +00:00
Richard Davey
e017691c68 The ScaleMode Component has been removed from every Game Object, and along with it the scaleMode property and setScaleMode method. These did nothing anyway as they were not hooked to the render pipeline and scale mode should be set on the texture, not the Game Object. Fix #4413 2019-03-24 23:07:27 +00:00
Richard Davey
4fc817c519 Final batch of typedefs 2019-02-13 16:06:00 +00:00
Richard Davey
348306cafb Lots more jsdoc fixes and new documentation 2019-01-31 14:47:50 +00:00
Richard Davey
4f6f6ee72f Lots of jsdoc and type fixes 2019-01-31 12:19:01 +00:00
Richard Davey
1eccff1e3b Fixed jsdoc links and markdown bullet lists 2019-01-18 15:20:56 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
ffd217dbdd Fixed size calculation and updated docs 2018-12-13 11:46:17 +00:00
Richard Davey
eef553d4c2 Fixed layer size calculations. Also changed rendering to use tileset tile sizes, as it should do. 2018-12-13 11:07:53 +00:00
Richard Davey
625955178e Updated docs 2018-11-20 12:45:47 +00:00
Richard Davey
5985e33caf
Merge pull request #4105 from the-realest-stu/master
Fix #4104
2018-11-20 11:05:05 +00:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Stuart Lindstrom
526067f7b6 Fix #4104 2018-10-09 14:34:47 -04:00
Richard Davey
a9063604dc Replace @readOnly with @readonly 2018-10-09 13:40:00 +01:00
Richard Davey
1b85512de2 Fixed a bug in the canvas rendering of both the Static and Dynamic Tilemap Layers where the camera matrix was being multiplied twice with the layer, causing the scale and placement to be off 2018-10-02 12:51:02 +01:00
Richard Davey
c16ea9b93d Completed DynamicTilemapLayer jsdocs 2018-09-28 14:46:31 +01:00
Richard Davey
e05f7c7ed0 Dynamic Tilemap Layers now support multiple tilesets per layer 2018-09-27 13:09:08 +01:00
Richard Davey
32bd01daba If you used a scaled Dynamic Tilemap Layer and rotated or flipped tiles, the tiles that were rotated or flipped would be positioned incorrectly in WebGL. Fix #3778 2018-09-26 16:49:18 +01:00
Richard Davey
25f8d29659 If you used a RenderTexture as a tileset then Dynamic Tilemap Layers would render the tiles inversed on the y-axis in WebGL. Fix #4017 2018-09-26 16:32:27 +01:00
Richard Davey
cc5bf41b25 Added renderOrder property and setRenderOrder method. 2018-08-21 18:01:33 +01:00
rootasjey
e2c505554a Fix JSDoc in Tilemap 2018-08-20 13:20:23 +02:00
Richard Davey
ae46e11e35 Skip processing if no tiles 2018-08-03 18:56:52 +01:00
Richard Davey
70b234952a Updated the canvas tilemap layer renderers to support parent matrix and tidied up the internal flow 2018-08-03 00:50:45 +01:00
Richard Davey
f1d3412c38 Corrected data types 2018-08-02 22:14:32 +01:00
Richard Davey
0967bfcab4 Should use currentContext, not gameContext 2018-08-02 17:59:30 +01:00
Richard Davey
f540d03346 Removed un-needed checks (willRender handles it now) 2018-08-01 16:03:58 +01:00
ampled
50c787a9c8 - add typedef for SpriteConfig extends GameObjectConfig
- allow update-function signature to be overriden by GameObject subclasses
2018-07-29 12:19:04 +02:00
Skysteed
5cd60b3378 Major Optimization for Tilemap Collision Indexing
This update optimizes an existing feature (Tilemap Collision Indexing).

This optimization will apply to [nearly] everyone using procedural generation tilemaps, infinite tilemaps, multiplayer tilemaps, particularly large tilemaps (especially those dyanmic in nature) or who otherwise intend to index collisions before the tiles are loaded.

Benchmarking:

Using the standard approach, indexing collisions for a 500x450 tileset took 2530ms. By pre-building the collision index array in its entirety, I was able to reduce that to 259ms. However, this implementation reduces it to 8 ms. Larger tilemaps would be exponentially affected.

There are some considerations to make here since there are better implementations, but it would require deprecating some existing code. The advantage would be that the standard approach itself would be optimized, (thus avoiding the sort of 2500+ms costs here), rather than fairly obscured as it is with this implementation.
2018-07-19 10:59:35 -05:00
Richard Davey
b4ddd44105 Added cullCallback support - the final step in culling. Don't like ours? Roll your own! 2018-07-12 17:06:36 +01: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
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
a8fa98e39b Skip all rendering if alpha <= 0 2018-07-12 15:31:00 +01:00
Richard Davey
5fdf51ce59 Using direct pipeline calls 2018-07-02 13:32:56 +01:00
Richard Davey
c6c9b25fdc Camera.alpha (and its related method Camera.setAlpha) allows you to get an alpha level for the entire camera. This impacts everything it is rendering, even if those objects also have their own alpha values too. You can tween the property to make the camera contents fade in / out, or you can set it as needed in your game. 2018-06-25 17:35:36 +01:00
Richard Davey
5a0fe89a7e Swap _id to id 2018-06-23 12:26:39 +01:00