This post is about making a cool effect even simpler using the drawing canvas.
To start we use just two objects a sprite, and two instances of the canvas.
The first instance has its properties set to have its origin in the top left
The second has it to the bottom.
Both instances are placed on the top layer and sized to fit the top and bottom.
We will use an instance variable to select them at runtime.
The bottom was set to 1.
You will need two layers one for the fx, and one for the sprite.
The fx will go on the top layer.
After selecting the top layer add Multiply, BlurHorizontal, and BlurVertical, in that order to the layer.
Since the effects are already enabled, all we have to do is create a gradient.
We can do that at the start of the layout.
We just need to select the different instances.
The top Drawing Canvas will need to have its gradient fill set.
Vertical, white to transparent.
The bottom canvas will be set to:
Vertical, transparent to white.
You will probably want to make sure that the Drawing Canvas is set to fixed resolution mode as they can and will be cleared if the user resizes the screen with it set the other way.
Using the objects gradient allows for many different ways to do things.
As always be sure to do lots of experimentation.
Comments
Post a Comment