a language for describing flipbooks and a compiler for this language that can convert a flipbook description into a print- able pdf. Made within 48 hours thanks to a lot of coffee, one power nap and Modest Mouse albums.
1
stars
0
forks
source link
Add analogue of Functions as Effects like swirl #3
This PR adds a new analogue of Functions as Effects called "swirl" to the Flipbook-Language repository. The swirl effect applies a rotation transformation to each page of the flipbook, with the angle of rotation increasing for each subsequent page.
Summary of Changes
Added a new function named SwirlEffect in the evaluator.go file.
The SwirlEffect function takes as input the flipbook pages and a parameter for the rate of rotation.
The SwirlEffect function applies a rotation transformation to each page, with the angle of rotation calculated as the current page number multiplied by the rate of rotation.
Updated the flipbook language interpreter in the evaluator to recognize the swirl effect command and call the SwirlEffect function with the appropriate parameters.
Updated the pdf generator in the evaluator to apply the transformations specified by the effects, including the swirl effect, to the flipbook pages.
Fixes #2.
π Latest improvements to Sweep:
Sweep can now passively improve your repository! Check out Rules to learn more.
π‘ To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
PR Feedback (click)
Description
This PR adds a new analogue of Functions as Effects called "swirl" to the Flipbook-Language repository. The swirl effect applies a rotation transformation to each page of the flipbook, with the angle of rotation increasing for each subsequent page.
Summary of Changes
Fixes #2.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: