mylingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
12 lines (9 loc) • 379 B
text/typescript
import { CubeTextureLoader, Texture } from "three"
import { forceGet } from "@lincode/utils"
import { handleProgress } from "./bytesLoaded"
const cache = new Map<string, Texture>()
const loader = new CubeTextureLoader()
export default (urls: Array<string>) =>
forceGet(cache, urls.join(","), () =>
loader.load(urls, undefined, handleProgress(urls.join(",")))
)