a lot of stuff
Some checks failed
Build / deploy (push) Has been cancelled

This commit is contained in:
CJSatnarine
2025-10-07 20:21:44 -04:00
parent 015c048dbd
commit 1f01baa3c2
17 changed files with 102 additions and 101 deletions

40
static/secrets/woof.js Normal file
View File

@@ -0,0 +1,40 @@
import * as THREE from 'three';
import { FirstPersonControls } from 'three/addons/controls/FirstPersonControls.js';
// Setup stuff
const scene = new THREE.Scene();
//const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
//camera.position.z = 5;
let camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.z = 5;
const renderer = new THREE.WebGLRenderer({
canvas: document.querySelector('#kennel'),
});
renderer.setSize(window.innerWidth, window.innerHeight);
// Cube geometry stuff.
const geometry = new THREE.BoxGeometry(5, 1, 1);
const material = new THREE.MeshBasicMaterial(
{ color: 0x962FFE }
);
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);
// Light stuff
const light = new THREE.DirectionalLight(0xFFFFFF, 0.5);
light.position.x = 5;
scene.add(light);
// Controller stuff
let clock = new THREE.Clock();
let controls = new FirstPersonControls(camera, renderer.domElement);
controls.movementSpeed = 5;
controls.lookSpeed = 0.8;
function animate() {
controls.update(clock.getDelta());
renderer.render(scene, camera);
}
renderer.setAnimationLoop(animate);