Skip to content

Instantly share code, notes, and snippets.

@joegaffey
joegaffey / rc_sim_controller.csv
Last active July 16, 2023 15:27
Project case for RC sim controller
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 11. in line 2.
# View in 3table
# https://3table.glitch.me/
cube, model, 2.5, 0.18, 8, 0, 9, -100, 0, 0, 0
cube, lid, 2.6, 0.18, 8, 0, 310, -100, 0, 0, 0
cube, model, 0.18, 3, 8, 120, 150, -100, 0, 0, 0
cube, model, 0.18, 3, 8, -120, 150, -100, 0, 0, 0
#1689515232568, model, 18, 20, 20, 0, 140, -300, -90, 0, 0
#1689515223617, model, 10, 10, 10, 0, 60, 120, 0, 90, 0
cylinder, model, 0.3, 2, 0.3, -108, 100, 0, 0, 0, 0
cylinder, model, 0.3, 2, 0.3, 108, 100, 0, 0, 0, 0
@joegaffey
joegaffey / script.js
Created August 27, 2023 17:46
Translate Three.js rotation to canvas rotation coordinates
// Set up the Three.js scene
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.z = camera.position.y = 500;
scene.add(camera);
const geometry = new THREE.CubeGeometry(200, 200, 200);
const material = new THREE.MeshNormalMaterial();