UNPKG

@animech-public/playcanvas

Version:
2 lines (1 loc) 534 B
class e{static setCompressedPRS(e,t,s){const l=s.singleVecs;let o,r;const a=t.___1;a||(o=s.tripleVecs,r=t.___2);let c=a?a[0]:o[r];e.setLocalPosition(l[c],l[c+1],l[c+2]),c=a?a[1]:o[r+1],e.setLocalEulerAngles(l[c],l[c+1],l[c+2]),c=a?a[2]:o[r+2],e.setLocalScale(l[c],l[c+1],l[c+2])}static oneCharToKey(e,t){const s=e.charCodeAt(0)-t.fieldFirstCode;return t.fieldArray[s]}static multCharToKey(e,t){let s=0;for(let l=0;l<e.length;l++)s=s*t.fieldCodeBase+e.charCodeAt(l)-t.fieldFirstCode;return t.fieldArray[s]}}export{e as CompressUtils};