Skip to content

Instantly share code, notes, and snippets.

@rjeli
rjeli / towers.rs
Last active April 27, 2024 10:43
towers lol
use std::{
marker::PhantomData,
ops::{Add, Mul},
};
trait Field: Copy + Default + Add<Output = Self> + Mul<Output = Self> {}
/*
We want a TowerField struct, such that it can be multiplied by itself or any subfield.
@rjeli
rjeli / app.tsx
Created October 23, 2024 19:11
fun fun fun
import { Grid, Instance, InstancedAttribute, Instances, OrbitControls, PerformanceMonitor, shaderMaterial, Stats, StatsGl } from "@react-three/drei";
import { Canvas, createRoot, events, extend, ThreeElements, useFrame } from "@react-three/fiber";
import { useControls } from "leva";
import GUI from "lil-gui";
import React, { useEffect, useRef, useState } from 'react';
import * as THREE from 'three';
extend(THREE);
console.log('hi');