zakeke-configurator-react 0.0.119 → 0.0.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,7 @@ export interface ProviderValue {
42
42
  quantityRule: ProductQuantityRule | null;
43
43
  eventMessages: EventMessage[] | null;
44
44
  isAssetsLoading: boolean;
45
- themeCompositions: ThemeCompositions[] | null;
45
+ draftCompositions: ThemeCompositions[] | null;
46
46
  extensionFields: {
47
47
  name: string;
48
48
  value: number;
package/dist/globals0.js CHANGED
@@ -1,4 +1,4 @@
1
- window.Logger={info:function(...args){if(window===undefined)return;if(window.location.href.indexOf("localhost")!=-1)console.log.apply(window,args);},error:function(...args){console.error.apply(window,args);}};var Zakeke;(function(Zakeke){Zakeke.config={"baseUrl":"https://portal.zakeke.com/","baseApiUrl":"https://api.zakeke.com/api/","baseImagesUploadApiUrl":"https://api.zakeke.com/api/","apiHost":"https://api.zakeke.com/api/","imagesUploadApiHost":"api.zakeke.com","maxUploadSize":10485760,"facebookAppID":"1157894994331979","instagramClientID":"1066407470424468","avaibleLanguages":["it","en","es","fr","de","af","fa","sq","am","ar","hy","az","eu","bn","my","bs","bg","ca","cs","ny","zh","zh-TW","ko","co","hr","ku","da","he","et","fil","fi","gl","cy","ka","ja","jv","el","gu","ha","haw","hi","hmn","id","is","kn","kk","km","ky","lo","lv","lt","lb","mk","ml","ms","mg","mt","mi","mr","mn","ne","no","nb","nl","ps","pl","pt","pa","ro","ru","sm","sr","st","sn","sd","si","sk","sl","so","su","sv","sw","tg","tai","ta","tr","uk","hu","ur","uz","vi","xh","yi","yo","zu","nb"]};})(Zakeke||(Zakeke={}));var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var __generator=this&&this.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1];},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this;}),g;function verb(n){return function(v){return step([n,v]);};}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue;}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break;}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break;}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break;}if(t[2])_.ops.pop();_.trys.pop();continue;}op=body.call(thisArg,_);}catch(e){op=[6,e];y=0;}finally{f=t=0;}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true};}};var ArrayHelper;(function(ArrayHelper){function match(array1,array2){for(var _i=0,array1_1=array1;_i<array1_1.length;_i++){var item=array1_1[_i];if(array2.indexOf(item)==-1){return false;}}return true;}ArrayHelper.match=match;})(ArrayHelper||(ArrayHelper={}));var DateHelper;(function(DateHelper){function fromJsonToDate(str){if(str==null)return null;var ticks=/-?\d+/.exec(str)[0];var d=new Date(parseInt(ticks));return d;}DateHelper.fromJsonToDate=fromJsonToDate;})(DateHelper||(DateHelper={}));var StringHelper;(function(StringHelper){function padLeft(str,width,char){var newStr=str.toString();for(var i=0;i<width-newStr.length;i++)newStr=char+newStr;return newStr;}StringHelper.padLeft=padLeft;function padRight(str,width,char){var newStr=str.toString();for(var i=0;i<width-newStr.length;i++)newStr=newStr+char;return newStr;}StringHelper.padRight=padRight;function format(str){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i];}return args.reduce(function(prev,current,idx){return prev.replace("{"+idx+"}",current);},str);}StringHelper.format=format;function rgbToHex(r,g,b){return"#"+((1<<24)+(r<<16)+(g<<8)+b).toString(16).slice(1);}StringHelper.rgbToHex=rgbToHex;function hex2rgb(c){var c=c.substring(1);// strip #
1
+ window.Logger={info:function(...args){if(window===undefined)return;if(window.location.href.indexOf("localhost")!=-1)console.log.apply(window,args);},error:function(...args){console.error.apply(window,args);}};var Zakeke;(function(Zakeke){Zakeke.config={"baseUrl":"https://test-portal.zakeke.com/","cloudFlareApiUrl":"https://zakeke-worker-testing.zakeke.workers.dev/api/","baseApiUrl":"https://test-api.zakeke.com/api/","baseImagesUploadApiUrl":"https://zakeke-testing-webapi-5.azurewebsites.net/api/","baseAdminUrl":"https://test-admin.zakeke.com/","apiHost":"https://zakeke-testing-webapi-5.azurewebsites.net/api/","imagesUploadApiHost":"https://zakeke-testing-webapi-5.azurewebsites.net/api/","maxUploadSize":10485760,"facebookAppID":"1157894994331979","instagramClientID":"1066407470424468","avaibleLanguages":["it","en","es","fr","de","af","fa","sq","am","ar","hy","az","eu","bn","my","bs","bg","ca","cs","ny","zh","zh-TW","ko","co","hr","ku","da","he","et","fil","fi","gl","cy","ka","ja","jv","el","gu","ha","haw","hi","hmn","id","is","kn","kk","km","ky","lo","lv","lt","lb","mk","ml","ms","mg","mt","mi","mr","mn","ne","no","nb","nl","ps","pl","pt","pa","ro","ru","sm","sr","st","sn","sd","si","sk","sl","so","su","sv","sw","tg","tai","ta","tr","uk","hu","ur","uz","vi","xh","yi","yo","zu","nb"]};})(Zakeke||(Zakeke={}));var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var __generator=this&&this.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1];},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this;}),g;function verb(n){return function(v){return step([n,v]);};}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue;}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break;}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break;}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break;}if(t[2])_.ops.pop();_.trys.pop();continue;}op=body.call(thisArg,_);}catch(e){op=[6,e];y=0;}finally{f=t=0;}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true};}};var ArrayHelper;(function(ArrayHelper){function match(array1,array2){for(var _i=0,array1_1=array1;_i<array1_1.length;_i++){var item=array1_1[_i];if(array2.indexOf(item)==-1){return false;}}return true;}ArrayHelper.match=match;})(ArrayHelper||(ArrayHelper={}));var DateHelper;(function(DateHelper){function fromJsonToDate(str){if(str==null)return null;var ticks=/-?\d+/.exec(str)[0];var d=new Date(parseInt(ticks));return d;}DateHelper.fromJsonToDate=fromJsonToDate;})(DateHelper||(DateHelper={}));var StringHelper;(function(StringHelper){function padLeft(str,width,char){var newStr=str.toString();for(var i=0;i<width-newStr.length;i++)newStr=char+newStr;return newStr;}StringHelper.padLeft=padLeft;function padRight(str,width,char){var newStr=str.toString();for(var i=0;i<width-newStr.length;i++)newStr=newStr+char;return newStr;}StringHelper.padRight=padRight;function format(str){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i];}return args.reduce(function(prev,current,idx){return prev.replace("{".concat(idx,"}"),current);},str);}StringHelper.format=format;function rgbToHex(r,g,b){return"#"+((1<<24)+(r<<16)+(g<<8)+b).toString(16).slice(1);}StringHelper.rgbToHex=rgbToHex;function hex2rgb(c){var c=c.substring(1);// strip #
2
2
  var rgb=parseInt(c,16);// convert rrggbb to decimal
3
3
  var r=rgb>>16&0xff;// extract red
4
4
  var g=rgb>>8&0xff;// extract green
@@ -12012,8 +12012,27 @@ if(this._webGLVersion>1){if(this._gl.HALF_FLOAT_OES!==0x140B){this._gl.HALF_FLOA
12012
12012
  if(this._webGLVersion>1){this._caps.drawBuffersExtension=true;this._caps.maxMSAASamples=this._gl.getParameter(this._gl.MAX_SAMPLES);}else{var drawBuffersExtension=this._gl.getExtension('WEBGL_draw_buffers');if(drawBuffersExtension!==null){this._caps.drawBuffersExtension=true;this._gl.drawBuffers=drawBuffersExtension.drawBuffersWEBGL.bind(drawBuffersExtension);this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++){this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=drawBuffersExtension["COLOR_ATTACHMENT"+i+"_WEBGL"];}}}// Depth Texture
12013
12013
  if(this._webGLVersion>1){this._caps.depthTextureExtension=true;}else{var depthTextureExtension=this._gl.getExtension('WEBGL_depth_texture');if(depthTextureExtension!=null){this._caps.depthTextureExtension=true;this._gl.UNSIGNED_INT_24_8=depthTextureExtension.UNSIGNED_INT_24_8_WEBGL;}}// Vertex array object
12014
12014
  if(this.disableVertexArrayObjects){this._caps.vertexArrayObject=false;}else if(this._webGLVersion>1){this._caps.vertexArrayObject=true;}else{var vertexArrayObjectExtension=this._gl.getExtension('OES_vertex_array_object');if(vertexArrayObjectExtension!=null){this._caps.vertexArrayObject=true;this._gl.createVertexArray=vertexArrayObjectExtension.createVertexArrayOES.bind(vertexArrayObjectExtension);this._gl.bindVertexArray=vertexArrayObjectExtension.bindVertexArrayOES.bind(vertexArrayObjectExtension);this._gl.deleteVertexArray=vertexArrayObjectExtension.deleteVertexArrayOES.bind(vertexArrayObjectExtension);}}// Instances count
12015
- if(this._webGLVersion>1){this._caps.instancedArrays=true;}else{var instanceExtension=this._gl.getExtension('ANGLE_instanced_arrays');if(instanceExtension!=null){this._caps.instancedArrays=true;this._gl.drawArraysInstanced=instanceExtension.drawArraysInstancedANGLE.bind(instanceExtension);this._gl.drawElementsInstanced=instanceExtension.drawElementsInstancedANGLE.bind(instanceExtension);this._gl.vertexAttribDivisor=instanceExtension.vertexAttribDivisorANGLE.bind(instanceExtension);}else{this._caps.instancedArrays=false;}}if(this._gl.getShaderPrecisionFormat){var vertex_highp=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT);var fragment_highp=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(vertex_highp&&fragment_highp){this._caps.highPrecisionShaderSupported=vertex_highp.precision!==0&&fragment_highp.precision!==0;}}if(this._webGLVersion>1){this._caps.blendMinMax=true;}else{var blendMinMaxExtension=this._gl.getExtension('EXT_blend_minmax');if(blendMinMaxExtension!=null){this._caps.blendMinMax=true;this._gl.MAX=blendMinMaxExtension.MAX_EXT;this._gl.MIN=blendMinMaxExtension.MIN_EXT;}}// sRGB buffers
12016
- if(this._webGLVersion>1){this._caps.supportSRGBBuffers=true;}else{var sRGBExtension=this._gl.getExtension('EXT_sRGB');if(sRGBExtension!=null){this._caps.supportSRGBBuffers=true;this._gl.SRGB=sRGBExtension.SRGB_EXT;this._gl.SRGB8=sRGBExtension.SRGB_ALPHA_EXT;this._gl.SRGB8_ALPHA8=sRGBExtension.SRGB_ALPHA_EXT;}}// Depth buffer
12015
+ if(this._webGLVersion>1){this._caps.instancedArrays=true;}else{var instanceExtension=this._gl.getExtension('ANGLE_instanced_arrays');if(instanceExtension!=null){this._caps.instancedArrays=true;this._gl.drawArraysInstanced=instanceExtension.drawArraysInstancedANGLE.bind(instanceExtension);this._gl.drawElementsInstanced=instanceExtension.drawElementsInstancedANGLE.bind(instanceExtension);this._gl.vertexAttribDivisor=instanceExtension.vertexAttribDivisorANGLE.bind(instanceExtension);}else{this._caps.instancedArrays=false;}}if(this._gl.getShaderPrecisionFormat){var vertex_highp=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT);var fragment_highp=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(vertex_highp&&fragment_highp){this._caps.highPrecisionShaderSupported=vertex_highp.precision!==0&&fragment_highp.precision!==0;}}if(this._webGLVersion>1){this._caps.blendMinMax=true;}else{var blendMinMaxExtension=this._gl.getExtension('EXT_blend_minmax');if(blendMinMaxExtension!=null){this._caps.blendMinMax=true;this._gl.MAX=blendMinMaxExtension.MAX_EXT;this._gl.MIN=blendMinMaxExtension.MIN_EXT;}}// Matteo - modificato in base all'ultima versione (5.0.0-beta.9) della libreria
12016
+ // per risolvere il problema di serializzazione del gammaSpace sulle texture caricate da gltf
12017
+ // sRGB buffers
12018
+ // only run this if not already set to true (in the constructor, for example)
12019
+ if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1){this._caps.supportSRGBBuffers=true;}else{var sRGBExtension=this._gl.getExtension('EXT_sRGB');if(sRGBExtension!=null){this._caps.supportSRGBBuffers=true;this._gl.SRGB=sRGBExtension.SRGB_EXT;this._gl.SRGB8=sRGBExtension.SRGB_ALPHA_EXT;this._gl.SRGB8_ALPHA8=sRGBExtension.SRGB_ALPHA_EXT;}}// take into account the forced state that was provided in options
12020
+ // When the issue in angle/chrome is fixed the flag should be taken into account only when it is explicitly defined
12021
+ this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&!!(this._creationOptions&&this._creationOptions.forceSRGBBufferSupportState);}/* ORIGINALE
12022
+ // sRGB buffers
12023
+ if (this._webGLVersion > 1) {
12024
+ this._caps.supportSRGBBuffers = true;
12025
+ }
12026
+ else {
12027
+ var sRGBExtension = this._gl.getExtension('EXT_sRGB');
12028
+ if (sRGBExtension != null) {
12029
+ this._caps.supportSRGBBuffers = true;
12030
+ this._gl.SRGB = sRGBExtension.SRGB_EXT;
12031
+ this._gl.SRGB8 = sRGBExtension.SRGB_ALPHA_EXT;
12032
+ this._gl.SRGB8_ALPHA8 = sRGBExtension.SRGB_ALPHA_EXT;
12033
+ }
12034
+ }
12035
+ */ // Depth buffer
12017
12036
  this._depthCullingState.depthTest=true;this._depthCullingState.depthFunc=this._gl.LEQUAL;this._depthCullingState.depthMask=true;// Texture maps
12018
12037
  this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var slot=0;slot<this._maxSimultaneousTextures;slot++){this._nextFreeTextureSlots.push(slot);}};ThinEngine.prototype._initFeatures=function(){this._features={forceBitmapOverHTMLImageElement:false,supportRenderAndCopyToLodForFloatTextures:this._webGLVersion!==1,supportDepthStencilTexture:this._webGLVersion!==1,supportShadowSamplers:this._webGLVersion!==1,uniformBufferHardCheckMatrix:false,allowTexturePrefiltering:this._webGLVersion!==1,trackUbosInFrame:false,checkUbosContentBeforeUpload:false,supportCSM:this._webGLVersion!==1,basisNeedsPOT:this._webGLVersion===1,support3DTextures:this._webGLVersion!==1,needTypeSuffixInShaderConstants:this._webGLVersion!==1,supportMSAA:this._webGLVersion!==1,supportSSAO2:this._webGLVersion!==1,supportExtendedTextureFormats:this._webGLVersion!==1,supportSwitchCaseInShader:this._webGLVersion!==1,supportSyncTextureRead:true,needsInvertingBitmap:true,useUBOBindingCache:true,needShaderCodeInlining:false,_collectUbosUpdatedInFrame:false};};Object.defineProperty(ThinEngine.prototype,"webGLVersion",{/**
12019
12038
  * Gets version of the current webGL context
package/dist/globals1.js CHANGED
@@ -2424,7 +2424,14 @@ for(var i=0;i<_this._orderedImageData.length;++i){glbData.push(_this._orderedIma
2424
2424
  * @param node glTF Node for storing the transformation data
2425
2425
  * @param babylonTransformNode Babylon mesh used as the source for the transformation data
2426
2426
  * @param convertToRightHandedSystem Converts the values to right-handed
2427
- */_Exporter.prototype.setNodeTransformation=function(node,babylonTransformNode,convertToRightHandedSystem){if(!babylonTransformNode.getPivotPoint().equalsToFloats(0,0,0)){babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Tools"].Warn("Pivot points are not supported in the glTF serializer");}if(!babylonTransformNode.position.equalsToFloats(0,0,0)){node.translation=convertToRightHandedSystem?_glTFUtilities__WEBPACK_IMPORTED_MODULE_3__["_GLTFUtilities"]._GetRightHandedPositionVector3(babylonTransformNode.position).asArray():babylonTransformNode.position.asArray();}if(!babylonTransformNode.scaling.equalsToFloats(1,1,1)){node.scale=babylonTransformNode.scaling.asArray();}var rotationQuaternion=babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Quaternion"].RotationYawPitchRoll(babylonTransformNode.rotation.y,babylonTransformNode.rotation.x,babylonTransformNode.rotation.z);if(babylonTransformNode.rotationQuaternion){rotationQuaternion.multiplyInPlace(babylonTransformNode.rotationQuaternion);}if(!(rotationQuaternion.x===0&&rotationQuaternion.y===0&&rotationQuaternion.z===0&&rotationQuaternion.w===1)){if(convertToRightHandedSystem){_glTFUtilities__WEBPACK_IMPORTED_MODULE_3__["_GLTFUtilities"]._GetRightHandedQuaternionFromRef(rotationQuaternion);}node.rotation=rotationQuaternion.normalize().asArray();}};_Exporter.prototype.getVertexBufferFromMesh=function(attributeKind,bufferMesh){if(bufferMesh.isVerticesDataPresent(attributeKind)){var vertexBuffer=bufferMesh.getVertexBuffer(attributeKind);if(vertexBuffer){return vertexBuffer;}}return null;};/**
2427
+ */_Exporter.prototype.setNodeTransformation=function(node,babylonTransformNode,convertToRightHandedSystem){if(!babylonTransformNode.getPivotPoint().equalsToFloats(0,0,0)){babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Tools"].Warn("Pivot points are not supported in the glTF serializer");}if(!babylonTransformNode.position.equalsToFloats(0,0,0)){node.translation=convertToRightHandedSystem?_glTFUtilities__WEBPACK_IMPORTED_MODULE_3__["_GLTFUtilities"]._GetRightHandedPositionVector3(babylonTransformNode.position).asArray():babylonTransformNode.position.asArray();}// Matteo - possibilità di intervenire sullo scaling del nodo padre
2428
+ /*
2429
+ if (!babylonTransformNode.parent) {
2430
+ node.scale = babylonTransformNode.scaling.scale(0.05).asArray();
2431
+ } else if (!babylonTransformNode.scaling.equalsToFloats(1, 1, 1)) {
2432
+ node.scale = babylonTransformNode.scaling.asArray();
2433
+ }
2434
+ */if(!babylonTransformNode.scaling.equalsToFloats(1,1,1)){node.scale=babylonTransformNode.scaling.asArray();}var rotationQuaternion=babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Quaternion"].RotationYawPitchRoll(babylonTransformNode.rotation.y,babylonTransformNode.rotation.x,babylonTransformNode.rotation.z);if(babylonTransformNode.rotationQuaternion){rotationQuaternion.multiplyInPlace(babylonTransformNode.rotationQuaternion);}if(!(rotationQuaternion.x===0&&rotationQuaternion.y===0&&rotationQuaternion.z===0&&rotationQuaternion.w===1)){if(convertToRightHandedSystem){_glTFUtilities__WEBPACK_IMPORTED_MODULE_3__["_GLTFUtilities"]._GetRightHandedQuaternionFromRef(rotationQuaternion);}node.rotation=rotationQuaternion.normalize().asArray();}};_Exporter.prototype.getVertexBufferFromMesh=function(attributeKind,bufferMesh){if(bufferMesh.isVerticesDataPresent(attributeKind)){var vertexBuffer=bufferMesh.getVertexBuffer(attributeKind);if(vertexBuffer){return vertexBuffer;}}return null;};/**
2428
2435
  * Creates a bufferview based on the vertices type for the Babylon mesh
2429
2436
  * @param kind Indicates the type of vertices data
2430
2437
  * @param componentType Indicates the numerical type used to store the data
@@ -2721,9 +2728,8 @@ if(babylonPBRMaterial.metallicTexture&&babylonPBRMaterial.useAmbientOcclusionFro
2721
2728
  var url=undefined;if(!(babylonTexture instanceof BABYLON.ProceduralTexture)&&babylonTexture.url.indexOf("blob:")===-1)url=babylonTexture.url;return Promise.resolve().then(function(){return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this,void 0,void 0,function(){var textureUid,pixels,samplers,sampler,samplerIndex_1,foundSamplerIndex,i,s,size;var _this=this;return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this,function(_a){switch(_a.label){case 0:textureUid=babylonTexture.uid;if(!(textureUid in this._textureMap))return[3/*break*/,1];return[2/*return*/,this._textureMap[textureUid]];case 1:return[4/*yield*/,this.getPixelsFromTexture(babylonTexture)];case 2:pixels=_a.sent();if(!pixels){return[2/*return*/,null];}samplers=this._exporter._samplers;sampler=this._getGLTFTextureSampler(babylonTexture);samplerIndex_1=null;foundSamplerIndex=null;for(i=0;i<samplers.length;++i){s=samplers[i];if(s.minFilter===sampler.minFilter&&s.magFilter===sampler.magFilter&&s.wrapS===sampler.wrapS&&s.wrapT===sampler.wrapT){foundSamplerIndex=i;break;}}if(foundSamplerIndex==null){samplers.push(sampler);samplerIndex_1=samplers.length-1;}else{samplerIndex_1=foundSamplerIndex;}size=babylonTexture.getSize();// Preserve texture mime type if defined
2722
2729
  if(babylonTexture.mimeType){switch(babylonTexture.mimeType){case"image/jpeg":mimeType="image/jpeg"/* JPEG */;break;case"image/png":mimeType="image/png"/* PNG */;break;}}return[2/*return*/,this._createBase64FromCanvasAsync(pixels,size.width,size.height,mimeType).then(function(base64Data){// Originale
2723
2730
  //var textureInfo = _this._getTextureInfoFromBase64(base64Data, babylonTexture.name.replace(/\.\/|\/|\.\\|\\/g, "_"), mimeType, babylonTexture.coordinatesIndex, samplerIndex_1);
2724
- // Matteo - se un blob, sostituisco il nome con un identificativo random
2731
+ // Matteo - se si tratta di un blob, sostituisco il nome con un identificativo random
2725
2732
  // Inoltre passo alla chiamata _getTextureInfoFromBase64 anche l'url
2726
- //var baseTextureName = babylonTexture.name.replace(/\.\/|\/|\.\\|\\/g, "_");
2727
2733
  var baseTextureName=babylonTexture.name.replace(/[/\\?%*:|"<>]/g,"_");if(!babylonTexture.url||babylonTexture.url.indexOf("blob:")!==-1)baseTextureName=BABYLON.Tools.RandomId();// sostituire baseTextureName nella chiamata e aggiungere url come parametro finale
2728
2734
  var textureInfo=_this._getTextureInfoFromBase64(base64Data,baseTextureName,mimeType,babylonTexture.coordinatesIndex,samplerIndex_1,url);if(textureInfo){_this._textureMap[textureUid]=textureInfo;_this._exporter._extensionsPostExportTextures("linkTextureInfo",textureInfo,babylonTexture);}return textureInfo;})];}});});});};/**
2729
2735
  * Builds a texture from base64 string