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
import * as THREE from "three" | |
export type Instance = { | |
object: THREE.Object3D | |
color?: THREE.Color | |
index: number | |
data: any | |
} | |
/* Our ManagedInstancedMesh class that we can use with just plain old Three.js */ |
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
import * as React from "react" | |
import { getRef } from "./getRef" | |
export default function App() { | |
const rCanvas = React.useRef<HTMLCanvasElement>(null) | |
React.useEffect(() => { | |
const canvas = getRef(rCanvas) | |
canvas.width = window.innerWidth | |
canvas.width = window.innerHeight |
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
// _____ ___ | |
// / / / / gradient.glsl | |
// / __/ * / /__ (c) ponies & light, 2014. All rights reserved. | |
// /__/ /_____/ poniesandlight.co.uk | |
// | |
// Created by tgfrerer on 18/03/2014. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |