Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function createTextDerivedMaterial(baseMaterial) {
const textMaterial = createDerivedMaterial(baseMaterial, {
extensions: {derivatives: true},
uniforms: {
uTroikaSDFTexture: {value: null},
uTroikaSDFTextureSize: {value: new Vector2()},
uTroikaSDFGlyphSize: {value: 0},
uTroikaSDFMinDistancePct: {value: 0},
uTroikaTotalBounds: {value: new Vector4()},
uTroikaClipRect: {value: new Vector4()},
uTroikaSDFDebug: {value: false}
},
vertexDefs: VERTEX_DEFS,
vertexTransform: VERTEX_TRANSFORM,
fragmentDefs: FRAGMENT_DEFS,
fragmentColorTransform: FRAGMENT_TRANSFORM
})