Skip to content

Instantly share code, notes, and snippets.

const vec3 = (x = 0, y = 0, z = 0) => mod.CreateVector(x, y, z);
class vec2 {
x: number;
y: number;
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
@Waffle1434
Waffle1434 / equirect_to_cube.py
Last active March 6, 2025 18:09
Convert 360 images to perspective cubemap. Requires py360convert
import argparse, os, sys
from pathlib import Path
from typing import get_args
from PIL import Image
import numpy as np
import py360convert
img_extensions = {".jpg", ".png"}
def ec2_dir(path, fov, size, mode):