Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97ebe8c
commit 44d4e6d
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,12 @@ import { | |
function animatedDraw(ctx) { | ||
let now = (Date.now() / 10); | ||
let width = now % 100; | ||
let red = Math.sqrt(width / 100) * 255; | ||
let hex = Math.floor(red).toString(16); | ||
|
||
// TODO: Should update the ctx proxy to convert from javascript hex strings, aka | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nick-thompson
Author
Collaborator
|
||
// #ffffaa to juce's Colour::fromString() API which is ffffffaa. | ||
ctx.fillStyle = `ff${hex}ffaa`; | ||
ctx.fillRect(0, 0, width, 2); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Heh. Yeah this would be awesome