phaser-tiled
phaser-tiled copied to clipboard
Parallax Layers
Right now there is no support for layers that scroll at different speeds, need to implement scrollFactor for layers and get that working. Also have custom properties so they can be set from Tiled.
any progress on this? I am currently working on a workaround to add parallaxing with this plugin by doing this: var xAmount = (this.mainLayer._scrollDelta.x * this.driftAmountMain) / 1000; var yAmount = (this.mainLayer._scrollDelta.y * this.driftAmountMain) / 1000; this.mainLayer.position.x += xAmount; this.mainLayer.position.y += yAmount; this.mainLayer._scroll.x += xAmount; this.mainLayer._scroll.y += yAmount;
... which is not quite right and I need to get back to this later. If you want, I can help you implement scrolling in your plugin. So, do you have any progress already?
I do not! Unfortunately, been too busy to work on this project at all for a while. v2 is being developed in the thin-tiles branch though so if you make any changes, do it there.
okay, I forked the current version and will try to implement the scrolling feature.
How is the progress going? Phaser lets me change the scrollFactorX/scrollFactorY for tiles and works beautiful, it would be nice if Phaser-tiled gets this, too!
THX
Moving this to v3 where the new custom render code will make this a lot easier.