{"version":3,"sources":["jsdelivr-header.js","/npm/mat4-recompose@1.0.4/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACKA,IAAI,KAAO,CACP,SAAU,QAAQ,oBAClB,UAAW,QAAQ,qBACnB,SAAU,QAAQ,oBAClB,OAAQ,QAAQ,kBAChB,MAAO,QAAQ,iBACf,wBAAyB,QAAQ,oCAGjC,eAAiB,KAAK,SACtB,KAAO,KAAK,SAEhB,OAAO,QAAU,SAAuB,EAAQ,EAAa,EAAO,EAAM,EAAa,GAmCnF,OAlCA,KAAK,SAAS,GAGd,KAAK,wBAAwB,EAAQ,EAAY,GAGjD,EAAO,GAAK,EAAY,GACxB,EAAO,GAAK,EAAY,GACxB,EAAO,IAAM,EAAY,GACzB,EAAO,IAAM,EAAY,GAIzB,KAAK,SAAS,MAEE,IAAZ,EAAK,KACL,KAAK,GAAK,EAAK,GACf,KAAK,SAAS,EAAQ,EAAQ,OAGlB,IAAZ,EAAK,KACL,KAAK,GAAK,EACV,KAAK,GAAK,EAAK,GACf,KAAK,SAAS,EAAQ,EAAQ,OAGlB,IAAZ,EAAK,KACL,KAAK,GAAK,EACV,KAAK,GAAK,EAAK,GACf,KAAK,SAAS,EAAQ,EAAQ,OAIlC,KAAK,MAAM,EAAQ,EAAQ,GACpB,CACX","file":"/npm/mat4-recompose@1.0.4/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/mat4-recompose@1.0.4/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*\nInput:  translation ; a 3 component vector\n        scale       ; a 3 component vector\n        skew        ; skew factors XY,XZ,YZ represented as a 3 component vector\n        perspective ; a 4 component vector\n        quaternion  ; a 4 component vector\nOutput: matrix      ; a 4x4 matrix\n\nFrom: http://www.w3.org/TR/css3-transforms/#recomposing-to-a-3d-matrix\n*/\n\nvar mat4 = {\n    identity: require('gl-mat4/identity'),\n    translate: require('gl-mat4/translate'),\n    multiply: require('gl-mat4/multiply'),\n    create: require('gl-mat4/create'),\n    scale: require('gl-mat4/scale'),\n    fromRotationTranslation: require('gl-mat4/fromRotationTranslation')\n}\n\nvar rotationMatrix = mat4.create()\nvar temp = mat4.create()\n\nmodule.exports = function recomposeMat4(matrix, translation, scale, skew, perspective, quaternion) {\n    mat4.identity(matrix)\n\n    //apply translation & rotation\n    mat4.fromRotationTranslation(matrix, quaternion, translation)\n\n    //apply perspective\n    matrix[3] = perspective[0]\n    matrix[7] = perspective[1]\n    matrix[11] = perspective[2]\n    matrix[15] = perspective[3]\n        \n    // apply skew\n    // temp is a identity 4x4 matrix initially\n    mat4.identity(temp)\n\n    if (skew[2] !== 0) {\n        temp[9] = skew[2]\n        mat4.multiply(matrix, matrix, temp)\n    }\n\n    if (skew[1] !== 0) {\n        temp[9] = 0\n        temp[8] = skew[1]\n        mat4.multiply(matrix, matrix, temp)\n    }\n\n    if (skew[0] !== 0) {\n        temp[8] = 0\n        temp[4] = skew[0]\n        mat4.multiply(matrix, matrix, temp)\n    }\n\n    //apply scale\n    mat4.scale(matrix, matrix, scale)\n    return matrix\n}"]}