{ "errors": [], "warnings": [], "version": "4.35.3", "hash": "ab0fd0436b23f82284a8", "time": 2526, "builtAt": 1568935417262, "publicPath": "", "outputPath": "C:\\Repos\\Babylon.js\\.temp/testsES6Modules", "assetsByChunkName": { "thinEngineOnly": "thinEngineOnly.js" }, "assets": [ { "name": "thinEngineOnly.js", "size": 426580, "chunks": [ "thinEngineOnly" ], "chunkNames": [ "thinEngineOnly" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "thinEngineOnly": { "chunks": [ "thinEngineOnly" ], "assets": [ "thinEngineOnly.js" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "thinEngineOnly": { "chunks": [ "thinEngineOnly" ], "assets": [ "thinEngineOnly.js" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": "thinEngineOnly", "rendered": true, "initial": true, "entry": true, "size": 374721, "names": [ "thinEngineOnly" ], "files": [ "thinEngineOnly.js" ], "hash": "78e8df7e120bd660d5a3", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "index": 18, "index2": 14, "size": 702, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./Expressions/Operators/shaderDefineAndOperator", "loc": "7:0-90" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineAndOperator", "loc": "66:38-61" } ], "providedExports": [ "ShaderDefineAndOperator" ], "optimizationBailout": [], "depth": 4, "source": "import * as tslib_1 from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineAndOperator = /** @class */ (function (_super) {\r\n tslib_1.__extends(ShaderDefineAndOperator, _super);\r\n function ShaderDefineAndOperator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderDefineAndOperator.prototype.isTrue = function (preprocessors) {\r\n return this.leftOperand.isTrue(preprocessors) && this.rightOperand.isTrue(preprocessors);\r\n };\r\n return ShaderDefineAndOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineAndOperator };\r\n//# sourceMappingURL=shaderDefineAndOperator.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "index": 19, "index2": 15, "size": 1546, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./Expressions/Operators/shaderDefineArithmeticOperator", "loc": "8:0-104" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineArithmeticOperator", "loc": "59:19-49" } ], "providedExports": [ "ShaderDefineArithmeticOperator" ], "optimizationBailout": [], "depth": 4, "source": "import * as tslib_1 from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineArithmeticOperator = /** @class */ (function (_super) {\r\n tslib_1.__extends(ShaderDefineArithmeticOperator, _super);\r\n function ShaderDefineArithmeticOperator(define, operand, testValue) {\r\n var _this = _super.call(this) || this;\r\n _this.define = define;\r\n _this.operand = operand;\r\n _this.testValue = testValue;\r\n return _this;\r\n }\r\n ShaderDefineArithmeticOperator.prototype.isTrue = function (preprocessors) {\r\n var value = preprocessors[this.define];\r\n if (value === undefined) {\r\n return false;\r\n }\r\n var condition = false;\r\n var left = parseInt(value);\r\n var right = parseInt(this.testValue);\r\n switch (this.operand) {\r\n case \">\":\r\n condition = left > right;\r\n break;\r\n case \"<\":\r\n condition = left < right;\r\n break;\r\n case \"<=\":\r\n condition = left <= right;\r\n break;\r\n case \">=\":\r\n condition = left >= right;\r\n break;\r\n case \"==\":\r\n condition = left === right;\r\n break;\r\n }\r\n return condition;\r\n };\r\n return ShaderDefineArithmeticOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineArithmeticOperator };\r\n//# sourceMappingURL=shaderDefineArithmeticOperator.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "index": 15, "index2": 12, "size": 924, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator", "loc": "5:0-102" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator", "loc": "42:23-52" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator", "loc": "55:23-52" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator", "loc": "91:38-67" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator", "loc": "94:38-67" } ], "providedExports": [ "ShaderDefineIsDefinedOperator" ], "optimizationBailout": [], "depth": 4, "source": "import * as tslib_1 from \"tslib\";\r\nimport { ShaderDefineExpression } from \"../shaderDefineExpression\";\r\n/** @hidden */\r\nvar ShaderDefineIsDefinedOperator = /** @class */ (function (_super) {\r\n tslib_1.__extends(ShaderDefineIsDefinedOperator, _super);\r\n function ShaderDefineIsDefinedOperator(define, not) {\r\n if (not === void 0) { not = false; }\r\n var _this = _super.call(this) || this;\r\n _this.define = define;\r\n _this.not = not;\r\n return _this;\r\n }\r\n ShaderDefineIsDefinedOperator.prototype.isTrue = function (preprocessors) {\r\n var condition = preprocessors[this.define] !== undefined;\r\n if (this.not) {\r\n condition = !condition;\r\n }\r\n return condition;\r\n };\r\n return ShaderDefineIsDefinedOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineIsDefinedOperator };\r\n//# sourceMappingURL=shaderDefineIsDefinedOperator.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "index": 17, "index2": 13, "size": 695, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./Expressions/Operators/shaderDefineOrOperator", "loc": "6:0-88" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./Expressions/Operators/shaderDefineOrOperator", "loc": "78:33-55" } ], "providedExports": [ "ShaderDefineOrOperator" ], "optimizationBailout": [], "depth": 4, "source": "import * as tslib_1 from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineOrOperator = /** @class */ (function (_super) {\r\n tslib_1.__extends(ShaderDefineOrOperator, _super);\r\n function ShaderDefineOrOperator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderDefineOrOperator.prototype.isTrue = function (preprocessors) {\r\n return this.leftOperand.isTrue(preprocessors) || this.rightOperand.isTrue(preprocessors);\r\n };\r\n return ShaderDefineOrOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineOrOperator };\r\n//# sourceMappingURL=shaderDefineOrOperator.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/shaderDefineExpression.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\shaderDefineExpression.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/shaderDefineExpression.js", "index": 16, "index2": 11, "size": 356, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "profile": { "factory": 6, "building": 12, "dependencies": 4 } } ], "profile": { "factory": 5, "building": 1 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "type": "harmony side effect evaluation", "userRequest": "../shaderDefineExpression", "loc": "2:0-67" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js", "type": "harmony import specifier", "userRequest": "../shaderDefineExpression", "loc": "13:2-24" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "type": "harmony side effect evaluation", "userRequest": "../shaderDefineExpression", "loc": "2:0-67" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js", "type": "harmony import specifier", "userRequest": "../shaderDefineExpression", "loc": "41:2-24" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "type": "harmony side effect evaluation", "userRequest": "../shaderDefineExpression", "loc": "2:0-67" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js", "type": "harmony import specifier", "userRequest": "../shaderDefineExpression", "loc": "21:2-24" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "type": "harmony side effect evaluation", "userRequest": "../shaderDefineExpression", "loc": "2:0-67" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js", "type": "harmony import specifier", "userRequest": "../shaderDefineExpression", "loc": "13:2-24" } ], "providedExports": [ "ShaderDefineExpression" ], "optimizationBailout": [], "depth": 5, "source": "/** @hidden */\r\nvar ShaderDefineExpression = /** @class */ (function () {\r\n function ShaderDefineExpression() {\r\n }\r\n ShaderDefineExpression.prototype.isTrue = function (preprocessors) {\r\n return true;\r\n };\r\n return ShaderDefineExpression;\r\n}());\r\nexport { ShaderDefineExpression };\r\n//# sourceMappingURL=shaderDefineExpression.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "index": 13, "index2": 9, "size": 860, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./shaderCodeConditionNode", "loc": "3:0-68" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeConditionNode", "loc": "129:46-69" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeConditionNode", "loc": "142:46-69" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeConditionNode", "loc": "150:46-69" } ], "providedExports": [ "ShaderCodeConditionNode" ], "optimizationBailout": [], "depth": 4, "source": "import * as tslib_1 from \"tslib\";\r\nimport { ShaderCodeNode } from './shaderCodeNode';\r\n/** @hidden */\r\nvar ShaderCodeConditionNode = /** @class */ (function (_super) {\r\n tslib_1.__extends(ShaderCodeConditionNode, _super);\r\n function ShaderCodeConditionNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderCodeConditionNode.prototype.process = function (preprocessors, options) {\r\n for (var index = 0; index < this.children.length; index++) {\r\n var node = this.children[index];\r\n if (node.isValid(preprocessors)) {\r\n return node.process(preprocessors, options);\r\n }\r\n }\r\n return \"\";\r\n };\r\n return ShaderCodeConditionNode;\r\n}(ShaderCodeNode));\r\nexport { ShaderCodeConditionNode };\r\n//# sourceMappingURL=shaderCodeConditionNode.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeCursor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeCursor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeCursor.js", "index": 12, "index2": 8, "size": 1628, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./shaderCodeCursor", "loc": "2:0-54" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeCursor", "loc": "177:25-41" } ], "providedExports": [ "ShaderCodeCursor" ], "optimizationBailout": [], "depth": 4, "source": "/** @hidden */\r\nvar ShaderCodeCursor = /** @class */ (function () {\r\n function ShaderCodeCursor() {\r\n }\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"currentLine\", {\r\n get: function () {\r\n return this._lines[this.lineIndex];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"canRead\", {\r\n get: function () {\r\n return this.lineIndex < this._lines.length - 1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"lines\", {\r\n set: function (value) {\r\n this._lines = [];\r\n for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {\r\n var line = value_1[_i];\r\n // Prevent removing line break in macros.\r\n if (line[0] === \"#\") {\r\n this._lines.push(line);\r\n continue;\r\n }\r\n var split = line.split(\";\");\r\n for (var index = 0; index < split.length; index++) {\r\n var subLine = split[index];\r\n subLine = subLine.trim();\r\n if (!subLine) {\r\n continue;\r\n }\r\n this._lines.push(subLine + (index !== split.length - 1 ? \";\" : \"\"));\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ShaderCodeCursor;\r\n}());\r\nexport { ShaderCodeCursor };\r\n//# sourceMappingURL=shaderCodeCursor.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js", "index": 10, "index2": 7, "size": 2903, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "type": "harmony side effect evaluation", "userRequest": "./shaderCodeNode", "loc": "2:0-50" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js", "type": "harmony import specifier", "userRequest": "./shaderCodeNode", "loc": "19:2-16" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "type": "harmony side effect evaluation", "userRequest": "./shaderCodeNode", "loc": "2:0-50" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "type": "harmony import specifier", "userRequest": "./shaderCodeNode", "loc": "13:2-16" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./shaderCodeNode", "loc": "1:0-50" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeNode", "loc": "107:35-49" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeNode", "loc": "160:34-48" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeNode", "loc": "176:27-41" } ], "providedExports": [ "ShaderCodeNode" ], "optimizationBailout": [], "depth": 4, "source": "import { StringTools } from '../../Misc/stringTools';\r\n/** @hidden */\r\nvar ShaderCodeNode = /** @class */ (function () {\r\n function ShaderCodeNode() {\r\n this.children = [];\r\n }\r\n ShaderCodeNode.prototype.isValid = function (preprocessors) {\r\n return true;\r\n };\r\n ShaderCodeNode.prototype.process = function (preprocessors, options) {\r\n var result = \"\";\r\n if (this.line) {\r\n var value = this.line;\r\n var processor = options.processor;\r\n if (processor) {\r\n // This must be done before other replacements to avoid mistakenly changing something that was already changed.\r\n if (processor.lineProcessor) {\r\n value = processor.lineProcessor(value, options.isFragment);\r\n }\r\n if (processor.attributeProcessor && StringTools.StartsWith(this.line, \"attribute\")) {\r\n value = processor.attributeProcessor(this.line);\r\n }\r\n else if (processor.varyingProcessor && StringTools.StartsWith(this.line, \"varying\")) {\r\n value = processor.varyingProcessor(this.line, options.isFragment);\r\n }\r\n else if ((processor.uniformProcessor || processor.uniformBufferProcessor) && StringTools.StartsWith(this.line, \"uniform\")) {\r\n var regex = /uniform (.+) (.+)/;\r\n if (regex.test(this.line)) { // uniform\r\n if (processor.uniformProcessor) {\r\n value = processor.uniformProcessor(this.line, options.isFragment);\r\n }\r\n }\r\n else { // Uniform buffer\r\n if (processor.uniformBufferProcessor) {\r\n value = processor.uniformBufferProcessor(this.line, options.isFragment);\r\n options.lookForClosingBracketForUniformBuffer = true;\r\n }\r\n }\r\n }\r\n if (processor.endOfUniformBufferProcessor) {\r\n if (options.lookForClosingBracketForUniformBuffer && this.line.indexOf(\"}\") !== -1) {\r\n options.lookForClosingBracketForUniformBuffer = false;\r\n value = processor.endOfUniformBufferProcessor(this.line, options.isFragment);\r\n }\r\n }\r\n }\r\n result += value + \"\\r\\n\";\r\n }\r\n this.children.forEach(function (child) {\r\n result += child.process(preprocessors, options);\r\n });\r\n if (this.additionalDefineKey) {\r\n preprocessors[this.additionalDefineKey] = this.additionalDefineValue || \"true\";\r\n }\r\n return result;\r\n };\r\n return ShaderCodeNode;\r\n}());\r\nexport { ShaderCodeNode };\r\n//# sourceMappingURL=shaderCodeNode.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js", "index": 14, "index2": 10, "size": 603, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "profile": { "factory": 25, "building": 9, "dependencies": 2 } } ], "profile": { "factory": 6, "building": 12, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "./shaderCodeTestNode", "loc": "4:0-58" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "./shaderCodeTestNode", "loc": "87:23-41" } ], "providedExports": [ "ShaderCodeTestNode" ], "optimizationBailout": [], "depth": 4, "source": "import * as tslib_1 from \"tslib\";\r\nimport { ShaderCodeNode } from './shaderCodeNode';\r\n/** @hidden */\r\nvar ShaderCodeTestNode = /** @class */ (function (_super) {\r\n tslib_1.__extends(ShaderCodeTestNode, _super);\r\n function ShaderCodeTestNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderCodeTestNode.prototype.isValid = function (preprocessors) {\r\n return this.testExpression.isTrue(preprocessors);\r\n };\r\n return ShaderCodeTestNode;\r\n}(ShaderCodeNode));\r\nexport { ShaderCodeTestNode };\r\n//# sourceMappingURL=shaderCodeTestNode.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "index": 9, "index2": 21, "size": 14076, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "issuerId": "../../.temp/packageES6Dev/core/Materials/effect.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } } ], "profile": { "factory": 25, "building": 9, "dependencies": 2 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony side effect evaluation", "userRequest": "../Engines/Processors/shaderProcessor", "loc": "5:0-72" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Engines/Processors/shaderProcessor", "loc": "281:16-31" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Engines/Processors/shaderProcessor", "loc": "283:20-35" } ], "providedExports": [ "ShaderProcessor" ], "optimizationBailout": [], "depth": 3, "source": "import { ShaderCodeNode } from './shaderCodeNode';\r\nimport { ShaderCodeCursor } from './shaderCodeCursor';\r\nimport { ShaderCodeConditionNode } from './shaderCodeConditionNode';\r\nimport { ShaderCodeTestNode } from './shaderCodeTestNode';\r\nimport { ShaderDefineIsDefinedOperator } from './Expressions/Operators/shaderDefineIsDefinedOperator';\r\nimport { ShaderDefineOrOperator } from './Expressions/Operators/shaderDefineOrOperator';\r\nimport { ShaderDefineAndOperator } from './Expressions/Operators/shaderDefineAndOperator';\r\nimport { ShaderDefineArithmeticOperator } from './Expressions/Operators/shaderDefineArithmeticOperator';\r\nimport { FileTools } from '../../Misc/fileTools';\r\n/** @hidden */\r\nvar ShaderProcessor = /** @class */ (function () {\r\n function ShaderProcessor() {\r\n }\r\n ShaderProcessor.Process = function (sourceCode, options, callback) {\r\n var _this = this;\r\n this._ProcessIncludes(sourceCode, options, function (codeWithIncludes) {\r\n var migratedCode = _this._ProcessShaderConversion(codeWithIncludes, options);\r\n callback(migratedCode);\r\n });\r\n };\r\n ShaderProcessor._ProcessPrecision = function (source, options) {\r\n var shouldUseHighPrecisionShader = options.shouldUseHighPrecisionShader;\r\n if (source.indexOf(\"precision highp float\") === -1) {\r\n if (!shouldUseHighPrecisionShader) {\r\n source = \"precision mediump float;\\n\" + source;\r\n }\r\n else {\r\n source = \"precision highp float;\\n\" + source;\r\n }\r\n }\r\n else {\r\n if (!shouldUseHighPrecisionShader) { // Moving highp to mediump\r\n source = source.replace(\"precision highp float\", \"precision mediump float\");\r\n }\r\n }\r\n return source;\r\n };\r\n ShaderProcessor._ExtractOperation = function (expression) {\r\n var regex = /defined\\((.+)\\)/;\r\n var match = regex.exec(expression);\r\n if (match && match.length) {\r\n return new ShaderDefineIsDefinedOperator(match[1].trim(), expression[0] === \"!\");\r\n }\r\n var operators = [\"==\", \">=\", \"<=\", \"<\", \">\"];\r\n var operator = \"\";\r\n var indexOperator = 0;\r\n for (var _i = 0, operators_1 = operators; _i < operators_1.length; _i++) {\r\n operator = operators_1[_i];\r\n indexOperator = expression.indexOf(operator);\r\n if (indexOperator > -1) {\r\n break;\r\n }\r\n }\r\n if (indexOperator === -1) {\r\n return new ShaderDefineIsDefinedOperator(expression);\r\n }\r\n var define = expression.substring(0, indexOperator).trim();\r\n var value = expression.substring(indexOperator + operator.length).trim();\r\n return new ShaderDefineArithmeticOperator(define, operator, value);\r\n };\r\n ShaderProcessor._BuildSubExpression = function (expression) {\r\n var indexOr = expression.indexOf(\"||\");\r\n if (indexOr === -1) {\r\n var indexAnd = expression.indexOf(\"&&\");\r\n if (indexAnd > -1) {\r\n var andOperator = new ShaderDefineAndOperator();\r\n var leftPart = expression.substring(0, indexAnd).trim();\r\n var rightPart = expression.substring(indexAnd + 2).trim();\r\n andOperator.leftOperand = this._BuildSubExpression(leftPart);\r\n andOperator.rightOperand = this._BuildSubExpression(rightPart);\r\n return andOperator;\r\n }\r\n else {\r\n return this._ExtractOperation(expression);\r\n }\r\n }\r\n else {\r\n var orOperator = new ShaderDefineOrOperator();\r\n var leftPart = expression.substring(0, indexOr).trim();\r\n var rightPart = expression.substring(indexOr + 2).trim();\r\n orOperator.leftOperand = this._BuildSubExpression(leftPart);\r\n orOperator.rightOperand = this._BuildSubExpression(rightPart);\r\n return orOperator;\r\n }\r\n };\r\n ShaderProcessor._BuildExpression = function (line, start) {\r\n var node = new ShaderCodeTestNode();\r\n var command = line.substring(0, start);\r\n var expression = line.substring(start).trim();\r\n if (command === \"#ifdef\") {\r\n node.testExpression = new ShaderDefineIsDefinedOperator(expression);\r\n }\r\n else if (command === \"#ifndef\") {\r\n node.testExpression = new ShaderDefineIsDefinedOperator(expression, true);\r\n }\r\n else {\r\n node.testExpression = this._BuildSubExpression(expression);\r\n }\r\n return node;\r\n };\r\n ShaderProcessor._MoveCursorWithinIf = function (cursor, rootNode, ifNode) {\r\n var line = cursor.currentLine;\r\n while (this._MoveCursor(cursor, ifNode)) {\r\n line = cursor.currentLine;\r\n var first5 = line.substring(0, 5).toLowerCase();\r\n if (first5 === \"#else\") {\r\n var elseNode = new ShaderCodeNode();\r\n rootNode.children.push(elseNode);\r\n this._MoveCursor(cursor, elseNode);\r\n return;\r\n }\r\n else if (first5 === \"#elif\") {\r\n var elifNode = this._BuildExpression(line, 5);\r\n rootNode.children.push(elifNode);\r\n ifNode = elifNode;\r\n }\r\n }\r\n };\r\n ShaderProcessor._MoveCursor = function (cursor, rootNode) {\r\n while (cursor.canRead) {\r\n cursor.lineIndex++;\r\n var line = cursor.currentLine;\r\n var keywords = /(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;\r\n var matches = keywords.exec(line);\r\n if (matches && matches.length) {\r\n var keyword = matches[0];\r\n switch (keyword) {\r\n case \"#ifdef\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n rootNode.children.push(newRootNode);\r\n var ifNode = this._BuildExpression(line, 6);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n case \"#else\":\r\n case \"#elif\":\r\n return true;\r\n case \"#endif\":\r\n return false;\r\n case \"#ifndef\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n rootNode.children.push(newRootNode);\r\n var ifNode = this._BuildExpression(line, 7);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n case \"#if\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n var ifNode = this._BuildExpression(line, 3);\r\n rootNode.children.push(newRootNode);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n var newNode = new ShaderCodeNode();\r\n newNode.line = line;\r\n rootNode.children.push(newNode);\r\n // Detect additional defines\r\n if (line[0] === \"#\" && line[1] === \"d\") {\r\n var split = line.replace(\";\", \"\").split(\" \");\r\n newNode.additionalDefineKey = split[1];\r\n if (split.length === 3) {\r\n newNode.additionalDefineValue = split[2];\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ShaderProcessor._EvaluatePreProcessors = function (sourceCode, preprocessors, options) {\r\n var rootNode = new ShaderCodeNode();\r\n var cursor = new ShaderCodeCursor();\r\n cursor.lineIndex = -1;\r\n cursor.lines = sourceCode.split(\"\\n\");\r\n // Decompose (We keep it in 2 steps so it is easier to maintain and perf hit is insignificant)\r\n this._MoveCursor(cursor, rootNode);\r\n // Recompose\r\n return rootNode.process(preprocessors, options);\r\n };\r\n ShaderProcessor._PreparePreProcessors = function (options) {\r\n var defines = options.defines;\r\n var preprocessors = {};\r\n for (var _i = 0, defines_1 = defines; _i < defines_1.length; _i++) {\r\n var define = defines_1[_i];\r\n var keyValue = define.replace(\"#define\", \"\").replace(\";\", \"\").trim();\r\n var split = keyValue.split(\" \");\r\n preprocessors[split[0]] = split.length > 1 ? split[1] : \"\";\r\n }\r\n preprocessors[\"GL_ES\"] = \"true\";\r\n preprocessors[\"__VERSION__\"] = options.version;\r\n preprocessors[options.platformName] = \"true\";\r\n return preprocessors;\r\n };\r\n ShaderProcessor._ProcessShaderConversion = function (sourceCode, options) {\r\n var preparedSourceCode = this._ProcessPrecision(sourceCode, options);\r\n if (!options.processor) {\r\n return preparedSourceCode;\r\n }\r\n // Already converted\r\n if (preparedSourceCode.indexOf(\"#version 3\") !== -1) {\r\n return preparedSourceCode.replace(\"#version 300 es\", \"\");\r\n }\r\n var defines = options.defines;\r\n var preprocessors = this._PreparePreProcessors(options);\r\n // General pre processing\r\n if (options.processor.preProcessor) {\r\n preparedSourceCode = options.processor.preProcessor(preparedSourceCode, defines, options.isFragment);\r\n }\r\n preparedSourceCode = this._EvaluatePreProcessors(preparedSourceCode, preprocessors, options);\r\n // Post processing\r\n if (options.processor.postProcessor) {\r\n preparedSourceCode = options.processor.postProcessor(preparedSourceCode, defines, options.isFragment);\r\n }\r\n return preparedSourceCode;\r\n };\r\n ShaderProcessor._ProcessIncludes = function (sourceCode, options, callback) {\r\n var _this = this;\r\n var regex = /#include<(.+)>(\\((.*)\\))*(\\[(.*)\\])*/g;\r\n var match = regex.exec(sourceCode);\r\n var returnValue = new String(sourceCode);\r\n while (match != null) {\r\n var includeFile = match[1];\r\n // Uniform declaration\r\n if (includeFile.indexOf(\"__decl__\") !== -1) {\r\n includeFile = includeFile.replace(/__decl__/, \"\");\r\n if (options.supportsUniformBuffers) {\r\n includeFile = includeFile.replace(/Vertex/, \"Ubo\");\r\n includeFile = includeFile.replace(/Fragment/, \"Ubo\");\r\n }\r\n includeFile = includeFile + \"Declaration\";\r\n }\r\n if (options.includesShadersStore[includeFile]) {\r\n // Substitution\r\n var includeContent = options.includesShadersStore[includeFile];\r\n if (match[2]) {\r\n var splits = match[3].split(\",\");\r\n for (var index = 0; index < splits.length; index += 2) {\r\n var source = new RegExp(splits[index], \"g\");\r\n var dest = splits[index + 1];\r\n includeContent = includeContent.replace(source, dest);\r\n }\r\n }\r\n if (match[4]) {\r\n var indexString = match[5];\r\n if (indexString.indexOf(\"..\") !== -1) {\r\n var indexSplits = indexString.split(\"..\");\r\n var minIndex = parseInt(indexSplits[0]);\r\n var maxIndex = parseInt(indexSplits[1]);\r\n var sourceIncludeContent = includeContent.slice(0);\r\n includeContent = \"\";\r\n if (isNaN(maxIndex)) {\r\n maxIndex = options.indexParameters[indexSplits[1]];\r\n }\r\n for (var i = minIndex; i < maxIndex; i++) {\r\n if (!options.supportsUniformBuffers) {\r\n // Ubo replacement\r\n sourceIncludeContent = sourceIncludeContent.replace(/light\\{X\\}.(\\w*)/g, function (str, p1) {\r\n return p1 + \"{X}\";\r\n });\r\n }\r\n includeContent += sourceIncludeContent.replace(/\\{X\\}/g, i.toString()) + \"\\n\";\r\n }\r\n }\r\n else {\r\n if (!options.supportsUniformBuffers) {\r\n // Ubo replacement\r\n includeContent = includeContent.replace(/light\\{X\\}.(\\w*)/g, function (str, p1) {\r\n return p1 + \"{X}\";\r\n });\r\n }\r\n includeContent = includeContent.replace(/\\{X\\}/g, indexString);\r\n }\r\n }\r\n // Replace\r\n returnValue = returnValue.replace(match[0], includeContent);\r\n }\r\n else {\r\n var includeShaderUrl = options.shadersRepository + \"ShadersInclude/\" + includeFile + \".fx\";\r\n FileTools.LoadFile(includeShaderUrl, function (fileContent) {\r\n options.includesShadersStore[includeFile] = fileContent;\r\n _this._ProcessIncludes(returnValue, options, callback);\r\n });\r\n return;\r\n }\r\n match = regex.exec(sourceCode);\r\n }\r\n callback(returnValue);\r\n };\r\n return ShaderProcessor;\r\n}());\r\nexport { ShaderProcessor };\r\n//# sourceMappingURL=shaderProcessor.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/WebGL/webGL2ShaderProcessors.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\WebGL\\webGL2ShaderProcessors.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/WebGL/webGL2ShaderProcessors.js", "index": 34, "index2": 32, "size": 1975, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "./WebGL/webGL2ShaderProcessors", "loc": "15:0-71" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./WebGL/webGL2ShaderProcessors", "loc": "301:40-61" } ], "providedExports": [ "WebGL2ShaderProcessor" ], "optimizationBailout": [], "depth": 2, "source": "/** @hidden */\r\nvar WebGL2ShaderProcessor = /** @class */ (function () {\r\n function WebGL2ShaderProcessor() {\r\n }\r\n WebGL2ShaderProcessor.prototype.attributeProcessor = function (attribute) {\r\n return attribute.replace(\"attribute\", \"in\");\r\n };\r\n WebGL2ShaderProcessor.prototype.varyingProcessor = function (varying, isFragment) {\r\n return varying.replace(\"varying\", isFragment ? \"in\" : \"out\");\r\n };\r\n WebGL2ShaderProcessor.prototype.postProcessor = function (code, defines, isFragment) {\r\n var hasDrawBuffersExtension = code.search(/#extension.+GL_EXT_draw_buffers.+require/) !== -1;\r\n // Remove extensions\r\n var regex = /#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g;\r\n code = code.replace(regex, \"\");\r\n // Replace instructions\r\n code = code.replace(/texture2D\\s*\\(/g, \"texture(\");\r\n if (isFragment) {\r\n code = code.replace(/texture2DLodEXT\\s*\\(/g, \"textureLod(\");\r\n code = code.replace(/textureCubeLodEXT\\s*\\(/g, \"textureLod(\");\r\n code = code.replace(/textureCube\\s*\\(/g, \"texture(\");\r\n code = code.replace(/gl_FragDepthEXT/g, \"gl_FragDepth\");\r\n code = code.replace(/gl_FragColor/g, \"glFragColor\");\r\n code = code.replace(/gl_FragData/g, \"glFragData\");\r\n code = code.replace(/void\\s+?main\\s*\\(/g, (hasDrawBuffersExtension ? \"\" : \"out vec4 glFragColor;\\n\") + \"void main(\");\r\n }\r\n else {\r\n var hasMultiviewExtension = defines.indexOf(\"#define MULTIVIEW\") !== -1;\r\n if (hasMultiviewExtension) {\r\n return \"#extension GL_OVR_multiview2 : require\\nlayout (num_views = 2) in;\\n\" + code;\r\n }\r\n }\r\n return code;\r\n };\r\n return WebGL2ShaderProcessor;\r\n}());\r\nexport { WebGL2ShaderProcessor };\r\n//# sourceMappingURL=webGL2ShaderProcessors.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/WebGL/webGLPipelineContext.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\WebGL\\webGLPipelineContext.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/WebGL/webGLPipelineContext.js", "index": 37, "index2": 35, "size": 1078, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "./WebGL/webGLPipelineContext", "loc": "17:0-68" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./WebGL/webGLPipelineContext", "loc": "1758:34-54" } ], "providedExports": [ "WebGLPipelineContext" ], "optimizationBailout": [], "depth": 2, "source": "/** @hidden */\r\nvar WebGLPipelineContext = /** @class */ (function () {\r\n function WebGLPipelineContext() {\r\n }\r\n Object.defineProperty(WebGLPipelineContext.prototype, \"isAsync\", {\r\n get: function () {\r\n return this.isParallelCompiled;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebGLPipelineContext.prototype, \"isReady\", {\r\n get: function () {\r\n if (this.program) {\r\n if (this.isParallelCompiled) {\r\n return this.engine._isRenderingStateCompiled(this);\r\n }\r\n return true;\r\n }\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n WebGLPipelineContext.prototype._handlesSpectorRebuildCallback = function (onCompiled) {\r\n if (onCompiled && this.program) {\r\n onCompiled(this.program);\r\n }\r\n };\r\n return WebGLPipelineContext;\r\n}());\r\nexport { WebGLPipelineContext };\r\n//# sourceMappingURL=webGLPipelineContext.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/constants.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\constants.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/constants.js", "index": 6, "index2": 3, "size": 19306, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "./constants", "loc": "11:0-40" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "444:84-93" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "444:128-137" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "457:91-100" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "457:135-144" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "472:80-89" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "472:110-119" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "472:160-169" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1569:45-54" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1569:83-92" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1578:28-37" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1588:43-52" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1588:81-90" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1634:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1636:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1638:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1641:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1643:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1645:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1647:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1649:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "1651:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2263:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2272:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2281:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2290:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2299:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2308:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2317:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2321:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2325:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2334:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2343:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2347:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2387:54-63" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2572:38-47" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2607:52-61" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2663:79-88" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2675:73-82" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2699:59-68" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2699:101-110" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2700:31-40" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2710:62-71" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "2922:54-63" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3109:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3111:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3113:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3138:44-53" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3199:67-76" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3199:127-136" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3257:45-54" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3258:48-57" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3259:48-57" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3380:44-53" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3386:44-53" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3432:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3434:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3436:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3438:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3440:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3442:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3448:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3450:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3452:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3454:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3456:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3458:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3460:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3462:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3464:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3466:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3468:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3470:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3472:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3474:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3476:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3478:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3487:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3490:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3493:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3496:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3499:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3502:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3505:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3511:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3514:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3517:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3520:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3532:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3534:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3536:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3543:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3545:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3547:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3549:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3551:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3553:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3555:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3557:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3562:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3564:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3566:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3568:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3570:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3572:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3574:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3576:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3578:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3580:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3582:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3584:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3589:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3591:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3593:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3595:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3597:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3602:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3604:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3606:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3608:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3610:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3615:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3617:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3619:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3621:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3623:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3628:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3630:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3632:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3634:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3636:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3641:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3643:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3645:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3647:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3649:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3654:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3656:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3658:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3660:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3662:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3667:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3669:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3671:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3673:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3675:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3677:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3679:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3681:25-34" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3691:21-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3694:26-35" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3771:38-47" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3774:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3777:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./constants", "loc": "3780:17-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "type": "harmony side effect evaluation", "userRequest": "../../Engines/constants", "loc": "3:0-52" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "type": "harmony import specifier", "userRequest": "../../Engines/constants", "loc": "276:61-70" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony side effect evaluation", "userRequest": "../Engines/constants", "loc": "2:0-49" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Engines/constants", "loc": "580:50-59" }, { "moduleId": "../../.temp/packageES6Dev/core/States/stencilState.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\stencilState.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "type": "harmony side effect evaluation", "userRequest": "../Engines/constants", "loc": "1:0-49" }, { "moduleId": "../../.temp/packageES6Dev/core/States/stencilState.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\stencilState.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "type": "harmony import specifier", "userRequest": "../Engines/constants", "loc": "177:26-35" }, { "moduleId": "../../.temp/packageES6Dev/core/States/stencilState.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\stencilState.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "type": "harmony import specifier", "userRequest": "../Engines/constants", "loc": "179:24-33" }, { "moduleId": "../../.temp/packageES6Dev/core/States/stencilState.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\stencilState.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js", "type": "harmony import specifier", "userRequest": "../Engines/constants", "loc": "181:27-36" } ], "providedExports": [ "Constants" ], "optimizationBailout": [], "depth": 2, "source": "/** Defines the cross module used constants to avoid circular dependncies */\r\nvar Constants = /** @class */ (function () {\r\n function Constants() {\r\n }\r\n /** Defines that alpha blending is disabled */\r\n Constants.ALPHA_DISABLE = 0;\r\n /** Defines that alpha blending to SRC ALPHA * SRC + DEST */\r\n Constants.ALPHA_ADD = 1;\r\n /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */\r\n Constants.ALPHA_COMBINE = 2;\r\n /** Defines that alpha blending to DEST - SRC * DEST */\r\n Constants.ALPHA_SUBTRACT = 3;\r\n /** Defines that alpha blending to SRC * DEST */\r\n Constants.ALPHA_MULTIPLY = 4;\r\n /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */\r\n Constants.ALPHA_MAXIMIZED = 5;\r\n /** Defines that alpha blending to SRC + DEST */\r\n Constants.ALPHA_ONEONE = 6;\r\n /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */\r\n Constants.ALPHA_PREMULTIPLIED = 7;\r\n /**\r\n * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST\r\n * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA\r\n */\r\n Constants.ALPHA_PREMULTIPLIED_PORTERDUFF = 8;\r\n /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */\r\n Constants.ALPHA_INTERPOLATE = 9;\r\n /**\r\n * Defines that alpha blending to SRC + (1 - SRC) * DEST\r\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA\r\n */\r\n Constants.ALPHA_SCREENMODE = 10;\r\n /**\r\n * Defines that alpha blending to SRC + DST\r\n * Alpha will be set to SRC ALPHA + DST ALPHA\r\n */\r\n Constants.ALPHA_ONEONE_ONEONE = 11;\r\n /**\r\n * Defines that alpha blending to SRC * DST ALPHA + DST\r\n * Alpha will be set to 0\r\n */\r\n Constants.ALPHA_ALPHATOCOLOR = 12;\r\n /**\r\n * Defines that alpha blending to SRC * (1 - DST) + DST * (1 - SRC)\r\n */\r\n Constants.ALPHA_REVERSEONEMINUS = 13;\r\n /**\r\n * Defines that alpha blending to SRC + DST * (1 - SRC ALPHA)\r\n * Alpha will be set to SRC ALPHA + DST ALPHA * (1 - SRC ALPHA)\r\n */\r\n Constants.ALPHA_SRC_DSTONEMINUSSRCALPHA = 14;\r\n /**\r\n * Defines that alpha blending to SRC + DST\r\n * Alpha will be set to SRC ALPHA\r\n */\r\n Constants.ALPHA_ONEONE_ONEZERO = 15;\r\n /** Defines that alpha blending equation a SUM */\r\n Constants.ALPHA_EQUATION_ADD = 0;\r\n /** Defines that alpha blending equation a SUBSTRACTION */\r\n Constants.ALPHA_EQUATION_SUBSTRACT = 1;\r\n /** Defines that alpha blending equation a REVERSE SUBSTRACTION */\r\n Constants.ALPHA_EQUATION_REVERSE_SUBTRACT = 2;\r\n /** Defines that alpha blending equation a MAX operation */\r\n Constants.ALPHA_EQUATION_MAX = 3;\r\n /** Defines that alpha blending equation a MIN operation */\r\n Constants.ALPHA_EQUATION_MIN = 4;\r\n /**\r\n * Defines that alpha blending equation a DARKEN operation:\r\n * It takes the min of the src and sums the alpha channels.\r\n */\r\n Constants.ALPHA_EQUATION_DARKEN = 5;\r\n /** Defines that the ressource is not delayed*/\r\n Constants.DELAYLOADSTATE_NONE = 0;\r\n /** Defines that the ressource was successfully delay loaded */\r\n Constants.DELAYLOADSTATE_LOADED = 1;\r\n /** Defines that the ressource is currently delay loading */\r\n Constants.DELAYLOADSTATE_LOADING = 2;\r\n /** Defines that the ressource is delayed and has not started loading */\r\n Constants.DELAYLOADSTATE_NOTLOADED = 4;\r\n // Depht or Stencil test Constants.\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */\r\n Constants.NEVER = 0x0200;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\r\n Constants.ALWAYS = 0x0207;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */\r\n Constants.LESS = 0x0201;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */\r\n Constants.EQUAL = 0x0202;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */\r\n Constants.LEQUAL = 0x0203;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */\r\n Constants.GREATER = 0x0204;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */\r\n Constants.GEQUAL = 0x0206;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */\r\n Constants.NOTEQUAL = 0x0205;\r\n // Stencil Actions Constants.\r\n /** Passed to stencilOperation to specify that stencil value must be kept */\r\n Constants.KEEP = 0x1E00;\r\n /** Passed to stencilOperation to specify that stencil value must be replaced */\r\n Constants.REPLACE = 0x1E01;\r\n /** Passed to stencilOperation to specify that stencil value must be incremented */\r\n Constants.INCR = 0x1E02;\r\n /** Passed to stencilOperation to specify that stencil value must be decremented */\r\n Constants.DECR = 0x1E03;\r\n /** Passed to stencilOperation to specify that stencil value must be inverted */\r\n Constants.INVERT = 0x150A;\r\n /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */\r\n Constants.INCR_WRAP = 0x8507;\r\n /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */\r\n Constants.DECR_WRAP = 0x8508;\r\n /** Texture is not repeating outside of 0..1 UVs */\r\n Constants.TEXTURE_CLAMP_ADDRESSMODE = 0;\r\n /** Texture is repeating outside of 0..1 UVs */\r\n Constants.TEXTURE_WRAP_ADDRESSMODE = 1;\r\n /** Texture is repeating and mirrored */\r\n Constants.TEXTURE_MIRROR_ADDRESSMODE = 2;\r\n /** ALPHA */\r\n Constants.TEXTUREFORMAT_ALPHA = 0;\r\n /** LUMINANCE */\r\n Constants.TEXTUREFORMAT_LUMINANCE = 1;\r\n /** LUMINANCE_ALPHA */\r\n Constants.TEXTUREFORMAT_LUMINANCE_ALPHA = 2;\r\n /** RGB */\r\n Constants.TEXTUREFORMAT_RGB = 4;\r\n /** RGBA */\r\n Constants.TEXTUREFORMAT_RGBA = 5;\r\n /** RED */\r\n Constants.TEXTUREFORMAT_RED = 6;\r\n /** RED (2nd reference) */\r\n Constants.TEXTUREFORMAT_R = 6;\r\n /** RG */\r\n Constants.TEXTUREFORMAT_RG = 7;\r\n /** RED_INTEGER */\r\n Constants.TEXTUREFORMAT_RED_INTEGER = 8;\r\n /** RED_INTEGER (2nd reference) */\r\n Constants.TEXTUREFORMAT_R_INTEGER = 8;\r\n /** RG_INTEGER */\r\n Constants.TEXTUREFORMAT_RG_INTEGER = 9;\r\n /** RGB_INTEGER */\r\n Constants.TEXTUREFORMAT_RGB_INTEGER = 10;\r\n /** RGBA_INTEGER */\r\n Constants.TEXTUREFORMAT_RGBA_INTEGER = 11;\r\n /** UNSIGNED_BYTE */\r\n Constants.TEXTURETYPE_UNSIGNED_BYTE = 0;\r\n /** UNSIGNED_BYTE (2nd reference) */\r\n Constants.TEXTURETYPE_UNSIGNED_INT = 0;\r\n /** FLOAT */\r\n Constants.TEXTURETYPE_FLOAT = 1;\r\n /** HALF_FLOAT */\r\n Constants.TEXTURETYPE_HALF_FLOAT = 2;\r\n /** BYTE */\r\n Constants.TEXTURETYPE_BYTE = 3;\r\n /** SHORT */\r\n Constants.TEXTURETYPE_SHORT = 4;\r\n /** UNSIGNED_SHORT */\r\n Constants.TEXTURETYPE_UNSIGNED_SHORT = 5;\r\n /** INT */\r\n Constants.TEXTURETYPE_INT = 6;\r\n /** UNSIGNED_INT */\r\n Constants.TEXTURETYPE_UNSIGNED_INTEGER = 7;\r\n /** UNSIGNED_SHORT_4_4_4_4 */\r\n Constants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8;\r\n /** UNSIGNED_SHORT_5_5_5_1 */\r\n Constants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9;\r\n /** UNSIGNED_SHORT_5_6_5 */\r\n Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10;\r\n /** UNSIGNED_INT_2_10_10_10_REV */\r\n Constants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11;\r\n /** UNSIGNED_INT_24_8 */\r\n Constants.TEXTURETYPE_UNSIGNED_INT_24_8 = 12;\r\n /** UNSIGNED_INT_10F_11F_11F_REV */\r\n Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13;\r\n /** UNSIGNED_INT_5_9_9_9_REV */\r\n Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14;\r\n /** FLOAT_32_UNSIGNED_INT_24_8_REV */\r\n Constants.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15;\r\n /** nearest is mag = nearest and min = nearest and mip = linear */\r\n Constants.TEXTURE_NEAREST_SAMPLINGMODE = 1;\r\n /** Bilinear is mag = linear and min = linear and mip = nearest */\r\n Constants.TEXTURE_BILINEAR_SAMPLINGMODE = 2;\r\n /** Trilinear is mag = linear and min = linear and mip = linear */\r\n Constants.TEXTURE_TRILINEAR_SAMPLINGMODE = 3;\r\n /** nearest is mag = nearest and min = nearest and mip = linear */\r\n Constants.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 1;\r\n /** Bilinear is mag = linear and min = linear and mip = nearest */\r\n Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 2;\r\n /** Trilinear is mag = linear and min = linear and mip = linear */\r\n Constants.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;\r\n /** mag = nearest and min = nearest and mip = nearest */\r\n Constants.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;\r\n /** mag = nearest and min = linear and mip = nearest */\r\n Constants.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;\r\n /** mag = nearest and min = linear and mip = linear */\r\n Constants.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;\r\n /** mag = nearest and min = linear and mip = none */\r\n Constants.TEXTURE_NEAREST_LINEAR = 7;\r\n /** mag = nearest and min = nearest and mip = none */\r\n Constants.TEXTURE_NEAREST_NEAREST = 8;\r\n /** mag = linear and min = nearest and mip = nearest */\r\n Constants.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;\r\n /** mag = linear and min = nearest and mip = linear */\r\n Constants.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;\r\n /** mag = linear and min = linear and mip = none */\r\n Constants.TEXTURE_LINEAR_LINEAR = 11;\r\n /** mag = linear and min = nearest and mip = none */\r\n Constants.TEXTURE_LINEAR_NEAREST = 12;\r\n /** Explicit coordinates mode */\r\n Constants.TEXTURE_EXPLICIT_MODE = 0;\r\n /** Spherical coordinates mode */\r\n Constants.TEXTURE_SPHERICAL_MODE = 1;\r\n /** Planar coordinates mode */\r\n Constants.TEXTURE_PLANAR_MODE = 2;\r\n /** Cubic coordinates mode */\r\n Constants.TEXTURE_CUBIC_MODE = 3;\r\n /** Projection coordinates mode */\r\n Constants.TEXTURE_PROJECTION_MODE = 4;\r\n /** Skybox coordinates mode */\r\n Constants.TEXTURE_SKYBOX_MODE = 5;\r\n /** Inverse Cubic coordinates mode */\r\n Constants.TEXTURE_INVCUBIC_MODE = 6;\r\n /** Equirectangular coordinates mode */\r\n Constants.TEXTURE_EQUIRECTANGULAR_MODE = 7;\r\n /** Equirectangular Fixed coordinates mode */\r\n Constants.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;\r\n /** Equirectangular Fixed Mirrored coordinates mode */\r\n Constants.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;\r\n // Texture rescaling mode\r\n /** Defines that texture rescaling will use a floor to find the closer power of 2 size */\r\n Constants.SCALEMODE_FLOOR = 1;\r\n /** Defines that texture rescaling will look for the nearest power of 2 size */\r\n Constants.SCALEMODE_NEAREST = 2;\r\n /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */\r\n Constants.SCALEMODE_CEILING = 3;\r\n /**\r\n * The dirty texture flag value\r\n */\r\n Constants.MATERIAL_TextureDirtyFlag = 1;\r\n /**\r\n * The dirty light flag value\r\n */\r\n Constants.MATERIAL_LightDirtyFlag = 2;\r\n /**\r\n * The dirty fresnel flag value\r\n */\r\n Constants.MATERIAL_FresnelDirtyFlag = 4;\r\n /**\r\n * The dirty attribute flag value\r\n */\r\n Constants.MATERIAL_AttributesDirtyFlag = 8;\r\n /**\r\n * The dirty misc flag value\r\n */\r\n Constants.MATERIAL_MiscDirtyFlag = 16;\r\n /**\r\n * The all dirty flag value\r\n */\r\n Constants.MATERIAL_AllDirtyFlag = 31;\r\n /**\r\n * Returns the triangle fill mode\r\n */\r\n Constants.MATERIAL_TriangleFillMode = 0;\r\n /**\r\n * Returns the wireframe mode\r\n */\r\n Constants.MATERIAL_WireFrameFillMode = 1;\r\n /**\r\n * Returns the point fill mode\r\n */\r\n Constants.MATERIAL_PointFillMode = 2;\r\n /**\r\n * Returns the point list draw mode\r\n */\r\n Constants.MATERIAL_PointListDrawMode = 3;\r\n /**\r\n * Returns the line list draw mode\r\n */\r\n Constants.MATERIAL_LineListDrawMode = 4;\r\n /**\r\n * Returns the line loop draw mode\r\n */\r\n Constants.MATERIAL_LineLoopDrawMode = 5;\r\n /**\r\n * Returns the line strip draw mode\r\n */\r\n Constants.MATERIAL_LineStripDrawMode = 6;\r\n /**\r\n * Returns the triangle strip draw mode\r\n */\r\n Constants.MATERIAL_TriangleStripDrawMode = 7;\r\n /**\r\n * Returns the triangle fan draw mode\r\n */\r\n Constants.MATERIAL_TriangleFanDrawMode = 8;\r\n /**\r\n * Stores the clock-wise side orientation\r\n */\r\n Constants.MATERIAL_ClockWiseSideOrientation = 0;\r\n /**\r\n * Stores the counter clock-wise side orientation\r\n */\r\n Constants.MATERIAL_CounterClockWiseSideOrientation = 1;\r\n /**\r\n * Nothing\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_NothingTrigger = 0;\r\n /**\r\n * On pick\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnPickTrigger = 1;\r\n /**\r\n * On left pick\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnLeftPickTrigger = 2;\r\n /**\r\n * On right pick\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnRightPickTrigger = 3;\r\n /**\r\n * On center pick\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnCenterPickTrigger = 4;\r\n /**\r\n * On pick down\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnPickDownTrigger = 5;\r\n /**\r\n * On double pick\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnDoublePickTrigger = 6;\r\n /**\r\n * On pick up\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnPickUpTrigger = 7;\r\n /**\r\n * On pick out.\r\n * This trigger will only be raised if you also declared a OnPickDown\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnPickOutTrigger = 16;\r\n /**\r\n * On long press\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnLongPressTrigger = 8;\r\n /**\r\n * On pointer over\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnPointerOverTrigger = 9;\r\n /**\r\n * On pointer out\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnPointerOutTrigger = 10;\r\n /**\r\n * On every frame\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnEveryFrameTrigger = 11;\r\n /**\r\n * On intersection enter\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnIntersectionEnterTrigger = 12;\r\n /**\r\n * On intersection exit\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnIntersectionExitTrigger = 13;\r\n /**\r\n * On key down\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnKeyDownTrigger = 14;\r\n /**\r\n * On key up\r\n * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers\r\n */\r\n Constants.ACTION_OnKeyUpTrigger = 15;\r\n /**\r\n * Billboard mode will only apply to Y axis\r\n */\r\n Constants.PARTICLES_BILLBOARDMODE_Y = 2;\r\n /**\r\n * Billboard mode will apply to all axes\r\n */\r\n Constants.PARTICLES_BILLBOARDMODE_ALL = 7;\r\n /**\r\n * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction\r\n */\r\n Constants.PARTICLES_BILLBOARDMODE_STRETCHED = 8;\r\n /**\r\n * Gets or sets base Assets URL\r\n */\r\n Constants.PARTICLES_BaseAssetsUrl = \"https://assets.babylonjs.com/particles\";\r\n /** Default culling strategy : this is an exclusion test and it's the more accurate.\r\n * Test order :\r\n * Is the bounding sphere outside the frustum ?\r\n * If not, are the bounding box vertices outside the frustum ?\r\n * It not, then the cullable object is in the frustum.\r\n */\r\n Constants.MESHES_CULLINGSTRATEGY_STANDARD = 0;\r\n /** Culling strategy : Bounding Sphere Only.\r\n * This is an exclusion test. It's faster than the standard strategy because the bounding box is not tested.\r\n * It's also less accurate than the standard because some not visible objects can still be selected.\r\n * Test : is the bounding sphere outside the frustum ?\r\n * If not, then the cullable object is in the frustum.\r\n */\r\n Constants.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1;\r\n /** Culling strategy : Optimistic Inclusion.\r\n * This in an inclusion test first, then the standard exclusion test.\r\n * This can be faster when a cullable object is expected to be almost always in the camera frustum.\r\n * This could also be a little slower than the standard test when the tested object center is not the frustum but one of its bounding box vertex is still inside.\r\n * Anyway, it's as accurate as the standard strategy.\r\n * Test :\r\n * Is the cullable object bounding sphere center in the frustum ?\r\n * If not, apply the default culling strategy.\r\n */\r\n Constants.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2;\r\n /** Culling strategy : Optimistic Inclusion then Bounding Sphere Only.\r\n * This in an inclusion test first, then the bounding sphere only exclusion test.\r\n * This can be the fastest test when a cullable object is expected to be almost always in the camera frustum.\r\n * This could also be a little slower than the BoundingSphereOnly strategy when the tested object center is not in the frustum but its bounding sphere still intersects it.\r\n * It's less accurate than the standard strategy and as accurate as the BoundingSphereOnly strategy.\r\n * Test :\r\n * Is the cullable object bounding sphere center in the frustum ?\r\n * If not, apply the Bounding Sphere Only strategy. No Bounding Box is tested here.\r\n */\r\n Constants.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3;\r\n /**\r\n * No logging while loading\r\n */\r\n Constants.SCENELOADER_NO_LOGGING = 0;\r\n /**\r\n * Minimal logging while loading\r\n */\r\n Constants.SCENELOADER_MINIMAL_LOGGING = 1;\r\n /**\r\n * Summary logging while loading\r\n */\r\n Constants.SCENELOADER_SUMMARY_LOGGING = 2;\r\n /**\r\n * Detailled logging while loading\r\n */\r\n Constants.SCENELOADER_DETAILED_LOGGING = 3;\r\n return Constants;\r\n}());\r\nexport { Constants };\r\n//# sourceMappingURL=constants.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/engineCapabilities.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\engineCapabilities.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/engineCapabilities.js", "index": 26, "index2": 24, "size": 407, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "./engineCapabilities", "loc": "5:0-58" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./engineCapabilities", "loc": "515:25-43" } ], "providedExports": [ "EngineCapabilities" ], "optimizationBailout": [], "depth": 2, "source": "/**\r\n * Class used to describe the capabilities of the engine relatively to the current browser\r\n */\r\nvar EngineCapabilities = /** @class */ (function () {\r\n function EngineCapabilities() {\r\n /** Max number of texture samples for MSAA */\r\n this.maxMSAASamples = 1;\r\n }\r\n return EngineCapabilities;\r\n}());\r\nexport { EngineCapabilities };\r\n//# sourceMappingURL=engineCapabilities.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/engineStore.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\engineStore.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/engineStore.js", "index": 3, "index2": 1, "size": 1486, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "./engineStore", "loc": "2:0-44" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./engineStore", "loc": "2451:20-31" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "./engineStore", "loc": "2452:40-51" } ], "providedExports": [ "EngineStore" ], "optimizationBailout": [], "depth": 2, "source": "/**\r\n * The engine store class is responsible to hold all the instances of Engine and Scene created\r\n * during the life time of the application.\r\n */\r\nvar EngineStore = /** @class */ (function () {\r\n function EngineStore() {\r\n }\r\n Object.defineProperty(EngineStore, \"LastCreatedEngine\", {\r\n /**\r\n * Gets the latest created engine\r\n */\r\n get: function () {\r\n if (this.Instances.length === 0) {\r\n return null;\r\n }\r\n return this.Instances[this.Instances.length - 1];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(EngineStore, \"LastCreatedScene\", {\r\n /**\r\n * Gets the latest created scene\r\n */\r\n get: function () {\r\n return this._LastCreatedScene;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** Gets the list of created engines */\r\n EngineStore.Instances = new Array();\r\n /** @hidden */\r\n EngineStore._LastCreatedScene = null;\r\n /**\r\n * Gets or sets a global variable indicating if fallback texture must be used when a texture cannot be loaded\r\n * @ignorenaming\r\n */\r\n EngineStore.UseFallbackTexture = true;\r\n /**\r\n * Texture content used if a texture cannot loaded\r\n * @ignorenaming\r\n */\r\n EngineStore.FallbackTexture = \"\";\r\n return EngineStore;\r\n}());\r\nexport { EngineStore };\r\n//# sourceMappingURL=engineStore.js.map" }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "index": 1, "index2": 36, "size": 177973, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "issuerId": "./thinEngineOnly.ts", "issuerName": "./thinEngineOnly.ts", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } } ], "profile": { "factory": 6, "building": 110 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "./thinEngineOnly.ts", "moduleIdentifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "module": "./thinEngineOnly.ts", "moduleName": "./thinEngineOnly.ts", "type": "harmony side effect evaluation", "userRequest": "@babylonjs/core/Engines/thinEngine", "loc": "1:0-64" }, { "moduleId": "./thinEngineOnly.ts", "moduleIdentifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "module": "./thinEngineOnly.ts", "moduleName": "./thinEngineOnly.ts", "type": "harmony import specifier", "userRequest": "@babylonjs/core/Engines/thinEngine", "loc": "3:4-14" } ], "providedExports": [ "ThinEngine" ], "optimizationBailout": [], "depth": 1, "source": "import * as tslib_1 from \"tslib\";\r\nimport { EngineStore } from './engineStore';\r\nimport { Effect } from '../Materials/effect';\r\nimport { _DevTools } from '../Misc/devTools';\r\nimport { EngineCapabilities } from './engineCapabilities';\r\nimport { PerfCounter } from '../Misc/perfCounter';\r\nimport { Observable } from '../Misc/observable';\r\nimport { DepthCullingState } from '../States/depthCullingState';\r\nimport { StencilState } from '../States/stencilState';\r\nimport { AlphaState } from '../States/alphaCullingState';\r\nimport { Constants } from './constants';\r\nimport { InternalTexture } from '../Materials/Textures/internalTexture';\r\nimport { Logger } from '../Misc/logger';\r\nimport { DomManagement } from '../Misc/domManagement';\r\nimport { WebGL2ShaderProcessor } from './WebGL/webGL2ShaderProcessors';\r\nimport { WebGLDataBuffer } from '../Meshes/WebGL/webGLDataBuffer';\r\nimport { WebGLPipelineContext } from './WebGL/webGLPipelineContext';\r\nimport { FileTools } from '../Misc/fileTools';\r\n/**\r\n * Keeps track of all the buffer info used in engine.\r\n */\r\nvar BufferPointer = /** @class */ (function () {\r\n function BufferPointer() {\r\n }\r\n return BufferPointer;\r\n}());\r\n/**\r\n * The base engine class (root of all engines)\r\n */\r\nvar ThinEngine = /** @class */ (function () {\r\n /**\r\n * Creates a new engine\r\n * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keyboards, etc...) so no event observables will be available. This is mostly used when Babylon.js is used as a plugin on a system which alreay used the WebGL context\r\n * @param antialias defines enable antialiasing (default: false)\r\n * @param options defines further options to be sent to the getContext() function\r\n * @param adaptToDeviceRatio defines whether to adapt to the device's viewport characteristics (default: false)\r\n */\r\n function ThinEngine(canvasOrContext, antialias, options, adaptToDeviceRatio) {\r\n var _this = this;\r\n if (adaptToDeviceRatio === void 0) { adaptToDeviceRatio = false; }\r\n /**\r\n * Gets or sets a boolean that indicates if textures must be forced to power of 2 size even if not required\r\n */\r\n this.forcePOTTextures = false;\r\n /**\r\n * Gets a boolean indicating if the engine is currently rendering in fullscreen mode\r\n */\r\n this.isFullscreen = false;\r\n /**\r\n * Gets a boolean indicating if the pointer is currently locked\r\n */\r\n this.isPointerLock = false;\r\n /**\r\n * Gets or sets a boolean indicating if back faces must be culled (true by default)\r\n */\r\n this.cullBackFaces = true;\r\n /**\r\n * Gets or sets a boolean indicating if the engine must keep rendering even if the window is not in foregroun\r\n */\r\n this.renderEvenInBackground = true;\r\n /**\r\n * Gets or sets a boolean indicating that cache can be kept between frames\r\n */\r\n this.preventCacheWipeBetweenFrames = false;\r\n /** Gets or sets a boolean indicating if the engine should validate programs after compilation */\r\n this.validateShaderPrograms = false;\r\n // Uniform buffers list\r\n /**\r\n * Gets or sets a boolean indicating that uniform buffers must be disabled even if they are supported\r\n */\r\n this.disableUniformBuffers = false;\r\n /** @hidden */\r\n this._uniformBuffers = new Array();\r\n this._windowIsBackground = false;\r\n this._webGLVersion = 1.0;\r\n this._highPrecisionShadersAllowed = true;\r\n /** @hidden */\r\n this._badOS = false;\r\n /** @hidden */\r\n this._badDesktopOS = false;\r\n this._colorWrite = true;\r\n /** @hidden */\r\n this._drawCalls = new PerfCounter();\r\n this._renderingQueueLaunched = false;\r\n this._activeRenderLoops = new Array();\r\n // Lost context\r\n /**\r\n * Observable signaled when a context lost event is raised\r\n */\r\n this.onContextLostObservable = new Observable();\r\n /**\r\n * Observable signaled when a context restored event is raised\r\n */\r\n this.onContextRestoredObservable = new Observable();\r\n this._contextWasLost = false;\r\n /** @hidden */\r\n this._doNotHandleContextLost = false;\r\n /**\r\n * Gets or sets a boolean indicating that vertex array object must be disabled even if they are supported\r\n */\r\n this.disableVertexArrayObjects = false;\r\n // States\r\n /** @hidden */\r\n this._depthCullingState = new DepthCullingState();\r\n /** @hidden */\r\n this._stencilState = new StencilState();\r\n /** @hidden */\r\n this._alphaState = new AlphaState();\r\n // Cache\r\n /** @hidden */\r\n this._internalTexturesCache = new Array();\r\n /** @hidden */\r\n this._activeChannel = 0;\r\n this._currentTextureChannel = -1;\r\n /** @hidden */\r\n this._boundTexturesCache = {};\r\n this._compiledEffects = {};\r\n this._vertexAttribArraysEnabled = [];\r\n this._uintIndicesCurrentlySet = false;\r\n this._currentBoundBuffer = new Array();\r\n /** @hidden */\r\n this._currentFramebuffer = null;\r\n this._currentBufferPointers = new Array();\r\n this._currentInstanceLocations = new Array();\r\n this._currentInstanceBuffers = new Array();\r\n this._vaoRecordInProgress = false;\r\n this._mustWipeVertexAttributes = false;\r\n this._nextFreeTextureSlots = new Array();\r\n this._maxSimultaneousTextures = 0;\r\n this._activeRequests = new Array();\r\n // Hardware supported Compressed Textures\r\n this._texturesSupported = new Array();\r\n /**\r\n * Defines whether the engine has been created with the premultipliedAlpha option on or not.\r\n */\r\n this.premultipliedAlpha = true;\r\n this._viewportCached = { x: 0, y: 0, z: 0, w: 0 };\r\n this._unpackFlipYCached = null;\r\n /**\r\n * In case you are sharing the context with other applications, it might\r\n * be interested to not cache the unpack flip y state to ensure a consistent\r\n * value would be set.\r\n */\r\n this.enableUnpackFlipYCached = true;\r\n this._boundUniforms = {};\r\n var canvas = null;\r\n if (!canvasOrContext) {\r\n return;\r\n }\r\n options = options || {};\r\n if (canvasOrContext.getContext) {\r\n canvas = canvasOrContext;\r\n this._renderingCanvas = canvas;\r\n if (antialias != null) {\r\n options.antialias = antialias;\r\n }\r\n if (options.deterministicLockstep === undefined) {\r\n options.deterministicLockstep = false;\r\n }\r\n if (options.lockstepMaxSteps === undefined) {\r\n options.lockstepMaxSteps = 4;\r\n }\r\n if (options.preserveDrawingBuffer === undefined) {\r\n options.preserveDrawingBuffer = false;\r\n }\r\n if (options.audioEngine === undefined) {\r\n options.audioEngine = true;\r\n }\r\n if (options.stencil === undefined) {\r\n options.stencil = true;\r\n }\r\n if (options.premultipliedAlpha === false) {\r\n this.premultipliedAlpha = false;\r\n }\r\n this._doNotHandleContextLost = options.doNotHandleContextLost ? true : false;\r\n // Exceptions\r\n if (navigator && navigator.userAgent) {\r\n var ua = navigator.userAgent;\r\n for (var _i = 0, _a = ThinEngine.ExceptionList; _i < _a.length; _i++) {\r\n var exception = _a[_i];\r\n var key = exception.key;\r\n var targets = exception.targets;\r\n var check = new RegExp(key);\r\n if (check.test(ua)) {\r\n if (exception.capture && exception.captureConstraint) {\r\n var capture = exception.capture;\r\n var constraint = exception.captureConstraint;\r\n var regex = new RegExp(capture);\r\n var matches = regex.exec(ua);\r\n if (matches && matches.length > 0) {\r\n var capturedValue = parseInt(matches[matches.length - 1]);\r\n if (capturedValue >= constraint) {\r\n continue;\r\n }\r\n }\r\n }\r\n for (var _b = 0, targets_1 = targets; _b < targets_1.length; _b++) {\r\n var target = targets_1[_b];\r\n switch (target) {\r\n case \"uniformBuffer\":\r\n this.disableUniformBuffers = true;\r\n break;\r\n case \"vao\":\r\n this.disableVertexArrayObjects = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Context lost\r\n if (!this._doNotHandleContextLost) {\r\n this._onContextLost = function (evt) {\r\n evt.preventDefault();\r\n _this._contextWasLost = true;\r\n Logger.Warn(\"WebGL context lost.\");\r\n _this.onContextLostObservable.notifyObservers(_this);\r\n };\r\n this._onContextRestored = function () {\r\n // Adding a timeout to avoid race condition at browser level\r\n setTimeout(function () {\r\n // Rebuild gl context\r\n _this._initGLContext();\r\n // Rebuild effects\r\n _this._rebuildEffects();\r\n // Rebuild textures\r\n _this._rebuildInternalTextures();\r\n // Rebuild buffers\r\n _this._rebuildBuffers();\r\n // Cache\r\n _this.wipeCaches(true);\r\n Logger.Warn(\"WebGL context successfully restored.\");\r\n _this.onContextRestoredObservable.notifyObservers(_this);\r\n _this._contextWasLost = false;\r\n }, 0);\r\n };\r\n canvas.addEventListener(\"webglcontextlost\", this._onContextLost, false);\r\n canvas.addEventListener(\"webglcontextrestored\", this._onContextRestored, false);\r\n options.powerPreference = \"high-performance\";\r\n }\r\n // GL\r\n if (!options.disableWebGL2Support) {\r\n try {\r\n this._gl = (canvas.getContext(\"webgl2\", options) || canvas.getContext(\"experimental-webgl2\", options));\r\n if (this._gl) {\r\n this._webGLVersion = 2.0;\r\n // Prevent weird browsers to lie :-)\r\n if (!this._gl.deleteQuery) {\r\n this._webGLVersion = 1.0;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // Do nothing\r\n }\r\n }\r\n if (!this._gl) {\r\n if (!canvas) {\r\n throw new Error(\"The provided canvas is null or undefined.\");\r\n }\r\n try {\r\n this._gl = (canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options));\r\n }\r\n catch (e) {\r\n throw new Error(\"WebGL not supported\");\r\n }\r\n }\r\n if (!this._gl) {\r\n throw new Error(\"WebGL not supported\");\r\n }\r\n // Ensures a consistent color space unpacking of textures cross browser.\r\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\r\n }\r\n else {\r\n this._gl = canvasOrContext;\r\n this._renderingCanvas = this._gl.canvas;\r\n if (this._gl.renderbufferStorageMultisample) {\r\n this._webGLVersion = 2.0;\r\n }\r\n var attributes = this._gl.getContextAttributes();\r\n if (attributes) {\r\n options.stencil = attributes.stencil;\r\n }\r\n }\r\n if (options.useHighPrecisionFloats !== undefined) {\r\n this._highPrecisionShadersAllowed = options.useHighPrecisionFloats;\r\n }\r\n // Viewport\r\n var devicePixelRatio = DomManagement.IsWindowObjectExist() ? (window.devicePixelRatio || 1.0) : 1.0;\r\n var limitDeviceRatio = options.limitDeviceRatio || devicePixelRatio;\r\n this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;\r\n this.resize();\r\n this._isStencilEnable = options.stencil ? true : false;\r\n this._initGLContext();\r\n // Prepare buffer pointers\r\n for (var i = 0; i < this._caps.maxVertexAttribs; i++) {\r\n this._currentBufferPointers[i] = new BufferPointer();\r\n }\r\n // Shader processor\r\n if (this.webGLVersion > 1) {\r\n this._shaderProcessor = new WebGL2ShaderProcessor();\r\n }\r\n // Detect if we are running on a faulty buggy OS.\r\n this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);\r\n // Detect if we are running on a faulty buggy desktop OS.\r\n this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\n console.log(\"Babylon.js v\" + ThinEngine.Version + \" - \" + this.description);\r\n }\r\n Object.defineProperty(ThinEngine, \"NpmPackage\", {\r\n /**\r\n * Returns the current npm package of the sdk\r\n */\r\n // Not mixed with Version for tooling purpose.\r\n get: function () {\r\n return \"babylonjs@4.1.0-alpha.20\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine, \"Version\", {\r\n /**\r\n * Returns the current version of the framework\r\n */\r\n get: function () {\r\n return \"4.1.0-alpha.20\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"description\", {\r\n /**\r\n * Returns a string describing the current engine\r\n */\r\n get: function () {\r\n var description = \"WebGL\" + this.webGLVersion;\r\n if (this._caps.parallelShaderCompile) {\r\n description += \" - Parallel shader compilation\";\r\n }\r\n return description;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine, \"ShadersRepository\", {\r\n /**\r\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\r\n */\r\n get: function () {\r\n return Effect.ShadersRepository;\r\n },\r\n set: function (value) {\r\n Effect.ShadersRepository = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"supportsUniformBuffers\", {\r\n /**\r\n * Gets a boolean indicating that the engine supports uniform buffers\r\n * @see http://doc.babylonjs.com/features/webgl2#uniform-buffer-objets\r\n */\r\n get: function () {\r\n return this.webGLVersion > 1 && !this.disableUniformBuffers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"_shouldUseHighPrecisionShader\", {\r\n /** @hidden */\r\n get: function () {\r\n return this._caps.highPrecisionShaderSupported && this._highPrecisionShadersAllowed;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"needPOTTextures\", {\r\n /**\r\n * Gets a boolean indicating that only power of 2 textures are supported\r\n * Please note that you can still use non power of 2 textures but in this case the engine will forcefully convert them\r\n */\r\n get: function () {\r\n return this._webGLVersion < 2 || this.forcePOTTextures;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"doNotHandleContextLost\", {\r\n /**\r\n * Gets or sets a boolean indicating if resources should be retained to be able to handle context lost events\r\n * @see http://doc.babylonjs.com/how_to/optimizing_your_scene#handling-webgl-context-lost\r\n */\r\n get: function () {\r\n return this._doNotHandleContextLost;\r\n },\r\n set: function (value) {\r\n this._doNotHandleContextLost = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"_supportsHardwareTextureRescaling\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"texturesSupported\", {\r\n /**\r\n * Gets the list of texture formats supported\r\n */\r\n get: function () {\r\n return this._texturesSupported;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"textureFormatInUse\", {\r\n /**\r\n * Gets the list of texture formats in use\r\n */\r\n get: function () {\r\n return this._textureFormatInUse;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"currentViewport\", {\r\n /**\r\n * Gets the current viewport\r\n */\r\n get: function () {\r\n return this._cachedViewport;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyTexture\", {\r\n /**\r\n * Gets the default empty texture\r\n */\r\n get: function () {\r\n if (!this._emptyTexture) {\r\n this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Constants.TEXTUREFORMAT_RGBA, false, false, Constants.TEXTURE_NEAREST_SAMPLINGMODE);\r\n }\r\n return this._emptyTexture;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyTexture3D\", {\r\n /**\r\n * Gets the default empty 3D texture\r\n */\r\n get: function () {\r\n if (!this._emptyTexture3D) {\r\n this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Constants.TEXTUREFORMAT_RGBA, false, false, Constants.TEXTURE_NEAREST_SAMPLINGMODE);\r\n }\r\n return this._emptyTexture3D;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyCubeTexture\", {\r\n /**\r\n * Gets the default empty cube texture\r\n */\r\n get: function () {\r\n if (!this._emptyCubeTexture) {\r\n var faceData = new Uint8Array(4);\r\n var cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];\r\n this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Constants.TEXTUREFORMAT_RGBA, Constants.TEXTURETYPE_UNSIGNED_INT, false, false, Constants.TEXTURE_NEAREST_SAMPLINGMODE);\r\n }\r\n return this._emptyCubeTexture;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ThinEngine.prototype._rebuildInternalTextures = function () {\r\n var currentState = this._internalTexturesCache.slice(); // Do a copy because the rebuild will add proxies\r\n for (var _i = 0, currentState_1 = currentState; _i < currentState_1.length; _i++) {\r\n var internalTexture = currentState_1[_i];\r\n internalTexture._rebuild();\r\n }\r\n };\r\n ThinEngine.prototype._rebuildEffects = function () {\r\n for (var key in this._compiledEffects) {\r\n var effect = this._compiledEffects[key];\r\n effect._prepareEffect();\r\n }\r\n Effect.ResetCache();\r\n };\r\n /**\r\n * Gets a boolean indicating if all created effects are ready\r\n * @returns true if all effects are ready\r\n */\r\n ThinEngine.prototype.areAllEffectsReady = function () {\r\n for (var key in this._compiledEffects) {\r\n var effect = this._compiledEffects[key];\r\n if (!effect.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n ThinEngine.prototype._rebuildBuffers = function () {\r\n // Uniforms\r\n for (var _i = 0, _a = this._uniformBuffers; _i < _a.length; _i++) {\r\n var uniformBuffer = _a[_i];\r\n uniformBuffer._rebuild();\r\n }\r\n };\r\n ThinEngine.prototype._initGLContext = function () {\r\n // Caps\r\n this._caps = new EngineCapabilities();\r\n this._caps.maxTexturesImageUnits = this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS);\r\n this._caps.maxCombinedTexturesImageUnits = this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);\r\n this._caps.maxVertexTextureImageUnits = this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);\r\n this._caps.maxTextureSize = this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE);\r\n this._caps.maxCubemapTextureSize = this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE);\r\n this._caps.maxRenderTextureSize = this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE);\r\n this._caps.maxVertexAttribs = this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS);\r\n this._caps.maxVaryingVectors = this._gl.getParameter(this._gl.MAX_VARYING_VECTORS);\r\n this._caps.maxFragmentUniformVectors = this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS);\r\n this._caps.maxVertexUniformVectors = this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS);\r\n // Infos\r\n this._glVersion = this._gl.getParameter(this._gl.VERSION);\r\n var rendererInfo = this._gl.getExtension(\"WEBGL_debug_renderer_info\");\r\n if (rendererInfo != null) {\r\n this._glRenderer = this._gl.getParameter(rendererInfo.UNMASKED_RENDERER_WEBGL);\r\n this._glVendor = this._gl.getParameter(rendererInfo.UNMASKED_VENDOR_WEBGL);\r\n }\r\n if (!this._glVendor) {\r\n this._glVendor = \"Unknown vendor\";\r\n }\r\n if (!this._glRenderer) {\r\n this._glRenderer = \"Unknown renderer\";\r\n }\r\n // Constants\r\n this._gl.HALF_FLOAT_OES = 0x8D61; // Half floating-point type (16-bit).\r\n if (this._gl.RGBA16F !== 0x881A) {\r\n this._gl.RGBA16F = 0x881A; // RGBA 16-bit floating-point color-renderable internal sized format.\r\n }\r\n if (this._gl.RGBA32F !== 0x8814) {\r\n this._gl.RGBA32F = 0x8814; // RGBA 32-bit floating-point color-renderable internal sized format.\r\n }\r\n if (this._gl.DEPTH24_STENCIL8 !== 35056) {\r\n this._gl.DEPTH24_STENCIL8 = 35056;\r\n }\r\n // Extensions\r\n this._caps.standardDerivatives = this._webGLVersion > 1 || (this._gl.getExtension('OES_standard_derivatives') !== null);\r\n this._caps.astc = this._gl.getExtension('WEBGL_compressed_texture_astc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_astc');\r\n this._caps.s3tc = this._gl.getExtension('WEBGL_compressed_texture_s3tc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc');\r\n this._caps.pvrtc = this._gl.getExtension('WEBGL_compressed_texture_pvrtc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc');\r\n this._caps.etc1 = this._gl.getExtension('WEBGL_compressed_texture_etc1') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_etc1');\r\n this._caps.etc2 = this._gl.getExtension('WEBGL_compressed_texture_etc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_etc') ||\r\n this._gl.getExtension('WEBGL_compressed_texture_es3_0'); // also a requirement of OpenGL ES 3\r\n this._caps.textureAnisotropicFilterExtension = this._gl.getExtension('EXT_texture_filter_anisotropic') || this._gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || this._gl.getExtension('MOZ_EXT_texture_filter_anisotropic');\r\n this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0;\r\n this._caps.uintIndices = this._webGLVersion > 1 || this._gl.getExtension('OES_element_index_uint') !== null;\r\n this._caps.fragmentDepthSupported = this._webGLVersion > 1 || this._gl.getExtension('EXT_frag_depth') !== null;\r\n this._caps.highPrecisionShaderSupported = false;\r\n this._caps.timerQuery = this._gl.getExtension('EXT_disjoint_timer_query_webgl2') || this._gl.getExtension(\"EXT_disjoint_timer_query\");\r\n if (this._caps.timerQuery) {\r\n if (this._webGLVersion === 1) {\r\n this._gl.getQuery = this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery);\r\n }\r\n this._caps.canUseTimestampForTimerQuery = this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT, this._caps.timerQuery.QUERY_COUNTER_BITS_EXT) > 0;\r\n }\r\n // Checks if some of the format renders first to allow the use of webgl inspector.\r\n this._caps.colorBufferFloat = this._webGLVersion > 1 && this._gl.getExtension('EXT_color_buffer_float');\r\n this._caps.textureFloat = (this._webGLVersion > 1 || this._gl.getExtension('OES_texture_float')) ? true : false;\r\n this._caps.textureFloatLinearFiltering = this._caps.textureFloat && this._gl.getExtension('OES_texture_float_linear') ? true : false;\r\n this._caps.textureFloatRender = this._caps.textureFloat && this._canRenderToFloatFramebuffer() ? true : false;\r\n this._caps.textureHalfFloat = (this._webGLVersion > 1 || this._gl.getExtension('OES_texture_half_float')) ? true : false;\r\n this._caps.textureHalfFloatLinearFiltering = (this._webGLVersion > 1 || (this._caps.textureHalfFloat && this._gl.getExtension('OES_texture_half_float_linear'))) ? true : false;\r\n if (this._webGLVersion > 1) {\r\n this._gl.HALF_FLOAT_OES = 0x140B;\r\n }\r\n this._caps.textureHalfFloatRender = this._caps.textureHalfFloat && this._canRenderToHalfFloatFramebuffer();\r\n this._caps.textureLOD = (this._webGLVersion > 1 || this._gl.getExtension('EXT_shader_texture_lod')) ? true : false;\r\n this._caps.multiview = this._gl.getExtension('OVR_multiview2');\r\n // Draw buffers\r\n if (this._webGLVersion > 1) {\r\n this._caps.drawBuffersExtension = true;\r\n this._caps.maxMSAASamples = this._gl.getParameter(this._gl.MAX_SAMPLES);\r\n }\r\n else {\r\n var drawBuffersExtension = this._gl.getExtension('WEBGL_draw_buffers');\r\n if (drawBuffersExtension !== null) {\r\n this._caps.drawBuffersExtension = true;\r\n this._gl.drawBuffers = drawBuffersExtension.drawBuffersWEBGL.bind(drawBuffersExtension);\r\n this._gl.DRAW_FRAMEBUFFER = this._gl.FRAMEBUFFER;\r\n for (var i = 0; i < 16; i++) {\r\n this._gl[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"] = drawBuffersExtension[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"];\r\n }\r\n }\r\n else {\r\n this._caps.drawBuffersExtension = false;\r\n }\r\n }\r\n // Shader compiler threads\r\n this._caps.parallelShaderCompile = this._gl.getExtension('KHR_parallel_shader_compile');\r\n // Depth Texture\r\n if (this._webGLVersion > 1) {\r\n this._caps.depthTextureExtension = true;\r\n }\r\n else {\r\n var depthTextureExtension = this._gl.getExtension('WEBGL_depth_texture');\r\n if (depthTextureExtension != null) {\r\n this._caps.depthTextureExtension = true;\r\n this._gl.UNSIGNED_INT_24_8 = depthTextureExtension.UNSIGNED_INT_24_8_WEBGL;\r\n }\r\n }\r\n // Vertex array object\r\n if (this.disableVertexArrayObjects) {\r\n this._caps.vertexArrayObject = false;\r\n }\r\n else if (this._webGLVersion > 1) {\r\n this._caps.vertexArrayObject = true;\r\n }\r\n else {\r\n var vertexArrayObjectExtension = this._gl.getExtension('OES_vertex_array_object');\r\n if (vertexArrayObjectExtension != null) {\r\n this._caps.vertexArrayObject = true;\r\n this._gl.createVertexArray = vertexArrayObjectExtension.createVertexArrayOES.bind(vertexArrayObjectExtension);\r\n this._gl.bindVertexArray = vertexArrayObjectExtension.bindVertexArrayOES.bind(vertexArrayObjectExtension);\r\n this._gl.deleteVertexArray = vertexArrayObjectExtension.deleteVertexArrayOES.bind(vertexArrayObjectExtension);\r\n }\r\n else {\r\n this._caps.vertexArrayObject = false;\r\n }\r\n }\r\n // Instances count\r\n if (this._webGLVersion > 1) {\r\n this._caps.instancedArrays = true;\r\n }\r\n else {\r\n var instanceExtension = this._gl.getExtension('ANGLE_instanced_arrays');\r\n if (instanceExtension != null) {\r\n this._caps.instancedArrays = true;\r\n this._gl.drawArraysInstanced = instanceExtension.drawArraysInstancedANGLE.bind(instanceExtension);\r\n this._gl.drawElementsInstanced = instanceExtension.drawElementsInstancedANGLE.bind(instanceExtension);\r\n this._gl.vertexAttribDivisor = instanceExtension.vertexAttribDivisorANGLE.bind(instanceExtension);\r\n }\r\n else {\r\n this._caps.instancedArrays = false;\r\n }\r\n }\r\n // Intelligently add supported compressed formats in order to check for.\r\n // Check for ASTC support first as it is most powerful and to be very cross platform.\r\n // Next PVRTC & DXT, which are probably superior to ETC1/2.\r\n // Likely no hardware which supports both PVR & DXT, so order matters little.\r\n // ETC2 is newer and handles ETC1 (no alpha capability), so check for first.\r\n if (this._caps.astc) {\r\n this.texturesSupported.push('-astc.ktx');\r\n }\r\n if (this._caps.s3tc) {\r\n this.texturesSupported.push('-dxt.ktx');\r\n }\r\n if (this._caps.pvrtc) {\r\n this.texturesSupported.push('-pvrtc.ktx');\r\n }\r\n if (this._caps.etc2) {\r\n this.texturesSupported.push('-etc2.ktx');\r\n }\r\n if (this._caps.etc1) {\r\n this.texturesSupported.push('-etc1.ktx');\r\n }\r\n if (this._gl.getShaderPrecisionFormat) {\r\n var vertex_highp = this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER, this._gl.HIGH_FLOAT);\r\n var fragment_highp = this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER, this._gl.HIGH_FLOAT);\r\n if (vertex_highp && fragment_highp) {\r\n this._caps.highPrecisionShaderSupported = vertex_highp.precision !== 0 && fragment_highp.precision !== 0;\r\n }\r\n }\r\n if (this._webGLVersion > 1) {\r\n this._caps.blendMinMax = true;\r\n }\r\n else {\r\n var blendMinMaxExtension = this._gl.getExtension('EXT_blend_minmax');\r\n if (blendMinMaxExtension != null) {\r\n this._caps.blendMinMax = true;\r\n this._gl.MAX = blendMinMaxExtension.MAX_EXT;\r\n this._gl.MIN = blendMinMaxExtension.MIN_EXT;\r\n }\r\n else {\r\n this._caps.blendMinMax = false;\r\n }\r\n }\r\n // Depth buffer\r\n this._depthCullingState.depthTest = true;\r\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\r\n this._depthCullingState.depthMask = true;\r\n // Texture maps\r\n this._maxSimultaneousTextures = this._caps.maxCombinedTexturesImageUnits;\r\n for (var slot = 0; slot < this._maxSimultaneousTextures; slot++) {\r\n this._nextFreeTextureSlots.push(slot);\r\n }\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"webGLVersion\", {\r\n /**\r\n * Gets version of the current webGL context\r\n */\r\n get: function () {\r\n return this._webGLVersion;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a string idenfifying the name of the class\r\n * @returns \"Engine\" string\r\n */\r\n ThinEngine.prototype.getClassName = function () {\r\n return \"Engine\";\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"isStencilEnable\", {\r\n /**\r\n * Returns true if the stencil buffer has been enabled through the creation option of the context.\r\n */\r\n get: function () {\r\n return this._isStencilEnable;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** @hidden */\r\n ThinEngine.prototype._prepareWorkingCanvas = function () {\r\n if (this._workingCanvas) {\r\n return;\r\n }\r\n this._workingCanvas = document.createElement(\"canvas\");\r\n var context = this._workingCanvas.getContext(\"2d\");\r\n if (context) {\r\n this._workingContext = context;\r\n }\r\n };\r\n /**\r\n * Reset the texture cache to empty state\r\n */\r\n ThinEngine.prototype.resetTextureCache = function () {\r\n for (var key in this._boundTexturesCache) {\r\n if (!this._boundTexturesCache.hasOwnProperty(key)) {\r\n continue;\r\n }\r\n this._boundTexturesCache[key] = null;\r\n }\r\n this._currentTextureChannel = -1;\r\n };\r\n /**\r\n * Gets an object containing information about the current webGL context\r\n * @returns an object containing the vender, the renderer and the version of the current webGL context\r\n */\r\n ThinEngine.prototype.getGlInfo = function () {\r\n return {\r\n vendor: this._glVendor,\r\n renderer: this._glRenderer,\r\n version: this._glVersion\r\n };\r\n };\r\n /**\r\n * Defines the hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @param level defines the level to use\r\n */\r\n ThinEngine.prototype.setHardwareScalingLevel = function (level) {\r\n this._hardwareScalingLevel = level;\r\n this.resize();\r\n };\r\n /**\r\n * Gets the current hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @returns a number indicating the current hardware scaling level\r\n */\r\n ThinEngine.prototype.getHardwareScalingLevel = function () {\r\n return this._hardwareScalingLevel;\r\n };\r\n /**\r\n * Gets the list of loaded textures\r\n * @returns an array containing all loaded textures\r\n */\r\n ThinEngine.prototype.getLoadedTexturesCache = function () {\r\n return this._internalTexturesCache;\r\n };\r\n /**\r\n * Gets the object containing all engine capabilities\r\n * @returns the EngineCapabilities object\r\n */\r\n ThinEngine.prototype.getCaps = function () {\r\n return this._caps;\r\n };\r\n /**\r\n * stop executing a render loop function and remove it from the execution array\r\n * @param renderFunction defines the function to be removed. If not provided all functions will be removed.\r\n */\r\n ThinEngine.prototype.stopRenderLoop = function (renderFunction) {\r\n if (!renderFunction) {\r\n this._activeRenderLoops = [];\r\n return;\r\n }\r\n var index = this._activeRenderLoops.indexOf(renderFunction);\r\n if (index >= 0) {\r\n this._activeRenderLoops.splice(index, 1);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._renderLoop = function () {\r\n if (!this._contextWasLost) {\r\n var shouldRender = true;\r\n if (!this.renderEvenInBackground && this._windowIsBackground) {\r\n shouldRender = false;\r\n }\r\n if (shouldRender) {\r\n // Start new frame\r\n this.beginFrame();\r\n for (var index = 0; index < this._activeRenderLoops.length; index++) {\r\n var renderFunction = this._activeRenderLoops[index];\r\n renderFunction();\r\n }\r\n // Present\r\n this.endFrame();\r\n }\r\n }\r\n if (this._activeRenderLoops.length > 0) {\r\n this._frameHandler = this._queueNewFrame(this._bindedRenderFunction, this.getHostWindow());\r\n }\r\n else {\r\n this._renderingQueueLaunched = false;\r\n }\r\n };\r\n /**\r\n * Gets the HTML canvas attached with the current webGL context\r\n * @returns a HTML canvas\r\n */\r\n ThinEngine.prototype.getRenderingCanvas = function () {\r\n return this._renderingCanvas;\r\n };\r\n /**\r\n * Gets host window\r\n * @returns the host window object\r\n */\r\n ThinEngine.prototype.getHostWindow = function () {\r\n if (this._renderingCanvas && this._renderingCanvas.ownerDocument && this._renderingCanvas.ownerDocument.defaultView) {\r\n return this._renderingCanvas.ownerDocument.defaultView;\r\n }\r\n return window;\r\n };\r\n /**\r\n * Gets the current render width\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render width\r\n */\r\n ThinEngine.prototype.getRenderWidth = function (useScreen) {\r\n if (useScreen === void 0) { useScreen = false; }\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.width;\r\n }\r\n return this._gl.drawingBufferWidth;\r\n };\r\n /**\r\n * Gets the current render height\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render height\r\n */\r\n ThinEngine.prototype.getRenderHeight = function (useScreen) {\r\n if (useScreen === void 0) { useScreen = false; }\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.height;\r\n }\r\n return this._gl.drawingBufferHeight;\r\n };\r\n /**\r\n * Can be used to override the current requestAnimationFrame requester.\r\n * @hidden\r\n */\r\n ThinEngine.prototype._queueNewFrame = function (bindedRenderFunction, requester) {\r\n return ThinEngine.QueueNewFrame(bindedRenderFunction, requester);\r\n };\r\n /**\r\n * Register and execute a render loop. The engine can have more than one render function\r\n * @param renderFunction defines the function to continuously execute\r\n */\r\n ThinEngine.prototype.runRenderLoop = function (renderFunction) {\r\n if (this._activeRenderLoops.indexOf(renderFunction) !== -1) {\r\n return;\r\n }\r\n this._activeRenderLoops.push(renderFunction);\r\n if (!this._renderingQueueLaunched) {\r\n this._renderingQueueLaunched = true;\r\n this._bindedRenderFunction = this._renderLoop.bind(this);\r\n this._frameHandler = this._queueNewFrame(this._bindedRenderFunction, this.getHostWindow());\r\n }\r\n };\r\n /**\r\n * Clear the current render buffer or the current render target (if any is set up)\r\n * @param color defines the color to use\r\n * @param backBuffer defines if the back buffer must be cleared\r\n * @param depth defines if the depth buffer must be cleared\r\n * @param stencil defines if the stencil buffer must be cleared\r\n */\r\n ThinEngine.prototype.clear = function (color, backBuffer, depth, stencil) {\r\n if (stencil === void 0) { stencil = false; }\r\n this.applyStates();\r\n var mode = 0;\r\n if (backBuffer && color) {\r\n this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);\r\n mode |= this._gl.COLOR_BUFFER_BIT;\r\n }\r\n if (depth) {\r\n this._gl.clearDepth(1.0);\r\n mode |= this._gl.DEPTH_BUFFER_BIT;\r\n }\r\n if (stencil) {\r\n this._gl.clearStencil(0);\r\n mode |= this._gl.STENCIL_BUFFER_BIT;\r\n }\r\n this._gl.clear(mode);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._viewport = function (x, y, width, height) {\r\n if (x !== this._viewportCached.x ||\r\n y !== this._viewportCached.y ||\r\n width !== this._viewportCached.z ||\r\n height !== this._viewportCached.w) {\r\n this._viewportCached.x = x;\r\n this._viewportCached.y = y;\r\n this._viewportCached.z = width;\r\n this._viewportCached.w = height;\r\n this._gl.viewport(x, y, width, height);\r\n }\r\n };\r\n /**\r\n * Set the WebGL's viewport\r\n * @param viewport defines the viewport element to be used\r\n * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used\r\n * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used\r\n */\r\n ThinEngine.prototype.setViewport = function (viewport, requiredWidth, requiredHeight) {\r\n var width = requiredWidth || this.getRenderWidth();\r\n var height = requiredHeight || this.getRenderHeight();\r\n var x = viewport.x || 0;\r\n var y = viewport.y || 0;\r\n this._cachedViewport = viewport;\r\n this._viewport(x * width, y * height, width * viewport.width, height * viewport.height);\r\n };\r\n /**\r\n * Begin a new frame\r\n */\r\n ThinEngine.prototype.beginFrame = function () {\r\n };\r\n /**\r\n * Enf the current frame\r\n */\r\n ThinEngine.prototype.endFrame = function () {\r\n // Force a flush in case we are using a bad OS.\r\n if (this._badOS) {\r\n this.flushFramebuffer();\r\n }\r\n };\r\n /**\r\n * Resize the view according to the canvas' size\r\n */\r\n ThinEngine.prototype.resize = function () {\r\n var width = this._renderingCanvas ? this._renderingCanvas.clientWidth : window.innerWidth;\r\n var height = this._renderingCanvas ? this._renderingCanvas.clientHeight : window.innerHeight;\r\n this.setSize(width / this._hardwareScalingLevel, height / this._hardwareScalingLevel);\r\n };\r\n /**\r\n * Force a specific size of the canvas\r\n * @param width defines the new canvas' width\r\n * @param height defines the new canvas' height\r\n */\r\n ThinEngine.prototype.setSize = function (width, height) {\r\n if (!this._renderingCanvas) {\r\n return;\r\n }\r\n width = width | 0;\r\n height = height | 0;\r\n if (this._renderingCanvas.width === width && this._renderingCanvas.height === height) {\r\n return;\r\n }\r\n this._renderingCanvas.width = width;\r\n this._renderingCanvas.height = height;\r\n };\r\n /**\r\n * Binds the frame buffer to the specified texture.\r\n * @param texture The texture to render to or null for the default canvas\r\n * @param faceIndex The face of the texture to render to in case of cube texture\r\n * @param requiredWidth The width of the target to render to\r\n * @param requiredHeight The height of the target to render to\r\n * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true\r\n * @param depthStencilTexture The depth stencil texture to use to render\r\n * @param lodLevel defines le lod level to bind to the frame buffer\r\n */\r\n ThinEngine.prototype.bindFramebuffer = function (texture, faceIndex, requiredWidth, requiredHeight, forceFullscreenViewport, depthStencilTexture, lodLevel) {\r\n if (lodLevel === void 0) { lodLevel = 0; }\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n this._currentRenderTarget = texture;\r\n this._bindUnboundFramebuffer(texture._MSAAFramebuffer ? texture._MSAAFramebuffer : texture._framebuffer);\r\n var gl = this._gl;\r\n if (texture.isCube) {\r\n if (faceIndex === undefined) {\r\n faceIndex = 0;\r\n }\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, texture._webGLTexture, lodLevel);\r\n if (depthStencilTexture) {\r\n if (depthStencilTexture._generateStencilBuffer) {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, depthStencilTexture._webGLTexture, lodLevel);\r\n }\r\n else {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, depthStencilTexture._webGLTexture, lodLevel);\r\n }\r\n }\r\n }\r\n if (this._cachedViewport && !forceFullscreenViewport) {\r\n this.setViewport(this._cachedViewport, requiredWidth, requiredHeight);\r\n }\r\n else {\r\n if (!requiredWidth) {\r\n requiredWidth = texture.width;\r\n if (lodLevel) {\r\n requiredWidth = requiredWidth / Math.pow(2, lodLevel);\r\n }\r\n }\r\n if (!requiredHeight) {\r\n requiredHeight = texture.height;\r\n if (lodLevel) {\r\n requiredHeight = requiredHeight / Math.pow(2, lodLevel);\r\n }\r\n }\r\n this._viewport(0, 0, requiredWidth, requiredHeight);\r\n }\r\n this.wipeCaches();\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindUnboundFramebuffer = function (framebuffer) {\r\n if (this._currentFramebuffer !== framebuffer) {\r\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, framebuffer);\r\n this._currentFramebuffer = framebuffer;\r\n }\r\n };\r\n /**\r\n * Unbind the current render target texture from the webGL context\r\n * @param texture defines the render target texture to unbind\r\n * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated\r\n * @param onBeforeUnbind defines a function which will be called before the effective unbind\r\n */\r\n ThinEngine.prototype.unBindFramebuffer = function (texture, disableGenerateMipMaps, onBeforeUnbind) {\r\n if (disableGenerateMipMaps === void 0) { disableGenerateMipMaps = false; }\r\n this._currentRenderTarget = null;\r\n // If MSAA, we need to bitblt back to main texture\r\n var gl = this._gl;\r\n if (texture._MSAAFramebuffer) {\r\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, texture._MSAAFramebuffer);\r\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, texture._framebuffer);\r\n gl.blitFramebuffer(0, 0, texture.width, texture.height, 0, 0, texture.width, texture.height, gl.COLOR_BUFFER_BIT, gl.NEAREST);\r\n }\r\n if (texture.generateMipMaps && !disableGenerateMipMaps && !texture.isCube) {\r\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n }\r\n if (onBeforeUnbind) {\r\n if (texture._MSAAFramebuffer) {\r\n // Bind the correct framebuffer\r\n this._bindUnboundFramebuffer(texture._framebuffer);\r\n }\r\n onBeforeUnbind();\r\n }\r\n this._bindUnboundFramebuffer(null);\r\n };\r\n /**\r\n * Force a webGL flush (ie. a flush of all waiting webGL commands)\r\n */\r\n ThinEngine.prototype.flushFramebuffer = function () {\r\n this._gl.flush();\r\n };\r\n /**\r\n * Unbind the current render target and bind the default framebuffer\r\n */\r\n ThinEngine.prototype.restoreDefaultFramebuffer = function () {\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n else {\r\n this._bindUnboundFramebuffer(null);\r\n }\r\n if (this._cachedViewport) {\r\n this.setViewport(this._cachedViewport);\r\n }\r\n this.wipeCaches();\r\n };\r\n // VBOs\r\n ThinEngine.prototype._resetVertexBufferBinding = function () {\r\n this.bindArrayBuffer(null);\r\n this._cachedVertexBuffers = null;\r\n };\r\n /**\r\n * Creates a vertex buffer\r\n * @param data the data for the vertex buffer\r\n * @returns the new WebGL static buffer\r\n */\r\n ThinEngine.prototype.createVertexBuffer = function (data) {\r\n return this._createVertexBuffer(data, this._gl.STATIC_DRAW);\r\n };\r\n ThinEngine.prototype._createVertexBuffer = function (data, usage) {\r\n var vbo = this._gl.createBuffer();\r\n if (!vbo) {\r\n throw new Error(\"Unable to create vertex buffer\");\r\n }\r\n var dataBuffer = new WebGLDataBuffer(vbo);\r\n this.bindArrayBuffer(dataBuffer);\r\n if (data instanceof Array) {\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, new Float32Array(data), this._gl.STATIC_DRAW);\r\n }\r\n else {\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, data, this._gl.STATIC_DRAW);\r\n }\r\n this._resetVertexBufferBinding();\r\n dataBuffer.references = 1;\r\n return dataBuffer;\r\n };\r\n /**\r\n * Creates a dynamic vertex buffer\r\n * @param data the data for the dynamic vertex buffer\r\n * @returns the new WebGL dynamic buffer\r\n */\r\n ThinEngine.prototype.createDynamicVertexBuffer = function (data) {\r\n return this._createVertexBuffer(data, this._gl.DYNAMIC_DRAW);\r\n };\r\n /**\r\n * Update a dynamic index buffer\r\n * @param indexBuffer defines the target index buffer\r\n * @param indices defines the data to update\r\n * @param offset defines the offset in the target index buffer where update should start\r\n */\r\n ThinEngine.prototype.updateDynamicIndexBuffer = function (indexBuffer, indices, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n // Force cache update\r\n this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER] = null;\r\n this.bindIndexBuffer(indexBuffer);\r\n var arrayBuffer;\r\n if (indices instanceof Uint16Array || indices instanceof Uint32Array) {\r\n arrayBuffer = indices;\r\n }\r\n else {\r\n arrayBuffer = indexBuffer.is32Bits ? new Uint32Array(indices) : new Uint16Array(indices);\r\n }\r\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, arrayBuffer, this._gl.DYNAMIC_DRAW);\r\n this._resetIndexBufferBinding();\r\n };\r\n /**\r\n * Updates a dynamic vertex buffer.\r\n * @param vertexBuffer the vertex buffer to update\r\n * @param data the data used to update the vertex buffer\r\n * @param byteOffset the byte offset of the data\r\n * @param byteLength the byte length of the data\r\n */\r\n ThinEngine.prototype.updateDynamicVertexBuffer = function (vertexBuffer, data, byteOffset, byteLength) {\r\n this.bindArrayBuffer(vertexBuffer);\r\n if (byteOffset === undefined) {\r\n byteOffset = 0;\r\n }\r\n if (byteLength === undefined) {\r\n if (data instanceof Array) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, new Float32Array(data));\r\n }\r\n else {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, data);\r\n }\r\n }\r\n else {\r\n if (data instanceof Array) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, new Float32Array(data).subarray(byteOffset, byteOffset + byteLength));\r\n }\r\n else {\r\n if (data instanceof ArrayBuffer) {\r\n data = new Uint8Array(data, byteOffset, byteLength);\r\n }\r\n else {\r\n data = new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);\r\n }\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n }\r\n }\r\n this._resetVertexBufferBinding();\r\n };\r\n ThinEngine.prototype._resetIndexBufferBinding = function () {\r\n this.bindIndexBuffer(null);\r\n this._cachedIndexBuffer = null;\r\n };\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the content of the index buffer\r\n * @param updatable defines if the index buffer must be updatable\r\n * @returns a new webGL buffer\r\n */\r\n ThinEngine.prototype.createIndexBuffer = function (indices, updatable) {\r\n var vbo = this._gl.createBuffer();\r\n var dataBuffer = new WebGLDataBuffer(vbo);\r\n if (!vbo) {\r\n throw new Error(\"Unable to create index buffer\");\r\n }\r\n this.bindIndexBuffer(dataBuffer);\r\n var data = this._normalizeIndexData(indices);\r\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, data, updatable ? this._gl.DYNAMIC_DRAW : this._gl.STATIC_DRAW);\r\n this._resetIndexBufferBinding();\r\n dataBuffer.references = 1;\r\n dataBuffer.is32Bits = (data.BYTES_PER_ELEMENT === 4);\r\n return dataBuffer;\r\n };\r\n ThinEngine.prototype._normalizeIndexData = function (indices) {\r\n if (indices instanceof Uint16Array) {\r\n return indices;\r\n }\r\n // Check 32 bit support\r\n if (this._caps.uintIndices) {\r\n if (indices instanceof Uint32Array) {\r\n return indices;\r\n }\r\n else {\r\n // number[] or Int32Array, check if 32 bit is necessary\r\n for (var index = 0; index < indices.length; index++) {\r\n if (indices[index] >= 65535) {\r\n return new Uint32Array(indices);\r\n }\r\n }\r\n return new Uint16Array(indices);\r\n }\r\n }\r\n // No 32 bit support, force conversion to 16 bit (values greater 16 bit are lost)\r\n return new Uint16Array(indices);\r\n };\r\n /**\r\n * Bind a webGL buffer to the webGL context\r\n * @param buffer defines the buffer to bind\r\n */\r\n ThinEngine.prototype.bindArrayBuffer = function (buffer) {\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.bindBuffer(buffer, this._gl.ARRAY_BUFFER);\r\n };\r\n /**\r\n * Bind a specific block at a given index in a specific shader program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param blockName defines the block name\r\n * @param index defines the index where to bind the block\r\n */\r\n ThinEngine.prototype.bindUniformBlock = function (pipelineContext, blockName, index) {\r\n var program = pipelineContext.program;\r\n var uniformLocation = this._gl.getUniformBlockIndex(program, blockName);\r\n this._gl.uniformBlockBinding(program, uniformLocation, index);\r\n };\r\n ThinEngine.prototype.bindIndexBuffer = function (buffer) {\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.bindBuffer(buffer, this._gl.ELEMENT_ARRAY_BUFFER);\r\n };\r\n ThinEngine.prototype.bindBuffer = function (buffer, target) {\r\n if (this._vaoRecordInProgress || this._currentBoundBuffer[target] !== buffer) {\r\n this._gl.bindBuffer(target, buffer ? buffer.underlyingResource : null);\r\n this._currentBoundBuffer[target] = buffer;\r\n }\r\n };\r\n /**\r\n * update the bound buffer with the given data\r\n * @param data defines the data to update\r\n */\r\n ThinEngine.prototype.updateArrayBuffer = function (data) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n };\r\n ThinEngine.prototype._vertexAttribPointer = function (buffer, indx, size, type, normalized, stride, offset) {\r\n var pointer = this._currentBufferPointers[indx];\r\n var changed = false;\r\n if (!pointer.active) {\r\n changed = true;\r\n pointer.active = true;\r\n pointer.index = indx;\r\n pointer.size = size;\r\n pointer.type = type;\r\n pointer.normalized = normalized;\r\n pointer.stride = stride;\r\n pointer.offset = offset;\r\n pointer.buffer = buffer;\r\n }\r\n else {\r\n if (pointer.buffer !== buffer) {\r\n pointer.buffer = buffer;\r\n changed = true;\r\n }\r\n if (pointer.size !== size) {\r\n pointer.size = size;\r\n changed = true;\r\n }\r\n if (pointer.type !== type) {\r\n pointer.type = type;\r\n changed = true;\r\n }\r\n if (pointer.normalized !== normalized) {\r\n pointer.normalized = normalized;\r\n changed = true;\r\n }\r\n if (pointer.stride !== stride) {\r\n pointer.stride = stride;\r\n changed = true;\r\n }\r\n if (pointer.offset !== offset) {\r\n pointer.offset = offset;\r\n changed = true;\r\n }\r\n }\r\n if (changed || this._vaoRecordInProgress) {\r\n this.bindArrayBuffer(buffer);\r\n this._gl.vertexAttribPointer(indx, size, type, normalized, stride, offset);\r\n }\r\n };\r\n ThinEngine.prototype._bindIndexBufferWithCache = function (indexBuffer) {\r\n if (indexBuffer == null) {\r\n return;\r\n }\r\n if (this._cachedIndexBuffer !== indexBuffer) {\r\n this._cachedIndexBuffer = indexBuffer;\r\n this.bindIndexBuffer(indexBuffer);\r\n this._uintIndicesCurrentlySet = indexBuffer.is32Bits;\r\n }\r\n };\r\n ThinEngine.prototype._bindVertexBuffersAttributes = function (vertexBuffers, effect) {\r\n var attributes = effect.getAttributesNames();\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.unbindAllAttributes();\r\n for (var index = 0; index < attributes.length; index++) {\r\n var order = effect.getAttributeLocation(index);\r\n if (order >= 0) {\r\n var vertexBuffer = vertexBuffers[attributes[index]];\r\n if (!vertexBuffer) {\r\n continue;\r\n }\r\n this._gl.enableVertexAttribArray(order);\r\n if (!this._vaoRecordInProgress) {\r\n this._vertexAttribArraysEnabled[order] = true;\r\n }\r\n var buffer = vertexBuffer.getBuffer();\r\n if (buffer) {\r\n this._vertexAttribPointer(buffer, order, vertexBuffer.getSize(), vertexBuffer.type, vertexBuffer.normalized, vertexBuffer.byteStride, vertexBuffer.byteOffset);\r\n if (vertexBuffer.getIsInstanced()) {\r\n this._gl.vertexAttribDivisor(order, vertexBuffer.getInstanceDivisor());\r\n if (!this._vaoRecordInProgress) {\r\n this._currentInstanceLocations.push(order);\r\n this._currentInstanceBuffers.push(buffer);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Records a vertex array object\r\n * @see http://doc.babylonjs.com/features/webgl2#vertex-array-objects\r\n * @param vertexBuffers defines the list of vertex buffers to store\r\n * @param indexBuffer defines the index buffer to store\r\n * @param effect defines the effect to store\r\n * @returns the new vertex array object\r\n */\r\n ThinEngine.prototype.recordVertexArrayObject = function (vertexBuffers, indexBuffer, effect) {\r\n var vao = this._gl.createVertexArray();\r\n this._vaoRecordInProgress = true;\r\n this._gl.bindVertexArray(vao);\r\n this._mustWipeVertexAttributes = true;\r\n this._bindVertexBuffersAttributes(vertexBuffers, effect);\r\n this.bindIndexBuffer(indexBuffer);\r\n this._vaoRecordInProgress = false;\r\n this._gl.bindVertexArray(null);\r\n return vao;\r\n };\r\n /**\r\n * Bind a specific vertex array object\r\n * @see http://doc.babylonjs.com/features/webgl2#vertex-array-objects\r\n * @param vertexArrayObject defines the vertex array object to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n */\r\n ThinEngine.prototype.bindVertexArrayObject = function (vertexArrayObject, indexBuffer) {\r\n if (this._cachedVertexArrayObject !== vertexArrayObject) {\r\n this._cachedVertexArrayObject = vertexArrayObject;\r\n this._gl.bindVertexArray(vertexArrayObject);\r\n this._cachedVertexBuffers = null;\r\n this._cachedIndexBuffer = null;\r\n this._uintIndicesCurrentlySet = indexBuffer != null && indexBuffer.is32Bits;\r\n this._mustWipeVertexAttributes = true;\r\n }\r\n };\r\n /**\r\n * Bind webGl buffers directly to the webGL context\r\n * @param vertexBuffer defines the vertex buffer to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param vertexDeclaration defines the vertex declaration to use with the vertex buffer\r\n * @param vertexStrideSize defines the vertex stride of the vertex buffer\r\n * @param effect defines the effect associated with the vertex buffer\r\n */\r\n ThinEngine.prototype.bindBuffersDirectly = function (vertexBuffer, indexBuffer, vertexDeclaration, vertexStrideSize, effect) {\r\n if (this._cachedVertexBuffers !== vertexBuffer || this._cachedEffectForVertexBuffers !== effect) {\r\n this._cachedVertexBuffers = vertexBuffer;\r\n this._cachedEffectForVertexBuffers = effect;\r\n var attributesCount = effect.getAttributesCount();\r\n this._unbindVertexArrayObject();\r\n this.unbindAllAttributes();\r\n var offset = 0;\r\n for (var index = 0; index < attributesCount; index++) {\r\n if (index < vertexDeclaration.length) {\r\n var order = effect.getAttributeLocation(index);\r\n if (order >= 0) {\r\n this._gl.enableVertexAttribArray(order);\r\n this._vertexAttribArraysEnabled[order] = true;\r\n this._vertexAttribPointer(vertexBuffer, order, vertexDeclaration[index], this._gl.FLOAT, false, vertexStrideSize, offset);\r\n }\r\n offset += vertexDeclaration[index] * 4;\r\n }\r\n }\r\n }\r\n this._bindIndexBufferWithCache(indexBuffer);\r\n };\r\n ThinEngine.prototype._unbindVertexArrayObject = function () {\r\n if (!this._cachedVertexArrayObject) {\r\n return;\r\n }\r\n this._cachedVertexArrayObject = null;\r\n this._gl.bindVertexArray(null);\r\n };\r\n /**\r\n * Bind a list of vertex buffers to the webGL context\r\n * @param vertexBuffers defines the list of vertex buffers to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param effect defines the effect associated with the vertex buffers\r\n */\r\n ThinEngine.prototype.bindBuffers = function (vertexBuffers, indexBuffer, effect) {\r\n if (this._cachedVertexBuffers !== vertexBuffers || this._cachedEffectForVertexBuffers !== effect) {\r\n this._cachedVertexBuffers = vertexBuffers;\r\n this._cachedEffectForVertexBuffers = effect;\r\n this._bindVertexBuffersAttributes(vertexBuffers, effect);\r\n }\r\n this._bindIndexBufferWithCache(indexBuffer);\r\n };\r\n /**\r\n * Unbind all instance attributes\r\n */\r\n ThinEngine.prototype.unbindInstanceAttributes = function () {\r\n var boundBuffer;\r\n for (var i = 0, ul = this._currentInstanceLocations.length; i < ul; i++) {\r\n var instancesBuffer = this._currentInstanceBuffers[i];\r\n if (boundBuffer != instancesBuffer && instancesBuffer.references) {\r\n boundBuffer = instancesBuffer;\r\n this.bindArrayBuffer(instancesBuffer);\r\n }\r\n var offsetLocation = this._currentInstanceLocations[i];\r\n this._gl.vertexAttribDivisor(offsetLocation, 0);\r\n }\r\n this._currentInstanceBuffers.length = 0;\r\n this._currentInstanceLocations.length = 0;\r\n };\r\n /**\r\n * Release and free the memory of a vertex array object\r\n * @param vao defines the vertex array object to delete\r\n */\r\n ThinEngine.prototype.releaseVertexArrayObject = function (vao) {\r\n this._gl.deleteVertexArray(vao);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseBuffer = function (buffer) {\r\n buffer.references--;\r\n if (buffer.references === 0) {\r\n this._deleteBuffer(buffer);\r\n return true;\r\n }\r\n return false;\r\n };\r\n ThinEngine.prototype._deleteBuffer = function (buffer) {\r\n this._gl.deleteBuffer(buffer.underlyingResource);\r\n };\r\n /**\r\n * Creates a webGL buffer to use with instanciation\r\n * @param capacity defines the size of the buffer\r\n * @returns the webGL buffer\r\n */\r\n ThinEngine.prototype.createInstancesBuffer = function (capacity) {\r\n var buffer = this._gl.createBuffer();\r\n if (!buffer) {\r\n throw new Error(\"Unable to create instance buffer\");\r\n }\r\n var result = new WebGLDataBuffer(buffer);\r\n result.capacity = capacity;\r\n this.bindArrayBuffer(result);\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, capacity, this._gl.DYNAMIC_DRAW);\r\n return result;\r\n };\r\n /**\r\n * Delete a webGL buffer used with instanciation\r\n * @param buffer defines the webGL buffer to delete\r\n */\r\n ThinEngine.prototype.deleteInstancesBuffer = function (buffer) {\r\n this._gl.deleteBuffer(buffer);\r\n };\r\n /**\r\n * Update the content of a webGL buffer used with instanciation and bind it to the webGL context\r\n * @param instancesBuffer defines the webGL buffer to update and bind\r\n * @param data defines the data to store in the buffer\r\n * @param offsetLocations defines the offsets or attributes information used to determine where data must be stored in the buffer\r\n */\r\n ThinEngine.prototype.updateAndBindInstancesBuffer = function (instancesBuffer, data, offsetLocations) {\r\n this.bindArrayBuffer(instancesBuffer);\r\n if (data) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n }\r\n if (offsetLocations[0].index !== undefined) {\r\n var stride = 0;\r\n for (var i = 0; i < offsetLocations.length; i++) {\r\n var ai = offsetLocations[i];\r\n stride += ai.attributeSize * 4;\r\n }\r\n for (var i = 0; i < offsetLocations.length; i++) {\r\n var ai = offsetLocations[i];\r\n if (!this._vertexAttribArraysEnabled[ai.index]) {\r\n this._gl.enableVertexAttribArray(ai.index);\r\n this._vertexAttribArraysEnabled[ai.index] = true;\r\n }\r\n this._vertexAttribPointer(instancesBuffer, ai.index, ai.attributeSize, ai.attribyteType || this._gl.FLOAT, ai.normalized || false, stride, ai.offset);\r\n this._gl.vertexAttribDivisor(ai.index, 1);\r\n this._currentInstanceLocations.push(ai.index);\r\n this._currentInstanceBuffers.push(instancesBuffer);\r\n }\r\n }\r\n else {\r\n for (var index = 0; index < 4; index++) {\r\n var offsetLocation = offsetLocations[index];\r\n if (!this._vertexAttribArraysEnabled[offsetLocation]) {\r\n this._gl.enableVertexAttribArray(offsetLocation);\r\n this._vertexAttribArraysEnabled[offsetLocation] = true;\r\n }\r\n this._vertexAttribPointer(instancesBuffer, offsetLocation, 4, this._gl.FLOAT, false, 64, index * 16);\r\n this._gl.vertexAttribDivisor(offsetLocation, 1);\r\n this._currentInstanceLocations.push(offsetLocation);\r\n this._currentInstanceBuffers.push(instancesBuffer);\r\n }\r\n }\r\n };\r\n /**\r\n * Apply all cached states (depth, culling, stencil and alpha)\r\n */\r\n ThinEngine.prototype.applyStates = function () {\r\n this._depthCullingState.apply(this._gl);\r\n this._stencilState.apply(this._gl);\r\n this._alphaState.apply(this._gl);\r\n };\r\n /**\r\n * Send a draw order\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.draw = function (useTriangles, indexStart, indexCount, instancesCount) {\r\n this.drawElementsType(useTriangles ? Constants.MATERIAL_TriangleFillMode : Constants.MATERIAL_WireFrameFillMode, indexStart, indexCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of points\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {\r\n this.drawArraysType(Constants.MATERIAL_PointFillMode, verticesStart, verticesCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawUnIndexed = function (useTriangles, verticesStart, verticesCount, instancesCount) {\r\n this.drawArraysType(useTriangles ? Constants.MATERIAL_TriangleFillMode : Constants.MATERIAL_WireFrameFillMode, verticesStart, verticesCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of indexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawElementsType = function (fillMode, indexStart, indexCount, instancesCount) {\r\n // Apply states\r\n this.applyStates();\r\n this._drawCalls.addCount(1, false);\r\n // Render\r\n var drawMode = this._drawMode(fillMode);\r\n var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;\r\n var mult = this._uintIndicesCurrentlySet ? 4 : 2;\r\n if (instancesCount) {\r\n this._gl.drawElementsInstanced(drawMode, indexCount, indexFormat, indexStart * mult, instancesCount);\r\n }\r\n else {\r\n this._gl.drawElements(drawMode, indexCount, indexFormat, indexStart * mult);\r\n }\r\n };\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawArraysType = function (fillMode, verticesStart, verticesCount, instancesCount) {\r\n // Apply states\r\n this.applyStates();\r\n this._drawCalls.addCount(1, false);\r\n var drawMode = this._drawMode(fillMode);\r\n if (instancesCount) {\r\n this._gl.drawArraysInstanced(drawMode, verticesStart, verticesCount, instancesCount);\r\n }\r\n else {\r\n this._gl.drawArrays(drawMode, verticesStart, verticesCount);\r\n }\r\n };\r\n ThinEngine.prototype._drawMode = function (fillMode) {\r\n switch (fillMode) {\r\n // Triangle views\r\n case Constants.MATERIAL_TriangleFillMode:\r\n return this._gl.TRIANGLES;\r\n case Constants.MATERIAL_PointFillMode:\r\n return this._gl.POINTS;\r\n case Constants.MATERIAL_WireFrameFillMode:\r\n return this._gl.LINES;\r\n // Draw modes\r\n case Constants.MATERIAL_PointListDrawMode:\r\n return this._gl.POINTS;\r\n case Constants.MATERIAL_LineListDrawMode:\r\n return this._gl.LINES;\r\n case Constants.MATERIAL_LineLoopDrawMode:\r\n return this._gl.LINE_LOOP;\r\n case Constants.MATERIAL_LineStripDrawMode:\r\n return this._gl.LINE_STRIP;\r\n case Constants.MATERIAL_TriangleStripDrawMode:\r\n return this._gl.TRIANGLE_STRIP;\r\n case Constants.MATERIAL_TriangleFanDrawMode:\r\n return this._gl.TRIANGLE_FAN;\r\n default:\r\n return this._gl.TRIANGLES;\r\n }\r\n };\r\n // Shaders\r\n /** @hidden */\r\n ThinEngine.prototype._releaseEffect = function (effect) {\r\n if (this._compiledEffects[effect._key]) {\r\n delete this._compiledEffects[effect._key];\r\n this._deletePipelineContext(effect.getPipelineContext());\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._deletePipelineContext = function (pipelineContext) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (webGLPipelineContext && webGLPipelineContext.program) {\r\n webGLPipelineContext.program.__SPECTOR_rebuildProgram = null;\r\n this._gl.deleteProgram(webGLPipelineContext.program);\r\n }\r\n };\r\n /**\r\n * Create a new effect (used to store vertex/fragment shaders)\r\n * @param baseName defines the base name of the effect (The name of file without .fragment.fx or .vertex.fx)\r\n * @param attributesNamesOrOptions defines either a list of attribute names or an EffectCreationOptions object\r\n * @param uniformsNamesOrEngine defines either a list of uniform names or the engine to use\r\n * @param samplers defines an array of string used to represent textures\r\n * @param defines defines the string containing the defines to use to compile the shaders\r\n * @param fallbacks defines the list of potential fallbacks to use if shader conmpilation fails\r\n * @param onCompiled defines a function to call when the effect creation is successful\r\n * @param onError defines a function to call when the effect creation has failed\r\n * @param indexParameters defines an object containing the index values to use to compile shaders (like the maximum number of simultaneous lights)\r\n * @returns the new Effect\r\n */\r\n ThinEngine.prototype.createEffect = function (baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, defines, fallbacks, onCompiled, onError, indexParameters) {\r\n var vertex = baseName.vertexElement || baseName.vertex || baseName;\r\n var fragment = baseName.fragmentElement || baseName.fragment || baseName;\r\n var name = vertex + \"+\" + fragment + \"@\" + (defines ? defines : attributesNamesOrOptions.defines);\r\n if (this._compiledEffects[name]) {\r\n var compiledEffect = this._compiledEffects[name];\r\n if (onCompiled && compiledEffect.isReady()) {\r\n onCompiled(compiledEffect);\r\n }\r\n return compiledEffect;\r\n }\r\n var effect = new Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, this, defines, fallbacks, onCompiled, onError, indexParameters);\r\n effect._key = name;\r\n this._compiledEffects[name] = effect;\r\n return effect;\r\n };\r\n ThinEngine._ConcatenateShader = function (source, defines, shaderVersion) {\r\n if (shaderVersion === void 0) { shaderVersion = \"\"; }\r\n return shaderVersion + (defines ? defines + \"\\n\" : \"\") + source;\r\n };\r\n ThinEngine.prototype._compileShader = function (source, type, defines, shaderVersion) {\r\n return this._compileRawShader(ThinEngine._ConcatenateShader(source, defines, shaderVersion), type);\r\n };\r\n ThinEngine.prototype._compileRawShader = function (source, type) {\r\n var gl = this._gl;\r\n var shader = gl.createShader(type === \"vertex\" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);\r\n if (!shader) {\r\n throw new Error(\"Something went wrong while compile the shader.\");\r\n }\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n return shader;\r\n };\r\n /**\r\n * Directly creates a webGL program\r\n * @param pipelineContext defines the pipeline context to attach to\r\n * @param vertexCode defines the vertex shader code to use\r\n * @param fragmentCode defines the fragment shader code to use\r\n * @param context defines the webGL context to use (if not set, the current one will be used)\r\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\r\n * @returns the new webGL program\r\n */\r\n ThinEngine.prototype.createRawShaderProgram = function (pipelineContext, vertexCode, fragmentCode, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n context = context || this._gl;\r\n var vertexShader = this._compileRawShader(vertexCode, \"vertex\");\r\n var fragmentShader = this._compileRawShader(fragmentCode, \"fragment\");\r\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\r\n };\r\n /**\r\n * Creates a webGL program\r\n * @param pipelineContext defines the pipeline context to attach to\r\n * @param vertexCode defines the vertex shader code to use\r\n * @param fragmentCode defines the fragment shader code to use\r\n * @param defines defines the string containing the defines to use to compile the shaders\r\n * @param context defines the webGL context to use (if not set, the current one will be used)\r\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\r\n * @returns the new webGL program\r\n */\r\n ThinEngine.prototype.createShaderProgram = function (pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n context = context || this._gl;\r\n var shaderVersion = (this._webGLVersion > 1) ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\r\n var vertexShader = this._compileShader(vertexCode, \"vertex\", defines, shaderVersion);\r\n var fragmentShader = this._compileShader(fragmentCode, \"fragment\", defines, shaderVersion);\r\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\r\n };\r\n /**\r\n * Creates a new pipeline context\r\n * @returns the new pipeline\r\n */\r\n ThinEngine.prototype.createPipelineContext = function () {\r\n var pipelineContext = new WebGLPipelineContext();\r\n pipelineContext.engine = this;\r\n if (this._caps.parallelShaderCompile) {\r\n pipelineContext.isParallelCompiled = true;\r\n }\r\n return pipelineContext;\r\n };\r\n ThinEngine.prototype._createShaderProgram = function (pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n var shaderProgram = context.createProgram();\r\n pipelineContext.program = shaderProgram;\r\n if (!shaderProgram) {\r\n throw new Error(\"Unable to create program\");\r\n }\r\n context.attachShader(shaderProgram, vertexShader);\r\n context.attachShader(shaderProgram, fragmentShader);\r\n context.linkProgram(shaderProgram);\r\n pipelineContext.context = context;\r\n pipelineContext.vertexShader = vertexShader;\r\n pipelineContext.fragmentShader = fragmentShader;\r\n if (!pipelineContext.isParallelCompiled) {\r\n this._finalizePipelineContext(pipelineContext);\r\n }\r\n return shaderProgram;\r\n };\r\n ThinEngine.prototype._finalizePipelineContext = function (pipelineContext) {\r\n var context = pipelineContext.context;\r\n var vertexShader = pipelineContext.vertexShader;\r\n var fragmentShader = pipelineContext.fragmentShader;\r\n var program = pipelineContext.program;\r\n var linked = context.getProgramParameter(program, context.LINK_STATUS);\r\n if (!linked) { // Get more info\r\n // Vertex\r\n if (!this._gl.getShaderParameter(vertexShader, this._gl.COMPILE_STATUS)) {\r\n var log = this._gl.getShaderInfoLog(vertexShader);\r\n if (log) {\r\n throw new Error(\"VERTEX SHADER \" + log);\r\n }\r\n }\r\n // Fragment\r\n if (!this._gl.getShaderParameter(fragmentShader, this._gl.COMPILE_STATUS)) {\r\n var log = this._gl.getShaderInfoLog(fragmentShader);\r\n if (log) {\r\n throw new Error(\"FRAGMENT SHADER \" + log);\r\n }\r\n }\r\n var error = context.getProgramInfoLog(program);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n }\r\n if (this.validateShaderPrograms) {\r\n context.validateProgram(program);\r\n var validated = context.getProgramParameter(program, context.VALIDATE_STATUS);\r\n if (!validated) {\r\n var error = context.getProgramInfoLog(program);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n }\r\n }\r\n context.deleteShader(vertexShader);\r\n context.deleteShader(fragmentShader);\r\n pipelineContext.vertexShader = undefined;\r\n pipelineContext.fragmentShader = undefined;\r\n if (pipelineContext.onCompiled) {\r\n pipelineContext.onCompiled();\r\n pipelineContext.onCompiled = undefined;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._preparePipelineContext = function (pipelineContext, vertexSourceCode, fragmentSourceCode, createAsRaw, rebuildRebind, defines, transformFeedbackVaryings) {\r\n var webGLRenderingState = pipelineContext;\r\n if (createAsRaw) {\r\n webGLRenderingState.program = this.createRawShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, undefined, transformFeedbackVaryings);\r\n }\r\n else {\r\n webGLRenderingState.program = this.createShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, defines, undefined, transformFeedbackVaryings);\r\n }\r\n webGLRenderingState.program.__SPECTOR_rebuildProgram = rebuildRebind;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._isRenderingStateCompiled = function (pipelineContext) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (this._gl.getProgramParameter(webGLPipelineContext.program, this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)) {\r\n this._finalizePipelineContext(webGLPipelineContext);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._executeWhenRenderingStateIsCompiled = function (pipelineContext, action) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (!webGLPipelineContext.isParallelCompiled) {\r\n action();\r\n return;\r\n }\r\n webGLPipelineContext.onCompiled = action;\r\n };\r\n /**\r\n * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param uniformsNames defines the list of uniform names\r\n * @returns an array of webGL uniform locations\r\n */\r\n ThinEngine.prototype.getUniforms = function (pipelineContext, uniformsNames) {\r\n var results = new Array();\r\n var webGLPipelineContext = pipelineContext;\r\n for (var index = 0; index < uniformsNames.length; index++) {\r\n results.push(this._gl.getUniformLocation(webGLPipelineContext.program, uniformsNames[index]));\r\n }\r\n return results;\r\n };\r\n /**\r\n * Gets the lsit of active attributes for a given webGL program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param attributesNames defines the list of attribute names to get\r\n * @returns an array of indices indicating the offset of each attribute\r\n */\r\n ThinEngine.prototype.getAttributes = function (pipelineContext, attributesNames) {\r\n var results = [];\r\n var webGLPipelineContext = pipelineContext;\r\n for (var index = 0; index < attributesNames.length; index++) {\r\n try {\r\n results.push(this._gl.getAttribLocation(webGLPipelineContext.program, attributesNames[index]));\r\n }\r\n catch (e) {\r\n results.push(-1);\r\n }\r\n }\r\n return results;\r\n };\r\n /**\r\n * Activates an effect, mkaing it the current one (ie. the one used for rendering)\r\n * @param effect defines the effect to activate\r\n */\r\n ThinEngine.prototype.enableEffect = function (effect) {\r\n if (!effect || effect === this._currentEffect) {\r\n return;\r\n }\r\n // Use program\r\n this.bindSamplers(effect);\r\n this._currentEffect = effect;\r\n if (effect.onBind) {\r\n effect.onBind(effect);\r\n }\r\n if (effect._onBindObservable) {\r\n effect._onBindObservable.notifyObservers(effect);\r\n }\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setFloatArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setFloatArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setFloatArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setFloatArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as matrices)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrices defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setMatrices = function (uniform, matrices) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix4fv(uniform, false, matrices);\r\n };\r\n /**\r\n * Set the value of an uniform to a matrix (3x3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 3x3 matrix to store\r\n */\r\n ThinEngine.prototype.setMatrix3x3 = function (uniform, matrix) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix3fv(uniform, false, matrix);\r\n };\r\n /**\r\n * Set the value of an uniform to a matrix (2x2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 2x2 matrix to store\r\n */\r\n ThinEngine.prototype.setMatrix2x2 = function (uniform, matrix) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix2fv(uniform, false, matrix);\r\n };\r\n /**\r\n * Set the value of an uniform to a number (int)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the int number to store\r\n */\r\n ThinEngine.prototype.setInt = function (uniform, value) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, value);\r\n };\r\n /**\r\n * Set the value of an uniform to a number (float)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the float number to store\r\n */\r\n ThinEngine.prototype.setFloat = function (uniform, value) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1f(uniform, value);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec2\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n */\r\n ThinEngine.prototype.setFloat2 = function (uniform, x, y) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform2f(uniform, x, y);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec3\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n */\r\n ThinEngine.prototype.setFloat3 = function (uniform, x, y, z) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform3f(uniform, x, y, z);\r\n };\r\n /**\r\n * Set the value of an uniform to a boolean\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param bool defines the boolean to store\r\n */\r\n ThinEngine.prototype.setBool = function (uniform, bool) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, bool);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec4\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @param w defines the 4th component of the value\r\n */\r\n ThinEngine.prototype.setFloat4 = function (uniform, x, y, z, w) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform4f(uniform, x, y, z, w);\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniform defines the uniform location\r\n * @param color4 defines the value to be set\r\n */\r\n ThinEngine.prototype.setDirectColor4 = function (uniform, color4) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform4f(uniform, color4.r, color4.g, color4.b, color4.a);\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"depthCullingState\", {\r\n // States\r\n /**\r\n * Gets the depth culling state manager\r\n */\r\n get: function () {\r\n return this._depthCullingState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"alphaState\", {\r\n /**\r\n * Gets the alpha state manager\r\n */\r\n get: function () {\r\n return this._alphaState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"stencilState\", {\r\n /**\r\n * Gets the stencil state manager\r\n */\r\n get: function () {\r\n return this._stencilState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Textures\r\n /**\r\n * Clears the list of texture accessible through engine.\r\n * This can help preventing texture load conflict due to name collision.\r\n */\r\n ThinEngine.prototype.clearInternalTexturesCache = function () {\r\n this._internalTexturesCache = [];\r\n };\r\n /**\r\n * Force the entire cache to be cleared\r\n * You should not have to use this function unless your engine needs to share the webGL context with another engine\r\n * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)\r\n */\r\n ThinEngine.prototype.wipeCaches = function (bruteForce) {\r\n if (this.preventCacheWipeBetweenFrames && !bruteForce) {\r\n return;\r\n }\r\n this._currentEffect = null;\r\n this._viewportCached.x = 0;\r\n this._viewportCached.y = 0;\r\n this._viewportCached.z = 0;\r\n this._viewportCached.w = 0;\r\n if (bruteForce) {\r\n this.resetTextureCache();\r\n this._currentProgram = null;\r\n this._stencilState.reset();\r\n this._depthCullingState.reset();\r\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\r\n this._alphaState.reset();\r\n this._unpackFlipYCached = null;\r\n }\r\n this._resetVertexBufferBinding();\r\n this._cachedIndexBuffer = null;\r\n this._cachedEffectForVertexBuffers = null;\r\n this._unbindVertexArrayObject();\r\n this.bindIndexBuffer(null);\r\n };\r\n /**\r\n * Set the compressed texture format to use, based on the formats you have, and the formats\r\n * supported by the hardware / browser.\r\n *\r\n * Khronos Texture Container (.ktx) files are used to support this. This format has the\r\n * advantage of being specifically designed for OpenGL. Header elements directly correspond\r\n * to API arguments needed to compressed textures. This puts the burden on the container\r\n * generator to house the arcane code for determining these for current & future formats.\r\n *\r\n * for description see https://www.khronos.org/opengles/sdk/tools/KTX/\r\n * for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/\r\n *\r\n * Note: The result of this call is not taken into account when a texture is base64.\r\n *\r\n * @param formatsAvailable defines the list of those format families you have created\r\n * on your server. Syntax: '-' + format family + '.ktx'. (Case and order do not matter.)\r\n *\r\n * Current families are astc, dxt, pvrtc, etc2, & etc1.\r\n * @returns The extension selected.\r\n */\r\n ThinEngine.prototype.setTextureFormatToUse = function (formatsAvailable) {\r\n for (var i = 0, len1 = this.texturesSupported.length; i < len1; i++) {\r\n for (var j = 0, len2 = formatsAvailable.length; j < len2; j++) {\r\n if (this._texturesSupported[i] === formatsAvailable[j].toLowerCase()) {\r\n return this._textureFormatInUse = this._texturesSupported[i];\r\n }\r\n }\r\n }\r\n // actively set format to nothing, to allow this to be called more than once\r\n // and possibly fail the 2nd time\r\n this._textureFormatInUse = null;\r\n return null;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getSamplingParameters = function (samplingMode, generateMipMaps) {\r\n var gl = this._gl;\r\n var magFilter = gl.NEAREST;\r\n var minFilter = gl.NEAREST;\r\n switch (samplingMode) {\r\n case Constants.TEXTURE_BILINEAR_SAMPLINGMODE:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case Constants.TEXTURE_TRILINEAR_SAMPLINGMODE:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case Constants.TEXTURE_NEAREST_SAMPLINGMODE:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case Constants.TEXTURE_NEAREST_NEAREST_MIPNEAREST:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case Constants.TEXTURE_NEAREST_LINEAR_MIPNEAREST:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case Constants.TEXTURE_NEAREST_LINEAR_MIPLINEAR:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case Constants.TEXTURE_NEAREST_LINEAR:\r\n magFilter = gl.NEAREST;\r\n minFilter = gl.LINEAR;\r\n break;\r\n case Constants.TEXTURE_NEAREST_NEAREST:\r\n magFilter = gl.NEAREST;\r\n minFilter = gl.NEAREST;\r\n break;\r\n case Constants.TEXTURE_LINEAR_NEAREST_MIPNEAREST:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case Constants.TEXTURE_LINEAR_NEAREST_MIPLINEAR:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case Constants.TEXTURE_LINEAR_LINEAR:\r\n magFilter = gl.LINEAR;\r\n minFilter = gl.LINEAR;\r\n break;\r\n case Constants.TEXTURE_LINEAR_NEAREST:\r\n magFilter = gl.LINEAR;\r\n minFilter = gl.NEAREST;\r\n break;\r\n }\r\n return {\r\n min: minFilter,\r\n mag: magFilter\r\n };\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._createTexture = function () {\r\n var texture = this._gl.createTexture();\r\n if (!texture) {\r\n throw new Error(\"Unable to create texture\");\r\n }\r\n return texture;\r\n };\r\n /**\r\n * Usually called from Texture.ts.\r\n * Passed information to create a WebGLTexture\r\n * @param urlArg defines a value which contains one of the following:\r\n * * A conventional http URL, e.g. 'http://...' or 'file://...'\r\n * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'\r\n * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'\r\n * @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file\r\n * @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)\r\n * @param scene needed for loading to the correct scene\r\n * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)\r\n * @param onLoad optional callback to be called upon successful completion\r\n * @param onError optional callback to be called upon failure\r\n * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob\r\n * @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities\r\n * @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures\r\n * @param forcedExtension defines the extension to use to pick the right loader\r\n * @param excludeLoaders array of texture loaders that should be excluded when picking a loader for the texture (default: empty array)\r\n * @returns a InternalTexture for assignment back into BABYLON.Texture\r\n */\r\n ThinEngine.prototype.createTexture = function (urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format, forcedExtension, excludeLoaders) {\r\n var _this = this;\r\n if (samplingMode === void 0) { samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE; }\r\n if (onLoad === void 0) { onLoad = null; }\r\n if (onError === void 0) { onError = null; }\r\n if (buffer === void 0) { buffer = null; }\r\n if (fallback === void 0) { fallback = null; }\r\n if (format === void 0) { format = null; }\r\n if (forcedExtension === void 0) { forcedExtension = null; }\r\n if (excludeLoaders === void 0) { excludeLoaders = []; }\r\n var url = String(urlArg); // assign a new string, so that the original is still available in case of fallback\r\n var fromData = url.substr(0, 5) === \"data:\";\r\n var fromBlob = url.substr(0, 5) === \"blob:\";\r\n var isBase64 = fromData && url.indexOf(\";base64,\") !== -1;\r\n var texture = fallback ? fallback : new InternalTexture(this, InternalTexture.DATASOURCE_URL);\r\n // establish the file extension, if possible\r\n var lastDot = url.lastIndexOf('.');\r\n var extension = forcedExtension ? forcedExtension : (lastDot > -1 ? url.substring(lastDot).toLowerCase() : \"\");\r\n var loader = null;\r\n for (var _i = 0, _a = ThinEngine._TextureLoaders; _i < _a.length; _i++) {\r\n var availableLoader = _a[_i];\r\n if (excludeLoaders.indexOf(availableLoader) === -1 && availableLoader.canLoad(extension, this._textureFormatInUse, fallback, isBase64, buffer ? true : false)) {\r\n loader = availableLoader;\r\n break;\r\n }\r\n }\r\n if (loader) {\r\n url = loader.transformUrl(url, this._textureFormatInUse);\r\n }\r\n if (scene) {\r\n scene._addPendingData(texture);\r\n }\r\n texture.url = url;\r\n texture.generateMipMaps = !noMipmap;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n if (!this._doNotHandleContextLost) {\r\n // Keep a link to the buffer only if we plan to handle context lost\r\n texture._buffer = buffer;\r\n }\r\n var onLoadObserver = null;\r\n if (onLoad && !fallback) {\r\n onLoadObserver = texture.onLoadedObservable.add(onLoad);\r\n }\r\n if (!fallback) {\r\n this._internalTexturesCache.push(texture);\r\n }\r\n var onInternalError = function (message, exception) {\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n var customFallback = false;\r\n if (loader) {\r\n var fallbackUrl = loader.getFallbackTextureUrl(url, _this._textureFormatInUse);\r\n if (fallbackUrl) {\r\n // Add Back\r\n customFallback = true;\r\n excludeLoaders.push(loader);\r\n _this.createTexture(urlArg, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture, undefined, undefined, excludeLoaders);\r\n return;\r\n }\r\n }\r\n if (!customFallback) {\r\n if (onLoadObserver) {\r\n texture.onLoadedObservable.remove(onLoadObserver);\r\n }\r\n if (EngineStore.UseFallbackTexture) {\r\n _this.createTexture(EngineStore.FallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture);\r\n return;\r\n }\r\n }\r\n if (onError) {\r\n onError(message || \"Unknown error\", exception);\r\n }\r\n };\r\n // processing for non-image formats\r\n if (loader) {\r\n var callback = function (data) {\r\n loader.loadData(data, texture, function (width, height, loadMipmap, isCompressed, done, loadFailed) {\r\n if (loadFailed) {\r\n onInternalError(\"TextureLoader failed to load data\");\r\n }\r\n else {\r\n _this._prepareWebGLTexture(texture, scene, width, height, texture.invertY, !loadMipmap, isCompressed, function () {\r\n done();\r\n return false;\r\n }, samplingMode);\r\n }\r\n });\r\n };\r\n if (!buffer) {\r\n this._loadFile(url, callback, undefined, scene ? scene.offlineProvider : undefined, true, function (request, exception) {\r\n onInternalError(\"Unable to load \" + (request ? request.responseURL : url, exception));\r\n });\r\n }\r\n else {\r\n //callback(buffer as ArrayBuffer);\r\n if (buffer instanceof ArrayBuffer) {\r\n callback(buffer);\r\n }\r\n else {\r\n if (onError) {\r\n onError(\"Unable to load: only ArrayBuffer supported here\", null);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n var onload = function (img) {\r\n if (fromBlob && !_this._doNotHandleContextLost) {\r\n // We need to store the image if we need to rebuild the texture\r\n // in case of a webgl context lost\r\n texture._buffer = img;\r\n }\r\n _this._prepareWebGLTexture(texture, scene, img.width, img.height, texture.invertY, noMipmap, false, function (potWidth, potHeight, continuationCallback) {\r\n var gl = _this._gl;\r\n var isPot = (img.width === potWidth && img.height === potHeight);\r\n var internalFormat = format ? _this._getInternalFormat(format) : ((extension === \".jpg\") ? gl.RGB : gl.RGBA);\r\n if (isPot) {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);\r\n return false;\r\n }\r\n var maxTextureSize = _this._caps.maxTextureSize;\r\n if (img.width > maxTextureSize || img.height > maxTextureSize || !_this._supportsHardwareTextureRescaling) {\r\n _this._prepareWorkingCanvas();\r\n if (!_this._workingCanvas || !_this._workingContext) {\r\n return false;\r\n }\r\n _this._workingCanvas.width = potWidth;\r\n _this._workingCanvas.height = potHeight;\r\n _this._workingContext.drawImage(img, 0, 0, img.width, img.height, 0, 0, potWidth, potHeight);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, _this._workingCanvas);\r\n texture.width = potWidth;\r\n texture.height = potHeight;\r\n return false;\r\n }\r\n else {\r\n // Using shaders when possible to rescale because canvas.drawImage is lossy\r\n var source_1 = new InternalTexture(_this, InternalTexture.DATASOURCE_TEMP);\r\n _this._bindTextureDirectly(gl.TEXTURE_2D, source_1, true);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);\r\n _this._rescaleTexture(source_1, texture, scene, internalFormat, function () {\r\n _this._releaseTexture(source_1);\r\n _this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n continuationCallback();\r\n });\r\n }\r\n return true;\r\n }, samplingMode);\r\n };\r\n if (!fromData || isBase64) {\r\n if (buffer instanceof HTMLImageElement) {\r\n onload(buffer);\r\n }\r\n else {\r\n FileTools.LoadImage(url, onload, onInternalError, scene ? scene.offlineProvider : null);\r\n }\r\n }\r\n else if (typeof buffer === \"string\" || buffer instanceof ArrayBuffer || ArrayBuffer.isView(buffer) || buffer instanceof Blob) {\r\n FileTools.LoadImage(buffer, onload, onInternalError, scene ? scene.offlineProvider : null);\r\n }\r\n else {\r\n onload(buffer);\r\n }\r\n }\r\n return texture;\r\n };\r\n /**\r\n * @hidden\r\n */\r\n ThinEngine.prototype._rescaleTexture = function (source, destination, scene, internalFormat, onComplete) {\r\n };\r\n /**\r\n * Creates a raw texture\r\n * @param data defines the data to store in the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param format defines the format of the data\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @returns the raw texture inside an InternalTexture\r\n */\r\n ThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression, type) {\r\n if (compression === void 0) { compression = null; }\r\n if (type === void 0) { type = Constants.TEXTURETYPE_UNSIGNED_INT; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /**\r\n * Creates a new raw cube texture\r\n * @param data defines the array of data to use to create each face\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compression used (null by default)\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n ThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression) {\r\n if (compression === void 0) { compression = null; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /**\r\n * Creates a new raw 3D texture\r\n * @param data defines the data used to create the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param depth defines the depth of the texture\r\n * @param format defines the format of the texture\r\n * @param generateMipMaps defines if the engine must generate mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compressed used (can be null)\r\n * @param textureType defines the compressed used (can be null)\r\n * @returns a new raw 3D texture (stored in an InternalTexture)\r\n */\r\n ThinEngine.prototype.createRawTexture3D = function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression, textureType) {\r\n if (compression === void 0) { compression = null; }\r\n if (textureType === void 0) { textureType = Constants.TEXTURETYPE_UNSIGNED_INT; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._unpackFlipY = function (value) {\r\n if (this._unpackFlipYCached !== value) {\r\n this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL, value ? 1 : 0);\r\n if (this.enableUnpackFlipYCached) {\r\n this._unpackFlipYCached = value;\r\n }\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getUnpackAlignement = function () {\r\n return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT);\r\n };\r\n /**\r\n * Update the sampling mode of a given texture\r\n * @param samplingMode defines the required sampling mode\r\n * @param texture defines the texture to update\r\n */\r\n ThinEngine.prototype.updateTextureSamplingMode = function (samplingMode, texture) {\r\n var filters = this._getSamplingParameters(samplingMode, texture.generateMipMaps);\r\n if (texture.isCube) {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n }\r\n else if (texture.is3D) {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n else {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n }\r\n texture.samplingMode = samplingMode;\r\n };\r\n /**\r\n * Updates a depth texture Comparison Mode and Function.\r\n * If the comparison Function is equal to 0, the mode will be set to none.\r\n * Otherwise, this only works in webgl 2 and requires a shadow sampler in the shader.\r\n * @param texture The texture to set the comparison function for\r\n * @param comparisonFunction The comparison function to set, 0 if no comparison required\r\n */\r\n ThinEngine.prototype.updateTextureComparisonFunction = function (texture, comparisonFunction) {\r\n if (this.webGLVersion === 1) {\r\n Logger.Error(\"WebGL 1 does not support texture comparison.\");\r\n return;\r\n }\r\n var gl = this._gl;\r\n if (texture.isCube) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);\r\n if (comparisonFunction === 0) {\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_FUNC, Constants.LEQUAL);\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_MODE, gl.NONE);\r\n }\r\n else {\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\r\n }\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n }\r\n else {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\r\n if (comparisonFunction === 0) {\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC, Constants.LEQUAL);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.NONE);\r\n }\r\n else {\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\r\n }\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n }\r\n texture._comparisonFunction = comparisonFunction;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setupDepthStencilTexture = function (internalTexture, size, generateStencil, bilinearFiltering, comparisonFunction) {\r\n var width = size.width || size;\r\n var height = size.height || size;\r\n internalTexture.baseWidth = width;\r\n internalTexture.baseHeight = height;\r\n internalTexture.width = width;\r\n internalTexture.height = height;\r\n internalTexture.isReady = true;\r\n internalTexture.samples = 1;\r\n internalTexture.generateMipMaps = false;\r\n internalTexture._generateDepthBuffer = true;\r\n internalTexture._generateStencilBuffer = generateStencil;\r\n internalTexture.samplingMode = bilinearFiltering ? Constants.TEXTURE_BILINEAR_SAMPLINGMODE : Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n internalTexture.type = Constants.TEXTURETYPE_UNSIGNED_INT;\r\n internalTexture._comparisonFunction = comparisonFunction;\r\n var gl = this._gl;\r\n var target = internalTexture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n var samplingParameters = this._getSamplingParameters(internalTexture.samplingMode, false);\r\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, samplingParameters.mag);\r\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, samplingParameters.min);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (comparisonFunction === 0) {\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, Constants.LEQUAL);\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.NONE);\r\n }\r\n else {\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\r\n }\r\n };\r\n /**\r\n * Creates a depth stencil texture.\r\n * This is only available in WebGL 2 or with the depth texture extension available.\r\n * @param size The size of face edge in the texture.\r\n * @param options The options defining the texture.\r\n * @returns The texture\r\n */\r\n ThinEngine.prototype.createDepthStencilTexture = function (size, options) {\r\n if (options.isCube) {\r\n var width = size.width || size;\r\n return this._createDepthStencilCubeTexture(width, options);\r\n }\r\n else {\r\n return this._createDepthStencilTexture(size, options);\r\n }\r\n };\r\n /**\r\n * Creates a depth stencil texture.\r\n * This is only available in WebGL 2 or with the depth texture extension available.\r\n * @param size The size of face edge in the texture.\r\n * @param options The options defining the texture.\r\n * @returns The texture\r\n */\r\n ThinEngine.prototype._createDepthStencilTexture = function (size, options) {\r\n var internalTexture = new InternalTexture(this, InternalTexture.DATASOURCE_DEPTHTEXTURE);\r\n if (!this._caps.depthTextureExtension) {\r\n Logger.Error(\"Depth texture is not supported by your browser or hardware.\");\r\n return internalTexture;\r\n }\r\n var internalOptions = tslib_1.__assign({ bilinearFiltering: false, comparisonFunction: 0, generateStencil: false }, options);\r\n var gl = this._gl;\r\n this._bindTextureDirectly(gl.TEXTURE_2D, internalTexture, true);\r\n this._setupDepthStencilTexture(internalTexture, size, internalOptions.generateStencil, internalOptions.bilinearFiltering, internalOptions.comparisonFunction);\r\n if (this.webGLVersion > 1) {\r\n if (internalOptions.generateStencil) {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH24_STENCIL8, internalTexture.width, internalTexture.height, 0, gl.DEPTH_STENCIL, gl.UNSIGNED_INT_24_8, null);\r\n }\r\n else {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH_COMPONENT24, internalTexture.width, internalTexture.height, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);\r\n }\r\n }\r\n else {\r\n if (internalOptions.generateStencil) {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH_STENCIL, internalTexture.width, internalTexture.height, 0, gl.DEPTH_STENCIL, gl.UNSIGNED_INT_24_8, null);\r\n }\r\n else {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH_COMPONENT, internalTexture.width, internalTexture.height, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);\r\n }\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n return internalTexture;\r\n };\r\n /**\r\n * Sets the frame buffer Depth / Stencil attachement of the render target to the defined depth stencil texture.\r\n * @param renderTarget The render target to set the frame buffer for\r\n */\r\n ThinEngine.prototype.setFrameBufferDepthStencilTexture = function (renderTarget) {\r\n // Create the framebuffer\r\n var internalTexture = renderTarget.getInternalTexture();\r\n if (!internalTexture || !internalTexture._framebuffer || !renderTarget.depthStencilTexture) {\r\n return;\r\n }\r\n var gl = this._gl;\r\n var depthStencilTexture = renderTarget.depthStencilTexture;\r\n this._bindUnboundFramebuffer(internalTexture._framebuffer);\r\n if (depthStencilTexture.isCube) {\r\n if (depthStencilTexture._generateStencilBuffer) {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X, depthStencilTexture._webGLTexture, 0);\r\n }\r\n else {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X, depthStencilTexture._webGLTexture, 0);\r\n }\r\n }\r\n else {\r\n if (depthStencilTexture._generateStencilBuffer) {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.TEXTURE_2D, depthStencilTexture._webGLTexture, 0);\r\n }\r\n else {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, depthStencilTexture._webGLTexture, 0);\r\n }\r\n }\r\n this._bindUnboundFramebuffer(null);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setupFramebufferDepthAttachments = function (generateStencilBuffer, generateDepthBuffer, width, height, samples) {\r\n if (samples === void 0) { samples = 1; }\r\n var depthStencilBuffer = null;\r\n var gl = this._gl;\r\n // Create the depth/stencil buffer\r\n if (generateStencilBuffer) {\r\n depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n if (samples > 1) {\r\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, gl.DEPTH24_STENCIL8, width, height);\r\n }\r\n else {\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\r\n }\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n else if (generateDepthBuffer) {\r\n depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n if (samples > 1) {\r\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, gl.DEPTH_COMPONENT16, width, height);\r\n }\r\n else {\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);\r\n }\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n return depthStencilBuffer;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadCompressedDataToTextureDirectly = function (texture, internalFormat, width, height, data, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n this._gl.compressedTexImage2D(target, lod, internalFormat, width, height, 0, data);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadDataToTextureDirectly = function (texture, imageData, faceIndex, lod, babylonInternalFormat, useTextureWidthAndHeight) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n if (useTextureWidthAndHeight === void 0) { useTextureWidthAndHeight = false; }\r\n var gl = this._gl;\r\n var textureType = this._getWebGLTextureType(texture.type);\r\n var format = this._getInternalFormat(texture.format);\r\n var internalFormat = babylonInternalFormat === undefined ? this._getRGBABufferInternalSizedFormat(texture.type, format) : this._getInternalFormat(babylonInternalFormat);\r\n this._unpackFlipY(texture.invertY);\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n var lodMaxWidth = Math.round(Math.log(texture.width) * Math.LOG2E);\r\n var lodMaxHeight = Math.round(Math.log(texture.height) * Math.LOG2E);\r\n var width = useTextureWidthAndHeight ? texture.width : Math.pow(2, Math.max(lodMaxWidth - lod, 0));\r\n var height = useTextureWidthAndHeight ? texture.height : Math.pow(2, Math.max(lodMaxHeight - lod, 0));\r\n gl.texImage2D(target, lod, internalFormat, width, height, 0, format, textureType, imageData);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadArrayBufferViewToTexture = function (texture, imageData, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n this._bindTextureDirectly(bindTarget, texture, true);\r\n this._uploadDataToTextureDirectly(texture, imageData, faceIndex, lod);\r\n this._bindTextureDirectly(bindTarget, null, true);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadImageToTexture = function (texture, image, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var textureType = this._getWebGLTextureType(texture.type);\r\n var format = this._getInternalFormat(texture.format);\r\n var internalFormat = this._getRGBABufferInternalSizedFormat(texture.type, format);\r\n var bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n this._bindTextureDirectly(bindTarget, texture, true);\r\n this._unpackFlipY(texture.invertY);\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n gl.texImage2D(target, lod, internalFormat, format, textureType, image);\r\n this._bindTextureDirectly(bindTarget, null, true);\r\n };\r\n /**\r\n * @hidden\r\n */\r\n ThinEngine.prototype._setCubeMapTextureParams = function (loadMipmap) {\r\n var gl = this._gl;\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, loadMipmap ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\r\n };\r\n ThinEngine.prototype._prepareWebGLTextureContinuation = function (texture, scene, noMipmap, isCompressed, samplingMode) {\r\n var gl = this._gl;\r\n if (!gl) {\r\n return;\r\n }\r\n var filters = this._getSamplingParameters(samplingMode, !noMipmap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filters.mag);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filters.min);\r\n if (!noMipmap && !isCompressed) {\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n // this.resetTextureCache();\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n texture.onLoadedObservable.notifyObservers(texture);\r\n texture.onLoadedObservable.clear();\r\n };\r\n ThinEngine.prototype._prepareWebGLTexture = function (texture, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {\r\n var _this = this;\r\n if (samplingMode === void 0) { samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE; }\r\n var maxTextureSize = this.getCaps().maxTextureSize;\r\n var potWidth = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(width, maxTextureSize) : width);\r\n var potHeight = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(height, maxTextureSize) : height);\r\n var gl = this._gl;\r\n if (!gl) {\r\n return;\r\n }\r\n if (!texture._webGLTexture) {\r\n // this.resetTextureCache();\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n return;\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n this._unpackFlipY(invertY === undefined ? true : (invertY ? true : false));\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = potWidth;\r\n texture.height = potHeight;\r\n texture.isReady = true;\r\n if (processFunction(potWidth, potHeight, function () {\r\n _this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\r\n })) {\r\n // Returning as texture needs extra async steps\r\n return;\r\n }\r\n this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseFramebufferObjects = function (texture) {\r\n var gl = this._gl;\r\n if (texture._framebuffer) {\r\n gl.deleteFramebuffer(texture._framebuffer);\r\n texture._framebuffer = null;\r\n }\r\n if (texture._depthStencilBuffer) {\r\n gl.deleteRenderbuffer(texture._depthStencilBuffer);\r\n texture._depthStencilBuffer = null;\r\n }\r\n if (texture._MSAAFramebuffer) {\r\n gl.deleteFramebuffer(texture._MSAAFramebuffer);\r\n texture._MSAAFramebuffer = null;\r\n }\r\n if (texture._MSAARenderBuffer) {\r\n gl.deleteRenderbuffer(texture._MSAARenderBuffer);\r\n texture._MSAARenderBuffer = null;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseTexture = function (texture) {\r\n this._releaseFramebufferObjects(texture);\r\n this._deleteTexture(texture._webGLTexture);\r\n // Unbind channels\r\n this.unbindAllTextures();\r\n var index = this._internalTexturesCache.indexOf(texture);\r\n if (index !== -1) {\r\n this._internalTexturesCache.splice(index, 1);\r\n }\r\n // Integrated fixed lod samplers.\r\n if (texture._lodTextureHigh) {\r\n texture._lodTextureHigh.dispose();\r\n }\r\n if (texture._lodTextureMid) {\r\n texture._lodTextureMid.dispose();\r\n }\r\n if (texture._lodTextureLow) {\r\n texture._lodTextureLow.dispose();\r\n }\r\n // Integrated irradiance map.\r\n if (texture._irradianceTexture) {\r\n texture._irradianceTexture.dispose();\r\n }\r\n };\r\n ThinEngine.prototype._deleteTexture = function (texture) {\r\n this._gl.deleteTexture(texture);\r\n };\r\n ThinEngine.prototype._setProgram = function (program) {\r\n if (this._currentProgram !== program) {\r\n this._gl.useProgram(program);\r\n this._currentProgram = program;\r\n }\r\n };\r\n /**\r\n * Binds an effect to the webGL context\r\n * @param effect defines the effect to bind\r\n */\r\n ThinEngine.prototype.bindSamplers = function (effect) {\r\n var webGLPipelineContext = effect.getPipelineContext();\r\n this._setProgram(webGLPipelineContext.program);\r\n var samplers = effect.getSamplers();\r\n for (var index = 0; index < samplers.length; index++) {\r\n var uniform = effect.getUniform(samplers[index]);\r\n if (uniform) {\r\n this._boundUniforms[index] = uniform;\r\n }\r\n }\r\n this._currentEffect = null;\r\n };\r\n ThinEngine.prototype._activateCurrentTexture = function () {\r\n if (this._currentTextureChannel !== this._activeChannel) {\r\n this._gl.activeTexture(this._gl.TEXTURE0 + this._activeChannel);\r\n this._currentTextureChannel = this._activeChannel;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindTextureDirectly = function (target, texture, forTextureDataUpdate, force) {\r\n if (forTextureDataUpdate === void 0) { forTextureDataUpdate = false; }\r\n if (force === void 0) { force = false; }\r\n var wasPreviouslyBound = false;\r\n var isTextureForRendering = texture && texture._associatedChannel > -1;\r\n if (forTextureDataUpdate && isTextureForRendering) {\r\n this._activeChannel = texture._associatedChannel;\r\n }\r\n var currentTextureBound = this._boundTexturesCache[this._activeChannel];\r\n if (currentTextureBound !== texture || force) {\r\n this._activateCurrentTexture();\r\n if (texture && texture.isMultiview) {\r\n this._gl.bindTexture(target, texture ? texture._colorTextureArray : null);\r\n }\r\n else {\r\n this._gl.bindTexture(target, texture ? texture._webGLTexture : null);\r\n }\r\n this._boundTexturesCache[this._activeChannel] = texture;\r\n if (texture) {\r\n texture._associatedChannel = this._activeChannel;\r\n }\r\n }\r\n else if (forTextureDataUpdate) {\r\n wasPreviouslyBound = true;\r\n this._activateCurrentTexture();\r\n }\r\n if (isTextureForRendering && !forTextureDataUpdate) {\r\n this._bindSamplerUniformToChannel(texture._associatedChannel, this._activeChannel);\r\n }\r\n return wasPreviouslyBound;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindTexture = function (channel, texture) {\r\n if (channel === undefined) {\r\n return;\r\n }\r\n if (texture) {\r\n texture._associatedChannel = channel;\r\n }\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture);\r\n };\r\n /**\r\n * Unbind all textures from the webGL context\r\n */\r\n ThinEngine.prototype.unbindAllTextures = function () {\r\n for (var channel = 0; channel < this._maxSimultaneousTextures; channel++) {\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n if (this.webGLVersion > 1) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a texture to the according uniform.\r\n * @param channel The texture channel\r\n * @param uniform The uniform to set\r\n * @param texture The texture to apply\r\n */\r\n ThinEngine.prototype.setTexture = function (channel, uniform, texture) {\r\n if (channel === undefined) {\r\n return;\r\n }\r\n if (uniform) {\r\n this._boundUniforms[channel] = uniform;\r\n }\r\n this._setTexture(channel, texture);\r\n };\r\n ThinEngine.prototype._bindSamplerUniformToChannel = function (sourceSlot, destination) {\r\n var uniform = this._boundUniforms[sourceSlot];\r\n if (!uniform || uniform._currentState === destination) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, destination);\r\n uniform._currentState = destination;\r\n };\r\n ThinEngine.prototype._getTextureWrapMode = function (mode) {\r\n switch (mode) {\r\n case Constants.TEXTURE_WRAP_ADDRESSMODE:\r\n return this._gl.REPEAT;\r\n case Constants.TEXTURE_CLAMP_ADDRESSMODE:\r\n return this._gl.CLAMP_TO_EDGE;\r\n case Constants.TEXTURE_MIRROR_ADDRESSMODE:\r\n return this._gl.MIRRORED_REPEAT;\r\n }\r\n return this._gl.REPEAT;\r\n };\r\n ThinEngine.prototype._setTexture = function (channel, texture, isPartOfTextureArray, depthStencilTexture) {\r\n if (isPartOfTextureArray === void 0) { isPartOfTextureArray = false; }\r\n if (depthStencilTexture === void 0) { depthStencilTexture = false; }\r\n // Not ready?\r\n if (!texture) {\r\n if (this._boundTexturesCache[channel] != null) {\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n if (this.webGLVersion > 1) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n }\r\n return false;\r\n }\r\n // Video\r\n if (texture.video) {\r\n this._activeChannel = channel;\r\n texture.update();\r\n }\r\n else if (texture.delayLoadState === Constants.DELAYLOADSTATE_NOTLOADED) { // Delay loading\r\n texture.delayLoad();\r\n return false;\r\n }\r\n var internalTexture;\r\n if (depthStencilTexture) {\r\n internalTexture = texture.depthStencilTexture;\r\n }\r\n else if (texture.isReady()) {\r\n internalTexture = texture.getInternalTexture();\r\n }\r\n else if (texture.isCube) {\r\n internalTexture = this.emptyCubeTexture;\r\n }\r\n else if (texture.is3D) {\r\n internalTexture = this.emptyTexture3D;\r\n }\r\n else {\r\n internalTexture = this.emptyTexture;\r\n }\r\n if (!isPartOfTextureArray && internalTexture) {\r\n internalTexture._associatedChannel = channel;\r\n }\r\n var needToBind = true;\r\n if (this._boundTexturesCache[channel] === internalTexture) {\r\n if (!isPartOfTextureArray) {\r\n this._bindSamplerUniformToChannel(internalTexture._associatedChannel, channel);\r\n }\r\n needToBind = false;\r\n }\r\n this._activeChannel = channel;\r\n if (internalTexture && internalTexture.isMultiview) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, internalTexture, isPartOfTextureArray);\r\n }\r\n }\r\n else if (internalTexture && internalTexture.is3D) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapU !== texture.wrapU) {\r\n internalTexture._cachedWrapU = texture.wrapU;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapV !== texture.wrapV) {\r\n internalTexture._cachedWrapV = texture.wrapV;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapR !== texture.wrapR) {\r\n internalTexture._cachedWrapR = texture.wrapR;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(texture.wrapR), internalTexture);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_3D, texture);\r\n }\r\n else if (internalTexture && internalTexture.isCube) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {\r\n internalTexture._cachedCoordinatesMode = texture.coordinatesMode;\r\n // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE. All other modes use REPEAT.\r\n var textureWrapMode = (texture.coordinatesMode !== Constants.TEXTURE_CUBIC_MODE && texture.coordinatesMode !== Constants.TEXTURE_SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_S, textureWrapMode, internalTexture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_T, textureWrapMode);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_CUBE_MAP, texture);\r\n }\r\n else {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapU !== texture.wrapU) {\r\n internalTexture._cachedWrapU = texture.wrapU;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapV !== texture.wrapV) {\r\n internalTexture._cachedWrapV = texture.wrapV;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_2D, texture);\r\n }\r\n return true;\r\n };\r\n /**\r\n * Sets an array of texture to the webGL context\r\n * @param channel defines the channel where the texture array must be set\r\n * @param uniform defines the associated uniform location\r\n * @param textures defines the array of textures to bind\r\n */\r\n ThinEngine.prototype.setTextureArray = function (channel, uniform, textures) {\r\n if (channel === undefined || !uniform) {\r\n return;\r\n }\r\n if (!this._textureUnits || this._textureUnits.length !== textures.length) {\r\n this._textureUnits = new Int32Array(textures.length);\r\n }\r\n for (var i = 0; i < textures.length; i++) {\r\n var texture = textures[i].getInternalTexture();\r\n if (texture) {\r\n this._textureUnits[i] = channel + i;\r\n texture._associatedChannel = channel + i;\r\n }\r\n else {\r\n this._textureUnits[i] = -1;\r\n }\r\n }\r\n this._gl.uniform1iv(uniform, this._textureUnits);\r\n for (var index = 0; index < textures.length; index++) {\r\n this._setTexture(this._textureUnits[index], textures[index], true);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setAnisotropicLevel = function (target, texture) {\r\n var internalTexture = texture.getInternalTexture();\r\n if (!internalTexture) {\r\n return;\r\n }\r\n var anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;\r\n var value = texture.anisotropicFilteringLevel;\r\n if (internalTexture.samplingMode !== Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST\r\n && internalTexture.samplingMode !== Constants.TEXTURE_LINEAR_LINEAR_MIPLINEAR\r\n && internalTexture.samplingMode !== Constants.TEXTURE_LINEAR_LINEAR) {\r\n value = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear\r\n }\r\n if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== value) {\r\n this._setTextureParameterFloat(target, anisotropicFilterExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(value, this._caps.maxAnisotropy), internalTexture);\r\n internalTexture._cachedAnisotropicFilteringLevel = value;\r\n }\r\n };\r\n ThinEngine.prototype._setTextureParameterFloat = function (target, parameter, value, texture) {\r\n this._bindTextureDirectly(target, texture, true, true);\r\n this._gl.texParameterf(target, parameter, value);\r\n };\r\n ThinEngine.prototype._setTextureParameterInteger = function (target, parameter, value, texture) {\r\n if (texture) {\r\n this._bindTextureDirectly(target, texture, true, true);\r\n }\r\n this._gl.texParameteri(target, parameter, value);\r\n };\r\n /**\r\n * Unbind all vertex attributes from the webGL context\r\n */\r\n ThinEngine.prototype.unbindAllAttributes = function () {\r\n if (this._mustWipeVertexAttributes) {\r\n this._mustWipeVertexAttributes = false;\r\n for (var i = 0; i < this._caps.maxVertexAttribs; i++) {\r\n this._gl.disableVertexAttribArray(i);\r\n this._vertexAttribArraysEnabled[i] = false;\r\n this._currentBufferPointers[i].active = false;\r\n }\r\n return;\r\n }\r\n for (var i = 0, ul = this._vertexAttribArraysEnabled.length; i < ul; i++) {\r\n if (i >= this._caps.maxVertexAttribs || !this._vertexAttribArraysEnabled[i]) {\r\n continue;\r\n }\r\n this._gl.disableVertexAttribArray(i);\r\n this._vertexAttribArraysEnabled[i] = false;\r\n this._currentBufferPointers[i].active = false;\r\n }\r\n };\r\n /**\r\n * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled\r\n */\r\n ThinEngine.prototype.releaseEffects = function () {\r\n for (var name in this._compiledEffects) {\r\n var webGLPipelineContext = this._compiledEffects[name].getPipelineContext();\r\n this._deletePipelineContext(webGLPipelineContext);\r\n }\r\n this._compiledEffects = {};\r\n };\r\n /**\r\n * Dispose and release all associated resources\r\n */\r\n ThinEngine.prototype.dispose = function () {\r\n this.stopRenderLoop();\r\n // Empty texture\r\n if (this._emptyTexture) {\r\n this._releaseTexture(this._emptyTexture);\r\n this._emptyTexture = null;\r\n }\r\n if (this._emptyCubeTexture) {\r\n this._releaseTexture(this._emptyCubeTexture);\r\n this._emptyCubeTexture = null;\r\n }\r\n // Release effects\r\n this.releaseEffects();\r\n // Unbind\r\n this.unbindAllAttributes();\r\n this._boundUniforms = [];\r\n // Events\r\n if (DomManagement.IsWindowObjectExist()) {\r\n if (this._renderingCanvas) {\r\n if (!this._doNotHandleContextLost) {\r\n this._renderingCanvas.removeEventListener(\"webglcontextlost\", this._onContextLost);\r\n this._renderingCanvas.removeEventListener(\"webglcontextrestored\", this._onContextRestored);\r\n }\r\n }\r\n }\r\n this._workingCanvas = null;\r\n this._workingContext = null;\r\n this._currentBufferPointers = [];\r\n this._renderingCanvas = null;\r\n this._currentProgram = null;\r\n this._bindedRenderFunction = null;\r\n Effect.ResetCache();\r\n // Abort active requests\r\n for (var _i = 0, _a = this._activeRequests; _i < _a.length; _i++) {\r\n var request = _a[_i];\r\n request.abort();\r\n }\r\n };\r\n /**\r\n * Attach a new callback raised when context lost event is fired\r\n * @param callback defines the callback to call\r\n */\r\n ThinEngine.prototype.attachContextLostEvent = function (callback) {\r\n if (this._renderingCanvas) {\r\n this._renderingCanvas.addEventListener(\"webglcontextlost\", callback, false);\r\n }\r\n };\r\n /**\r\n * Attach a new callback raised when context restored event is fired\r\n * @param callback defines the callback to call\r\n */\r\n ThinEngine.prototype.attachContextRestoredEvent = function (callback) {\r\n if (this._renderingCanvas) {\r\n this._renderingCanvas.addEventListener(\"webglcontextrestored\", callback, false);\r\n }\r\n };\r\n /**\r\n * Get the current error code of the webGL context\r\n * @returns the error code\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError\r\n */\r\n ThinEngine.prototype.getError = function () {\r\n return this._gl.getError();\r\n };\r\n ThinEngine.prototype._canRenderToFloatFramebuffer = function () {\r\n if (this._webGLVersion > 1) {\r\n return this._caps.colorBufferFloat;\r\n }\r\n return this._canRenderToFramebuffer(Constants.TEXTURETYPE_FLOAT);\r\n };\r\n ThinEngine.prototype._canRenderToHalfFloatFramebuffer = function () {\r\n if (this._webGLVersion > 1) {\r\n return this._caps.colorBufferFloat;\r\n }\r\n return this._canRenderToFramebuffer(Constants.TEXTURETYPE_HALF_FLOAT);\r\n };\r\n // Thank you : http://stackoverflow.com/questions/28827511/webgl-ios-render-to-floating-point-texture\r\n ThinEngine.prototype._canRenderToFramebuffer = function (type) {\r\n var gl = this._gl;\r\n //clear existing errors\r\n while (gl.getError() !== gl.NO_ERROR) { }\r\n var successful = true;\r\n var texture = gl.createTexture();\r\n gl.bindTexture(gl.TEXTURE_2D, texture);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, this._getRGBABufferInternalSizedFormat(type), 1, 1, 0, gl.RGBA, this._getWebGLTextureType(type), null);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\r\n var fb = gl.createFramebuffer();\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\r\n var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\r\n successful = successful && (status === gl.FRAMEBUFFER_COMPLETE);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n //try render by clearing frame buffer's color buffer\r\n if (successful) {\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n }\r\n //try reading from frame to ensure render occurs (just creating the FBO is not sufficient to determine if rendering is supported)\r\n if (successful) {\r\n //in practice it's sufficient to just read from the backbuffer rather than handle potentially issues reading from the texture\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n var readFormat = gl.RGBA;\r\n var readType = gl.UNSIGNED_BYTE;\r\n var buffer = new Uint8Array(4);\r\n gl.readPixels(0, 0, 1, 1, readFormat, readType, buffer);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n }\r\n //clean up\r\n gl.deleteTexture(texture);\r\n gl.deleteFramebuffer(fb);\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n //clear accumulated errors\r\n while (!successful && (gl.getError() !== gl.NO_ERROR)) { }\r\n return successful;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getWebGLTextureType = function (type) {\r\n if (this._webGLVersion === 1) {\r\n switch (type) {\r\n case Constants.TEXTURETYPE_FLOAT:\r\n return this._gl.FLOAT;\r\n case Constants.TEXTURETYPE_HALF_FLOAT:\r\n return this._gl.HALF_FLOAT_OES;\r\n case Constants.TEXTURETYPE_UNSIGNED_BYTE:\r\n return this._gl.UNSIGNED_BYTE;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:\r\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:\r\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:\r\n return this._gl.UNSIGNED_SHORT_5_6_5;\r\n }\r\n return this._gl.UNSIGNED_BYTE;\r\n }\r\n switch (type) {\r\n case Constants.TEXTURETYPE_BYTE:\r\n return this._gl.BYTE;\r\n case Constants.TEXTURETYPE_UNSIGNED_BYTE:\r\n return this._gl.UNSIGNED_BYTE;\r\n case Constants.TEXTURETYPE_SHORT:\r\n return this._gl.SHORT;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT:\r\n return this._gl.UNSIGNED_SHORT;\r\n case Constants.TEXTURETYPE_INT:\r\n return this._gl.INT;\r\n case Constants.TEXTURETYPE_UNSIGNED_INTEGER: // Refers to UNSIGNED_INT\r\n return this._gl.UNSIGNED_INT;\r\n case Constants.TEXTURETYPE_FLOAT:\r\n return this._gl.FLOAT;\r\n case Constants.TEXTURETYPE_HALF_FLOAT:\r\n return this._gl.HALF_FLOAT;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:\r\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:\r\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:\r\n return this._gl.UNSIGNED_SHORT_5_6_5;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:\r\n return this._gl.UNSIGNED_INT_2_10_10_10_REV;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_24_8:\r\n return this._gl.UNSIGNED_INT_24_8;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:\r\n return this._gl.UNSIGNED_INT_10F_11F_11F_REV;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:\r\n return this._gl.UNSIGNED_INT_5_9_9_9_REV;\r\n case Constants.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:\r\n return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV;\r\n }\r\n return this._gl.UNSIGNED_BYTE;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getInternalFormat = function (format) {\r\n var internalFormat = this._gl.RGBA;\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_ALPHA:\r\n internalFormat = this._gl.ALPHA;\r\n break;\r\n case Constants.TEXTUREFORMAT_LUMINANCE:\r\n internalFormat = this._gl.LUMINANCE;\r\n break;\r\n case Constants.TEXTUREFORMAT_LUMINANCE_ALPHA:\r\n internalFormat = this._gl.LUMINANCE_ALPHA;\r\n break;\r\n case Constants.TEXTUREFORMAT_RED:\r\n internalFormat = this._gl.RED;\r\n break;\r\n case Constants.TEXTUREFORMAT_RG:\r\n internalFormat = this._gl.RG;\r\n break;\r\n case Constants.TEXTUREFORMAT_RGB:\r\n internalFormat = this._gl.RGB;\r\n break;\r\n case Constants.TEXTUREFORMAT_RGBA:\r\n internalFormat = this._gl.RGBA;\r\n break;\r\n }\r\n if (this._webGLVersion > 1) {\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n internalFormat = this._gl.RED_INTEGER;\r\n break;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n internalFormat = this._gl.RG_INTEGER;\r\n break;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n internalFormat = this._gl.RGB_INTEGER;\r\n break;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n internalFormat = this._gl.RGBA_INTEGER;\r\n break;\r\n }\r\n }\r\n return internalFormat;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getRGBABufferInternalSizedFormat = function (type, format) {\r\n if (this._webGLVersion === 1) {\r\n if (format !== undefined) {\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_ALPHA:\r\n return this._gl.ALPHA;\r\n case Constants.TEXTUREFORMAT_LUMINANCE:\r\n return this._gl.LUMINANCE;\r\n case Constants.TEXTUREFORMAT_LUMINANCE_ALPHA:\r\n return this._gl.LUMINANCE_ALPHA;\r\n }\r\n }\r\n return this._gl.RGBA;\r\n }\r\n switch (type) {\r\n case Constants.TEXTURETYPE_BYTE:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED:\r\n return this._gl.R8_SNORM;\r\n case Constants.TEXTUREFORMAT_RG:\r\n return this._gl.RG8_SNORM;\r\n case Constants.TEXTUREFORMAT_RGB:\r\n return this._gl.RGB8_SNORM;\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n return this._gl.R8I;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n return this._gl.RG8I;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n return this._gl.RGB8I;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGBA8I;\r\n default:\r\n return this._gl.RGBA8_SNORM;\r\n }\r\n case Constants.TEXTURETYPE_UNSIGNED_BYTE:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED:\r\n return this._gl.R8;\r\n case Constants.TEXTUREFORMAT_RG:\r\n return this._gl.RG8;\r\n case Constants.TEXTUREFORMAT_RGB:\r\n return this._gl.RGB8; // By default. Other possibilities are RGB565, SRGB8.\r\n case Constants.TEXTUREFORMAT_RGBA:\r\n return this._gl.RGBA8; // By default. Other possibilities are RGB5_A1, RGBA4, SRGB8_ALPHA8.\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n return this._gl.R8UI;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n return this._gl.RG8UI;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n return this._gl.RGB8UI;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGBA8UI;\r\n case Constants.TEXTUREFORMAT_ALPHA:\r\n return this._gl.ALPHA;\r\n case Constants.TEXTUREFORMAT_LUMINANCE:\r\n return this._gl.LUMINANCE;\r\n case Constants.TEXTUREFORMAT_LUMINANCE_ALPHA:\r\n return this._gl.LUMINANCE_ALPHA;\r\n default:\r\n return this._gl.RGBA8;\r\n }\r\n case Constants.TEXTURETYPE_SHORT:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n return this._gl.R16I;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n return this._gl.RG16I;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n return this._gl.RGB16I;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGBA16I;\r\n default:\r\n return this._gl.RGBA16I;\r\n }\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n return this._gl.R16UI;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n return this._gl.RG16UI;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n return this._gl.RGB16UI;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGBA16UI;\r\n default:\r\n return this._gl.RGBA16UI;\r\n }\r\n case Constants.TEXTURETYPE_INT:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n return this._gl.R32I;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n return this._gl.RG32I;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n return this._gl.RGB32I;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGBA32I;\r\n default:\r\n return this._gl.RGBA32I;\r\n }\r\n case Constants.TEXTURETYPE_UNSIGNED_INTEGER: // Refers to UNSIGNED_INT\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED_INTEGER:\r\n return this._gl.R32UI;\r\n case Constants.TEXTUREFORMAT_RG_INTEGER:\r\n return this._gl.RG32UI;\r\n case Constants.TEXTUREFORMAT_RGB_INTEGER:\r\n return this._gl.RGB32UI;\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGBA32UI;\r\n default:\r\n return this._gl.RGBA32UI;\r\n }\r\n case Constants.TEXTURETYPE_FLOAT:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED:\r\n return this._gl.R32F; // By default. Other possibility is R16F.\r\n case Constants.TEXTUREFORMAT_RG:\r\n return this._gl.RG32F; // By default. Other possibility is RG16F.\r\n case Constants.TEXTUREFORMAT_RGB:\r\n return this._gl.RGB32F; // By default. Other possibilities are RGB16F, R11F_G11F_B10F, RGB9_E5.\r\n case Constants.TEXTUREFORMAT_RGBA:\r\n return this._gl.RGBA32F; // By default. Other possibility is RGBA16F.\r\n default:\r\n return this._gl.RGBA32F;\r\n }\r\n case Constants.TEXTURETYPE_HALF_FLOAT:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RED:\r\n return this._gl.R16F;\r\n case Constants.TEXTUREFORMAT_RG:\r\n return this._gl.RG16F;\r\n case Constants.TEXTUREFORMAT_RGB:\r\n return this._gl.RGB16F; // By default. Other possibilities are R11F_G11F_B10F, RGB9_E5.\r\n case Constants.TEXTUREFORMAT_RGBA:\r\n return this._gl.RGBA16F;\r\n default:\r\n return this._gl.RGBA16F;\r\n }\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:\r\n return this._gl.RGB565;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:\r\n return this._gl.R11F_G11F_B10F;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:\r\n return this._gl.RGB9_E5;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:\r\n return this._gl.RGBA4;\r\n case Constants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:\r\n return this._gl.RGB5_A1;\r\n case Constants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:\r\n switch (format) {\r\n case Constants.TEXTUREFORMAT_RGBA:\r\n return this._gl.RGB10_A2; // By default. Other possibility is RGB5_A1.\r\n case Constants.TEXTUREFORMAT_RGBA_INTEGER:\r\n return this._gl.RGB10_A2UI;\r\n default:\r\n return this._gl.RGB10_A2;\r\n }\r\n }\r\n return this._gl.RGBA8;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getRGBAMultiSampleBufferFormat = function (type) {\r\n if (type === Constants.TEXTURETYPE_FLOAT) {\r\n return this._gl.RGBA32F;\r\n }\r\n else if (type === Constants.TEXTURETYPE_HALF_FLOAT) {\r\n return this._gl.RGBA16F;\r\n }\r\n return this._gl.RGBA8;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._loadFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\r\n var _this = this;\r\n var request = FileTools.LoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);\r\n this._activeRequests.push(request);\r\n request.onCompleteObservable.add(function (request) {\r\n _this._activeRequests.splice(_this._activeRequests.indexOf(request), 1);\r\n });\r\n return request;\r\n };\r\n // Statics\r\n /**\r\n * Gets a boolean indicating if the engine can be instanciated (ie. if a webGL context can be found)\r\n * @returns true if the engine can be created\r\n * @ignorenaming\r\n */\r\n ThinEngine.isSupported = function () {\r\n try {\r\n var tempcanvas = document.createElement(\"canvas\");\r\n var gl = tempcanvas.getContext(\"webgl\") || tempcanvas.getContext(\"experimental-webgl\");\r\n return gl != null && !!window.WebGLRenderingContext;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Find the next highest power of two.\r\n * @param x Number to start search from.\r\n * @return Next highest power of two.\r\n */\r\n ThinEngine.CeilingPOT = function (x) {\r\n x--;\r\n x |= x >> 1;\r\n x |= x >> 2;\r\n x |= x >> 4;\r\n x |= x >> 8;\r\n x |= x >> 16;\r\n x++;\r\n return x;\r\n };\r\n /**\r\n * Find the next lowest power of two.\r\n * @param x Number to start search from.\r\n * @return Next lowest power of two.\r\n */\r\n ThinEngine.FloorPOT = function (x) {\r\n x = x | (x >> 1);\r\n x = x | (x >> 2);\r\n x = x | (x >> 4);\r\n x = x | (x >> 8);\r\n x = x | (x >> 16);\r\n return x - (x >> 1);\r\n };\r\n /**\r\n * Find the nearest power of two.\r\n * @param x Number to start search from.\r\n * @return Next nearest power of two.\r\n */\r\n ThinEngine.NearestPOT = function (x) {\r\n var c = ThinEngine.CeilingPOT(x);\r\n var f = ThinEngine.FloorPOT(x);\r\n return (c - x) > (x - f) ? f : c;\r\n };\r\n /**\r\n * Get the closest exponent of two\r\n * @param value defines the value to approximate\r\n * @param max defines the maximum value to return\r\n * @param mode defines how to define the closest value\r\n * @returns closest exponent of two of the given value\r\n */\r\n ThinEngine.GetExponentOfTwo = function (value, max, mode) {\r\n if (mode === void 0) { mode = Constants.SCALEMODE_NEAREST; }\r\n var pot;\r\n switch (mode) {\r\n case Constants.SCALEMODE_FLOOR:\r\n pot = ThinEngine.FloorPOT(value);\r\n break;\r\n case Constants.SCALEMODE_NEAREST:\r\n pot = ThinEngine.NearestPOT(value);\r\n break;\r\n case Constants.SCALEMODE_CEILING:\r\n default:\r\n pot = ThinEngine.CeilingPOT(value);\r\n break;\r\n }\r\n return Math.min(pot, max);\r\n };\r\n /**\r\n * Queue a new function into the requested animation frame pool (ie. this function will be executed byt the browser for the next frame)\r\n * @param func - the function to be called\r\n * @param requester - the object that will request the next frame. Falls back to window.\r\n * @returns frame number\r\n */\r\n ThinEngine.QueueNewFrame = function (func, requester) {\r\n if (!DomManagement.IsWindowObjectExist()) {\r\n return setTimeout(func, 16);\r\n }\r\n if (!requester) {\r\n requester = window;\r\n }\r\n if (requester.requestAnimationFrame) {\r\n return requester.requestAnimationFrame(func);\r\n }\r\n else if (requester.msRequestAnimationFrame) {\r\n return requester.msRequestAnimationFrame(func);\r\n }\r\n else if (requester.webkitRequestAnimationFrame) {\r\n return requester.webkitRequestAnimationFrame(func);\r\n }\r\n else if (requester.mozRequestAnimationFrame) {\r\n return requester.mozRequestAnimationFrame(func);\r\n }\r\n else if (requester.oRequestAnimationFrame) {\r\n return requester.oRequestAnimationFrame(func);\r\n }\r\n else {\r\n return window.setTimeout(func, 16);\r\n }\r\n };\r\n /** Use this array to turn off some WebGL2 features on known buggy browsers version */\r\n ThinEngine.ExceptionList = [\r\n { key: \"Chrome\\/63\\.0\", capture: \"63\\\\.0\\\\.3239\\\\.(\\\\d+)\", captureConstraint: 108, targets: [\"uniformBuffer\"] },\r\n { key: \"Firefox\\/58\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\r\n { key: \"Firefox\\/59\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\r\n { key: \"Chrome\\/72.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Chrome\\/73.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Chrome\\/74.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Mac OS.+Chrome\\/71\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Mac OS.+Chrome\\/72\", capture: null, captureConstraint: null, targets: [\"vao\"] }\r\n ];\r\n /** @hidden */\r\n ThinEngine._TextureLoaders = [];\r\n // Updatable statics so stick with vars here\r\n /**\r\n * Gets or sets the epsilon value used by collision engine\r\n */\r\n ThinEngine.CollisionsEpsilon = 0.001;\r\n return ThinEngine;\r\n}());\r\nexport { ThinEngine };\r\n//# sourceMappingURL=thinEngine.js.map" }, { "id": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "index": 32, "index2": 31, "size": 16680, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Materials/Textures/internalTexture", "loc": "12:0-72" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/Textures/internalTexture", "loc": "2399:48-63" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/Textures/internalTexture", "loc": "2399:70-85" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/Textures/internalTexture", "loc": "2523:43-58" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/Textures/internalTexture", "loc": "2523:66-81" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/Textures/internalTexture", "loc": "2742:34-49" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/Textures/internalTexture", "loc": "2742:56-71" } ], "providedExports": [ "InternalTexture" ], "optimizationBailout": [], "depth": 2, "source": "import { Observable } from \"../../Misc/observable\";\r\nimport { RenderTargetCreationOptions } from \"../../Materials/Textures/renderTargetCreationOptions\";\r\nimport { Constants } from \"../../Engines/constants\";\r\nimport { _DevTools } from '../../Misc/devTools';\r\n/**\r\n * Class used to store data associated with WebGL texture data for the engine\r\n * This class should not be used directly\r\n */\r\nvar InternalTexture = /** @class */ (function () {\r\n /**\r\n * Creates a new InternalTexture\r\n * @param engine defines the engine to use\r\n * @param dataSource defines the type of data that will be used\r\n * @param delayAllocation if the texture allocation should be delayed (default: false)\r\n */\r\n function InternalTexture(engine, dataSource, delayAllocation) {\r\n if (delayAllocation === void 0) { delayAllocation = false; }\r\n /**\r\n * Defines if the texture is ready\r\n */\r\n this.isReady = false;\r\n /**\r\n * Defines if the texture is a cube texture\r\n */\r\n this.isCube = false;\r\n /**\r\n * Defines if the texture contains 3D data\r\n */\r\n this.is3D = false;\r\n /**\r\n * Defines if the texture contains multiview data\r\n */\r\n this.isMultiview = false;\r\n /**\r\n * Gets the URL used to load this texture\r\n */\r\n this.url = \"\";\r\n /**\r\n * Gets the sampling mode of the texture\r\n */\r\n this.samplingMode = -1;\r\n /**\r\n * Gets a boolean indicating if the texture needs mipmaps generation\r\n */\r\n this.generateMipMaps = false;\r\n /**\r\n * Gets the number of samples used by the texture (WebGL2+ only)\r\n */\r\n this.samples = 0;\r\n /**\r\n * Gets the type of the texture (int, float...)\r\n */\r\n this.type = -1;\r\n /**\r\n * Gets the format of the texture (RGB, RGBA...)\r\n */\r\n this.format = -1;\r\n /**\r\n * Observable called when the texture is loaded\r\n */\r\n this.onLoadedObservable = new Observable();\r\n /**\r\n * Gets the width of the texture\r\n */\r\n this.width = 0;\r\n /**\r\n * Gets the height of the texture\r\n */\r\n this.height = 0;\r\n /**\r\n * Gets the depth of the texture\r\n */\r\n this.depth = 0;\r\n /**\r\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseWidth = 0;\r\n /**\r\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseHeight = 0;\r\n /**\r\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseDepth = 0;\r\n /**\r\n * Gets a boolean indicating if the texture is inverted on Y axis\r\n */\r\n this.invertY = false;\r\n // Private\r\n /** @hidden */\r\n this._invertVScale = false;\r\n /** @hidden */\r\n this._associatedChannel = -1;\r\n /** @hidden */\r\n this._dataSource = InternalTexture.DATASOURCE_UNKNOWN;\r\n /** @hidden */\r\n this._buffer = null;\r\n /** @hidden */\r\n this._bufferView = null;\r\n /** @hidden */\r\n this._bufferViewArray = null;\r\n /** @hidden */\r\n this._bufferViewArrayArray = null;\r\n /** @hidden */\r\n this._size = 0;\r\n /** @hidden */\r\n this._extension = \"\";\r\n /** @hidden */\r\n this._files = null;\r\n /** @hidden */\r\n this._workingCanvas = null;\r\n /** @hidden */\r\n this._workingContext = null;\r\n /** @hidden */\r\n this._framebuffer = null;\r\n /** @hidden */\r\n this._depthStencilBuffer = null;\r\n /** @hidden */\r\n this._MSAAFramebuffer = null;\r\n /** @hidden */\r\n this._MSAARenderBuffer = null;\r\n /** @hidden */\r\n this._attachments = null;\r\n /** @hidden */\r\n this._cachedCoordinatesMode = null;\r\n /** @hidden */\r\n this._cachedWrapU = null;\r\n /** @hidden */\r\n this._cachedWrapV = null;\r\n /** @hidden */\r\n this._cachedWrapR = null;\r\n /** @hidden */\r\n this._cachedAnisotropicFilteringLevel = null;\r\n /** @hidden */\r\n this._isDisabled = false;\r\n /** @hidden */\r\n this._compression = null;\r\n /** @hidden */\r\n this._generateStencilBuffer = false;\r\n /** @hidden */\r\n this._generateDepthBuffer = false;\r\n /** @hidden */\r\n this._comparisonFunction = 0;\r\n /** @hidden */\r\n this._sphericalPolynomial = null;\r\n /** @hidden */\r\n this._lodGenerationScale = 0;\r\n /** @hidden */\r\n this._lodGenerationOffset = 0;\r\n // Multiview\r\n /** @hidden */\r\n this._colorTextureArray = null;\r\n /** @hidden */\r\n this._depthStencilTextureArray = null;\r\n // The following three fields helps sharing generated fixed LODs for texture filtering\r\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\r\n // They are at the level of the gl texture to benefit from the cache.\r\n /** @hidden */\r\n this._lodTextureHigh = null;\r\n /** @hidden */\r\n this._lodTextureMid = null;\r\n /** @hidden */\r\n this._lodTextureLow = null;\r\n /** @hidden */\r\n this._isRGBD = false;\r\n /** @hidden */\r\n this._linearSpecularLOD = false;\r\n /** @hidden */\r\n this._irradianceTexture = null;\r\n /** @hidden */\r\n this._webGLTexture = null;\r\n /** @hidden */\r\n this._references = 1;\r\n this._engine = engine;\r\n this._dataSource = dataSource;\r\n if (!delayAllocation) {\r\n this._webGLTexture = engine._createTexture();\r\n }\r\n }\r\n /**\r\n * Gets the Engine the texture belongs to.\r\n * @returns The babylon engine\r\n */\r\n InternalTexture.prototype.getEngine = function () {\r\n return this._engine;\r\n };\r\n Object.defineProperty(InternalTexture.prototype, \"dataSource\", {\r\n /**\r\n * Gets the data source type of the texture (can be one of the InternalTexture.DATASOURCE_XXXX)\r\n */\r\n get: function () {\r\n return this._dataSource;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Increments the number of references (ie. the number of Texture that point to it)\r\n */\r\n InternalTexture.prototype.incrementReferences = function () {\r\n this._references++;\r\n };\r\n /**\r\n * Change the size of the texture (not the size of the content)\r\n * @param width defines the new width\r\n * @param height defines the new height\r\n * @param depth defines the new depth (1 by default)\r\n */\r\n InternalTexture.prototype.updateSize = function (width, height, depth) {\r\n if (depth === void 0) { depth = 1; }\r\n this.width = width;\r\n this.height = height;\r\n this.depth = depth;\r\n this.baseWidth = width;\r\n this.baseHeight = height;\r\n this.baseDepth = depth;\r\n this._size = width * height * depth;\r\n };\r\n /** @hidden */\r\n InternalTexture.prototype._rebuild = function () {\r\n var _this = this;\r\n var proxy;\r\n this.isReady = false;\r\n this._cachedCoordinatesMode = null;\r\n this._cachedWrapU = null;\r\n this._cachedWrapV = null;\r\n this._cachedAnisotropicFilteringLevel = null;\r\n switch (this._dataSource) {\r\n case InternalTexture.DATASOURCE_TEMP:\r\n return;\r\n case InternalTexture.DATASOURCE_URL:\r\n proxy = this._engine.createTexture(this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n }, null, this._buffer, undefined, this.format);\r\n return;\r\n case InternalTexture.DATASOURCE_RAW:\r\n proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTexture.DATASOURCE_RAW3D:\r\n proxy = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTexture.DATASOURCE_DYNAMIC:\r\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\r\n proxy._swapAndDie(this);\r\n this._engine.updateDynamicTexture(this, this._engine.getRenderingCanvas(), this.invertY, undefined, undefined, true);\r\n // The engine will make sure to update content so no need to flag it as isReady = true\r\n return;\r\n case InternalTexture.DATASOURCE_RENDERTARGET:\r\n var options = new RenderTargetCreationOptions();\r\n options.generateDepthBuffer = this._generateDepthBuffer;\r\n options.generateMipMaps = this.generateMipMaps;\r\n options.generateStencilBuffer = this._generateStencilBuffer;\r\n options.samplingMode = this.samplingMode;\r\n options.type = this.type;\r\n if (this.isCube) {\r\n proxy = this._engine.createRenderTargetCubeTexture(this.width, options);\r\n }\r\n else {\r\n var size = {\r\n width: this.width,\r\n height: this.height\r\n };\r\n proxy = this._engine.createRenderTargetTexture(size, options);\r\n }\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTexture.DATASOURCE_DEPTHTEXTURE:\r\n var depthTextureOptions = {\r\n bilinearFiltering: this.samplingMode !== Constants.TEXTURE_BILINEAR_SAMPLINGMODE,\r\n comparisonFunction: this._comparisonFunction,\r\n generateStencil: this._generateStencilBuffer,\r\n isCube: this.isCube\r\n };\r\n proxy = this._engine.createDepthStencilTexture({ width: this.width, height: this.height }, depthTextureOptions);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTexture.DATASOURCE_CUBE:\r\n proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n }, null, this.format, this._extension);\r\n return;\r\n case InternalTexture.DATASOURCE_CUBERAW:\r\n proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTexture.DATASOURCE_CUBERAW_RGBD:\r\n proxy = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n InternalTexture._UpdateRGBDAsync(proxy, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n });\r\n return;\r\n case InternalTexture.DATASOURCE_CUBEPREFILTERED:\r\n proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, function (proxy) {\r\n if (proxy) {\r\n proxy._swapAndDie(_this);\r\n }\r\n _this.isReady = true;\r\n }, null, this.format, this._extension);\r\n proxy._sphericalPolynomial = this._sphericalPolynomial;\r\n return;\r\n }\r\n };\r\n /** @hidden */\r\n InternalTexture.prototype._swapAndDie = function (target) {\r\n target._webGLTexture = this._webGLTexture;\r\n target._isRGBD = this._isRGBD;\r\n if (this._framebuffer) {\r\n target._framebuffer = this._framebuffer;\r\n }\r\n if (this._depthStencilBuffer) {\r\n target._depthStencilBuffer = this._depthStencilBuffer;\r\n }\r\n if (this._lodTextureHigh) {\r\n if (target._lodTextureHigh) {\r\n target._lodTextureHigh.dispose();\r\n }\r\n target._lodTextureHigh = this._lodTextureHigh;\r\n }\r\n if (this._lodTextureMid) {\r\n if (target._lodTextureMid) {\r\n target._lodTextureMid.dispose();\r\n }\r\n target._lodTextureMid = this._lodTextureMid;\r\n }\r\n if (this._lodTextureLow) {\r\n if (target._lodTextureLow) {\r\n target._lodTextureLow.dispose();\r\n }\r\n target._lodTextureLow = this._lodTextureLow;\r\n }\r\n if (this._irradianceTexture) {\r\n if (target._irradianceTexture) {\r\n target._irradianceTexture.dispose();\r\n }\r\n target._irradianceTexture = this._irradianceTexture;\r\n }\r\n var cache = this._engine.getLoadedTexturesCache();\r\n var index = cache.indexOf(this);\r\n if (index !== -1) {\r\n cache.splice(index, 1);\r\n }\r\n var index = cache.indexOf(target);\r\n if (index === -1) {\r\n cache.push(target);\r\n }\r\n };\r\n /**\r\n * Dispose the current allocated resources\r\n */\r\n InternalTexture.prototype.dispose = function () {\r\n if (!this._webGLTexture) {\r\n return;\r\n }\r\n this._references--;\r\n if (this._references === 0) {\r\n this._engine._releaseTexture(this);\r\n this._webGLTexture = null;\r\n }\r\n };\r\n /** @hidden */\r\n InternalTexture._UpdateRGBDAsync = function (internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {\r\n throw _DevTools.WarnImport(\"environmentTextureTools\");\r\n };\r\n /**\r\n * The source of the texture data is unknown\r\n */\r\n InternalTexture.DATASOURCE_UNKNOWN = 0;\r\n /**\r\n * Texture data comes from an URL\r\n */\r\n InternalTexture.DATASOURCE_URL = 1;\r\n /**\r\n * Texture data is only used for temporary storage\r\n */\r\n InternalTexture.DATASOURCE_TEMP = 2;\r\n /**\r\n * Texture data comes from raw data (ArrayBuffer)\r\n */\r\n InternalTexture.DATASOURCE_RAW = 3;\r\n /**\r\n * Texture content is dynamic (video or dynamic texture)\r\n */\r\n InternalTexture.DATASOURCE_DYNAMIC = 4;\r\n /**\r\n * Texture content is generated by rendering to it\r\n */\r\n InternalTexture.DATASOURCE_RENDERTARGET = 5;\r\n /**\r\n * Texture content is part of a multi render target process\r\n */\r\n InternalTexture.DATASOURCE_MULTIRENDERTARGET = 6;\r\n /**\r\n * Texture data comes from a cube data file\r\n */\r\n InternalTexture.DATASOURCE_CUBE = 7;\r\n /**\r\n * Texture data comes from a raw cube data\r\n */\r\n InternalTexture.DATASOURCE_CUBERAW = 8;\r\n /**\r\n * Texture data come from a prefiltered cube data file\r\n */\r\n InternalTexture.DATASOURCE_CUBEPREFILTERED = 9;\r\n /**\r\n * Texture content is raw 3D data\r\n */\r\n InternalTexture.DATASOURCE_RAW3D = 10;\r\n /**\r\n * Texture content is a depth texture\r\n */\r\n InternalTexture.DATASOURCE_DEPTHTEXTURE = 11;\r\n /**\r\n * Texture data comes from a raw cube data encoded with RGBD\r\n */\r\n InternalTexture.DATASOURCE_CUBERAW_RGBD = 12;\r\n return InternalTexture;\r\n}());\r\nexport { InternalTexture };\r\n//# sourceMappingURL=internalTexture.js.map" }, { "id": "../../.temp/packageES6Dev/core/Materials/Textures/renderTargetCreationOptions.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\renderTargetCreationOptions.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/renderTargetCreationOptions.js", "index": 33, "index2": 30, "size": 329, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "issuerId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } } ], "profile": { "factory": 43, "building": 9 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "type": "harmony side effect evaluation", "userRequest": "../../Materials/Textures/renderTargetCreationOptions", "loc": "2:0-99" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "type": "harmony import specifier", "userRequest": "../../Materials/Textures/renderTargetCreationOptions", "loc": "255:34-61" } ], "providedExports": [ "RenderTargetCreationOptions" ], "optimizationBailout": [], "depth": 3, "source": "/**\r\n * Define options used to create a render target texture\r\n */\r\nvar RenderTargetCreationOptions = /** @class */ (function () {\r\n function RenderTargetCreationOptions() {\r\n }\r\n return RenderTargetCreationOptions;\r\n}());\r\nexport { RenderTargetCreationOptions };\r\n//# sourceMappingURL=renderTargetCreationOptions.js.map" }, { "id": "../../.temp/packageES6Dev/core/Materials/effect.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "index": 4, "index2": 22, "size": 50320, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Materials/effect", "loc": "3:0-45" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/effect", "loc": "349:19-25" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/effect", "loc": "352:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/effect", "loc": "491:8-14" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/effect", "loc": "1697:25-31" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Materials/effect", "loc": "3343:8-14" } ], "providedExports": [ "EffectFallbacks", "EffectCreationOptions", "Effect" ], "optimizationBailout": [], "depth": 2, "source": "import { Observable } from \"../Misc/observable\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { DomManagement } from \"../Misc/domManagement\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { ShaderProcessor } from '../Engines/Processors/shaderProcessor';\r\n/**\r\n * EffectFallbacks can be used to add fallbacks (properties to disable) to certain properties when desired to improve performance.\r\n * (Eg. Start at high quality with reflection and fog, if fps is low, remove reflection, if still low remove fog)\r\n */\r\nvar EffectFallbacks = /** @class */ (function () {\r\n function EffectFallbacks() {\r\n this._defines = {};\r\n this._currentRank = 32;\r\n this._maxRank = -1;\r\n this._mesh = null;\r\n }\r\n /**\r\n * Removes the fallback from the bound mesh.\r\n */\r\n EffectFallbacks.prototype.unBindMesh = function () {\r\n this._mesh = null;\r\n };\r\n /**\r\n * Adds a fallback on the specified property.\r\n * @param rank The rank of the fallback (Lower ranks will be fallbacked to first)\r\n * @param define The name of the define in the shader\r\n */\r\n EffectFallbacks.prototype.addFallback = function (rank, define) {\r\n if (!this._defines[rank]) {\r\n if (rank < this._currentRank) {\r\n this._currentRank = rank;\r\n }\r\n if (rank > this._maxRank) {\r\n this._maxRank = rank;\r\n }\r\n this._defines[rank] = new Array();\r\n }\r\n this._defines[rank].push(define);\r\n };\r\n /**\r\n * Sets the mesh to use CPU skinning when needing to fallback.\r\n * @param rank The rank of the fallback (Lower ranks will be fallbacked to first)\r\n * @param mesh The mesh to use the fallbacks.\r\n */\r\n EffectFallbacks.prototype.addCPUSkinningFallback = function (rank, mesh) {\r\n this._mesh = mesh;\r\n if (rank < this._currentRank) {\r\n this._currentRank = rank;\r\n }\r\n if (rank > this._maxRank) {\r\n this._maxRank = rank;\r\n }\r\n };\r\n Object.defineProperty(EffectFallbacks.prototype, \"hasMoreFallbacks\", {\r\n /**\r\n * Checks to see if more fallbacks are still availible.\r\n */\r\n get: function () {\r\n return this._currentRank <= this._maxRank;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Removes the defines that should be removed when falling back.\r\n * @param currentDefines defines the current define statements for the shader.\r\n * @param effect defines the current effect we try to compile\r\n * @returns The resulting defines with defines of the current rank removed.\r\n */\r\n EffectFallbacks.prototype.reduce = function (currentDefines, effect) {\r\n // First we try to switch to CPU skinning\r\n if (this._mesh && this._mesh.computeBonesUsingShaders && this._mesh.numBoneInfluencers > 0) {\r\n this._mesh.computeBonesUsingShaders = false;\r\n currentDefines = currentDefines.replace(\"#define NUM_BONE_INFLUENCERS \" + this._mesh.numBoneInfluencers, \"#define NUM_BONE_INFLUENCERS 0\");\r\n effect._bonesComputationForcedToCPU = true;\r\n var scene = this._mesh.getScene();\r\n for (var index = 0; index < scene.meshes.length; index++) {\r\n var otherMesh = scene.meshes[index];\r\n if (!otherMesh.material) {\r\n if (!this._mesh.material && otherMesh.computeBonesUsingShaders && otherMesh.numBoneInfluencers > 0) {\r\n otherMesh.computeBonesUsingShaders = false;\r\n }\r\n continue;\r\n }\r\n if (!otherMesh.computeBonesUsingShaders || otherMesh.numBoneInfluencers === 0) {\r\n continue;\r\n }\r\n if (otherMesh.material.getEffect() === effect) {\r\n otherMesh.computeBonesUsingShaders = false;\r\n }\r\n else if (otherMesh.subMeshes) {\r\n for (var _i = 0, _a = otherMesh.subMeshes; _i < _a.length; _i++) {\r\n var subMesh = _a[_i];\r\n var subMeshEffect = subMesh.effect;\r\n if (subMeshEffect === effect) {\r\n otherMesh.computeBonesUsingShaders = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n var currentFallbacks = this._defines[this._currentRank];\r\n if (currentFallbacks) {\r\n for (var index = 0; index < currentFallbacks.length; index++) {\r\n currentDefines = currentDefines.replace(\"#define \" + currentFallbacks[index], \"\");\r\n }\r\n }\r\n this._currentRank++;\r\n }\r\n return currentDefines;\r\n };\r\n return EffectFallbacks;\r\n}());\r\nexport { EffectFallbacks };\r\n/**\r\n * Options to be used when creating an effect.\r\n */\r\nvar EffectCreationOptions = /** @class */ (function () {\r\n function EffectCreationOptions() {\r\n }\r\n return EffectCreationOptions;\r\n}());\r\nexport { EffectCreationOptions };\r\n/**\r\n * Effect containing vertex and fragment shader that can be executed on an object.\r\n */\r\nvar Effect = /** @class */ (function () {\r\n /**\r\n * Instantiates an effect.\r\n * An effect can be used to create/manage/execute vertex and fragment shaders.\r\n * @param baseName Name of the effect.\r\n * @param attributesNamesOrOptions List of attribute names that will be passed to the shader or set of all options to create the effect.\r\n * @param uniformsNamesOrEngine List of uniform variable names that will be passed to the shader or the engine that will be used to render effect.\r\n * @param samplers List of sampler variables that will be passed to the shader.\r\n * @param engine Engine to be used to render the effect\r\n * @param defines Define statements to be added to the shader.\r\n * @param fallbacks Possible fallbacks for this effect to improve performance when needed.\r\n * @param onCompiled Callback that will be called when the shader is compiled.\r\n * @param onError Callback that will be called if an error occurs during shader compilation.\r\n * @param indexParameters Parameters to be used with Babylons include syntax to iterate over an array (eg. {lights: 10})\r\n */\r\n function Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, engine, defines, fallbacks, onCompiled, onError, indexParameters) {\r\n var _this = this;\r\n if (samplers === void 0) { samplers = null; }\r\n if (defines === void 0) { defines = null; }\r\n if (fallbacks === void 0) { fallbacks = null; }\r\n if (onCompiled === void 0) { onCompiled = null; }\r\n if (onError === void 0) { onError = null; }\r\n /**\r\n * Name of the effect.\r\n */\r\n this.name = null;\r\n /**\r\n * String container all the define statements that should be set on the shader.\r\n */\r\n this.defines = \"\";\r\n /**\r\n * Callback that will be called when the shader is compiled.\r\n */\r\n this.onCompiled = null;\r\n /**\r\n * Callback that will be called if an error occurs during shader compilation.\r\n */\r\n this.onError = null;\r\n /**\r\n * Callback that will be called when effect is bound.\r\n */\r\n this.onBind = null;\r\n /**\r\n * Unique ID of the effect.\r\n */\r\n this.uniqueId = 0;\r\n /**\r\n * Observable that will be called when the shader is compiled.\r\n * It is recommended to use executeWhenCompile() or to make sure that scene.isReady() is called to get this observable raised.\r\n */\r\n this.onCompileObservable = new Observable();\r\n /**\r\n * Observable that will be called if an error occurs during shader compilation.\r\n */\r\n this.onErrorObservable = new Observable();\r\n /** @hidden */\r\n this._onBindObservable = null;\r\n /** @hidden */\r\n this._bonesComputationForcedToCPU = false;\r\n this._uniformBuffersNames = {};\r\n this._samplers = {};\r\n this._isReady = false;\r\n this._compilationError = \"\";\r\n this._uniforms = {};\r\n /**\r\n * Key for the effect.\r\n * @hidden\r\n */\r\n this._key = \"\";\r\n this._fallbacks = null;\r\n this._vertexSourceCode = \"\";\r\n this._fragmentSourceCode = \"\";\r\n this._vertexSourceCodeOverride = \"\";\r\n this._fragmentSourceCodeOverride = \"\";\r\n this._transformFeedbackVaryings = null;\r\n /**\r\n * Compiled shader to webGL program.\r\n * @hidden\r\n */\r\n this._pipelineContext = null;\r\n this._valueCache = {};\r\n this.name = baseName;\r\n if (attributesNamesOrOptions.attributes) {\r\n var options = attributesNamesOrOptions;\r\n this._engine = uniformsNamesOrEngine;\r\n this._attributesNames = options.attributes;\r\n this._uniformsNames = options.uniformsNames.concat(options.samplers);\r\n this._samplerList = options.samplers.slice();\r\n this.defines = options.defines;\r\n this.onError = options.onError;\r\n this.onCompiled = options.onCompiled;\r\n this._fallbacks = options.fallbacks;\r\n this._indexParameters = options.indexParameters;\r\n this._transformFeedbackVaryings = options.transformFeedbackVaryings;\r\n if (options.uniformBuffersNames) {\r\n for (var i = 0; i < options.uniformBuffersNames.length; i++) {\r\n this._uniformBuffersNames[options.uniformBuffersNames[i]] = i;\r\n }\r\n }\r\n }\r\n else {\r\n this._engine = engine;\r\n this.defines = (defines == null ? \"\" : defines);\r\n this._uniformsNames = uniformsNamesOrEngine.concat(samplers);\r\n this._samplerList = samplers ? samplers.slice() : [];\r\n this._attributesNames = attributesNamesOrOptions;\r\n this.onError = onError;\r\n this.onCompiled = onCompiled;\r\n this._indexParameters = indexParameters;\r\n this._fallbacks = fallbacks;\r\n }\r\n this.uniqueId = Effect._uniqueIdSeed++;\r\n var vertexSource;\r\n var fragmentSource;\r\n if (baseName.vertexSource) {\r\n vertexSource = \"source:\" + baseName.vertexSource;\r\n }\r\n else if (baseName.vertexElement) {\r\n vertexSource = document.getElementById(baseName.vertexElement);\r\n if (!vertexSource) {\r\n vertexSource = baseName.vertexElement;\r\n }\r\n }\r\n else {\r\n vertexSource = baseName.vertex || baseName;\r\n }\r\n if (baseName.fragmentSource) {\r\n fragmentSource = \"source:\" + baseName.fragmentSource;\r\n }\r\n else if (baseName.fragmentElement) {\r\n fragmentSource = document.getElementById(baseName.fragmentElement);\r\n if (!fragmentSource) {\r\n fragmentSource = baseName.fragmentElement;\r\n }\r\n }\r\n else {\r\n fragmentSource = baseName.fragment || baseName;\r\n }\r\n var processorOptions = {\r\n defines: this.defines.split(\"\\n\"),\r\n indexParameters: this._indexParameters,\r\n isFragment: false,\r\n shouldUseHighPrecisionShader: this._engine._shouldUseHighPrecisionShader,\r\n processor: this._engine._shaderProcessor,\r\n supportsUniformBuffers: this._engine.supportsUniformBuffers,\r\n shadersRepository: Effect.ShadersRepository,\r\n includesShadersStore: Effect.IncludesShadersStore,\r\n version: (this._engine.webGLVersion * 100).toString(),\r\n platformName: this._engine.webGLVersion >= 2 ? \"WEBGL2\" : \"WEBGL1\"\r\n };\r\n this._loadVertexShader(vertexSource, function (vertexCode) {\r\n _this._loadFragmentShader(fragmentSource, function (fragmentCode) {\r\n ShaderProcessor.Process(vertexCode, processorOptions, function (migratedVertexCode) {\r\n processorOptions.isFragment = true;\r\n ShaderProcessor.Process(fragmentCode, processorOptions, function (migratedFragmentCode) {\r\n _this._useFinalCode(migratedVertexCode, migratedFragmentCode, baseName);\r\n });\r\n });\r\n });\r\n });\r\n }\r\n Object.defineProperty(Effect.prototype, \"onBindObservable\", {\r\n /**\r\n * Observable that will be called when effect is bound.\r\n */\r\n get: function () {\r\n if (!this._onBindObservable) {\r\n this._onBindObservable = new Observable();\r\n }\r\n return this._onBindObservable;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Effect.prototype._useFinalCode = function (migratedVertexCode, migratedFragmentCode, baseName) {\r\n if (baseName) {\r\n var vertex = baseName.vertexElement || baseName.vertex || baseName.spectorName || baseName;\r\n var fragment = baseName.fragmentElement || baseName.fragment || baseName.spectorName || baseName;\r\n this._vertexSourceCode = \"#define SHADER_NAME vertex:\" + vertex + \"\\n\" + migratedVertexCode;\r\n this._fragmentSourceCode = \"#define SHADER_NAME fragment:\" + fragment + \"\\n\" + migratedFragmentCode;\r\n }\r\n else {\r\n this._vertexSourceCode = migratedVertexCode;\r\n this._fragmentSourceCode = migratedFragmentCode;\r\n }\r\n this._prepareEffect();\r\n };\r\n Object.defineProperty(Effect.prototype, \"key\", {\r\n /**\r\n * Unique key for this effect\r\n */\r\n get: function () {\r\n return this._key;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * If the effect has been compiled and prepared.\r\n * @returns if the effect is compiled and prepared.\r\n */\r\n Effect.prototype.isReady = function () {\r\n try {\r\n return this._isReadyInternal();\r\n }\r\n catch (_a) {\r\n return false;\r\n }\r\n };\r\n Effect.prototype._isReadyInternal = function () {\r\n if (this._isReady) {\r\n return true;\r\n }\r\n if (this._pipelineContext) {\r\n return this._pipelineContext.isReady;\r\n }\r\n return false;\r\n };\r\n /**\r\n * The engine the effect was initialized with.\r\n * @returns the engine.\r\n */\r\n Effect.prototype.getEngine = function () {\r\n return this._engine;\r\n };\r\n /**\r\n * The pipeline context for this effect\r\n * @returns the associated pipeline context\r\n */\r\n Effect.prototype.getPipelineContext = function () {\r\n return this._pipelineContext;\r\n };\r\n /**\r\n * The set of names of attribute variables for the shader.\r\n * @returns An array of attribute names.\r\n */\r\n Effect.prototype.getAttributesNames = function () {\r\n return this._attributesNames;\r\n };\r\n /**\r\n * Returns the attribute at the given index.\r\n * @param index The index of the attribute.\r\n * @returns The location of the attribute.\r\n */\r\n Effect.prototype.getAttributeLocation = function (index) {\r\n return this._attributes[index];\r\n };\r\n /**\r\n * Returns the attribute based on the name of the variable.\r\n * @param name of the attribute to look up.\r\n * @returns the attribute location.\r\n */\r\n Effect.prototype.getAttributeLocationByName = function (name) {\r\n var index = this._attributesNames.indexOf(name);\r\n return this._attributes[index];\r\n };\r\n /**\r\n * The number of attributes.\r\n * @returns the numnber of attributes.\r\n */\r\n Effect.prototype.getAttributesCount = function () {\r\n return this._attributes.length;\r\n };\r\n /**\r\n * Gets the index of a uniform variable.\r\n * @param uniformName of the uniform to look up.\r\n * @returns the index.\r\n */\r\n Effect.prototype.getUniformIndex = function (uniformName) {\r\n return this._uniformsNames.indexOf(uniformName);\r\n };\r\n /**\r\n * Returns the attribute based on the name of the variable.\r\n * @param uniformName of the uniform to look up.\r\n * @returns the location of the uniform.\r\n */\r\n Effect.prototype.getUniform = function (uniformName) {\r\n return this._uniforms[uniformName];\r\n };\r\n /**\r\n * Returns an array of sampler variable names\r\n * @returns The array of sampler variable neames.\r\n */\r\n Effect.prototype.getSamplers = function () {\r\n return this._samplerList;\r\n };\r\n /**\r\n * The error from the last compilation.\r\n * @returns the error string.\r\n */\r\n Effect.prototype.getCompilationError = function () {\r\n return this._compilationError;\r\n };\r\n /**\r\n * Adds a callback to the onCompiled observable and call the callback imediatly if already ready.\r\n * @param func The callback to be used.\r\n */\r\n Effect.prototype.executeWhenCompiled = function (func) {\r\n var _this = this;\r\n if (this.isReady()) {\r\n func(this);\r\n return;\r\n }\r\n this.onCompileObservable.add(function (effect) {\r\n func(effect);\r\n });\r\n if (!this._pipelineContext || this._pipelineContext.isAsync) {\r\n setTimeout(function () {\r\n _this._checkIsReady();\r\n }, 16);\r\n }\r\n };\r\n Effect.prototype._checkIsReady = function () {\r\n var _this = this;\r\n try {\r\n if (this._isReadyInternal()) {\r\n return;\r\n }\r\n }\r\n catch (e) {\r\n this._processCompilationErrors(e);\r\n return;\r\n }\r\n setTimeout(function () {\r\n _this._checkIsReady();\r\n }, 16);\r\n };\r\n /** @hidden */\r\n Effect.prototype._loadVertexShader = function (vertex, callback) {\r\n if (typeof (HTMLElement) !== \"undefined\") {\r\n // DOM element ?\r\n if (vertex instanceof HTMLElement) {\r\n var vertexCode = DomManagement.GetDOMTextContent(vertex);\r\n callback(vertexCode);\r\n return;\r\n }\r\n }\r\n // Direct source ?\r\n if (vertex.substr(0, 7) === \"source:\") {\r\n callback(vertex.substr(7));\r\n return;\r\n }\r\n // Base64 encoded ?\r\n if (vertex.substr(0, 7) === \"base64:\") {\r\n var vertexBinary = window.atob(vertex.substr(7));\r\n callback(vertexBinary);\r\n return;\r\n }\r\n // Is in local store ?\r\n if (Effect.ShadersStore[vertex + \"VertexShader\"]) {\r\n callback(Effect.ShadersStore[vertex + \"VertexShader\"]);\r\n return;\r\n }\r\n var vertexShaderUrl;\r\n if (vertex[0] === \".\" || vertex[0] === \"/\" || vertex.indexOf(\"http\") > -1) {\r\n vertexShaderUrl = vertex;\r\n }\r\n else {\r\n vertexShaderUrl = Effect.ShadersRepository + vertex;\r\n }\r\n // Vertex shader\r\n this._engine._loadFile(vertexShaderUrl + \".vertex.fx\", callback);\r\n };\r\n /** @hidden */\r\n Effect.prototype._loadFragmentShader = function (fragment, callback) {\r\n if (typeof (HTMLElement) !== \"undefined\") {\r\n // DOM element ?\r\n if (fragment instanceof HTMLElement) {\r\n var fragmentCode = DomManagement.GetDOMTextContent(fragment);\r\n callback(fragmentCode);\r\n return;\r\n }\r\n }\r\n // Direct source ?\r\n if (fragment.substr(0, 7) === \"source:\") {\r\n callback(fragment.substr(7));\r\n return;\r\n }\r\n // Base64 encoded ?\r\n if (fragment.substr(0, 7) === \"base64:\") {\r\n var fragmentBinary = window.atob(fragment.substr(7));\r\n callback(fragmentBinary);\r\n return;\r\n }\r\n // Is in local store ?\r\n if (Effect.ShadersStore[fragment + \"PixelShader\"]) {\r\n callback(Effect.ShadersStore[fragment + \"PixelShader\"]);\r\n return;\r\n }\r\n if (Effect.ShadersStore[fragment + \"FragmentShader\"]) {\r\n callback(Effect.ShadersStore[fragment + \"FragmentShader\"]);\r\n return;\r\n }\r\n var fragmentShaderUrl;\r\n if (fragment[0] === \".\" || fragment[0] === \"/\" || fragment.indexOf(\"http\") > -1) {\r\n fragmentShaderUrl = fragment;\r\n }\r\n else {\r\n fragmentShaderUrl = Effect.ShadersRepository + fragment;\r\n }\r\n // Fragment shader\r\n this._engine._loadFile(fragmentShaderUrl + \".fragment.fx\", callback);\r\n };\r\n /** @hidden */\r\n Effect.prototype._dumpShadersSource = function (vertexCode, fragmentCode, defines) {\r\n // Rebuild shaders source code\r\n var shaderVersion = (this._engine.webGLVersion > 1) ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\r\n var prefix = shaderVersion + (defines ? defines + \"\\n\" : \"\");\r\n vertexCode = prefix + vertexCode;\r\n fragmentCode = prefix + fragmentCode;\r\n // Number lines of shaders source code\r\n var i = 2;\r\n var regex = /\\n/gm;\r\n var formattedVertexCode = \"\\n1\\t\" + vertexCode.replace(regex, function () { return \"\\n\" + (i++) + \"\\t\"; });\r\n i = 2;\r\n var formattedFragmentCode = \"\\n1\\t\" + fragmentCode.replace(regex, function () { return \"\\n\" + (i++) + \"\\t\"; });\r\n // Dump shaders name and formatted source code\r\n if (this.name.vertexElement) {\r\n Logger.Error(\"Vertex shader: \" + this.name.vertexElement + formattedVertexCode);\r\n Logger.Error(\"Fragment shader: \" + this.name.fragmentElement + formattedFragmentCode);\r\n }\r\n else if (this.name.vertex) {\r\n Logger.Error(\"Vertex shader: \" + this.name.vertex + formattedVertexCode);\r\n Logger.Error(\"Fragment shader: \" + this.name.fragment + formattedFragmentCode);\r\n }\r\n else {\r\n Logger.Error(\"Vertex shader: \" + this.name + formattedVertexCode);\r\n Logger.Error(\"Fragment shader: \" + this.name + formattedFragmentCode);\r\n }\r\n };\r\n /**\r\n * Recompiles the webGL program\r\n * @param vertexSourceCode The source code for the vertex shader.\r\n * @param fragmentSourceCode The source code for the fragment shader.\r\n * @param onCompiled Callback called when completed.\r\n * @param onError Callback called on error.\r\n * @hidden\r\n */\r\n Effect.prototype._rebuildProgram = function (vertexSourceCode, fragmentSourceCode, onCompiled, onError) {\r\n var _this = this;\r\n this._isReady = false;\r\n this._vertexSourceCodeOverride = vertexSourceCode;\r\n this._fragmentSourceCodeOverride = fragmentSourceCode;\r\n this.onError = function (effect, error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n };\r\n this.onCompiled = function () {\r\n var scenes = _this.getEngine().scenes;\r\n for (var i = 0; i < scenes.length; i++) {\r\n scenes[i].markAllMaterialsAsDirty(Constants.MATERIAL_AllDirtyFlag);\r\n }\r\n _this._pipelineContext._handlesSpectorRebuildCallback(onCompiled);\r\n };\r\n this._fallbacks = null;\r\n this._prepareEffect();\r\n };\r\n /**\r\n * Prepares the effect\r\n * @hidden\r\n */\r\n Effect.prototype._prepareEffect = function () {\r\n var _this = this;\r\n var attributesNames = this._attributesNames;\r\n var defines = this.defines;\r\n this._valueCache = {};\r\n var previousPipelineContext = this._pipelineContext;\r\n try {\r\n var engine_1 = this._engine;\r\n this._pipelineContext = engine_1.createPipelineContext();\r\n var rebuildRebind = this._rebuildProgram.bind(this);\r\n if (this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride) {\r\n engine_1._preparePipelineContext(this._pipelineContext, this._vertexSourceCodeOverride, this._fragmentSourceCodeOverride, true, rebuildRebind, null, this._transformFeedbackVaryings);\r\n }\r\n else {\r\n engine_1._preparePipelineContext(this._pipelineContext, this._vertexSourceCode, this._fragmentSourceCode, false, rebuildRebind, defines, this._transformFeedbackVaryings);\r\n }\r\n engine_1._executeWhenRenderingStateIsCompiled(this._pipelineContext, function () {\r\n if (engine_1.supportsUniformBuffers) {\r\n for (var name in _this._uniformBuffersNames) {\r\n _this.bindUniformBlock(name, _this._uniformBuffersNames[name]);\r\n }\r\n }\r\n var uniforms = engine_1.getUniforms(_this._pipelineContext, _this._uniformsNames);\r\n uniforms.forEach(function (uniform, index) {\r\n _this._uniforms[_this._uniformsNames[index]] = uniform;\r\n });\r\n _this._attributes = engine_1.getAttributes(_this._pipelineContext, attributesNames);\r\n var index;\r\n for (index = 0; index < _this._samplerList.length; index++) {\r\n var sampler = _this.getUniform(_this._samplerList[index]);\r\n if (sampler == null) {\r\n _this._samplerList.splice(index, 1);\r\n index--;\r\n }\r\n }\r\n _this._samplerList.forEach(function (name, index) {\r\n _this._samplers[name] = index;\r\n });\r\n engine_1.bindSamplers(_this);\r\n _this._compilationError = \"\";\r\n _this._isReady = true;\r\n if (_this.onCompiled) {\r\n _this.onCompiled(_this);\r\n }\r\n _this.onCompileObservable.notifyObservers(_this);\r\n _this.onCompileObservable.clear();\r\n // Unbind mesh reference in fallbacks\r\n if (_this._fallbacks) {\r\n _this._fallbacks.unBindMesh();\r\n }\r\n if (previousPipelineContext) {\r\n _this.getEngine()._deletePipelineContext(previousPipelineContext);\r\n }\r\n });\r\n if (this._pipelineContext.isAsync) {\r\n this._checkIsReady();\r\n }\r\n }\r\n catch (e) {\r\n this._processCompilationErrors(e, previousPipelineContext);\r\n }\r\n };\r\n Effect.prototype._processCompilationErrors = function (e, previousPipelineContext) {\r\n if (previousPipelineContext === void 0) { previousPipelineContext = null; }\r\n this._compilationError = e.message;\r\n var attributesNames = this._attributesNames;\r\n var fallbacks = this._fallbacks;\r\n // Let's go through fallbacks then\r\n Logger.Error(\"Unable to compile effect:\");\r\n Logger.Error(\"Uniforms: \" + this._uniformsNames.map(function (uniform) {\r\n return \" \" + uniform;\r\n }));\r\n Logger.Error(\"Attributes: \" + attributesNames.map(function (attribute) {\r\n return \" \" + attribute;\r\n }));\r\n Logger.Error(\"Defines:\\r\\n\" + this.defines);\r\n Logger.Error(\"Error: \" + this._compilationError);\r\n if (previousPipelineContext) {\r\n this._pipelineContext = previousPipelineContext;\r\n this._isReady = true;\r\n if (this.onError) {\r\n this.onError(this, this._compilationError);\r\n }\r\n this.onErrorObservable.notifyObservers(this);\r\n }\r\n if (fallbacks) {\r\n this._pipelineContext = null;\r\n if (fallbacks.hasMoreFallbacks) {\r\n Logger.Error(\"Trying next fallback.\");\r\n this.defines = fallbacks.reduce(this.defines, this);\r\n this._prepareEffect();\r\n }\r\n else { // Sorry we did everything we can\r\n if (this.onError) {\r\n this.onError(this, this._compilationError);\r\n }\r\n this.onErrorObservable.notifyObservers(this);\r\n this.onErrorObservable.clear();\r\n // Unbind mesh reference in fallbacks\r\n if (this._fallbacks) {\r\n this._fallbacks.unBindMesh();\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(Effect.prototype, \"isSupported\", {\r\n /**\r\n * Checks if the effect is supported. (Must be called after compilation)\r\n */\r\n get: function () {\r\n return this._compilationError === \"\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Binds a texture to the engine to be used as output of the shader.\r\n * @param channel Name of the output variable.\r\n * @param texture Texture to bind.\r\n * @hidden\r\n */\r\n Effect.prototype._bindTexture = function (channel, texture) {\r\n this._engine._bindTexture(this._samplers[channel], texture);\r\n };\r\n /**\r\n * Sets a texture on the engine to be used in the shader.\r\n * @param channel Name of the sampler variable.\r\n * @param texture Texture to set.\r\n */\r\n Effect.prototype.setTexture = function (channel, texture) {\r\n this._engine.setTexture(this._samplers[channel], this._uniforms[channel], texture);\r\n };\r\n /**\r\n * Sets a depth stencil texture from a render target on the engine to be used in the shader.\r\n * @param channel Name of the sampler variable.\r\n * @param texture Texture to set.\r\n */\r\n Effect.prototype.setDepthStencilTexture = function (channel, texture) {\r\n this._engine.setDepthStencilTexture(this._samplers[channel], this._uniforms[channel], texture);\r\n };\r\n /**\r\n * Sets an array of textures on the engine to be used in the shader.\r\n * @param channel Name of the variable.\r\n * @param textures Textures to set.\r\n */\r\n Effect.prototype.setTextureArray = function (channel, textures) {\r\n var exName = channel + \"Ex\";\r\n if (this._samplerList.indexOf(exName + \"0\") === -1) {\r\n var initialPos = this._samplerList.indexOf(channel);\r\n for (var index = 1; index < textures.length; index++) {\r\n var currentExName = exName + (index - 1).toString();\r\n this._samplerList.splice(initialPos + index, 0, currentExName);\r\n }\r\n // Reset every channels\r\n var channelIndex = 0;\r\n for (var _i = 0, _a = this._samplerList; _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n this._samplers[key] = channelIndex;\r\n channelIndex += 1;\r\n }\r\n }\r\n this._engine.setTextureArray(this._samplers[channel], this._uniforms[channel], textures);\r\n };\r\n /**\r\n * Sets a texture to be the input of the specified post process. (To use the output, pass in the next post process in the pipeline)\r\n * @param channel Name of the sampler variable.\r\n * @param postProcess Post process to get the input texture from.\r\n */\r\n Effect.prototype.setTextureFromPostProcess = function (channel, postProcess) {\r\n this._engine.setTextureFromPostProcess(this._samplers[channel], postProcess);\r\n };\r\n /**\r\n * (Warning! setTextureFromPostProcessOutput may be desired instead)\r\n * Sets the input texture of the passed in post process to be input of this effect. (To use the output of the passed in post process use setTextureFromPostProcessOutput)\r\n * @param channel Name of the sampler variable.\r\n * @param postProcess Post process to get the output texture from.\r\n */\r\n Effect.prototype.setTextureFromPostProcessOutput = function (channel, postProcess) {\r\n this._engine.setTextureFromPostProcessOutput(this._samplers[channel], postProcess);\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheMatrix = function (uniformName, matrix) {\r\n var cache = this._valueCache[uniformName];\r\n var flag = matrix.updateFlag;\r\n if (cache !== undefined && cache === flag) {\r\n return false;\r\n }\r\n this._valueCache[uniformName] = flag;\r\n return true;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat2 = function (uniformName, x, y) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat3 = function (uniformName, x, y, z) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat4 = function (uniformName, x, y, z, w) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z, w];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n if (cache[3] !== w) {\r\n cache[3] = w;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Binds a buffer to a uniform.\r\n * @param buffer Buffer to bind.\r\n * @param name Name of the uniform variable to bind to.\r\n */\r\n Effect.prototype.bindUniformBuffer = function (buffer, name) {\r\n var bufferName = this._uniformBuffersNames[name];\r\n if (bufferName === undefined || Effect._baseCache[bufferName] === buffer) {\r\n return;\r\n }\r\n Effect._baseCache[bufferName] = buffer;\r\n this._engine.bindUniformBufferBase(buffer, bufferName);\r\n };\r\n /**\r\n * Binds block to a uniform.\r\n * @param blockName Name of the block to bind.\r\n * @param index Index to bind.\r\n */\r\n Effect.prototype.bindUniformBlock = function (blockName, index) {\r\n this._engine.bindUniformBlock(this._pipelineContext, blockName, index);\r\n };\r\n /**\r\n * Sets an interger value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setInt = function (uniformName, value) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = value;\r\n this._engine.setInt(this._uniforms[uniformName], value);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setFloatArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrices = function (uniformName, matrices) {\r\n if (!matrices) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrices(this._uniforms[uniformName], matrices);\r\n return this;\r\n };\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix = function (uniformName, matrix) {\r\n if (this._cacheMatrix(uniformName, matrix)) {\r\n this._engine.setMatrices(this._uniforms[uniformName], matrix.toArray());\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Speicified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix3x3 = function (uniformName, matrix) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix3x3(this._uniforms[uniformName], matrix);\r\n return this;\r\n };\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Speicified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix2x2 = function (uniformName, matrix) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix2x2(this._uniforms[uniformName], matrix);\r\n return this;\r\n };\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat = function (uniformName, value) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = value;\r\n this._engine.setFloat(this._uniforms[uniformName], value);\r\n return this;\r\n };\r\n /**\r\n * Sets a boolean on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param bool value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setBool = function (uniformName, bool) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === bool) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = bool;\r\n this._engine.setBool(this._uniforms[uniformName], bool ? 1 : 0);\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector2 = function (uniformName, vector2) {\r\n if (this._cacheFloat2(uniformName, vector2.x, vector2.y)) {\r\n this._engine.setFloat2(this._uniforms[uniformName], vector2.x, vector2.y);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat2 = function (uniformName, x, y) {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n this._engine.setFloat2(this._uniforms[uniformName], x, y);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector3 = function (uniformName, vector3) {\r\n if (this._cacheFloat3(uniformName, vector3.x, vector3.y, vector3.z)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], vector3.x, vector3.y, vector3.z);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat3 = function (uniformName, x, y, z) {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], x, y, z);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector4 = function (uniformName, vector4) {\r\n if (this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], vector4.x, vector4.y, vector4.z, vector4.w);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat4 = function (uniformName, x, y, z, w) {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], x, y, z, w);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setColor3 = function (uniformName, color3) {\r\n if (this._cacheFloat3(uniformName, color3.r, color3.g, color3.b)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], color3.r, color3.g, color3.b);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setColor4 = function (uniformName, color3, alpha) {\r\n if (this._cacheFloat4(uniformName, color3.r, color3.g, color3.b, alpha)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], color3.r, color3.g, color3.b, alpha);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setDirectColor4 = function (uniformName, color4) {\r\n if (this._cacheFloat4(uniformName, color4.r, color4.g, color4.b, color4.a)) {\r\n this._engine.setDirectColor4(this._uniforms[uniformName], color4);\r\n }\r\n return this;\r\n };\r\n /** Release all associated resources */\r\n Effect.prototype.dispose = function () {\r\n this._engine._releaseEffect(this);\r\n };\r\n /**\r\n * This function will add a new shader to the shader store\r\n * @param name the name of the shader\r\n * @param pixelShader optional pixel shader content\r\n * @param vertexShader optional vertex shader content\r\n */\r\n Effect.RegisterShader = function (name, pixelShader, vertexShader) {\r\n if (pixelShader) {\r\n Effect.ShadersStore[name + \"PixelShader\"] = pixelShader;\r\n }\r\n if (vertexShader) {\r\n Effect.ShadersStore[name + \"VertexShader\"] = vertexShader;\r\n }\r\n };\r\n /**\r\n * Resets the cache of effects.\r\n */\r\n Effect.ResetCache = function () {\r\n Effect._baseCache = {};\r\n };\r\n /**\r\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\r\n */\r\n Effect.ShadersRepository = \"src/Shaders/\";\r\n Effect._uniqueIdSeed = 0;\r\n Effect._baseCache = {};\r\n /**\r\n * Store of each shader (The can be looked up using effect.key)\r\n */\r\n Effect.ShadersStore = {};\r\n /**\r\n * Store of each included file for a shader (The can be looked up using effect.key)\r\n */\r\n Effect.IncludesShadersStore = {};\r\n return Effect;\r\n}());\r\nexport { Effect };\r\n//# sourceMappingURL=effect.js.map" }, { "id": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "index": 35, "index2": 34, "size": 692, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Meshes/WebGL/webGLDataBuffer", "loc": "16:0-66" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Meshes/WebGL/webGLDataBuffer", "loc": "1116:29-44" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Meshes/WebGL/webGLDataBuffer", "loc": "1205:29-44" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Meshes/WebGL/webGLDataBuffer", "loc": "1497:25-40" } ], "providedExports": [ "WebGLDataBuffer" ], "optimizationBailout": [], "depth": 2, "source": "import * as tslib_1 from \"tslib\";\r\nimport { DataBuffer } from '../dataBuffer';\r\n/** @hidden */\r\nvar WebGLDataBuffer = /** @class */ (function (_super) {\r\n tslib_1.__extends(WebGLDataBuffer, _super);\r\n function WebGLDataBuffer(resource) {\r\n var _this = _super.call(this) || this;\r\n _this._buffer = resource;\r\n return _this;\r\n }\r\n Object.defineProperty(WebGLDataBuffer.prototype, \"underlyingResource\", {\r\n get: function () {\r\n return this._buffer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return WebGLDataBuffer;\r\n}(DataBuffer));\r\nexport { WebGLDataBuffer };\r\n//# sourceMappingURL=webGLDataBuffer.js.map" }, { "id": "../../.temp/packageES6Dev/core/Meshes/dataBuffer.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\dataBuffer.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/dataBuffer.js", "index": 36, "index2": 33, "size": 866, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js", "issuerId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } } ], "profile": { "factory": 46, "building": 8 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "type": "harmony side effect evaluation", "userRequest": "../dataBuffer", "loc": "2:0-43" }, { "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js", "type": "harmony import specifier", "userRequest": "../dataBuffer", "loc": "19:2-12" } ], "providedExports": [ "DataBuffer" ], "optimizationBailout": [], "depth": 3, "source": "/**\r\n * Class used to store gfx data (like WebGLBuffer)\r\n */\r\nvar DataBuffer = /** @class */ (function () {\r\n function DataBuffer() {\r\n /**\r\n * Gets or sets the number of objects referencing this buffer\r\n */\r\n this.references = 0;\r\n /** Gets or sets the size of the underlying buffer */\r\n this.capacity = 0;\r\n /**\r\n * Gets or sets a boolean indicating if the buffer contains 32bits indices\r\n */\r\n this.is32Bits = false;\r\n }\r\n Object.defineProperty(DataBuffer.prototype, \"underlyingResource\", {\r\n /**\r\n * Gets the underlying buffer\r\n */\r\n get: function () {\r\n return null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DataBuffer;\r\n}());\r\nexport { DataBuffer };\r\n//# sourceMappingURL=dataBuffer.js.map" }, { "id": "../../.temp/packageES6Dev/core/Misc/devTools.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\devTools.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/devTools.js", "index": 25, "index2": 23, "size": 347, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Misc/devTools", "loc": "4:0-45" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/devTools", "loc": "2573:14-23" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/devTools", "loc": "2589:14-23" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/devTools", "loc": "2608:14-23" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "type": "harmony side effect evaluation", "userRequest": "../../Misc/devTools", "loc": "4:0-48" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js", "type": "harmony import specifier", "userRequest": "../../Misc/devTools", "loc": "373:14-23" } ], "providedExports": [ "_DevTools" ], "optimizationBailout": [], "depth": 2, "source": "/** @hidden */\r\nvar _DevTools = /** @class */ (function () {\r\n function _DevTools() {\r\n }\r\n _DevTools.WarnImport = function (name) {\r\n return name + \" needs to be imported before as it contains a side-effect required by your code.\";\r\n };\r\n return _DevTools;\r\n}());\r\nexport { _DevTools };\r\n//# sourceMappingURL=devTools.js.map" }, { "id": "../../.temp/packageES6Dev/core/Misc/domManagement.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\domManagement.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/domManagement.js", "index": 7, "index2": 4, "size": 1249, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Misc/domManagement", "loc": "14:0-54" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/domManagement", "loc": "289:31-44" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/domManagement", "loc": "3329:12-25" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/domManagement", "loc": "3794:13-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony side effect evaluation", "userRequest": "../Misc/domManagement", "loc": "3:0-54" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/domManagement", "loc": "461:33-46" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/domManagement", "loc": "497:35-48" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony side effect evaluation", "userRequest": "./domManagement", "loc": "3:0-48" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./domManagement", "loc": "223:106-119" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/precisionDate.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\precisionDate.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/precisionDate.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/precisionDate.js", "type": "harmony side effect evaluation", "userRequest": "./domManagement", "loc": "1:0-48" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/precisionDate.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\precisionDate.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/precisionDate.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/precisionDate.js", "type": "harmony import specifier", "userRequest": "./domManagement", "loc": "13:16-29" } ], "providedExports": [ "DomManagement" ], "optimizationBailout": [], "depth": 2, "source": "/**\r\n * Sets of helpers dealing with the DOM and some of the recurrent functions needed in\r\n * Babylon.js\r\n */\r\nvar DomManagement = /** @class */ (function () {\r\n function DomManagement() {\r\n }\r\n /**\r\n * Checks if the window object exists\r\n * @returns true if the window object exists\r\n */\r\n DomManagement.IsWindowObjectExist = function () {\r\n return (typeof window) !== \"undefined\";\r\n };\r\n /**\r\n * Checks if the navigator object exists\r\n * @returns true if the navigator object exists\r\n */\r\n DomManagement.IsNavigatorAvailable = function () {\r\n return (typeof navigator) !== \"undefined\";\r\n };\r\n /**\r\n * Extracts text content from a DOM element hierarchy\r\n * @param element defines the root element\r\n * @returns a string\r\n */\r\n DomManagement.GetDOMTextContent = function (element) {\r\n var result = \"\";\r\n var child = element.firstChild;\r\n while (child) {\r\n if (child.nodeType === 3) {\r\n result += child.textContent;\r\n }\r\n child = (child.nextSibling);\r\n }\r\n return result;\r\n };\r\n return DomManagement;\r\n}());\r\nexport { DomManagement };\r\n//# sourceMappingURL=domManagement.js.map" }, { "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "index": 20, "index2": 20, "size": 13727, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony side effect evaluation", "userRequest": "../../Misc/fileTools", "loc": "9:0-49" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js", "type": "harmony import specifier", "userRequest": "../../Misc/fileTools", "loc": "284:16-25" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Misc/fileTools", "loc": "18:0-46" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/fileTools", "loc": "2540:20-29" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/fileTools", "loc": "2544:16-25" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/fileTools", "loc": "3702:22-31" } ], "providedExports": [ "FileTools" ], "optimizationBailout": [], "depth": 2, "source": "import { WebRequest } from './webRequest';\r\nimport { LoadFileError } from './loadFileError';\r\nimport { DomManagement } from './domManagement';\r\nimport { Observable } from './observable';\r\nimport { FilesInputStore } from './filesInputStore';\r\nimport { RetryStrategy } from './retryStrategy';\r\n/**\r\n * @hidden\r\n */\r\nvar FileTools = /** @class */ (function () {\r\n function FileTools() {\r\n }\r\n /**\r\n * Removes unwanted characters from an url\r\n * @param url defines the url to clean\r\n * @returns the cleaned url\r\n */\r\n FileTools._CleanUrl = function (url) {\r\n url = url.replace(/#/mg, \"%23\");\r\n return url;\r\n };\r\n /**\r\n * Sets the cors behavior on a dom element. This will add the required Tools.CorsBehavior to the element.\r\n * @param url define the url we are trying\r\n * @param element define the dom element where to configure the cors policy\r\n */\r\n FileTools.SetCorsBehavior = function (url, element) {\r\n if (url && url.indexOf(\"data:\") === 0) {\r\n return;\r\n }\r\n if (this.CorsBehavior) {\r\n if (typeof (this.CorsBehavior) === 'string' || this.CorsBehavior instanceof String) {\r\n element.crossOrigin = this.CorsBehavior;\r\n }\r\n else {\r\n var result = this.CorsBehavior(url);\r\n if (result) {\r\n element.crossOrigin = result;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Loads an image as an HTMLImageElement.\r\n * @param input url string, ArrayBuffer, or Blob to load\r\n * @param onLoad callback called when the image successfully loads\r\n * @param onError callback called when the image fails to load\r\n * @param offlineProvider offline provider for caching\r\n * @returns the HTMLImageElement of the loaded image\r\n */\r\n FileTools.LoadImage = function (input, onLoad, onError, offlineProvider) {\r\n var url;\r\n var usingObjectURL = false;\r\n if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) {\r\n url = URL.createObjectURL(new Blob([input]));\r\n usingObjectURL = true;\r\n }\r\n else if (input instanceof Blob) {\r\n url = URL.createObjectURL(input);\r\n usingObjectURL = true;\r\n }\r\n else {\r\n url = this._CleanUrl(input);\r\n url = this.PreprocessUrl(input);\r\n }\r\n var img = new Image();\r\n this.SetCorsBehavior(url, img);\r\n var loadHandler = function () {\r\n img.removeEventListener(\"load\", loadHandler);\r\n img.removeEventListener(\"error\", errorHandler);\r\n onLoad(img);\r\n // Must revoke the URL after calling onLoad to avoid security exceptions in\r\n // certain scenarios (e.g. when hosted in vscode).\r\n if (usingObjectURL && img.src) {\r\n URL.revokeObjectURL(img.src);\r\n }\r\n };\r\n var errorHandler = function (err) {\r\n img.removeEventListener(\"load\", loadHandler);\r\n img.removeEventListener(\"error\", errorHandler);\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, err);\r\n }\r\n if (usingObjectURL && img.src) {\r\n URL.revokeObjectURL(img.src);\r\n }\r\n };\r\n img.addEventListener(\"load\", loadHandler);\r\n img.addEventListener(\"error\", errorHandler);\r\n var noOfflineSupport = function () {\r\n img.src = url;\r\n };\r\n var loadFromOfflineSupport = function () {\r\n if (offlineProvider) {\r\n offlineProvider.loadImage(url, img);\r\n }\r\n };\r\n if (url.substr(0, 5) !== \"data:\" && offlineProvider && offlineProvider.enableTexturesOffline) {\r\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport);\r\n }\r\n else {\r\n if (url.indexOf(\"file:\") !== -1) {\r\n var textureName = decodeURIComponent(url.substring(5).toLowerCase());\r\n if (FilesInputStore.FilesToLoad[textureName]) {\r\n try {\r\n var blobURL;\r\n try {\r\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\r\n }\r\n catch (ex) {\r\n // Chrome doesn't support oneTimeOnly parameter\r\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\r\n }\r\n img.src = blobURL;\r\n usingObjectURL = true;\r\n }\r\n catch (e) {\r\n img.src = \"\";\r\n }\r\n return img;\r\n }\r\n }\r\n noOfflineSupport();\r\n }\r\n return img;\r\n };\r\n /**\r\n * Loads a file\r\n * @param fileToLoad defines the file to load\r\n * @param callback defines the callback to call when data is loaded\r\n * @param progressCallBack defines the callback to call during loading process\r\n * @param useArrayBuffer defines a boolean indicating that data must be returned as an ArrayBuffer\r\n * @returns a file request object\r\n */\r\n FileTools.ReadFile = function (fileToLoad, callback, progressCallBack, useArrayBuffer) {\r\n var reader = new FileReader();\r\n var request = {\r\n onCompleteObservable: new Observable(),\r\n abort: function () { return reader.abort(); },\r\n };\r\n reader.onloadend = function (e) { return request.onCompleteObservable.notifyObservers(request); };\r\n reader.onerror = function (e) {\r\n callback(JSON.stringify({ autoClear: true, clearColor: [1, 0, 0], ambientColor: [0, 0, 0], gravity: [0, -9.807, 0], meshes: [], cameras: [], lights: [] }));\r\n };\r\n reader.onload = function (e) {\r\n //target doesn't have result from ts 1.3\r\n callback(e.target['result']);\r\n };\r\n if (progressCallBack) {\r\n reader.onprogress = progressCallBack;\r\n }\r\n if (!useArrayBuffer) {\r\n // Asynchronous read\r\n reader.readAsText(fileToLoad);\r\n }\r\n else {\r\n reader.readAsArrayBuffer(fileToLoad);\r\n }\r\n return request;\r\n };\r\n /**\r\n * Loads a file\r\n * @param url url string, ArrayBuffer, or Blob to load\r\n * @param onSuccess callback called when the file successfully loads\r\n * @param onProgress callback called while file is loading (if the server supports this mode)\r\n * @param offlineProvider defines the offline provider for caching\r\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\r\n * @param onError callback called when the file fails to load\r\n * @returns a file request object\r\n */\r\n FileTools.LoadFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\r\n var _this = this;\r\n url = this._CleanUrl(url);\r\n url = this.PreprocessUrl(url);\r\n // If file and file input are set\r\n if (url.indexOf(\"file:\") !== -1) {\r\n var fileName = decodeURIComponent(url.substring(5).toLowerCase());\r\n if (FilesInputStore.FilesToLoad[fileName]) {\r\n return this.ReadFile(FilesInputStore.FilesToLoad[fileName], onSuccess, onProgress, useArrayBuffer);\r\n }\r\n }\r\n var loadUrl = this.BaseUrl + url;\r\n var aborted = false;\r\n var fileRequest = {\r\n onCompleteObservable: new Observable(),\r\n abort: function () { return aborted = true; },\r\n };\r\n var requestFile = function () {\r\n var request = new WebRequest();\r\n var retryHandle = null;\r\n fileRequest.abort = function () {\r\n aborted = true;\r\n if (request.readyState !== (XMLHttpRequest.DONE || 4)) {\r\n request.abort();\r\n }\r\n if (retryHandle !== null) {\r\n clearTimeout(retryHandle);\r\n retryHandle = null;\r\n }\r\n };\r\n var retryLoop = function (retryIndex) {\r\n request.open('GET', loadUrl);\r\n if (useArrayBuffer) {\r\n request.responseType = \"arraybuffer\";\r\n }\r\n if (onProgress) {\r\n request.addEventListener(\"progress\", onProgress);\r\n }\r\n var onLoadEnd = function () {\r\n request.removeEventListener(\"loadend\", onLoadEnd);\r\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\r\n fileRequest.onCompleteObservable.clear();\r\n };\r\n request.addEventListener(\"loadend\", onLoadEnd);\r\n var onReadyStateChange = function () {\r\n if (aborted) {\r\n return;\r\n }\r\n // In case of undefined state in some browsers.\r\n if (request.readyState === (XMLHttpRequest.DONE || 4)) {\r\n // Some browsers have issues where onreadystatechange can be called multiple times with the same value.\r\n request.removeEventListener(\"readystatechange\", onReadyStateChange);\r\n if ((request.status >= 200 && request.status < 300) || (request.status === 0 && (!DomManagement.IsWindowObjectExist() || _this.IsFileURL()))) {\r\n onSuccess(!useArrayBuffer ? request.responseText : request.response, request.responseURL);\r\n return;\r\n }\r\n var retryStrategy = _this.DefaultRetryStrategy;\r\n if (retryStrategy) {\r\n var waitTime = retryStrategy(loadUrl, request, retryIndex);\r\n if (waitTime !== -1) {\r\n // Prevent the request from completing for retry.\r\n request.removeEventListener(\"loadend\", onLoadEnd);\r\n request = new WebRequest();\r\n retryHandle = setTimeout(function () { return retryLoop(retryIndex + 1); }, waitTime);\r\n return;\r\n }\r\n }\r\n var e = new LoadFileError(\"Error status: \" + request.status + \" \" + request.statusText + \" - Unable to load \" + loadUrl, request);\r\n if (onError) {\r\n onError(request, e);\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n };\r\n request.addEventListener(\"readystatechange\", onReadyStateChange);\r\n request.send();\r\n };\r\n retryLoop(0);\r\n };\r\n // Caching all files\r\n if (offlineProvider && offlineProvider.enableSceneOffline) {\r\n var noOfflineSupport_1 = function (request) {\r\n if (request && request.status > 400) {\r\n if (onError) {\r\n onError(request);\r\n }\r\n }\r\n else {\r\n if (!aborted) {\r\n requestFile();\r\n }\r\n }\r\n };\r\n var loadFromOfflineSupport = function () {\r\n // TODO: database needs to support aborting and should return a IFileRequest\r\n if (aborted) {\r\n return;\r\n }\r\n if (offlineProvider) {\r\n offlineProvider.loadFile(url, function (data) {\r\n if (!aborted) {\r\n onSuccess(data);\r\n }\r\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\r\n }, onProgress ? function (event) {\r\n if (!aborted) {\r\n onProgress(event);\r\n }\r\n } : undefined, noOfflineSupport_1, useArrayBuffer);\r\n }\r\n };\r\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport_1);\r\n }\r\n else {\r\n requestFile();\r\n }\r\n return fileRequest;\r\n };\r\n /**\r\n * Checks if the loaded document was accessed via `file:`-Protocol.\r\n * @returns boolean\r\n */\r\n FileTools.IsFileURL = function () {\r\n return location.protocol === \"file:\";\r\n };\r\n /**\r\n * Gets or sets the retry strategy to apply when an error happens while loading an asset\r\n */\r\n FileTools.DefaultRetryStrategy = RetryStrategy.ExponentialBackoff();\r\n /**\r\n * Gets or sets the base URL to use to load assets\r\n */\r\n FileTools.BaseUrl = \"\";\r\n /**\r\n * Default behaviour for cors in the application.\r\n * It can be a string if the expected behavior is identical in the entire app.\r\n * Or a callback to be able to set it per url or on a group of them (in case of Video source for instance)\r\n */\r\n FileTools.CorsBehavior = \"anonymous\";\r\n /**\r\n * Gets or sets a function used to pre-process url before using them to load assets\r\n */\r\n FileTools.PreprocessUrl = function (url) {\r\n return url;\r\n };\r\n return FileTools;\r\n}());\r\nexport { FileTools };\r\n//# sourceMappingURL=fileTools.js.map" }, { "id": "../../.temp/packageES6Dev/core/Misc/filesInputStore.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\filesInputStore.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/filesInputStore.js", "index": 23, "index2": 18, "size": 387, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } } ], "profile": { "factory": 61, "building": 8, "dependencies": 2 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony side effect evaluation", "userRequest": "./filesInputStore", "loc": "5:0-52" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./filesInputStore", "loc": "104:20-35" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./filesInputStore", "loc": "108:58-73" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./filesInputStore", "loc": "112:58-73" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./filesInputStore", "loc": "178:16-31" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./filesInputStore", "loc": "179:37-52" } ], "providedExports": [ "FilesInputStore" ], "optimizationBailout": [], "depth": 3, "source": "/**\r\n * Class used to help managing file picking and drag'n'drop\r\n * File Storage\r\n */\r\nvar FilesInputStore = /** @class */ (function () {\r\n function FilesInputStore() {\r\n }\r\n /**\r\n * List of files ready to be loaded\r\n */\r\n FilesInputStore.FilesToLoad = {};\r\n return FilesInputStore;\r\n}());\r\nexport { FilesInputStore };\r\n//# sourceMappingURL=filesInputStore.js.map" }, { "id": "../../.temp/packageES6Dev/core/Misc/loadFileError.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\loadFileError.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/loadFileError.js", "index": 22, "index2": 17, "size": 1266, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } }, { "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "profile": { "factory": 59, "building": 41, "dependencies": 4 } } ], "profile": { "factory": 61, "building": 8, "dependencies": 2 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony side effect evaluation", "userRequest": "./loadFileError", "loc": "2:0-48" }, { "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js", "type": "harmony import specifier", "userRequest": "./loadFileError", "loc": "238:36-49" } ], "providedExports": [ "LoadFileError" ], "optimizationBailout": [], "depth": 3, "source": "import * as tslib_1 from \"tslib\";\r\n/**\r\n * @ignore\r\n * Application error to support additional information when loading a file\r\n */\r\nvar LoadFileError = /** @class */ (function (_super) {\r\n tslib_1.__extends(LoadFileError, _super);\r\n /**\r\n * Creates a new LoadFileError\r\n * @param message defines the message of the error\r\n * @param request defines the optional web request\r\n */\r\n function LoadFileError(message, \r\n /** defines the optional web request */\r\n request) {\r\n var _this = _super.call(this, message) || this;\r\n _this.request = request;\r\n _this.name = \"LoadFileError\";\r\n LoadFileError._setPrototypeOf(_this, LoadFileError.prototype);\r\n return _this;\r\n }\r\n // See https://stackoverflow.com/questions/12915412/how-do-i-extend-a-host-object-e-g-error-in-typescript\r\n // and https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n // Polyfill for Object.setPrototypeOf if necessary.\r\n LoadFileError._setPrototypeOf = Object.setPrototypeOf || (function (o, proto) { o.__proto__ = proto; return o; });\r\n return LoadFileError;\r\n}(Error));\r\nexport { LoadFileError };\r\n//# sourceMappingURL=loadFileError.js.map" }, { "id": "../../.temp/packageES6Dev/core/Misc/logger.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\logger.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/logger.js", "index": 8, "index2": 5, "size": 4161, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "thinEngineOnly" ], "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "issuerPath": [ { "id": "./thinEngineOnly.ts", "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts", "name": "./thinEngineOnly.ts", "profile": { "factory": 42, "building": 2115 } }, { "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "profile": { "factory": 6, "building": 110 } } ], "profile": { "factory": 59, "building": 41, "dependencies": 4 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony side effect evaluation", "userRequest": "../Misc/logger", "loc": "13:0-40" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "216:20-26" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "232:24-30" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "2656:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "2744:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony side effect evaluation", "userRequest": "../Misc/logger", "loc": "4:0-40" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "547:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "548:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "551:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "552:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "555:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "556:12-18" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "659:8-14" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "660:8-14" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "663:8-14" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "666:8-14" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "667:8-14" }, { "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js", "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js", "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js", "type": "harmony import specifier", "userRequest": "../Misc/logger", "loc": "679:16-22" } ], "providedExports": [ "Logger" ], "optimizationBailout": [], "depth": 2, "source": "/**\r\n * Logger used througouht the application to allow configuration of\r\n * the log level required for the messages.\r\n */\r\nvar Logger = /** @class */ (function () {\r\n function Logger() {\r\n }\r\n Logger._AddLogEntry = function (entry) {\r\n Logger._LogCache = entry + Logger._LogCache;\r\n if (Logger.OnNewCacheEntry) {\r\n Logger.OnNewCacheEntry(entry);\r\n }\r\n };\r\n Logger._FormatMessage = function (message) {\r\n var padStr = function (i) { return (i < 10) ? \"0\" + i : \"\" + i; };\r\n var date = new Date();\r\n return \"[\" + padStr(date.getHours()) + \":\" + padStr(date.getMinutes()) + \":\" + padStr(date.getSeconds()) + \"]: \" + message;\r\n };\r\n Logger._LogDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._LogEnabled = function (message) {\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.log(\"BJS - \" + formattedMessage);\r\n var entry = \"