Notes
Notes - notes.io |
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Matrix with Additional Controls</title>
<style>
body {
margin: 0;
background: black;
overflow: hidden;
font-family: monospace;
}
canvas {
display: block;
}
/* Settings Button Styles */
#settingsBtn {
position: fixed;
top: 10px;
left: 10px;
background: transparent;
border: none;
cursor: pointer;
padding: 8px;
outline: none;
z-index: 10;
width: 40px;
height: 40px;
}
#settingsBtn:hover {
background: rgba(255,255,255,0.1);
border-radius: 4px;
}
#settingsIcon {
fill: #0F0;
width: 24px;
height: 24px;
display: inline-block;
}
/* Menu container styles */
#colorPickerContainer {
position: fixed;
top: 50px;
left: 10px;
background: #222;
border-radius: 4px;
padding: 8px;
display: none; /* Hidden initially */
z-index: 20;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
max-width: 200px;
}
#colorPickerContainer.show {
display: block;
}
#colorPickerLabel {
color: #fff;
margin-bottom: 4px;
}
#colorInput {
width: 150px;
cursor: pointer;
margin-bottom: 8px;
display: block;
}
/* Rainbow toggle style */
#rainbowToggleLabel {
display: flex;
align-items: center;
color: #fff;
font-size: 14px;
margin-bottom: 8px;
justify-content: space-between;
}
/* Buttons style inside menu */
.menuButton {
width: 100%;
padding: 6px;
font-size: 14px;
background: #444;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
margin-top: 8px;
}
.menuButton:hover {
background: #666;
}
</style>
</head>
<body>
<!-- Settings Button with SVG Icon -->
<button id="settingsBtn" aria-label="Settings" title="Settings">
<svg id="settingsIcon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M19.43 12.98c.04-.32.07-.65.07-.98s-.03-.66-.07-.98l2.11-1.65a.5.5 0 00.12-.66l-2-3.46a.5.5 0 00-.61-.21l-2.49 1a6.99 6.99 0 00-1.7-.98l-.38-2.65A.5.5 0 0014 2h-4a.5.5 0 00-.5.43l-.38 2.65c-.63.2-1.21.45-1.7.98l-2.49-1a.5.5 0 00-.61.21l-2 3.46a.5.5 0 00.12.66l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65a.5.5 0 00-.12.66l2 3.46c.15.26.43.36.69.21l2.49-1c.49.53 1.07.98 1.7.98l.38 2.65c.05.27.27.43.5.43h4c.27 0 .45-.16.5-.43l.38-2.65c.63-.2 1.21-.45 1.7-.98l2.49 1c.26.15.54.05.69-.21l2-3.46a.5.5 0 00-.12-.66l-2.11-1.65zM12 15.5A3.5 3.5 0 1115.5 12 3.5 3.5 0 0112 15.5z"/>
</svg>
</button>
<!-- Color picker menu container -->
<div id="colorPickerContainer">
<div id="colorPickerLabel">Pick Matrix Color:</div>
<input type="color" id="colorInput" value="#00ff00" />
<!-- Rainbow pulse toggle -->
<label id="rainbowToggleLabel">
Rainbow Pulse:
<input type="checkbox" id="rainbowToggle" />
</label>
<!-- Fullscreen button -->
<button id="fullscreenBtn" class="menuButton">Fullscreen</button>
<!-- Hide cursor button -->
<button id="hideCursorBtn" class="menuButton">Hide Cursor</button>
<!-- Hide icon button -->
<button id="hideIconBtn" class="menuButton">Hide Icon</button>
</div>
<!-- Canvas for matrix effect -->
<canvas id="matrix"></canvas>
<script>
const settingsBtn = document.getElementById('settingsBtn');
const colorPickerContainer = document.getElementById('colorPickerContainer');
const colorInput = document.getElementById('colorInput');
const rainbowCheckbox = document.getElementById('rainbowToggle');
const fullscreenBtn = document.getElementById('fullscreenBtn');
const hideCursorBtn = document.getElementById('hideCursorBtn');
const hideIconBtn = document.getElementById('hideIconBtn');
const settingsIcon = document.getElementById('settingsIcon');
const canvas = document.getElementById('matrix');
const ctx = canvas.getContext('2d');
let columns = Math.floor(window.innerWidth / 20);
let drops = new Array(columns).fill(0);
let cursorHidden = false;
let iconHidden = false;
// Resize canvas
function resize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
columns = Math.floor(canvas.width / 20);
drops = new Array(columns).fill(0);
}
window.addEventListener('resize', resize);
resize();
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()[]{}<>';
let frameCount = 0;
const slowFactor = 3;
let matrixColor = '#00ff00';
// Rainbow toggle state
let rainbowActive = false;
// Prevent right-click on settings button
settingsBtn.addEventListener('contextmenu', (e) => {
e.preventDefault();
});
// Toggle menu on left click
settingsBtn.addEventListener('click', () => {
if (colorPickerContainer.classList.contains('show')) {
colorPickerContainer.classList.remove('show');
} else {
colorPickerContainer.classList.add('show');
}
});
// Hide menu on outside click
document.addEventListener('click', (e) => {
if (!colorPickerContainer.contains(e.target) && e.target !== settingsBtn) {
colorPickerContainer.classList.remove('show');
}
});
// Change color
colorInput.addEventListener('input', () => {
if (!rainbowActive) {
matrixColor = colorInput.value;
}
});
// Toggle rainbow effect
rainbowCheckbox.addEventListener('change', () => {
rainbowActive = rainbowCheckbox.checked;
});
// Fullscreen button
document.getElementById('fullscreenBtn').addEventListener('click', () => {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
}
});
// Hide cursor button
document.getElementById('hideCursorBtn').addEventListener('click', () => {
cursorHidden = !cursorHidden;
document.body.style.cursor = cursorHidden ? 'none' : 'auto';
});
// Hide/Show icon button
document.getElementById('hideIconBtn').addEventListener('click', () => {
iconHidden = !iconHidden;
settingsIcon.style.display = iconHidden ? 'none' : 'inline-block';
});
// Function to generate a random rainbow color
function getRandomRainbowColor() {
const hue = Math.floor(Math.random() * 360);
return `hsl(${hue}, 100%, 50%)`;
}
// Draw loop
function draw() {
if (frameCount % slowFactor === 0) {
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.font = '20px monospace';
for (let i = 0; i < drops.length; i++) {
const char = characters.charAt(Math.floor(Math.random() * characters.length));
const x = i * 20;
const y = drops[i] * 20;
if (rainbowActive) {
ctx.fillStyle = getRandomRainbowColor();
} else {
ctx.fillStyle = matrixColor;
}
ctx.fillText(char, x, y);
if (y > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
} else {
drops[i]++;
}
}
}
frameCount++;
requestAnimationFrame(draw);
}
draw();
</script>
</body>
</html>
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
