Created
January 22, 2024 16:52
-
-
Save thegoldenmule/5d6b516de0a1abf3021180240f6c43ac to your computer and use it in GitHub Desktop.
Vector example from class.
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
const vec2 = glMatrix.vec2; | |
window.init = (canvas) => { | |
console.log('Init()!!!!!!!!!'); | |
// TODO | |
}; | |
window.loop = (dt, canvas) => { | |
const ctx = canvas.getContext('2d'); | |
const center = vec2.fromValues( | |
canvas.width / 2, | |
canvas.height / 2, | |
); | |
ctx.moveTo(center[0], center[1]); | |
const direction = vec2.create(); | |
const rotated = vec2.create(); | |
const down = vec2.fromValues(0, -1); | |
vec2.rotate( | |
rotated, | |
down, | |
vec2.create(), | |
Math.PI / 6); | |
vec2.scale(direction, rotated, 100); | |
ctx.lineTo(center[0] + direction[0], center[1] + direction[1]); | |
ctx.stroke(); | |
}; |
The growth and popularity of online games in Slovenia have been remarkable over the past few years, especially on platforms like Sloterman-SI. This surge can be attributed to a combination of technological advancements, increased accessibility, and the wide variety of engaging games available for players. Online games, particularly those focused on slots and interactive entertainment, have found a dedicated audience in Slovenia, and their appeal continues to expand.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. Exploring various reviews of English casinos, I finally discovered the best among all. It became Monopoly Casino. This casino offers cool and comfortable gambling opportunities unaffected by the gaming experience. In addition, thanks to the bonus program, you will be able to make much larger winnings than usual.