Skip to content

Instantly share code, notes, and snippets.

@BlueMagnificent
BlueMagnificent / handleKeyDown.js
Created August 3, 2020 13:39
Javascript 3D Physics Tut 3 Handle Key Down
function handleKeyDown(event){
let keyCode = event.keyCode;
switch(keyCode){
case 87: //W: FORWARD
moveDirection.forward = 1;
break;
@BlueMagnificent
BlueMagnificent / contact_pair_test.html
Last active March 18, 2024 15:32
Javascript 3D Physics Tut 3 Contact Pair Test
<html>
<head>
<meta charset="utf-8">
<title>Collision JS 3D Physics</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],