We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I change the theme to dark, the cmatrix behavior is not working as expected. The matrix is not displayed correctly with the dark theme.
cmatrix
Html
<canvas id="matrix"></canvas>
Javascript
import matrix from "cmatrix/dist/matrix"; var canvas = document.getElementById("matrix"); var someFunction = function (event) { //clear canvas before drawing canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height); matrix(canvas, { chars: ["0", "1"], color: localStorage.getItem("theme") === "dark" ? "#0F0" : "#000", background: localStorage.getItem("theme") === "dark" ? "rgba(51, 65, 84, 0.09)" : "rgba(255,255,255, 0.05)", exit: true, font_size: 20, }); }; window.addEventListener("theme", someFunction, false);
The text was updated successfully, but these errors were encountered:
The problem is that you execute matrix multiple times. You need a way to destroy/stop old code before running it again.
Sorry, something went wrong.
fix clearing state after subsequent call to main function #2
71484ef
It should be fixed now, can you confirm?
No branches or pull requests
When I change the theme to dark, the
cmatrix
behavior is not working as expected. The matrix is not displayed correctly with the dark theme.Html
Javascript
Untitled3.1.mp4
The text was updated successfully, but these errors were encountered: