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

Added option for rounded rectangles #3

Merged
merged 4 commits into from
Feb 13, 2024
Merged

Conversation

omar-shahid
Copy link
Contributor

@omar-shahid omar-shahid commented Feb 10, 2024

Description

Test Code:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Canvas</title>
  </head>
  <body>
    <canvas height="200" width="400" id="c"></canvas>
    <script type="module" src="./index.js"></script>
  </body>
</html>
import { continuousVisualizer } from "./sound-visualizer/lib/index.mjs";

async function init() {
  const c = document.getElementById("c");
  const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
  continuousVisualizer(stream, c, { slices: 30, lineWidth: 5, barRadius: 50 }).start();
}
init();

Preview:

Screenshot (6)

Copy link
Owner

@ej-shafran ej-shafran left a comment

Choose a reason for hiding this comment

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

Hey! Thanks for the pull request. Looks great. Please go over my two comments and fix them, and I'll merge this.

src/continuous/draw/impure.ts Outdated Show resolved Hide resolved
src/continuous/draw/options.ts Outdated Show resolved Hide resolved
@ej-shafran ej-shafran merged commit 7543811 into ej-shafran:main Feb 13, 2024
1 check passed
@rangelojc
Copy link

Was this PR ever released in NPM? I can't see the change. Typescript is still complaining with the barRadius option

@ej-shafran
Copy link
Owner

Was this PR ever released in NPM? I can't see the change. Typescript is still complaining with the barRadius option

You're right, I don't think I ever released this. Will publish to NPM later today.

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.

[Feature Request]: Rounded borders in continuous wave
3 participants