UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

16 lines (15 loc) 405 B
import { DeviceCache } from "../../platform/graphics/device-cache.js"; const programLibraryDeviceCache = new DeviceCache(); function getProgramLibrary(device) { const library = programLibraryDeviceCache.get(device); return library; } function setProgramLibrary(device, library) { programLibraryDeviceCache.get(device, () => { return library; }); } export { getProgramLibrary, setProgramLibrary };