babylonjs-serializers
Advanced tools
Comparing version 3.1.0-beta1.0 to 3.1.0-beta1.1
@@ -1,2 +0,3 @@ | ||
var babylonDependency; try { babylonDependency = BABYLON || (typeof require !== 'undefined' && require("../babylon.max")); } catch (e) { babylonDependency = BABYLON || (typeof require !== 'undefined' && require("babylonjs")); } | ||
var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this); | ||
var babylonDependency = (globalObject && globalObject.BABYLON) || BABYLON || (typeof require !== 'undefined' && require("babylonjs")); | ||
var BABYLON = babylonDependency; | ||
@@ -146,13 +147,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
(function universalModuleDefinition(root, factory) { | ||
var f = factory(); | ||
if (root && root["BABYLON"]) { | ||
return; | ||
} | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(); | ||
module.exports = f; | ||
else if(typeof define === 'function' && define.amd) | ||
define([], factory); | ||
define(["BJSSerializers"], factory); | ||
else if(typeof exports === 'object') | ||
exports["BJSSerializers"] = factory(); | ||
exports["BJSSerializers"] = f; | ||
else { | ||
root["BABYLON"] = factory(); | ||
root["BABYLON"] = f; | ||
} | ||
@@ -159,0 +162,0 @@ })(this, function() { |
@@ -1,1 +0,1 @@ | ||
var babylonDependency;try{babylonDependency=BABYLON||"undefined"!=typeof require&&require("../babylon.max")}catch(e){babylonDependency=BABYLON||"undefined"!=typeof require&&require("babylonjs")}var BABYLON=babylonDependency,__decorate=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var u=e.length-1;u>=0;u--)(n=e[u])&&(a=(i<3?n(a):i>3?n(t,o,a):n(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},__extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}})(),BABYLON;!(function(e){var t=(function(){function t(){}return t.OBJ=function(t,o,r,n){var i=[],a=1;o&&(r||(r="mat"),i.push("mtllib "+r+".mtl"));for(var u=0;u<t.length;u++){i.push("g object"+u),i.push("o object_"+u);var s=null;if(n){var p=e.Matrix.Translation(t[u].position.x,t[u].position.y,t[u].position.z);s=e.Matrix.Translation(-t[u].position.x,-t[u].position.y,-t[u].position.z),t[u].bakeTransformIntoVertices(p)}if(o){var f=t[u].material;f&&i.push("usemtl "+f.id)}var c=t[u].geometry;if(c){var l=c.getVerticesData("position"),d=c.getVerticesData("normal"),h=c.getVerticesData("uv"),m=c.getIndices(),b=0;if(l&&d&&h&&m){for(var x=0;x<l.length;x+=3)i.push("v "+l[x]+" "+l[x+1]+" "+l[x+2]),b++;for(x=0;x<d.length;x+=3)i.push("vn "+d[x]+" "+d[x+1]+" "+d[x+2]);for(x=0;x<h.length;x+=2)i.push("vt "+h[x]+" "+h[x+1]);for(x=0;x<m.length;x+=3)i.push("f "+(m[x+2]+a)+"/"+(m[x+2]+a)+"/"+(m[x+2]+a)+" "+(m[x+1]+a)+"/"+(m[x+1]+a)+"/"+(m[x+1]+a)+" "+(m[x]+a)+"/"+(m[x]+a)+"/"+(m[x]+a));n&&s&&t[u].bakeTransformIntoVertices(s),a+=b}}}return i.join("\n")},t.MTL=function(e){var t=[],o=e.material;t.push("newmtl mat1"),t.push(" Ns "+o.specularPower.toFixed(4)),t.push(" Ni 1.5000"),t.push(" d "+o.alpha.toFixed(4)),t.push(" Tr 0.0000"),t.push(" Tf 1.0000 1.0000 1.0000"),t.push(" illum 2"),t.push(" Ka "+o.ambientColor.r.toFixed(4)+" "+o.ambientColor.g.toFixed(4)+" "+o.ambientColor.b.toFixed(4)),t.push(" Kd "+o.diffuseColor.r.toFixed(4)+" "+o.diffuseColor.g.toFixed(4)+" "+o.diffuseColor.b.toFixed(4)),t.push(" Ks "+o.specularColor.r.toFixed(4)+" "+o.specularColor.g.toFixed(4)+" "+o.specularColor.b.toFixed(4)),t.push(" Ke "+o.emissiveColor.r.toFixed(4)+" "+o.emissiveColor.g.toFixed(4)+" "+o.emissiveColor.b.toFixed(4));return o.ambientTexture&&t.push(" map_Ka "+o.ambientTexture.name),o.diffuseTexture&&t.push(" map_Kd "+o.diffuseTexture.name),o.specularTexture&&t.push(" map_Ks "+o.specularTexture.name),o.bumpTexture&&t.push(" map_bump -imfchan z "+o.bumpTexture.name),o.opacityTexture&&t.push(" map_d "+o.opacityTexture.name),t.join("\n")},t})();e.OBJExport=t})(BABYLON||(BABYLON={})),(function(e,t){e&&e.BABYLON||("object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BJSSerializers=t():e.BABYLON=t())})(this,(function(){return BABYLON})); | ||
var globalObject="undefined"!=typeof global?global:"undefined"!=typeof window?window:this,babylonDependency=globalObject&&globalObject.BABYLON||BABYLON||"undefined"!=typeof require&&require("babylonjs"),BABYLON=babylonDependency,__decorate=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},__extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}})(),BABYLON;!(function(e){var t=(function(){function t(){}return t.OBJ=function(t,o,r,i){var n=[],a=1;o&&(r||(r="mat"),n.push("mtllib "+r+".mtl"));for(var s=0;s<t.length;s++){n.push("g object"+s),n.push("o object_"+s);var u=null;if(i){var p=e.Matrix.Translation(t[s].position.x,t[s].position.y,t[s].position.z);u=e.Matrix.Translation(-t[s].position.x,-t[s].position.y,-t[s].position.z),t[s].bakeTransformIntoVertices(p)}if(o){var l=t[s].material;l&&n.push("usemtl "+l.id)}var f=t[s].geometry;if(f){var c=f.getVerticesData("position"),d=f.getVerticesData("normal"),h=f.getVerticesData("uv"),b=f.getIndices(),m=0;if(c&&d&&h&&b){for(var x=0;x<c.length;x+=3)n.push("v "+c[x]+" "+c[x+1]+" "+c[x+2]),m++;for(x=0;x<d.length;x+=3)n.push("vn "+d[x]+" "+d[x+1]+" "+d[x+2]);for(x=0;x<h.length;x+=2)n.push("vt "+h[x]+" "+h[x+1]);for(x=0;x<b.length;x+=3)n.push("f "+(b[x+2]+a)+"/"+(b[x+2]+a)+"/"+(b[x+2]+a)+" "+(b[x+1]+a)+"/"+(b[x+1]+a)+"/"+(b[x+1]+a)+" "+(b[x]+a)+"/"+(b[x]+a)+"/"+(b[x]+a));i&&u&&t[s].bakeTransformIntoVertices(u),a+=m}}}return n.join("\n")},t.MTL=function(e){var t=[],o=e.material;t.push("newmtl mat1"),t.push(" Ns "+o.specularPower.toFixed(4)),t.push(" Ni 1.5000"),t.push(" d "+o.alpha.toFixed(4)),t.push(" Tr 0.0000"),t.push(" Tf 1.0000 1.0000 1.0000"),t.push(" illum 2"),t.push(" Ka "+o.ambientColor.r.toFixed(4)+" "+o.ambientColor.g.toFixed(4)+" "+o.ambientColor.b.toFixed(4)),t.push(" Kd "+o.diffuseColor.r.toFixed(4)+" "+o.diffuseColor.g.toFixed(4)+" "+o.diffuseColor.b.toFixed(4)),t.push(" Ks "+o.specularColor.r.toFixed(4)+" "+o.specularColor.g.toFixed(4)+" "+o.specularColor.b.toFixed(4)),t.push(" Ke "+o.emissiveColor.r.toFixed(4)+" "+o.emissiveColor.g.toFixed(4)+" "+o.emissiveColor.b.toFixed(4));return o.ambientTexture&&t.push(" map_Ka "+o.ambientTexture.name),o.diffuseTexture&&t.push(" map_Kd "+o.diffuseTexture.name),o.specularTexture&&t.push(" map_Ks "+o.specularTexture.name),o.bumpTexture&&t.push(" map_bump -imfchan z "+o.bumpTexture.name),o.opacityTexture&&t.push(" map_d "+o.opacityTexture.name),t.join("\n")},t})();e.OBJExport=t})(BABYLON||(BABYLON={})),(function(e,t){var o=t();e&&e.BABYLON||("object"==typeof exports&&"object"==typeof module?module.exports=o:"function"==typeof define&&define.amd?define(["BJSSerializers"],t):"object"==typeof exports?exports.BJSSerializers=o:e.BABYLON=o)})(this,(function(){return BABYLON})); |
@@ -7,3 +7,3 @@ { | ||
"description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.", | ||
"version": "3.1.0-beta1.0", | ||
"version": "3.1.0-beta1.1", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13613
168