phaser-tiled icon indicating copy to clipboard operation
phaser-tiled copied to clipboard

Parallax Layers

Open englercj opened this issue 11 years ago • 5 comments

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.

englercj avatar Oct 20 '14 16:10 englercj

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?

embiem avatar Jun 26 '15 11:06 embiem

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.

englercj avatar Jun 26 '15 13:06 englercj

okay, I forked the current version and will try to implement the scrolling feature.

embiem avatar Jun 26 '15 14:06 embiem

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

Weedshaker avatar Feb 23 '16 23:02 Weedshaker

Moving this to v3 where the new custom render code will make this a lot easier.

englercj avatar Apr 05 '16 16:04 englercj