UNPKG

playcanvas

Version:

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

11 lines (8 loc) 272 B
import { hashCode } from '../../../core/hash.js'; class ShaderGenerator { static definesHash(defines) { const sortedArray = Array.from(defines).sort((a, b)=>a[0] > b[0] ? 1 : -1); return hashCode(JSON.stringify(sortedArray)); } } export { ShaderGenerator };