Times Table on Circle
How do I make an times table on circle?
Https://www.youtube.com/watch?v=-X49VQgi86E. What is a times table on circle? How do you make a times table on circle? This script and codes were developed by Yukulélé on 26 August 2022, Friday.
Times Table on Circle - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Times Table on Circle</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="ctrl"> <div><input type="range" name="mul" min="0" max="100" step="1" value="2"/> mul = <span>2</span></div> <div><input type="range" name="mod" min="0" max="1000" step="1" value="30"/> mod = <span>30</span></div> <div><label><input type="checkbox" name="color"/> color</label></div> <div><label><input type="checkbox" name="number"/> number</label></div>
</div>
<div class="step"> <input type="range" name="step" min="0" max="5" step="1" value="0" /> step = <span>1</span>
</div> <script src='js/ejmqbm.js'></script> <script src="js/index.js"></script>
</body>
</html>
Times Table on Circle - Script Codes CSS Codes
body
html padding 0 margin 0 background black overflow hidden color #fff
canvas vertical-align top
.ctrl position absolute width 100% input vertical-align top &[type=range] width calc(100% - 150px)
.step position absolute bottom 0 left 0
Times Table on Circle - Script Codes JS Codes
const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d')
const ctrl = { mul: 2, mod: 30
}
let win
let middle
function draw() { ctx.globalCompositeOperation = "source-over" ctx.fillStyle = '#000' ctx.fillRect(0, 0, win.x, win.y) ctx.globalCompositeOperation = "screen" const radius = Math.min(middle.x, middle.y) * 0.8 ctx.beginPath() ctx.fillStyle = ctx.strokeStyle = '#fff' circle(middle.x, middle.y, radius) ctx.stroke() ctx.font = "10px sans serif" ctx.textAlign = "center" ctx.textBaseline = "middle" for (let i = 0; i < ctrl.mod; i++) { ctx.beginPath() let ang = i / ctrl.mod let hue = ang * 360 ang *= 2 * Math.PI if (ctrl.color) ctx.fillStyle = ctx.strokeStyle = `hsl(${hue},100%,50%` const a = middle.add(Vector.polar(radius, ang - Math.PI / 2)) const b = middle.add(Vector.polar(radius, ang * ctrl.mul - Math.PI / 2)) if (ctrl.number) { const t = middle.add(Vector.polar(radius + 10, ang - Math.PI / 2)) ctx.fillText(i, ...t.arr()) } ctx.moveTo(...a.arr()) ctx.lineTo(...b.arr()) ctx.stroke() }
}
function circle(x, y, radius) { ctx.arc(x, y, radius, 0, 2 * Math.PI)
}
function resize() { win = new Vector(canvas.width = window.innerWidth, canvas.height = window.innerHeight) middle = win.div(2) draw()
}
window.addEventListener('resize', () => { resize()
})
resize()
document.querySelector(".ctrl").addEventListener("input", (e) => { const t = e.target if (t.type !== 'range') return t.nextElementSibling.innerHTML = ctrl[t.name] = +t.value draw()
})
document.querySelector(".ctrl").addEventListener("change", (e) => { const t = e.target if (t.type !== 'checkbox') return ctrl[t.name] = t.checked draw()
})
document.querySelector(".step").addEventListener("input", (e) => { const t = e.target const v = Math.pow(2, +t.value) t.nextElementSibling.innerHTML = v == 1 ? 1 : '1/' + v Array.prototype.forEach.call(document.querySelectorAll(".ctrl input"), elm => elm.step = 1 / v) draw()
})
document.body.appendChild(canvas)
Developer | Yukulélé |
Username | yukulele |
Uploaded | August 26, 2022 |
Rating | 4 |
Size | 4,525 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Pure CSS Star Wars opening crawl | 8,792 Kb |
Table reverse | 2,495 Kb |
Shepard Piano | 4,057 Kb |
Musical scale visualisation | 5,737 Kb |
Perlin noise animation | 3,948 Kb |
Nested divs animated by CSS | 4,380 Kb |
CSS torus animation | 2,574 Kb |
CSS Vortex | 2,655 Kb |
Pure css responsive Shadow of the Beast | 3,583 Kb |
Acid swiming pool | 1,895 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
LBCA - Mail canvas | Emnbdx | 3,856 Kb |
Fun animations with CSS3 | Minimalmonkey | 2,360 Kb |
SCSS Simple Animated Drop-In | Danwarfel | 2,175 Kb |
Wikipedia Viewer | Thalpha | 4,426 Kb |
Vertically rotating text with CSS | Nopr | 2,141 Kb |
Dragonball Dragon Radar | DouglasGlover | 2,157 Kb |
Console fun | Dviate | 1,500 Kb |
Nice textured background | Hans | 2,659 Kb |
Expandable Left Side Bar with jQuery animate | Retrofuturistic | 2,483 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!