UNPKG

pixi.js

Version:

<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">

56 lines (54 loc) 922 B
"use strict"; function getDefaultUniformValue(type, size) { switch (type) { case "f32": return 0; case "vec2<f32>": return new Float32Array(2 * size); case "vec3<f32>": return new Float32Array(3 * size); case "vec4<f32>": return new Float32Array(4 * size); case "mat2x2<f32>": return new Float32Array([ 1, 0, 0, 1 ]); case "mat3x3<f32>": return new Float32Array([ 1, 0, 0, 0, 1, 0, 0, 0, 1 ]); case "mat4x4<f32>": return new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]); } return null; } export { getDefaultUniformValue }; //# sourceMappingURL=getDefaultUniformValue.mjs.map