Problem to solve
Being able to warp the rendering of a Sprite would be useful when responding to a game event requires applying some kind of (usually) transient deformation of the rendering output. An example might be an enemy Sprite which, when disappearing due to having been destroyed, briefly collapses on itself or expands outwards.
Apple's SpriteKit provides the SKWarpGeometryGrid class for this purpose: the deformation is defined via a grid in UV space.
Proposal
Add (somewhat) equivalent support via:
- the
WarpGrid class, mimicking SKWarpGeometryGrid
- the
HasWarpGrid mixin on SpriteComponent, mimicking the SKWarpable protocol
- the
WarpEffect class to animate warp grids
More information
I have opened PR #4105 with the proposed implementation, featuring a new example for warping; this is available in the testbed.
Other
Problem to solve
Being able to warp the rendering of a
Spritewould be useful when responding to a game event requires applying some kind of (usually) transient deformation of the rendering output. An example might be an enemySpritewhich, when disappearing due to having been destroyed, briefly collapses on itself or expands outwards.Apple's SpriteKit provides the
SKWarpGeometryGridclass for this purpose: the deformation is defined via a grid in UV space.Proposal
Add (somewhat) equivalent support via:
WarpGridclass, mimickingSKWarpGeometryGridHasWarpGridmixin onSpriteComponent, mimicking theSKWarpableprotocolWarpEffectclass to animate warp gridsMore information
I have opened PR #4105 with the proposed implementation, featuring a new example for warping; this is available in the testbed.
Other