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 { exec } from 'child_process'; | |
import fs from 'fs'; | |
import path from 'path'; | |
// By Michael de Laborde | |
// This script compresses PNG and JPG textures to KTX2 using the Khronos toktx tool. | |
// Uses low quality but highly compressed ETC1S compression by default. | |
// REQUIREMENTS: | |
// Install toktx 4.3.1 from https://github.com/KhronosGroup/KTX-Software/releases/tag/v4.3.1 |
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
// InstancedMesh helpers | |
// | |
import { | |
BufferAttribute, | |
InstancedBufferGeometry, | |
InstancedMesh, | |
Matrix4, | |
Vector3, | |
Vector4, | |
} from "three" |
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 { IndexProjectsPageData } from "types/back" | |
import React, { useEffect, useMemo, useState } from "react" | |
import { Texture, TextureLoader } from "three" | |
import InfiniteSlider from "@components/CanvasGL/InfiniteSlider" | |
import { makeButton, useTweaks } from "use-tweaks" | |
import random from "canvas-sketch-util/random" | |
import { Slide } from "../InfiniteSlider/types" | |
const ProjectsCanvas = ({ pageProps: { allProjects } }: { pageProps: IndexProjectsPageData }) => { | |
// State |