Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ranges and globalCompositionOperation override to Siriwave Options #74

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

KrishKrosh
Copy link
Contributor

@KrishKrosh KrishKrosh commented Apr 26, 2023

Added a ranges and globalCompositionOperation option to override and allow for more customization.

globalCompositionOperation

It will default to "lighter", however it is now included in options.

Ranges

Each wave chooses a random parameter for each of these ranges that factors into their creation. You can override these ranges by passing a ranges object to the constructor.

Here is the type of the ranges object:

export type IiOS9Ranges = {
  noOfCurves?: [number, number];
  amplitude?: [number, number];
  offset?: [number, number];
  width?: [number, number];
  speed?: [number, number];
  despawnTimeout?: [number, number];
};

@KrishKrosh KrishKrosh changed the title Add ranges override to Siriwave Options Add ranges and globalCompositionOperation override to Siriwave Options Apr 26, 2023
Comment on lines +6 to +32
type GlobalCompositeOperation =
| "color"
| "color-burn"
| "color-dodge"
| "copy"
| "darken"
| "destination-atop"
| "destination-in"
| "destination-out"
| "destination-over"
| "difference"
| "exclusion"
| "hard-light"
| "hue"
| "lighten"
| "lighter"
| "luminosity"
| "multiply"
| "overlay"
| "saturation"
| "screen"
| "soft-light"
| "source-atop"
| "source-in"
| "source-out"
| "source-over"
| "xor";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is type is technically already included, however there is a bug with the current typescript version.

@kopiro kopiro merged commit 2afd461 into kopiro:master Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants