Building more complex patterns
The entitys are draggable
Test purpose
- STEP 1. We define a gradient, then apply it to some Blocks we create in a new canvas Cell. This gives us a more interesting gradient pattern than the default 'linear' and 'radial' gradients supplied by the Canvas API
- STEP 2. Apply a Noise-based displacement filter to our pattern Cell. We can then animate this filter to make it more interesting
- STEP 3. We are now in a position where we can use our Cells as pattern fills for some SC entitys.
- STEP 4. If we want, we can add some color-based filters to our entitys, to give our pattern a different look.
- STEP 5. There's one additional thing we can do with our Cell-based pattern - pass it into a Pattern object where we can warp and resize it. Then we can apply it to entitys via the Pattern object.
Annotated code