diff --git a/build/nunu.editor.min.js b/build/nunu.editor.min.js index 662b1a265..895220376 100644 --- a/build/nunu.editor.min.js +++ b/build/nunu.editor.min.js @@ -1,4 +1,4 @@ -function Nunu(){}Nunu.NAME='nunuStudio';Nunu.VERSION='V0.9.2 Beta';Nunu.TIMESTAMP='201709222318';Nunu.webvrAvailable=function(){return void 0!==navigator.getVRDisplays};Nunu.getVRDisplays=function(a){void 0===navigator.getVRDisplays?console.warn('nunuStudio: WebVR is not supported.'):navigator.getVRDisplays().then(function(b){0a.MathUtils.PI?D-=a.MathUtils.PI2:D<-a.MathUtils.PI e,k){this.r=a;this.g=b;this.b=e;this.a=k;this.clamp();return this};a.prototype.setFromColor=function(a){this.r=a.r;this.g=a.g;this.b=a.b;this.a=a.a;return this};a.prototype.setFromString=function(a){a='#'==a.charAt(0)?a.substr(1):a;this.r=parseInt(a.substr(0,2),16)/255;this.g=parseInt(a.substr(2,2),16)/255;this.b=parseInt(a.substr(4,2),16)/255;this.a=(8!=a.length?255:parseInt(a.substr(6,2),16))/255;return this};a.prototype.add=function(a,b,e,k){this.r+=a;this.g+=b;this.b+=e;this.a+=k;this.clamp(); return this};a.prototype.clamp=function(){0>this.r?this.r=0:1this.g?this.g=0:1this.b?this.b=0:1this.a?this.a=0:1e?e:a};a.cosDeg=function(b){return Math.cos(b*a.degRad)};a.sinDeg=function(b){return Math.sin(b* a.degRad)};a.signum=function(a){return 0a?-1:0};a.toInt=function(a){return 0a?-b:b};a.PI=3.1415927;a.PI2=2*a.PI;a.radiansToDegrees=180/a.PI;a.radDeg=a.radiansToDegrees;a.degreesToRadians=a.PI/180;a.degRad=a.degreesToRadians;return a}();a.MathUtils=b;b=function(){function a(){}a.arrayCopy=function(a,b,e,k,l){for(var d=b;d=e?b:a.setArraySize(b,e,g)};a.newArray=function(a,b){for(var d=Array(a),e=0;e=f?b:a.setArraySize(b,f,e)};a.newArray=function(a,b){for(var d=Array(a),e=0;ethis.maxDelta&&(this.delta=this.maxDelta);this.lastTime=a;this.frameCount++;1b;b++)a+='0123456789ABCDEF' ObjectUtils.getMaterials=function(a,b){function e(a){void 0===b[a.uuid]&&(b[a.uuid]=a)}void 0===b&&(b=[]);a.traverse(function(a){if(!(void 0===a.material||a.hidden||a instanceof ParticleEmitter||a instanceof Sky||a instanceof SpineAnimation))if(a.material instanceof THREE.Material)e(a.material);else if(a.material instanceof Array)for(var b=0;bk)e=a+1;else if(0b&&(b=0);1k)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(l.normalize(),g=Math.acos(ma.clamp(c[m- 1].dot(c[m]),-1,1)),k[m].applyMatrix4(n.makeRotationAxis(l,g))),f[m].crossVectors(c[m],k[m]);if(!0===d)for(g=Math.acos(ma.clamp(k[0].dot(k[a]),-1,1)),g/=a,0w;w++)q.push(d(b,c+h+w*l,e));w=[];c=c+h+n*l;for(h=0;k>h;h++)w.push(p(b,c+h*f,q,e));return{axes:q,instances:w}}},{'../check':2,'../parse':10,'../table':13}],17:[function(c,h,b){function f(b,d,c,e,f){var k;return 0<(d&e)?(k=b.parseByte(),0===(d&f)&&(k=-k),k=c+k):k=0<(d&f)?c:c+b.parseShort(),k}function e(b,d,c){d=new u.Parser(d,c);b.numberOfContours=d.parseShort();b._xMin=d.parseShort();b._yMin=d.parseShort(); -b._xMax=d.parseShort();b._yMax=d.parseShort();var e;if(0k;k+=1)if(e=d.parseByte(),c.push(e),0<(8&e))for(var l=d.parseByte(),m=0;l>m;m+=1)c.push(e),k+=1;if(p.argument(c.length===n,'Bad flags.'),0k;k+= -1)e=c[k],l={},l.onCurve=!!(1&e),l.lastPointOfContour=0<=h.indexOf(k),m.push(l);for(k=h=0;n>k;k+=1)e=c[k],l=m[k],l.x=f(d,e,h,2,16),h=l.x;for(k=h=0;n>k;k+=1)e=c[k],l=m[k],l.y=f(d,e,h,4,32),h=l.y}b.points=m}else b.points=[]}else if(0===b.numberOfContours)b.points=[];else for(b.isComposite=!0,b.points=[],b.components=[],e=!0;e;)c=d.parseUShort(),e={glyphIndex:d.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0},0<(1&c)?0<(2&c)?(e.dx=d.parseShort(),e.dy=d.parseShort()):e.matchedPoints=[d.parseUShort(), -d.parseUShort()]:0<(2&c)?(e.dx=d.parseChar(),e.dy=d.parseChar()):e.matchedPoints=[d.parseByte(),d.parseByte()],0<(8&c)?e.xScale=e.yScale=d.parseF2Dot14():0<(64&c)?(e.xScale=d.parseF2Dot14(),e.yScale=d.parseF2Dot14()):0<(128&c)&&(e.xScale=d.parseF2Dot14(),e.scale01=d.parseF2Dot14(),e.scale10=d.parseF2Dot14(),e.yScale=d.parseF2Dot14()),b.components.push(e),e=!!(32&c)}function d(b,d){for(var c=[],e=0;ec.points.length-1||f.matchedPoints[1]>k.points.length-1)throw Error('Matched points out of range in '+c.name);var h=c.points[f.matchedPoints[0]],l=k.points[f.matchedPoints[1]],f={xScale:f.xScale,scale01:f.scale01,scale10:f.scale10,yScale:f.yScale, +1);for(var n=f.parseUShort(),l=f.parseUShort(),k=f.parseUShort(),f=f.parseUShort(),q=[],w=0;n>w;w++)q.push(d(b,c+h+w*l,e));w=[];c=c+h+n*l;for(h=0;k>h;h++)w.push(p(b,c+h*f,q,e));return{axes:q,instances:w}}},{'../check':2,'../parse':10,'../table':13}],17:[function(c,h,b){function f(b,c,d,e,f){var k;return 0<(c&e)?(k=b.parseByte(),0===(c&f)&&(k=-k),k=d+k):k=0<(c&f)?d:d+b.parseShort(),k}function e(b,c,d){c=new u.Parser(c,d);b.numberOfContours=c.parseShort();b._xMin=c.parseShort();b._yMin=c.parseShort(); +b._xMax=c.parseShort();b._yMax=c.parseShort();var e;if(0k;k+=1)if(e=c.parseByte(),d.push(e),0<(8&e))for(var l=c.parseByte(),m=0;l>m;m+=1)d.push(e),k+=1;if(p.argument(d.length===n,'Bad flags.'),0k;k+= +1)e=d[k],l={},l.onCurve=!!(1&e),l.lastPointOfContour=0<=h.indexOf(k),m.push(l);for(k=h=0;n>k;k+=1)e=d[k],l=m[k],l.x=f(c,e,h,2,16),h=l.x;for(k=h=0;n>k;k+=1)e=d[k],l=m[k],l.y=f(c,e,h,4,32),h=l.y}b.points=m}else b.points=[]}else if(0===b.numberOfContours)b.points=[];else for(b.isComposite=!0,b.points=[],b.components=[],e=!0;e;)d=c.parseUShort(),e={glyphIndex:c.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0},0<(1&d)?0<(2&d)?(e.dx=c.parseShort(),e.dy=c.parseShort()):e.matchedPoints=[c.parseUShort(), +c.parseUShort()]:0<(2&d)?(e.dx=c.parseChar(),e.dy=c.parseChar()):e.matchedPoints=[c.parseByte(),c.parseByte()],0<(8&d)?e.xScale=e.yScale=c.parseF2Dot14():0<(64&d)?(e.xScale=c.parseF2Dot14(),e.yScale=c.parseF2Dot14()):0<(128&d)&&(e.xScale=c.parseF2Dot14(),e.scale01=c.parseF2Dot14(),e.scale10=c.parseF2Dot14(),e.yScale=c.parseF2Dot14()),b.components.push(e),e=!!(32&d)}function d(b,c){for(var d=[],e=0;ec.points.length-1||f.matchedPoints[1]>k.points.length-1)throw Error('Matched points out of range in '+c.name);var h=c.points[f.matchedPoints[0]],l=k.points[f.matchedPoints[1]],f={xScale:f.xScale,scale01:f.scale01,scale10:f.scale10,yScale:f.yScale, dx:0,dy:0},l=d([l],f)[0];f.dx=h.x-l.x;f.dy=h.y-l.y}k=d(k.points,f);c.points=c.points.concat(k)}}var m;c=c.points;b=new n.Path;if(c){e=[];k=[];for(h=0;he;e++)c[b.parseTag()]={offset:b.parseUShort()};return c}function e(b,d){b=new u.Parser(b,d);var c=b.parseUShort();d=b.parseUShort();if(1===c)return b.parseUShortList(d);if(2===c){for(c=[];d--;)for(var e=b.parseUShort(), -f=b.parseUShort(),k=b.parseUShort();f>=e;e++)c[k++]=e;return c}}function d(b,d){b=new u.Parser(b,d);d=b.parseUShort();if(1===d){var c=b.parseUShort();d=b.parseUShort();var e=b.parseUShortList(d);return function(b){return e[b-c]||0}}if(2===d){d=b.parseUShort();for(var f=[],k=[],h=[],l=0;d>l;l++)f[l]=b.parseUShort(),k[l]=b.parseUShort(),h[l]=b.parseUShort();return function(b){for(var d=0,c=f.length-1;c>d;){var e=d+c+1>>1;bh;h++){var B=c[h],D=p[B];if(!D)for(D={},k.relativeOffset=B,B=k.parseUShort();B--;){var F=k.parseUShort();n&&(f=k.parseShort());m&&k.parseShort();D[F]=f}C[l[h]]=D}return function(b,d){return(b=C[b])?b[d]:void 0}}if(2===h){var D=k.parseUShort(),B=k.parseUShort(),p=k.parseUShort(),h=k.parseUShort(),A=d(b,c+D),H=d(b,c+B), -G=[];for(b=0;p>b;b++)for(c=G[b]=[],D=0;h>D;D++)n&&(f=k.parseShort()),m&&k.parseShort(),c[D]=f;var K={};for(b=0;be;e++)m.push(l(b,d+n[e]));c.getKerningValue=function(b,d){for(var c= -m.length;c--;){var e=m[c](b,d);if(void 0!==e)return e}return 0}}return c}var m=c('../check'),u=c('../parse');b.parse=function(b,d,c){var e=new u.Parser(b,d),k=e.parseFixed();m.argument(1===k,'Unsupported GPOS table version.');f(b,d+e.parseUShort());f(b,d+e.parseUShort());var h=e.parseUShort();e.relativeOffset=h;k=e.parseUShort();e=e.parseOffset16List(k);d+=h;for(h=0;k>h;h++){var l=p(b,d+e[h]);2!==l.lookupType||c.getGposKerningValue||(c.getGposKerningValue=l.getKerningValue)}}},{'../check':2,'../parse':10}], -19:[function(c,h,b){var f=c('../check'),e=c('../parse').Parser,d=Array(9),l=c('../table');d[1]=function(){var b=this.offset+this.relativeOffset,d=this.parseUShort();return 1===d?{substFormat:1,coverage:this.parsePointer(e.coverage),deltaGlyphId:this.parseUShort()}:2===d?{substFormat:2,coverage:this.parsePointer(e.coverage),substitute:this.parseOffset16List()}:void f.assert(!1,'0x'+b.toString(16)+': lookup type 1 format must be 1 or 2.')};d[2]=function(){var b=this.parseUShort();return f.argument(1=== +D=0===f?h:k[f-1];if(D.onCurve&&u.onCurve)b.lineTo(u.x,u.y);else if(D.onCurve&&!u.onCurve)m=u;else if(D.onCurve||u.onCurve){if(D.onCurve||!u.onCurve)throw Error('Invalid state.');b.quadraticCurveTo(m.x,m.y,u.x,u.y);m=null}else b.quadraticCurveTo(D.x,D.y,(D.x+u.x)/2,(D.y+u.y)/2),m=u}h!==l&&(m?b.quadraticCurveTo(m.x,m.y,h.x,h.y):b.lineTo(h.x,h.y))}m=(b.closePath(),b)}else m=b;return m}var p=c('../check'),m=c('../glyphset'),u=c('../parse'),n=c('../path');b.parse=function(b,c,d,f){var k,h=new m.GlyphSet(f); +for(k=0;ke;e++)d[b.parseTag()]={offset:b.parseUShort()};return d}function e(b,c){b=new u.Parser(b,c);var d=b.parseUShort();c=b.parseUShort();if(1===d)return b.parseUShortList(c);if(2===d){for(d=[];c--;)for(var e=b.parseUShort(), +f=b.parseUShort(),k=b.parseUShort();f>=e;e++)d[k++]=e;return d}}function d(b,c){b=new u.Parser(b,c);c=b.parseUShort();if(1===c){var d=b.parseUShort();c=b.parseUShort();var e=b.parseUShortList(c);return function(b){return e[b-d]||0}}if(2===c){c=b.parseUShort();for(var f=[],k=[],h=[],l=0;c>l;l++)f[l]=b.parseUShort(),k[l]=b.parseUShort(),h[l]=b.parseUShort();return function(b){for(var c=0,d=f.length-1;d>c;){var e=c+d+1>>1;bh;h++){var B=c[h],D=p[B];if(!D)for(D={},k.relativeOffset=B,B=k.parseUShort();B--;){var F=k.parseUShort();n&&(f=k.parseShort());m&&k.parseShort();D[F]=f}C[l[h]]=D}return function(b,c){return(b=C[b])?b[c]:void 0}}if(2===h){var D=k.parseUShort(),B=k.parseUShort(),p=k.parseUShort(),h=k.parseUShort(),A=d(b,c+D),H=d(b,c+B), +G=[];for(b=0;p>b;b++)for(c=G[b]=[],D=0;h>D;D++)n&&(f=k.parseShort()),m&&k.parseShort(),c[D]=f;var K={};for(b=0;be;e++)m.push(l(b,c+n[e]));d.getKerningValue=function(b,c){for(var d= +m.length;d--;){var e=m[d](b,c);if(void 0!==e)return e}return 0}}return d}var m=c('../check'),u=c('../parse');b.parse=function(b,c,d){var e=new u.Parser(b,c),k=e.parseFixed();m.argument(1===k,'Unsupported GPOS table version.');f(b,c+e.parseUShort());f(b,c+e.parseUShort());var h=e.parseUShort();e.relativeOffset=h;k=e.parseUShort();e=e.parseOffset16List(k);c+=h;for(h=0;k>h;h++){var l=p(b,c+e[h]);2!==l.lookupType||d.getGposKerningValue||(d.getGposKerningValue=l.getKerningValue)}}},{'../check':2,'../parse':10}], +19:[function(c,h,b){var f=c('../check'),e=c('../parse').Parser,d=Array(9),l=c('../table');d[1]=function(){var b=this.offset+this.relativeOffset,c=this.parseUShort();return 1===c?{substFormat:1,coverage:this.parsePointer(e.coverage),deltaGlyphId:this.parseUShort()}:2===c?{substFormat:2,coverage:this.parsePointer(e.coverage),substitute:this.parseOffset16List()}:void f.assert(!1,'0x'+b.toString(16)+': lookup type 1 format must be 1 or 2.')};d[2]=function(){var b=this.parseUShort();return f.argument(1=== b,'GSUB Multiple Substitution Subtable identifier-format must be 1'),{substFormat:b,coverage:this.parsePointer(e.coverage),sequences:this.parseListOfLists()}};d[3]=function(){var b=this.parseUShort();return f.argument(1===b,'GSUB Alternate Substitution Subtable identifier-format must be 1'),{substFormat:b,coverage:this.parsePointer(e.coverage),alternateSets:this.parseListOfLists()}};d[4]=function(){var b=this.parseUShort();return f.argument(1===b,'GSUB ligature table identifier-format must be 1'), -{substFormat:b,coverage:this.parsePointer(e.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var p={sequenceIndex:e.uShort,lookupListIndex:e.uShort};d[5]=function(){var b=this.offset+this.relativeOffset,d=this.parseUShort();if(1===d)return{substFormat:d,coverage:this.parsePointer(e.coverage),ruleSets:this.parseListOfLists(function(){var b=this.parseUShort(),d=this.parseUShort();return{input:this.parseUShortList(b- -1),lookupRecords:this.parseRecordList(d,p)}})};if(2===d)return{substFormat:d,coverage:this.parsePointer(e.coverage),classDef:this.parsePointer(e.classDef),classSets:this.parseListOfLists(function(){var b=this.parseUShort(),d=this.parseUShort();return{classes:this.parseUShortList(b-1),lookupRecords:this.parseRecordList(d,p)}})};if(3===d){var b=this.parseUShort(),c=this.parseUShort();return{substFormat:d,coverages:this.parseList(b,e.pointer(e.coverage)),lookupRecords:this.parseRecordList(c,p)}}f.assert(!1, -'0x'+b.toString(16)+': lookup type 5 format must be 1, 2 or 3.')};d[6]=function(){var b=this.offset+this.relativeOffset,d=this.parseUShort();return 1===d?{substFormat:1,coverage:this.parsePointer(e.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:2===d?{substFormat:2,coverage:this.parsePointer(e.coverage),backtrackClassDef:this.parsePointer(e.classDef), -inputClassDef:this.parsePointer(e.classDef),lookaheadClassDef:this.parsePointer(e.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:3===d?{substFormat:3,backtrackCoverage:this.parseList(e.pointer(e.coverage)),inputCoverage:this.parseList(e.pointer(e.coverage)),lookaheadCoverage:this.parseList(e.pointer(e.coverage)),lookupRecords:this.parseRecordList(p)}: +{substFormat:b,coverage:this.parsePointer(e.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var p={sequenceIndex:e.uShort,lookupListIndex:e.uShort};d[5]=function(){var b=this.offset+this.relativeOffset,c=this.parseUShort();if(1===c)return{substFormat:c,coverage:this.parsePointer(e.coverage),ruleSets:this.parseListOfLists(function(){var b=this.parseUShort(),c=this.parseUShort();return{input:this.parseUShortList(b- +1),lookupRecords:this.parseRecordList(c,p)}})};if(2===c)return{substFormat:c,coverage:this.parsePointer(e.coverage),classDef:this.parsePointer(e.classDef),classSets:this.parseListOfLists(function(){var b=this.parseUShort(),c=this.parseUShort();return{classes:this.parseUShortList(b-1),lookupRecords:this.parseRecordList(c,p)}})};if(3===c){var b=this.parseUShort(),d=this.parseUShort();return{substFormat:c,coverages:this.parseList(b,e.pointer(e.coverage)),lookupRecords:this.parseRecordList(d,p)}}f.assert(!1, +'0x'+b.toString(16)+': lookup type 5 format must be 1, 2 or 3.')};d[6]=function(){var b=this.offset+this.relativeOffset,c=this.parseUShort();return 1===c?{substFormat:1,coverage:this.parsePointer(e.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:2===c?{substFormat:2,coverage:this.parsePointer(e.coverage),backtrackClassDef:this.parsePointer(e.classDef), +inputClassDef:this.parsePointer(e.classDef),lookaheadClassDef:this.parsePointer(e.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:3===c?{substFormat:3,backtrackCoverage:this.parseList(e.pointer(e.coverage)),inputCoverage:this.parseList(e.pointer(e.coverage)),lookaheadCoverage:this.parseList(e.pointer(e.coverage)),lookupRecords:this.parseRecordList(p)}: void f.assert(!1,'0x'+b.toString(16)+': lookup type 6 format must be 1, 2 or 3.')};d[7]=function(){var b=this.parseUShort();f.argument(1===b,'GSUB Extension Substitution subtable identifier-format must be 1');var b=this.parseUShort(),c=new e(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:b,extension:d[b].call(c)}};d[8]=function(){var b=this.parseUShort();return f.argument(1===b,'GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1'),{substFormat:b, coverage:this.parsePointer(e.coverage),backtrackCoverage:this.parseList(e.pointer(e.coverage)),lookaheadCoverage:this.parseList(e.pointer(e.coverage)),substitutes:this.parseUShortList()}};var m=Array(9);m[1]=function(b){return 1===b.substFormat?new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT',value:1},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)},{name:'deltaGlyphID',type:'USHORT',value:b.deltaGlyphId}]):new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT', value:2},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)}].concat(l.ushortList('substitute',b.substitute)))};m[3]=function(b){return f.assert(1===b.substFormat,'Lookup type 3 substFormat must be 1.'),new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT',value:1},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)}].concat(l.tableList('altSet',b.alternateSets,function(b){return new l.Table('alternateSetTable',l.ushortList('alternate',b))})))};m[4]=function(b){return f.assert(1=== b.substFormat,'Lookup type 4 substFormat must be 1.'),new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT',value:1},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)}].concat(l.tableList('ligSet',b.ligatureSets,function(b){return new l.Table('ligatureSetTable',l.tableList('ligature',b,function(b){return new l.Table('ligatureTable',[{name:'ligGlyph',type:'USHORT',value:b.ligGlyph}].concat(l.ushortList('component',b.components,b.components.length+1)))}))})))};b.parse=function(b, c){b=new e(b,c||0);c=b.parseVersion();return f.argument(1===c,'Unsupported GSUB table version.'),{version:c,scripts:b.parseScriptList(),features:b.parseFeatureList(),lookups:b.parseLookupList(d)}};b.make=function(b){return new l.Table('GSUB',[{name:'version',type:'ULONG',value:65536},{name:'scripts',type:'TABLE',value:new l.ScriptList(b.scripts)},{name:'features',type:'TABLE',value:new l.FeatureList(b.features)},{name:'lookups',type:'TABLE',value:new l.LookupList(b.lookups,m)}])}},{'../check':2,'../parse':10, -'../table':13}],20:[function(c,h,b){var f=c('../check'),e=c('../parse'),d=c('../table');b.parse=function(b,d){var c={};b=new e.Parser(b,d);return c.version=b.parseVersion(),c.fontRevision=Math.round(1E3*b.parseFixed())/1E3,c.checkSumAdjustment=b.parseULong(),c.magicNumber=b.parseULong(),f.argument(1594834165===c.magicNumber,'Font header has wrong magic number.'),c.flags=b.parseUShort(),c.unitsPerEm=b.parseUShort(),c.created=b.parseLongDateTime(),c.modified=b.parseLongDateTime(),c.xMin=b.parseShort(), -c.yMin=b.parseShort(),c.xMax=b.parseShort(),c.yMax=b.parseShort(),c.macStyle=b.parseUShort(),c.lowestRecPPEM=b.parseUShort(),c.fontDirectionHint=b.parseShort(),c.indexToLocFormat=b.parseShort(),c.glyphDataFormat=b.parseShort(),c};b.make=function(b){var c=Math.round((new Date).getTime()/1E3)+2082844800,e=c;return b.createdTimestamp&&(e=b.createdTimestamp+2082844800),new d.Table('head',[{name:'version',type:'FIXED',value:65536},{name:'fontRevision',type:'FIXED',value:65536},{name:'checkSumAdjustment', +'../table':13}],20:[function(c,h,b){var f=c('../check'),e=c('../parse'),d=c('../table');b.parse=function(b,c){var d={};b=new e.Parser(b,c);return d.version=b.parseVersion(),d.fontRevision=Math.round(1E3*b.parseFixed())/1E3,d.checkSumAdjustment=b.parseULong(),d.magicNumber=b.parseULong(),f.argument(1594834165===d.magicNumber,'Font header has wrong magic number.'),d.flags=b.parseUShort(),d.unitsPerEm=b.parseUShort(),d.created=b.parseLongDateTime(),d.modified=b.parseLongDateTime(),d.xMin=b.parseShort(), +d.yMin=b.parseShort(),d.xMax=b.parseShort(),d.yMax=b.parseShort(),d.macStyle=b.parseUShort(),d.lowestRecPPEM=b.parseUShort(),d.fontDirectionHint=b.parseShort(),d.indexToLocFormat=b.parseShort(),d.glyphDataFormat=b.parseShort(),d};b.make=function(b){var c=Math.round((new Date).getTime()/1E3)+2082844800,e=c;return b.createdTimestamp&&(e=b.createdTimestamp+2082844800),new d.Table('head',[{name:'version',type:'FIXED',value:65536},{name:'fontRevision',type:'FIXED',value:65536},{name:'checkSumAdjustment', type:'ULONG',value:0},{name:'magicNumber',type:'ULONG',value:1594834165},{name:'flags',type:'USHORT',value:0},{name:'unitsPerEm',type:'USHORT',value:1E3},{name:'created',type:'LONGDATETIME',value:e},{name:'modified',type:'LONGDATETIME',value:c},{name:'xMin',type:'SHORT',value:0},{name:'yMin',type:'SHORT',value:0},{name:'xMax',type:'SHORT',value:0},{name:'yMax',type:'SHORT',value:0},{name:'macStyle',type:'USHORT',value:0},{name:'lowestRecPPEM',type:'USHORT',value:0},{name:'fontDirectionHint',type:'SHORT', value:2},{name:'indexToLocFormat',type:'SHORT',value:0},{name:'glyphDataFormat',type:'SHORT',value:0}],b)}},{'../check':2,'../parse':10,'../table':13}],21:[function(c,h,b){var f=c('../parse'),e=c('../table');b.parse=function(b,c){var d={};b=new f.Parser(b,c);return d.version=b.parseVersion(),d.ascender=b.parseShort(),d.descender=b.parseShort(),d.lineGap=b.parseShort(),d.advanceWidthMax=b.parseUShort(),d.minLeftSideBearing=b.parseShort(),d.minRightSideBearing=b.parseShort(),d.xMaxExtent=b.parseShort(), d.caretSlopeRise=b.parseShort(),d.caretSlopeRun=b.parseShort(),d.caretOffset=b.parseShort(),b.relativeOffset+=8,d.metricDataFormat=b.parseShort(),d.numberOfHMetrics=b.parseUShort(),d};b.make=function(b){return new e.Table('hhea',[{name:'version',type:'FIXED',value:65536},{name:'ascender',type:'FWORD',value:0},{name:'descender',type:'FWORD',value:0},{name:'lineGap',type:'FWORD',value:0},{name:'advanceWidthMax',type:'UFWORD',value:0},{name:'minLeftSideBearing',type:'FWORD',value:0},{name:'minRightSideBearing', @@ -2388,8 +2388,9 @@ MathUtils.randomColor=function(){for(var a='#',c=0;6>c;c++)a+='0123456789ABCDEF' ObjectUtils.getMaterials=function(a,c){function h(a){void 0===c[a.uuid]&&(c[a.uuid]=a)}void 0===c&&(c=[]);a.traverse(function(a){if(!(void 0===a.material||a.hidden||a instanceof ParticleEmitter||a instanceof Sky||a instanceof SpineAnimation))if(a.material instanceof THREE.Material)h(a.material);else if(a.material instanceof Array)for(var b=0;ba.MathUtils.PI?D-=a.MathUtils.PI2:D<-a.MathUtils.PI e,k){this.r=a;this.g=b;this.b=e;this.a=k;this.clamp();return this};a.prototype.setFromColor=function(a){this.r=a.r;this.g=a.g;this.b=a.b;this.a=a.a;return this};a.prototype.setFromString=function(a){a='#'==a.charAt(0)?a.substr(1):a;this.r=parseInt(a.substr(0,2),16)/255;this.g=parseInt(a.substr(2,2),16)/255;this.b=parseInt(a.substr(4,2),16)/255;this.a=(8!=a.length?255:parseInt(a.substr(6,2),16))/255;return this};a.prototype.add=function(a,b,e,k){this.r+=a;this.g+=b;this.b+=e;this.a+=k;this.clamp(); return this};a.prototype.clamp=function(){0>this.r?this.r=0:1this.g?this.g=0:1this.b?this.b=0:1this.a?this.a=0:1e?e:a};a.cosDeg=function(b){return Math.cos(b*a.degRad)};a.sinDeg=function(b){return Math.sin(b* a.degRad)};a.signum=function(a){return 0a?-1:0};a.toInt=function(a){return 0a?-b:b};a.PI=3.1415927;a.PI2=2*a.PI;a.radiansToDegrees=180/a.PI;a.radDeg=a.radiansToDegrees;a.degreesToRadians=a.PI/180;a.degRad=a.degreesToRadians;return a}();a.MathUtils=b;b=function(){function a(){}a.arrayCopy=function(a,b,e,k,l){for(var d=b;d=e?b:a.setArraySize(b,e,g)};a.newArray=function(a,b){for(var d=Array(a),e=0;e=f?b:a.setArraySize(b,f,e)};a.newArray=function(a,b){for(var d=Array(a),e=0;ethis.maxDelta&&(this.delta=this.maxDelta);this.lastTime=a;this.frameCount++;1b;b++)a+='0123456789ABCDEF' ObjectUtils.getMaterials=function(a,b){function e(a){void 0===b[a.uuid]&&(b[a.uuid]=a)}void 0===b&&(b=[]);a.traverse(function(a){if(!(void 0===a.material||a.hidden||a instanceof ParticleEmitter||a instanceof Sky||a instanceof SpineAnimation))if(a.material instanceof THREE.Material)e(a.material);else if(a.material instanceof Array)for(var b=0;bk)e=a+1;else if(0b&&(b=0);1k)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(l.normalize(),g=Math.acos(ma.clamp(c[m- 1].dot(c[m]),-1,1)),k[m].applyMatrix4(n.makeRotationAxis(l,g))),f[m].crossVectors(c[m],k[m]);if(!0===d)for(g=Math.acos(ma.clamp(k[0].dot(k[a]),-1,1)),g/=a,0w;w++)q.push(d(b,c+h+w*l,e));w=[];c=c+h+n*l;for(h=0;k>h;h++)w.push(p(b,c+h*f,q,e));return{axes:q,instances:w}}},{'../check':2,'../parse':10,'../table':13}],17:[function(c,h,b){function f(b,d,c,e,f){var k;return 0<(d&e)?(k=b.parseByte(),0===(d&f)&&(k=-k),k=c+k):k=0<(d&f)?c:c+b.parseShort(),k}function e(b,d,c){d=new u.Parser(d,c);b.numberOfContours=d.parseShort();b._xMin=d.parseShort();b._yMin=d.parseShort(); -b._xMax=d.parseShort();b._yMax=d.parseShort();var e;if(0k;k+=1)if(e=d.parseByte(),c.push(e),0<(8&e))for(var l=d.parseByte(),m=0;l>m;m+=1)c.push(e),k+=1;if(p.argument(c.length===n,'Bad flags.'),0k;k+= -1)e=c[k],l={},l.onCurve=!!(1&e),l.lastPointOfContour=0<=h.indexOf(k),m.push(l);for(k=h=0;n>k;k+=1)e=c[k],l=m[k],l.x=f(d,e,h,2,16),h=l.x;for(k=h=0;n>k;k+=1)e=c[k],l=m[k],l.y=f(d,e,h,4,32),h=l.y}b.points=m}else b.points=[]}else if(0===b.numberOfContours)b.points=[];else for(b.isComposite=!0,b.points=[],b.components=[],e=!0;e;)c=d.parseUShort(),e={glyphIndex:d.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0},0<(1&c)?0<(2&c)?(e.dx=d.parseShort(),e.dy=d.parseShort()):e.matchedPoints=[d.parseUShort(), -d.parseUShort()]:0<(2&c)?(e.dx=d.parseChar(),e.dy=d.parseChar()):e.matchedPoints=[d.parseByte(),d.parseByte()],0<(8&c)?e.xScale=e.yScale=d.parseF2Dot14():0<(64&c)?(e.xScale=d.parseF2Dot14(),e.yScale=d.parseF2Dot14()):0<(128&c)&&(e.xScale=d.parseF2Dot14(),e.scale01=d.parseF2Dot14(),e.scale10=d.parseF2Dot14(),e.yScale=d.parseF2Dot14()),b.components.push(e),e=!!(32&c)}function d(b,d){for(var c=[],e=0;ec.points.length-1||f.matchedPoints[1]>k.points.length-1)throw Error('Matched points out of range in '+c.name);var h=c.points[f.matchedPoints[0]],l=k.points[f.matchedPoints[1]],f={xScale:f.xScale,scale01:f.scale01,scale10:f.scale10,yScale:f.yScale, +1);for(var n=f.parseUShort(),l=f.parseUShort(),k=f.parseUShort(),f=f.parseUShort(),q=[],w=0;n>w;w++)q.push(d(b,c+h+w*l,e));w=[];c=c+h+n*l;for(h=0;k>h;h++)w.push(p(b,c+h*f,q,e));return{axes:q,instances:w}}},{'../check':2,'../parse':10,'../table':13}],17:[function(c,h,b){function f(b,c,d,e,f){var k;return 0<(c&e)?(k=b.parseByte(),0===(c&f)&&(k=-k),k=d+k):k=0<(c&f)?d:d+b.parseShort(),k}function e(b,c,d){c=new u.Parser(c,d);b.numberOfContours=c.parseShort();b._xMin=c.parseShort();b._yMin=c.parseShort(); +b._xMax=c.parseShort();b._yMax=c.parseShort();var e;if(0k;k+=1)if(e=c.parseByte(),d.push(e),0<(8&e))for(var l=c.parseByte(),m=0;l>m;m+=1)d.push(e),k+=1;if(p.argument(d.length===n,'Bad flags.'),0k;k+= +1)e=d[k],l={},l.onCurve=!!(1&e),l.lastPointOfContour=0<=h.indexOf(k),m.push(l);for(k=h=0;n>k;k+=1)e=d[k],l=m[k],l.x=f(c,e,h,2,16),h=l.x;for(k=h=0;n>k;k+=1)e=d[k],l=m[k],l.y=f(c,e,h,4,32),h=l.y}b.points=m}else b.points=[]}else if(0===b.numberOfContours)b.points=[];else for(b.isComposite=!0,b.points=[],b.components=[],e=!0;e;)d=c.parseUShort(),e={glyphIndex:c.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0},0<(1&d)?0<(2&d)?(e.dx=c.parseShort(),e.dy=c.parseShort()):e.matchedPoints=[c.parseUShort(), +c.parseUShort()]:0<(2&d)?(e.dx=c.parseChar(),e.dy=c.parseChar()):e.matchedPoints=[c.parseByte(),c.parseByte()],0<(8&d)?e.xScale=e.yScale=c.parseF2Dot14():0<(64&d)?(e.xScale=c.parseF2Dot14(),e.yScale=c.parseF2Dot14()):0<(128&d)&&(e.xScale=c.parseF2Dot14(),e.scale01=c.parseF2Dot14(),e.scale10=c.parseF2Dot14(),e.yScale=c.parseF2Dot14()),b.components.push(e),e=!!(32&d)}function d(b,c){for(var d=[],e=0;ec.points.length-1||f.matchedPoints[1]>k.points.length-1)throw Error('Matched points out of range in '+c.name);var h=c.points[f.matchedPoints[0]],l=k.points[f.matchedPoints[1]],f={xScale:f.xScale,scale01:f.scale01,scale10:f.scale10,yScale:f.yScale, dx:0,dy:0},l=d([l],f)[0];f.dx=h.x-l.x;f.dy=h.y-l.y}k=d(k.points,f);c.points=c.points.concat(k)}}var m;c=c.points;b=new n.Path;if(c){e=[];k=[];for(h=0;he;e++)c[b.parseTag()]={offset:b.parseUShort()};return c}function e(b,d){b=new u.Parser(b,d);var c=b.parseUShort();d=b.parseUShort();if(1===c)return b.parseUShortList(d);if(2===c){for(c=[];d--;)for(var e=b.parseUShort(), -f=b.parseUShort(),k=b.parseUShort();f>=e;e++)c[k++]=e;return c}}function d(b,d){b=new u.Parser(b,d);d=b.parseUShort();if(1===d){var c=b.parseUShort();d=b.parseUShort();var e=b.parseUShortList(d);return function(b){return e[b-c]||0}}if(2===d){d=b.parseUShort();for(var f=[],k=[],h=[],l=0;d>l;l++)f[l]=b.parseUShort(),k[l]=b.parseUShort(),h[l]=b.parseUShort();return function(b){for(var d=0,c=f.length-1;c>d;){var e=d+c+1>>1;bh;h++){var B=c[h],D=p[B];if(!D)for(D={},k.relativeOffset=B,B=k.parseUShort();B--;){var F=k.parseUShort();n&&(f=k.parseShort());m&&k.parseShort();D[F]=f}C[l[h]]=D}return function(b,d){return(b=C[b])?b[d]:void 0}}if(2===h){var D=k.parseUShort(),B=k.parseUShort(),p=k.parseUShort(),h=k.parseUShort(),A=d(b,c+D),H=d(b,c+B), -G=[];for(b=0;p>b;b++)for(c=G[b]=[],D=0;h>D;D++)n&&(f=k.parseShort()),m&&k.parseShort(),c[D]=f;var K={};for(b=0;be;e++)m.push(l(b,d+n[e]));c.getKerningValue=function(b,d){for(var c= -m.length;c--;){var e=m[c](b,d);if(void 0!==e)return e}return 0}}return c}var m=c('../check'),u=c('../parse');b.parse=function(b,d,c){var e=new u.Parser(b,d),k=e.parseFixed();m.argument(1===k,'Unsupported GPOS table version.');f(b,d+e.parseUShort());f(b,d+e.parseUShort());var h=e.parseUShort();e.relativeOffset=h;k=e.parseUShort();e=e.parseOffset16List(k);d+=h;for(h=0;k>h;h++){var l=p(b,d+e[h]);2!==l.lookupType||c.getGposKerningValue||(c.getGposKerningValue=l.getKerningValue)}}},{'../check':2,'../parse':10}], -19:[function(c,h,b){var f=c('../check'),e=c('../parse').Parser,d=Array(9),l=c('../table');d[1]=function(){var b=this.offset+this.relativeOffset,d=this.parseUShort();return 1===d?{substFormat:1,coverage:this.parsePointer(e.coverage),deltaGlyphId:this.parseUShort()}:2===d?{substFormat:2,coverage:this.parsePointer(e.coverage),substitute:this.parseOffset16List()}:void f.assert(!1,'0x'+b.toString(16)+': lookup type 1 format must be 1 or 2.')};d[2]=function(){var b=this.parseUShort();return f.argument(1=== +D=0===f?h:k[f-1];if(D.onCurve&&u.onCurve)b.lineTo(u.x,u.y);else if(D.onCurve&&!u.onCurve)m=u;else if(D.onCurve||u.onCurve){if(D.onCurve||!u.onCurve)throw Error('Invalid state.');b.quadraticCurveTo(m.x,m.y,u.x,u.y);m=null}else b.quadraticCurveTo(D.x,D.y,(D.x+u.x)/2,(D.y+u.y)/2),m=u}h!==l&&(m?b.quadraticCurveTo(m.x,m.y,h.x,h.y):b.lineTo(h.x,h.y))}m=(b.closePath(),b)}else m=b;return m}var p=c('../check'),m=c('../glyphset'),u=c('../parse'),n=c('../path');b.parse=function(b,c,d,f){var k,h=new m.GlyphSet(f); +for(k=0;ke;e++)d[b.parseTag()]={offset:b.parseUShort()};return d}function e(b,c){b=new u.Parser(b,c);var d=b.parseUShort();c=b.parseUShort();if(1===d)return b.parseUShortList(c);if(2===d){for(d=[];c--;)for(var e=b.parseUShort(), +f=b.parseUShort(),k=b.parseUShort();f>=e;e++)d[k++]=e;return d}}function d(b,c){b=new u.Parser(b,c);c=b.parseUShort();if(1===c){var d=b.parseUShort();c=b.parseUShort();var e=b.parseUShortList(c);return function(b){return e[b-d]||0}}if(2===c){c=b.parseUShort();for(var f=[],k=[],h=[],l=0;c>l;l++)f[l]=b.parseUShort(),k[l]=b.parseUShort(),h[l]=b.parseUShort();return function(b){for(var c=0,d=f.length-1;d>c;){var e=c+d+1>>1;bh;h++){var B=c[h],D=p[B];if(!D)for(D={},k.relativeOffset=B,B=k.parseUShort();B--;){var F=k.parseUShort();n&&(f=k.parseShort());m&&k.parseShort();D[F]=f}C[l[h]]=D}return function(b,c){return(b=C[b])?b[c]:void 0}}if(2===h){var D=k.parseUShort(),B=k.parseUShort(),p=k.parseUShort(),h=k.parseUShort(),A=d(b,c+D),H=d(b,c+B), +G=[];for(b=0;p>b;b++)for(c=G[b]=[],D=0;h>D;D++)n&&(f=k.parseShort()),m&&k.parseShort(),c[D]=f;var K={};for(b=0;be;e++)m.push(l(b,c+n[e]));d.getKerningValue=function(b,c){for(var d= +m.length;d--;){var e=m[d](b,c);if(void 0!==e)return e}return 0}}return d}var m=c('../check'),u=c('../parse');b.parse=function(b,c,d){var e=new u.Parser(b,c),k=e.parseFixed();m.argument(1===k,'Unsupported GPOS table version.');f(b,c+e.parseUShort());f(b,c+e.parseUShort());var h=e.parseUShort();e.relativeOffset=h;k=e.parseUShort();e=e.parseOffset16List(k);c+=h;for(h=0;k>h;h++){var l=p(b,c+e[h]);2!==l.lookupType||d.getGposKerningValue||(d.getGposKerningValue=l.getKerningValue)}}},{'../check':2,'../parse':10}], +19:[function(c,h,b){var f=c('../check'),e=c('../parse').Parser,d=Array(9),l=c('../table');d[1]=function(){var b=this.offset+this.relativeOffset,c=this.parseUShort();return 1===c?{substFormat:1,coverage:this.parsePointer(e.coverage),deltaGlyphId:this.parseUShort()}:2===c?{substFormat:2,coverage:this.parsePointer(e.coverage),substitute:this.parseOffset16List()}:void f.assert(!1,'0x'+b.toString(16)+': lookup type 1 format must be 1 or 2.')};d[2]=function(){var b=this.parseUShort();return f.argument(1=== b,'GSUB Multiple Substitution Subtable identifier-format must be 1'),{substFormat:b,coverage:this.parsePointer(e.coverage),sequences:this.parseListOfLists()}};d[3]=function(){var b=this.parseUShort();return f.argument(1===b,'GSUB Alternate Substitution Subtable identifier-format must be 1'),{substFormat:b,coverage:this.parsePointer(e.coverage),alternateSets:this.parseListOfLists()}};d[4]=function(){var b=this.parseUShort();return f.argument(1===b,'GSUB ligature table identifier-format must be 1'), -{substFormat:b,coverage:this.parsePointer(e.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var p={sequenceIndex:e.uShort,lookupListIndex:e.uShort};d[5]=function(){var b=this.offset+this.relativeOffset,d=this.parseUShort();if(1===d)return{substFormat:d,coverage:this.parsePointer(e.coverage),ruleSets:this.parseListOfLists(function(){var b=this.parseUShort(),d=this.parseUShort();return{input:this.parseUShortList(b- -1),lookupRecords:this.parseRecordList(d,p)}})};if(2===d)return{substFormat:d,coverage:this.parsePointer(e.coverage),classDef:this.parsePointer(e.classDef),classSets:this.parseListOfLists(function(){var b=this.parseUShort(),d=this.parseUShort();return{classes:this.parseUShortList(b-1),lookupRecords:this.parseRecordList(d,p)}})};if(3===d){var b=this.parseUShort(),c=this.parseUShort();return{substFormat:d,coverages:this.parseList(b,e.pointer(e.coverage)),lookupRecords:this.parseRecordList(c,p)}}f.assert(!1, -'0x'+b.toString(16)+': lookup type 5 format must be 1, 2 or 3.')};d[6]=function(){var b=this.offset+this.relativeOffset,d=this.parseUShort();return 1===d?{substFormat:1,coverage:this.parsePointer(e.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:2===d?{substFormat:2,coverage:this.parsePointer(e.coverage),backtrackClassDef:this.parsePointer(e.classDef), -inputClassDef:this.parsePointer(e.classDef),lookaheadClassDef:this.parsePointer(e.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:3===d?{substFormat:3,backtrackCoverage:this.parseList(e.pointer(e.coverage)),inputCoverage:this.parseList(e.pointer(e.coverage)),lookaheadCoverage:this.parseList(e.pointer(e.coverage)),lookupRecords:this.parseRecordList(p)}: +{substFormat:b,coverage:this.parsePointer(e.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var p={sequenceIndex:e.uShort,lookupListIndex:e.uShort};d[5]=function(){var b=this.offset+this.relativeOffset,c=this.parseUShort();if(1===c)return{substFormat:c,coverage:this.parsePointer(e.coverage),ruleSets:this.parseListOfLists(function(){var b=this.parseUShort(),c=this.parseUShort();return{input:this.parseUShortList(b- +1),lookupRecords:this.parseRecordList(c,p)}})};if(2===c)return{substFormat:c,coverage:this.parsePointer(e.coverage),classDef:this.parsePointer(e.classDef),classSets:this.parseListOfLists(function(){var b=this.parseUShort(),c=this.parseUShort();return{classes:this.parseUShortList(b-1),lookupRecords:this.parseRecordList(c,p)}})};if(3===c){var b=this.parseUShort(),d=this.parseUShort();return{substFormat:c,coverages:this.parseList(b,e.pointer(e.coverage)),lookupRecords:this.parseRecordList(d,p)}}f.assert(!1, +'0x'+b.toString(16)+': lookup type 5 format must be 1, 2 or 3.')};d[6]=function(){var b=this.offset+this.relativeOffset,c=this.parseUShort();return 1===c?{substFormat:1,coverage:this.parsePointer(e.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:2===c?{substFormat:2,coverage:this.parsePointer(e.coverage),backtrackClassDef:this.parsePointer(e.classDef), +inputClassDef:this.parsePointer(e.classDef),lookaheadClassDef:this.parsePointer(e.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(p)}})}:3===c?{substFormat:3,backtrackCoverage:this.parseList(e.pointer(e.coverage)),inputCoverage:this.parseList(e.pointer(e.coverage)),lookaheadCoverage:this.parseList(e.pointer(e.coverage)),lookupRecords:this.parseRecordList(p)}: void f.assert(!1,'0x'+b.toString(16)+': lookup type 6 format must be 1, 2 or 3.')};d[7]=function(){var b=this.parseUShort();f.argument(1===b,'GSUB Extension Substitution subtable identifier-format must be 1');var b=this.parseUShort(),c=new e(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:b,extension:d[b].call(c)}};d[8]=function(){var b=this.parseUShort();return f.argument(1===b,'GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1'),{substFormat:b, coverage:this.parsePointer(e.coverage),backtrackCoverage:this.parseList(e.pointer(e.coverage)),lookaheadCoverage:this.parseList(e.pointer(e.coverage)),substitutes:this.parseUShortList()}};var m=Array(9);m[1]=function(b){return 1===b.substFormat?new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT',value:1},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)},{name:'deltaGlyphID',type:'USHORT',value:b.deltaGlyphId}]):new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT', value:2},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)}].concat(l.ushortList('substitute',b.substitute)))};m[3]=function(b){return f.assert(1===b.substFormat,'Lookup type 3 substFormat must be 1.'),new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT',value:1},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)}].concat(l.tableList('altSet',b.alternateSets,function(b){return new l.Table('alternateSetTable',l.ushortList('alternate',b))})))};m[4]=function(b){return f.assert(1=== b.substFormat,'Lookup type 4 substFormat must be 1.'),new l.Table('substitutionTable',[{name:'substFormat',type:'USHORT',value:1},{name:'coverage',type:'TABLE',value:new l.Coverage(b.coverage)}].concat(l.tableList('ligSet',b.ligatureSets,function(b){return new l.Table('ligatureSetTable',l.tableList('ligature',b,function(b){return new l.Table('ligatureTable',[{name:'ligGlyph',type:'USHORT',value:b.ligGlyph}].concat(l.ushortList('component',b.components,b.components.length+1)))}))})))};b.parse=function(b, c){b=new e(b,c||0);c=b.parseVersion();return f.argument(1===c,'Unsupported GSUB table version.'),{version:c,scripts:b.parseScriptList(),features:b.parseFeatureList(),lookups:b.parseLookupList(d)}};b.make=function(b){return new l.Table('GSUB',[{name:'version',type:'ULONG',value:65536},{name:'scripts',type:'TABLE',value:new l.ScriptList(b.scripts)},{name:'features',type:'TABLE',value:new l.FeatureList(b.features)},{name:'lookups',type:'TABLE',value:new l.LookupList(b.lookups,m)}])}},{'../check':2,'../parse':10, -'../table':13}],20:[function(c,h,b){var f=c('../check'),e=c('../parse'),d=c('../table');b.parse=function(b,d){var c={};b=new e.Parser(b,d);return c.version=b.parseVersion(),c.fontRevision=Math.round(1E3*b.parseFixed())/1E3,c.checkSumAdjustment=b.parseULong(),c.magicNumber=b.parseULong(),f.argument(1594834165===c.magicNumber,'Font header has wrong magic number.'),c.flags=b.parseUShort(),c.unitsPerEm=b.parseUShort(),c.created=b.parseLongDateTime(),c.modified=b.parseLongDateTime(),c.xMin=b.parseShort(), -c.yMin=b.parseShort(),c.xMax=b.parseShort(),c.yMax=b.parseShort(),c.macStyle=b.parseUShort(),c.lowestRecPPEM=b.parseUShort(),c.fontDirectionHint=b.parseShort(),c.indexToLocFormat=b.parseShort(),c.glyphDataFormat=b.parseShort(),c};b.make=function(b){var c=Math.round((new Date).getTime()/1E3)+2082844800,e=c;return b.createdTimestamp&&(e=b.createdTimestamp+2082844800),new d.Table('head',[{name:'version',type:'FIXED',value:65536},{name:'fontRevision',type:'FIXED',value:65536},{name:'checkSumAdjustment', +'../table':13}],20:[function(c,h,b){var f=c('../check'),e=c('../parse'),d=c('../table');b.parse=function(b,c){var d={};b=new e.Parser(b,c);return d.version=b.parseVersion(),d.fontRevision=Math.round(1E3*b.parseFixed())/1E3,d.checkSumAdjustment=b.parseULong(),d.magicNumber=b.parseULong(),f.argument(1594834165===d.magicNumber,'Font header has wrong magic number.'),d.flags=b.parseUShort(),d.unitsPerEm=b.parseUShort(),d.created=b.parseLongDateTime(),d.modified=b.parseLongDateTime(),d.xMin=b.parseShort(), +d.yMin=b.parseShort(),d.xMax=b.parseShort(),d.yMax=b.parseShort(),d.macStyle=b.parseUShort(),d.lowestRecPPEM=b.parseUShort(),d.fontDirectionHint=b.parseShort(),d.indexToLocFormat=b.parseShort(),d.glyphDataFormat=b.parseShort(),d};b.make=function(b){var c=Math.round((new Date).getTime()/1E3)+2082844800,e=c;return b.createdTimestamp&&(e=b.createdTimestamp+2082844800),new d.Table('head',[{name:'version',type:'FIXED',value:65536},{name:'fontRevision',type:'FIXED',value:65536},{name:'checkSumAdjustment', type:'ULONG',value:0},{name:'magicNumber',type:'ULONG',value:1594834165},{name:'flags',type:'USHORT',value:0},{name:'unitsPerEm',type:'USHORT',value:1E3},{name:'created',type:'LONGDATETIME',value:e},{name:'modified',type:'LONGDATETIME',value:c},{name:'xMin',type:'SHORT',value:0},{name:'yMin',type:'SHORT',value:0},{name:'xMax',type:'SHORT',value:0},{name:'yMax',type:'SHORT',value:0},{name:'macStyle',type:'USHORT',value:0},{name:'lowestRecPPEM',type:'USHORT',value:0},{name:'fontDirectionHint',type:'SHORT', value:2},{name:'indexToLocFormat',type:'SHORT',value:0},{name:'glyphDataFormat',type:'SHORT',value:0}],b)}},{'../check':2,'../parse':10,'../table':13}],21:[function(c,h,b){var f=c('../parse'),e=c('../table');b.parse=function(b,c){var d={};b=new f.Parser(b,c);return d.version=b.parseVersion(),d.ascender=b.parseShort(),d.descender=b.parseShort(),d.lineGap=b.parseShort(),d.advanceWidthMax=b.parseUShort(),d.minLeftSideBearing=b.parseShort(),d.minRightSideBearing=b.parseShort(),d.xMaxExtent=b.parseShort(), d.caretSlopeRise=b.parseShort(),d.caretSlopeRun=b.parseShort(),d.caretOffset=b.parseShort(),b.relativeOffset+=8,d.metricDataFormat=b.parseShort(),d.numberOfHMetrics=b.parseUShort(),d};b.make=function(b){return new e.Table('hhea',[{name:'version',type:'FIXED',value:65536},{name:'ascender',type:'FWORD',value:0},{name:'descender',type:'FWORD',value:0},{name:'lineGap',type:'FWORD',value:0},{name:'advanceWidthMax',type:'UFWORD',value:0},{name:'minLeftSideBearing',type:'FWORD',value:0},{name:'minRightSideBearing', @@ -2388,8 +2388,9 @@ MathUtils.randomColor=function(){for(var a='#',c=0;6>c;c++)a+='0123456789ABCDEF' ObjectUtils.getMaterials=function(a,c){function h(a){void 0===c[a.uuid]&&(c[a.uuid]=a)}void 0===c&&(c=[]);a.traverse(function(a){if(!(void 0===a.material||a.hidden||a instanceof ParticleEmitter||a instanceof Sky||a instanceof SpineAnimation))if(a.material instanceof THREE.Material)h(a.material);else if(a.material instanceof Array)for(var b=0;b