|
@@ -6685,7 +6685,7 @@ var AudioEngine = /** @class */ (function () {
|
|
};
|
|
};
|
|
AudioEngine.prototype._resumeAudioContext = function () {
|
|
AudioEngine.prototype._resumeAudioContext = function () {
|
|
var result;
|
|
var result;
|
|
- if (this._audioContext.resume) {
|
|
|
|
|
|
+ if (this._audioContext.resume !== undefined) {
|
|
result = this._audioContext.resume();
|
|
result = this._audioContext.resume();
|
|
}
|
|
}
|
|
return result || Promise.resolve();
|
|
return result || Promise.resolve();
|
|
@@ -32614,150 +32614,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
/***/ }),
|
|
/***/ }),
|
|
|
|
|
|
-/***/ "./Engines/Native/nativeShaderProcessor.ts":
|
|
|
|
-/*!*************************************************!*\
|
|
|
|
- !*** ./Engines/Native/nativeShaderProcessor.ts ***!
|
|
|
|
- \*************************************************/
|
|
|
|
-/*! exports provided: NativeShaderProcessor */
|
|
|
|
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
-
|
|
|
|
-"use strict";
|
|
|
|
-__webpack_require__.r(__webpack_exports__);
|
|
|
|
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NativeShaderProcessor", function() { return NativeShaderProcessor; });
|
|
|
|
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
|
|
|
|
-/* harmony import */ var _WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../WebGL/webGL2ShaderProcessors */ "./Engines/WebGL/webGL2ShaderProcessors.ts");
|
|
|
|
-/* harmony import */ var _Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Meshes/buffer */ "./Meshes/buffer.ts");
|
|
|
|
-var _a, _b;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// These numbers must match the values for bgfx::Attrib::Enum
|
|
|
|
-var attributeLocations = (_a = {},
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].PositionKind] = 0,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].NormalKind] = 1,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].TangentKind] = 2,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UVKind] = 10,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UV2Kind] = 11,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UV3Kind] = 12,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UV4Kind] = 13,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].ColorKind] = 4,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].MatricesIndicesKind] = 8,
|
|
|
|
- _a[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].MatricesWeightsKind] = 9,
|
|
|
|
- _a);
|
|
|
|
-// Remap BJS names to bgfx names
|
|
|
|
-var attributeBGFXName = (_b = {},
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].PositionKind] = "a_position",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].NormalKind] = "a_normal",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].TangentKind] = "a_tangent",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UVKind] = "a_texcoord0",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UV2Kind] = "a_texcoord1",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UV3Kind] = "a_texcoord2",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].UV4Kind] = "a_texcoord3",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].ColorKind] = "a_color0",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].MatricesIndicesKind] = "a_indices",
|
|
|
|
- _b[_Meshes_buffer__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].MatricesWeightsKind] = "a_weight",
|
|
|
|
- _b);
|
|
|
|
-// Must match bgfx::Attrib::TexCoord0
|
|
|
|
-var firstGenericAttributeLocation = 10;
|
|
|
|
-// Must match bgfx::Attrib::TexCoord7
|
|
|
|
-var lastGenericAttributeLocation = 17;
|
|
|
|
-/** @hidden */
|
|
|
|
-var NativeShaderProcessor = /** @class */ (function (_super) {
|
|
|
|
- Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NativeShaderProcessor, _super);
|
|
|
|
- function NativeShaderProcessor() {
|
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
|
- }
|
|
|
|
- NativeShaderProcessor.prototype.lineProcessor = function (line) {
|
|
|
|
- for (var _i = 0, _a = this._replacements; _i < _a.length; _i++) {
|
|
|
|
- var replacement = _a[_i];
|
|
|
|
- line = line.replace(replacement.searchValue, replacement.replaceValue);
|
|
|
|
- }
|
|
|
|
- return line;
|
|
|
|
- };
|
|
|
|
- NativeShaderProcessor.prototype.attributeProcessor = function (attribute) {
|
|
|
|
- var match = attribute.match(/attribute\s+[^\s]+\s+([^\s]+)\s*(?:\[.+\])?\s*;/);
|
|
|
|
- var name = match[1];
|
|
|
|
- var location = attributeLocations[name];
|
|
|
|
- if (location === undefined) {
|
|
|
|
- location = this._genericAttributeLocation++;
|
|
|
|
- if (location > lastGenericAttributeLocation) {
|
|
|
|
- throw new Error("Exceeded maximum custom attributes");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- var newName = attributeBGFXName[name];
|
|
|
|
- if (newName === undefined) {
|
|
|
|
- throw new Error("Can't find bgfx name mapping");
|
|
|
|
- }
|
|
|
|
- attribute = attribute.replace(name, newName);
|
|
|
|
- this._replacements.push({ searchValue: new RegExp("\\b" + name + "\\b", 'g'), replaceValue: "" + newName });
|
|
|
|
- return "layout(location=" + location + ") " + _super.prototype.attributeProcessor.call(this, attribute);
|
|
|
|
- };
|
|
|
|
- NativeShaderProcessor.prototype.varyingProcessor = function (varying, isFragment) {
|
|
|
|
- var location;
|
|
|
|
- if (isFragment) {
|
|
|
|
- location = this._varyingLocationMap[varying];
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- location = this._varyingLocationCount++;
|
|
|
|
- this._varyingLocationMap[varying] = location;
|
|
|
|
- }
|
|
|
|
- return "layout(location=" + location + ") " + _super.prototype.varyingProcessor.call(this, varying, isFragment);
|
|
|
|
- };
|
|
|
|
- NativeShaderProcessor.prototype.uniformProcessor = function (uniform) {
|
|
|
|
- var match = uniform.match(/uniform\s+([^\s]+)\s+([^\s]+)\s*(?:\[.+\])?\s*;/);
|
|
|
|
- var type = match[1];
|
|
|
|
- var name = match[2];
|
|
|
|
- switch (type) {
|
|
|
|
- case "sampler2D":
|
|
|
|
- case "samplerCube": {
|
|
|
|
- var suffix = type.substr(7);
|
|
|
|
- var binding = this._textureCount++;
|
|
|
|
- this._replacements.push({ searchValue: new RegExp("\\b" + name + "\\b"), replaceValue: "sampler" + suffix + "(" + name + "Texture, " + name + ")" });
|
|
|
|
- return "layout(binding=" + binding + ") uniform texture" + suffix + " " + name + "Texture;\nlayout(binding=" + binding + ") uniform sampler " + name + ";";
|
|
|
|
- }
|
|
|
|
- case "float": {
|
|
|
|
- this._replacements.push({ searchValue: new RegExp("\\b" + name + "\\b"), replaceValue: name + ".x" });
|
|
|
|
- uniform = "uniform vec4 " + name + ";";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- case "vec2": {
|
|
|
|
- this._replacements.push({ searchValue: new RegExp("\\b" + name + "\\b"), replaceValue: name + ".xy" });
|
|
|
|
- uniform = "uniform vec4 " + name + ";";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- case "vec3": {
|
|
|
|
- this._replacements.push({ searchValue: new RegExp("\\b" + name + "\\b"), replaceValue: name + ".xyz" });
|
|
|
|
- uniform = "uniform vec4 " + name + ";";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this._uniforms.push(uniform);
|
|
|
|
- return this._uniforms.length === 1 ? "<UNIFORM>" : "";
|
|
|
|
- };
|
|
|
|
- NativeShaderProcessor.prototype.preProcessor = function (code, defines, isFragment) {
|
|
|
|
- this._genericAttributeLocation = firstGenericAttributeLocation;
|
|
|
|
- if (!isFragment) {
|
|
|
|
- this._varyingLocationCount = 0;
|
|
|
|
- this._varyingLocationMap = {};
|
|
|
|
- }
|
|
|
|
- this._replacements = [];
|
|
|
|
- this._textureCount = 0;
|
|
|
|
- this._uniforms = [];
|
|
|
|
- return code;
|
|
|
|
- };
|
|
|
|
- NativeShaderProcessor.prototype.postProcessor = function (code, defines, isFragment) {
|
|
|
|
- code = _super.prototype.postProcessor.call(this, code, defines, isFragment);
|
|
|
|
- code = code.replace("<UNIFORM>", "layout(binding=0) uniform Frame {\n" + this._uniforms.join("\n") + "\n};");
|
|
|
|
- code = code.replace("out vec4 glFragColor", "layout(location=0) out vec4 glFragColor");
|
|
|
|
- return code;
|
|
|
|
- };
|
|
|
|
- return NativeShaderProcessor;
|
|
|
|
-}(_WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_1__["WebGL2ShaderProcessor"]));
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-/***/ }),
|
|
|
|
-
|
|
|
|
/***/ "./Engines/Processors/Expressions/Operators/shaderDefineAndOperator.ts":
|
|
/***/ "./Engines/Processors/Expressions/Operators/shaderDefineAndOperator.ts":
|
|
/*!*****************************************************************************!*\
|
|
/*!*****************************************************************************!*\
|
|
!*** ./Engines/Processors/Expressions/Operators/shaderDefineAndOperator.ts ***!
|
|
!*** ./Engines/Processors/Expressions/Operators/shaderDefineAndOperator.ts ***!
|
|
@@ -35478,7 +35334,7 @@ var Engine = /** @class */ (function (_super) {
|
|
cam._currentRenderId = 0;
|
|
cam._currentRenderId = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.onResizeObservable.hasObservers) {
|
|
|
|
|
|
+ if (this.onResizeObservable.hasObservers()) {
|
|
this.onResizeObservable.notifyObservers(this);
|
|
this.onResizeObservable.notifyObservers(this);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -36374,12 +36230,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _Misc_tools__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Misc/tools */ "./Misc/tools.ts");
|
|
/* harmony import */ var _Misc_tools__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Misc/tools */ "./Misc/tools.ts");
|
|
/* harmony import */ var _Misc_environmentTextureTools__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Misc/environmentTextureTools */ "./Misc/environmentTextureTools.ts");
|
|
/* harmony import */ var _Misc_environmentTextureTools__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Misc/environmentTextureTools */ "./Misc/environmentTextureTools.ts");
|
|
/* harmony import */ var _Materials_Textures_renderTargetCreationOptions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Materials/Textures/renderTargetCreationOptions */ "./Materials/Textures/renderTargetCreationOptions.ts");
|
|
/* harmony import */ var _Materials_Textures_renderTargetCreationOptions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Materials/Textures/renderTargetCreationOptions */ "./Materials/Textures/renderTargetCreationOptions.ts");
|
|
-/* harmony import */ var _Native_nativeShaderProcessor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Native/nativeShaderProcessor */ "./Engines/Native/nativeShaderProcessor.ts");
|
|
|
|
-/* harmony import */ var _Misc_logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Misc/logger */ "./Misc/logger.ts");
|
|
|
|
-/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./constants */ "./Engines/constants.ts");
|
|
|
|
-/* harmony import */ var _thinEngine__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./thinEngine */ "./Engines/thinEngine.ts");
|
|
|
|
-/* harmony import */ var _engineStore__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./engineStore */ "./Engines/engineStore.ts");
|
|
|
|
-/* harmony import */ var _Processors_shaderCodeInliner__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Processors/shaderCodeInliner */ "./Engines/Processors/shaderCodeInliner.ts");
|
|
|
|
|
|
+/* harmony import */ var _Misc_logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Misc/logger */ "./Misc/logger.ts");
|
|
|
|
+/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./constants */ "./Engines/constants.ts");
|
|
|
|
+/* harmony import */ var _thinEngine__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./thinEngine */ "./Engines/thinEngine.ts");
|
|
|
|
+/* harmony import */ var _engineStore__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./engineStore */ "./Engines/engineStore.ts");
|
|
|
|
+/* harmony import */ var _Processors_shaderCodeInliner__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Processors/shaderCodeInliner */ "./Engines/Processors/shaderCodeInliner.ts");
|
|
|
|
+/* harmony import */ var _Engines_WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Engines/WebGL/webGL2ShaderProcessors */ "./Engines/WebGL/webGL2ShaderProcessors.ts");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -36546,7 +36402,7 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
window.Blob = function () { };
|
|
window.Blob = function () { };
|
|
}
|
|
}
|
|
// Shader processor
|
|
// Shader processor
|
|
- _this._shaderProcessor = new _Native_nativeShaderProcessor__WEBPACK_IMPORTED_MODULE_8__["NativeShaderProcessor"]();
|
|
|
|
|
|
+ _this._shaderProcessor = new _Engines_WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_13__["WebGL2ShaderProcessor"]();
|
|
return _this;
|
|
return _this;
|
|
}
|
|
}
|
|
NativeEngine.prototype.getHardwareScalingLevel = function () {
|
|
NativeEngine.prototype.getHardwareScalingLevel = function () {
|
|
@@ -36729,14 +36585,14 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
NativeEngine.prototype.createShaderProgram = function (pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings) {
|
|
NativeEngine.prototype.createShaderProgram = function (pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings) {
|
|
if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }
|
|
if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }
|
|
this.onBeforeShaderCompilationObservable.notifyObservers(this);
|
|
this.onBeforeShaderCompilationObservable.notifyObservers(this);
|
|
- var vertexInliner = new _Processors_shaderCodeInliner__WEBPACK_IMPORTED_MODULE_13__["ShaderCodeInliner"](vertexCode);
|
|
|
|
|
|
+ var vertexInliner = new _Processors_shaderCodeInliner__WEBPACK_IMPORTED_MODULE_12__["ShaderCodeInliner"](vertexCode);
|
|
vertexInliner.processCode();
|
|
vertexInliner.processCode();
|
|
vertexCode = vertexInliner.code;
|
|
vertexCode = vertexInliner.code;
|
|
- var fragmentInliner = new _Processors_shaderCodeInliner__WEBPACK_IMPORTED_MODULE_13__["ShaderCodeInliner"](fragmentCode);
|
|
|
|
|
|
+ var fragmentInliner = new _Processors_shaderCodeInliner__WEBPACK_IMPORTED_MODULE_12__["ShaderCodeInliner"](fragmentCode);
|
|
fragmentInliner.processCode();
|
|
fragmentInliner.processCode();
|
|
fragmentCode = fragmentInliner.code;
|
|
fragmentCode = fragmentInliner.code;
|
|
- vertexCode = _thinEngine__WEBPACK_IMPORTED_MODULE_11__["ThinEngine"]._ConcatenateShader(vertexCode, defines);
|
|
|
|
- fragmentCode = _thinEngine__WEBPACK_IMPORTED_MODULE_11__["ThinEngine"]._ConcatenateShader(fragmentCode, defines);
|
|
|
|
|
|
+ vertexCode = _thinEngine__WEBPACK_IMPORTED_MODULE_10__["ThinEngine"]._ConcatenateShader(vertexCode, defines);
|
|
|
|
+ fragmentCode = _thinEngine__WEBPACK_IMPORTED_MODULE_10__["ThinEngine"]._ConcatenateShader(fragmentCode, defines);
|
|
var program = this._native.createProgram(vertexCode, fragmentCode);
|
|
var program = this._native.createProgram(vertexCode, fragmentCode);
|
|
this.onAfterShaderCompilationObservable.notifyObservers(this);
|
|
this.onAfterShaderCompilationObservable.notifyObservers(this);
|
|
return program;
|
|
return program;
|
|
@@ -36876,7 +36732,7 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
}
|
|
}
|
|
this._native.setBlendMode(mode);
|
|
this._native.setBlendMode(mode);
|
|
if (!noDepthWriteChange) {
|
|
if (!noDepthWriteChange) {
|
|
- this.setDepthWrite(mode === _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].ALPHA_DISABLE);
|
|
|
|
|
|
+ this.setDepthWrite(mode === _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].ALPHA_DISABLE);
|
|
}
|
|
}
|
|
this._alphaMode = mode;
|
|
this._alphaMode = mode;
|
|
};
|
|
};
|
|
@@ -37065,7 +36921,7 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
*/
|
|
*/
|
|
NativeEngine.prototype.createTexture = function (url, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format, forcedExtension, mimeType) {
|
|
NativeEngine.prototype.createTexture = function (url, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format, forcedExtension, mimeType) {
|
|
var _this = this;
|
|
var _this = this;
|
|
- if (samplingMode === void 0) { samplingMode = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE; }
|
|
|
|
|
|
+ if (samplingMode === void 0) { samplingMode = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE; }
|
|
if (onLoad === void 0) { onLoad = null; }
|
|
if (onLoad === void 0) { onLoad = null; }
|
|
if (onError === void 0) { onError = null; }
|
|
if (onError === void 0) { onError = null; }
|
|
if (buffer === void 0) { buffer = null; }
|
|
if (buffer === void 0) { buffer = null; }
|
|
@@ -37118,16 +36974,16 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
if (onLoadObserver) {
|
|
if (onLoadObserver) {
|
|
texture.onLoadedObservable.remove(onLoadObserver);
|
|
texture.onLoadedObservable.remove(onLoadObserver);
|
|
}
|
|
}
|
|
- if (_engineStore__WEBPACK_IMPORTED_MODULE_12__["EngineStore"].UseFallbackTexture) {
|
|
|
|
- _this.createTexture(_engineStore__WEBPACK_IMPORTED_MODULE_12__["EngineStore"].FallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture);
|
|
|
|
|
|
+ if (_engineStore__WEBPACK_IMPORTED_MODULE_11__["EngineStore"].UseFallbackTexture) {
|
|
|
|
+ _this.createTexture(_engineStore__WEBPACK_IMPORTED_MODULE_11__["EngineStore"].FallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture);
|
|
}
|
|
}
|
|
if (onError) {
|
|
if (onError) {
|
|
- onError((message || "Unknown error") + (_engineStore__WEBPACK_IMPORTED_MODULE_12__["EngineStore"].UseFallbackTexture ? " - Fallback texture was used" : ""), exception);
|
|
|
|
|
|
+ onError((message || "Unknown error") + (_engineStore__WEBPACK_IMPORTED_MODULE_11__["EngineStore"].UseFallbackTexture ? " - Fallback texture was used" : ""), exception);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
// fall back to the original url if the transformed url fails to load
|
|
// fall back to the original url if the transformed url fails to load
|
|
- _Misc_logger__WEBPACK_IMPORTED_MODULE_9__["Logger"].Warn("Failed to load " + url + ", falling back to " + originalUrl);
|
|
|
|
|
|
+ _Misc_logger__WEBPACK_IMPORTED_MODULE_8__["Logger"].Warn("Failed to load " + url + ", falling back to " + originalUrl);
|
|
_this.createTexture(originalUrl, noMipmap, texture.invertY, scene, samplingMode, onLoad, onError, buffer, texture, format, forcedExtension, mimeType);
|
|
_this.createTexture(originalUrl, noMipmap, texture.invertY, scene, samplingMode, onLoad, onError, buffer, texture, format, forcedExtension, mimeType);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -37241,8 +37097,8 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
}
|
|
}
|
|
texture._lodGenerationScale = specularInfo.lodGenerationScale;
|
|
texture._lodGenerationScale = specularInfo.lodGenerationScale;
|
|
var imageData = _Misc_environmentTextureTools__WEBPACK_IMPORTED_MODULE_6__["EnvironmentTextureTools"].CreateImageDataArrayBufferViews(data, info);
|
|
var imageData = _Misc_environmentTextureTools__WEBPACK_IMPORTED_MODULE_6__["EnvironmentTextureTools"].CreateImageDataArrayBufferViews(data, info);
|
|
- texture.format = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTUREFORMAT_RGBA;
|
|
|
|
- texture.type = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_UNSIGNED_INT;
|
|
|
|
|
|
+ texture.format = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTUREFORMAT_RGBA;
|
|
|
|
+ texture.type = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_UNSIGNED_INT;
|
|
texture.generateMipMaps = true;
|
|
texture.generateMipMaps = true;
|
|
texture.getEngine().updateTextureSamplingMode(_Materials_Textures_texture__WEBPACK_IMPORTED_MODULE_3__["Texture"].TRILINEAR_SAMPLINGMODE, texture);
|
|
texture.getEngine().updateTextureSamplingMode(_Materials_Textures_texture__WEBPACK_IMPORTED_MODULE_3__["Texture"].TRILINEAR_SAMPLINGMODE, texture);
|
|
texture._isRGBD = true;
|
|
texture._isRGBD = true;
|
|
@@ -37295,39 +37151,39 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
// Returns a NativeFilter.XXXX value.
|
|
// Returns a NativeFilter.XXXX value.
|
|
NativeEngine.prototype._getSamplingFilter = function (samplingMode) {
|
|
NativeEngine.prototype._getSamplingFilter = function (samplingMode) {
|
|
switch (samplingMode) {
|
|
switch (samplingMode) {
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_BILINEAR_SAMPLINGMODE:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_BILINEAR_SAMPLINGMODE:
|
|
return NativeFilter.MINLINEAR_MAGLINEAR_MIPPOINT;
|
|
return NativeFilter.MINLINEAR_MAGLINEAR_MIPPOINT;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE:
|
|
return NativeFilter.MINLINEAR_MAGLINEAR_MIPLINEAR;
|
|
return NativeFilter.MINLINEAR_MAGLINEAR_MIPLINEAR;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_SAMPLINGMODE:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_SAMPLINGMODE:
|
|
return NativeFilter.MINPOINT_MAGPOINT_MIPLINEAR;
|
|
return NativeFilter.MINPOINT_MAGPOINT_MIPLINEAR;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_NEAREST_MIPNEAREST:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_NEAREST_MIPNEAREST:
|
|
return NativeFilter.MINPOINT_MAGPOINT_MIPPOINT;
|
|
return NativeFilter.MINPOINT_MAGPOINT_MIPPOINT;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_LINEAR_MIPNEAREST:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_LINEAR_MIPNEAREST:
|
|
return NativeFilter.MINLINEAR_MAGPOINT_MIPPOINT;
|
|
return NativeFilter.MINLINEAR_MAGPOINT_MIPPOINT;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_LINEAR_MIPLINEAR:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_LINEAR_MIPLINEAR:
|
|
return NativeFilter.MINLINEAR_MAGPOINT_MIPLINEAR;
|
|
return NativeFilter.MINLINEAR_MAGPOINT_MIPLINEAR;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_LINEAR:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_LINEAR:
|
|
return NativeFilter.MINLINEAR_MAGPOINT_MIPLINEAR;
|
|
return NativeFilter.MINLINEAR_MAGPOINT_MIPLINEAR;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_NEAREST:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_NEAREST:
|
|
return NativeFilter.MINPOINT_MAGPOINT_MIPPOINT;
|
|
return NativeFilter.MINPOINT_MAGPOINT_MIPPOINT;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_LINEAR_NEAREST_MIPNEAREST:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_LINEAR_NEAREST_MIPNEAREST:
|
|
return NativeFilter.MINPOINT_MAGLINEAR_MIPPOINT;
|
|
return NativeFilter.MINPOINT_MAGLINEAR_MIPPOINT;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_LINEAR_NEAREST_MIPLINEAR:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_LINEAR_NEAREST_MIPLINEAR:
|
|
return NativeFilter.MINPOINT_MAGLINEAR_MIPLINEAR;
|
|
return NativeFilter.MINPOINT_MAGLINEAR_MIPLINEAR;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_LINEAR_LINEAR:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_LINEAR_LINEAR:
|
|
return NativeFilter.MINLINEAR_MAGLINEAR_MIPLINEAR;
|
|
return NativeFilter.MINLINEAR_MAGLINEAR_MIPLINEAR;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_LINEAR_NEAREST:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_LINEAR_NEAREST:
|
|
return NativeFilter.MINPOINT_MAGLINEAR_MIPLINEAR;
|
|
return NativeFilter.MINPOINT_MAGLINEAR_MIPLINEAR;
|
|
default:
|
|
default:
|
|
throw new Error("Unexpected sampling mode: " + samplingMode + ".");
|
|
throw new Error("Unexpected sampling mode: " + samplingMode + ".");
|
|
}
|
|
}
|
|
};
|
|
};
|
|
NativeEngine._GetNativeTextureFormat = function (format, type) {
|
|
NativeEngine._GetNativeTextureFormat = function (format, type) {
|
|
- if (format == _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTUREFORMAT_RGBA && type == _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_UNSIGNED_INT) {
|
|
|
|
|
|
+ if (format == _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTUREFORMAT_RGBA && type == _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_UNSIGNED_INT) {
|
|
return NativeTextureFormat.RGBA8;
|
|
return NativeTextureFormat.RGBA8;
|
|
}
|
|
}
|
|
- else if (format == _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTUREFORMAT_RGBA && type == _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_FLOAT) {
|
|
|
|
|
|
+ else if (format == _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTUREFORMAT_RGBA && type == _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_FLOAT) {
|
|
return NativeTextureFormat.RGBA32F;
|
|
return NativeTextureFormat.RGBA32F;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -37340,32 +37196,32 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
fullOptions.generateMipMaps = options.generateMipMaps;
|
|
fullOptions.generateMipMaps = options.generateMipMaps;
|
|
fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;
|
|
fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;
|
|
fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;
|
|
fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;
|
|
- fullOptions.type = options.type === undefined ? _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_UNSIGNED_INT : options.type;
|
|
|
|
- fullOptions.samplingMode = options.samplingMode === undefined ? _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;
|
|
|
|
- fullOptions.format = options.format === undefined ? _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTUREFORMAT_RGBA : options.format;
|
|
|
|
|
|
+ fullOptions.type = options.type === undefined ? _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_UNSIGNED_INT : options.type;
|
|
|
|
+ fullOptions.samplingMode = options.samplingMode === undefined ? _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;
|
|
|
|
+ fullOptions.format = options.format === undefined ? _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTUREFORMAT_RGBA : options.format;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
fullOptions.generateMipMaps = options;
|
|
fullOptions.generateMipMaps = options;
|
|
fullOptions.generateDepthBuffer = true;
|
|
fullOptions.generateDepthBuffer = true;
|
|
fullOptions.generateStencilBuffer = false;
|
|
fullOptions.generateStencilBuffer = false;
|
|
- fullOptions.type = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_UNSIGNED_INT;
|
|
|
|
- fullOptions.samplingMode = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE;
|
|
|
|
- fullOptions.format = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTUREFORMAT_RGBA;
|
|
|
|
|
|
+ fullOptions.type = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_UNSIGNED_INT;
|
|
|
|
+ fullOptions.samplingMode = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE;
|
|
|
|
+ fullOptions.format = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTUREFORMAT_RGBA;
|
|
}
|
|
}
|
|
- if (fullOptions.type === _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
|
|
|
|
|
|
+ if (fullOptions.type === _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
|
|
// if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
|
|
// if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
|
|
- fullOptions.samplingMode = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_SAMPLINGMODE;
|
|
|
|
|
|
+ fullOptions.samplingMode = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_SAMPLINGMODE;
|
|
}
|
|
}
|
|
- else if (fullOptions.type === _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
|
|
|
|
|
|
+ else if (fullOptions.type === _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
|
|
// if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
|
|
// if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
|
|
- fullOptions.samplingMode = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_NEAREST_SAMPLINGMODE;
|
|
|
|
|
|
+ fullOptions.samplingMode = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_NEAREST_SAMPLINGMODE;
|
|
}
|
|
}
|
|
var texture = new NativeTexture(this, _Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__["InternalTextureSource"].RenderTarget);
|
|
var texture = new NativeTexture(this, _Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__["InternalTextureSource"].RenderTarget);
|
|
var width = size.width || size;
|
|
var width = size.width || size;
|
|
var height = size.height || size;
|
|
var height = size.height || size;
|
|
- if (fullOptions.type === _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_FLOAT && !this._caps.textureFloat) {
|
|
|
|
- fullOptions.type = _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURETYPE_UNSIGNED_INT;
|
|
|
|
- _Misc_logger__WEBPACK_IMPORTED_MODULE_9__["Logger"].Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type");
|
|
|
|
|
|
+ if (fullOptions.type === _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_FLOAT && !this._caps.textureFloat) {
|
|
|
|
+ fullOptions.type = _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURETYPE_UNSIGNED_INT;
|
|
|
|
+ _Misc_logger__WEBPACK_IMPORTED_MODULE_8__["Logger"].Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type");
|
|
}
|
|
}
|
|
var framebuffer = this._native.createFramebuffer(texture._webGLTexture, width, height, NativeEngine._GetNativeTextureFormat(fullOptions.format, fullOptions.type), fullOptions.samplingMode, fullOptions.generateStencilBuffer ? true : false, fullOptions.generateDepthBuffer, fullOptions.generateMipMaps ? true : false);
|
|
var framebuffer = this._native.createFramebuffer(texture._webGLTexture, width, height, NativeEngine._GetNativeTextureFormat(fullOptions.format, fullOptions.type), fullOptions.samplingMode, fullOptions.generateStencilBuffer ? true : false, fullOptions.generateDepthBuffer, fullOptions.generateMipMaps ? true : false);
|
|
texture._framebuffer = framebuffer;
|
|
texture._framebuffer = framebuffer;
|
|
@@ -37406,7 +37262,7 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
NativeEngine.prototype.unBindFramebuffer = function (texture, disableGenerateMipMaps, onBeforeUnbind) {
|
|
NativeEngine.prototype.unBindFramebuffer = function (texture, disableGenerateMipMaps, onBeforeUnbind) {
|
|
if (disableGenerateMipMaps === void 0) { disableGenerateMipMaps = false; }
|
|
if (disableGenerateMipMaps === void 0) { disableGenerateMipMaps = false; }
|
|
if (disableGenerateMipMaps) {
|
|
if (disableGenerateMipMaps) {
|
|
- _Misc_logger__WEBPACK_IMPORTED_MODULE_9__["Logger"].Warn("Disabling mipmap generation not yet supported in NativeEngine. Ignoring.");
|
|
|
|
|
|
+ _Misc_logger__WEBPACK_IMPORTED_MODULE_8__["Logger"].Warn("Disabling mipmap generation not yet supported in NativeEngine. Ignoring.");
|
|
}
|
|
}
|
|
if (onBeforeUnbind) {
|
|
if (onBeforeUnbind) {
|
|
onBeforeUnbind();
|
|
onBeforeUnbind();
|
|
@@ -37456,7 +37312,7 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
this._activeChannel = channel;
|
|
this._activeChannel = channel;
|
|
texture.update();
|
|
texture.update();
|
|
}
|
|
}
|
|
- else if (texture.delayLoadState === _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].DELAYLOADSTATE_NOTLOADED) { // Delay loading
|
|
|
|
|
|
+ else if (texture.delayLoadState === _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].DELAYLOADSTATE_NOTLOADED) { // Delay loading
|
|
texture.delayLoad();
|
|
texture.delayLoad();
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -37505,11 +37361,11 @@ var NativeEngine = /** @class */ (function (_super) {
|
|
// Returns a NativeAddressMode.XXX value.
|
|
// Returns a NativeAddressMode.XXX value.
|
|
NativeEngine.prototype._getAddressMode = function (wrapMode) {
|
|
NativeEngine.prototype._getAddressMode = function (wrapMode) {
|
|
switch (wrapMode) {
|
|
switch (wrapMode) {
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_WRAP_ADDRESSMODE:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_WRAP_ADDRESSMODE:
|
|
return NativeAddressMode.WRAP;
|
|
return NativeAddressMode.WRAP;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_CLAMP_ADDRESSMODE:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_CLAMP_ADDRESSMODE:
|
|
return NativeAddressMode.CLAMP;
|
|
return NativeAddressMode.CLAMP;
|
|
- case _constants__WEBPACK_IMPORTED_MODULE_10__["Constants"].TEXTURE_MIRROR_ADDRESSMODE:
|
|
|
|
|
|
+ case _constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].TEXTURE_MIRROR_ADDRESSMODE:
|
|
return NativeAddressMode.MIRROR;
|
|
return NativeAddressMode.MIRROR;
|
|
default:
|
|
default:
|
|
throw new Error("Unexpected wrap mode: " + wrapMode + ".");
|
|
throw new Error("Unexpected wrap mode: " + wrapMode + ".");
|
|
@@ -62098,7 +61954,7 @@ var SceneLoader = /** @class */ (function () {
|
|
var directLoad = SceneLoader._getDirectLoad(fileInfo.name);
|
|
var directLoad = SceneLoader._getDirectLoad(fileInfo.name);
|
|
var registeredPlugin = pluginExtension ? SceneLoader._getPluginForExtension(pluginExtension) : (directLoad ? SceneLoader._getPluginForDirectLoad(fileInfo.name) : SceneLoader._getPluginForFilename(fileInfo.name));
|
|
var registeredPlugin = pluginExtension ? SceneLoader._getPluginForExtension(pluginExtension) : (directLoad ? SceneLoader._getPluginForDirectLoad(fileInfo.name) : SceneLoader._getPluginForFilename(fileInfo.name));
|
|
var plugin;
|
|
var plugin;
|
|
- if (registeredPlugin.plugin.createPlugin) {
|
|
|
|
|
|
+ if (registeredPlugin.plugin.createPlugin !== undefined) {
|
|
plugin = registeredPlugin.plugin.createPlugin();
|
|
plugin = registeredPlugin.plugin.createPlugin();
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -90146,13 +90002,16 @@ var DynamicTexture = /** @class */ (function (_super) {
|
|
_Misc_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].Warn("The scene must be ready before serializing the dynamic texture");
|
|
_Misc_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].Warn("The scene must be ready before serializing the dynamic texture");
|
|
}
|
|
}
|
|
var serializationObject = _super.prototype.serialize.call(this);
|
|
var serializationObject = _super.prototype.serialize.call(this);
|
|
- if (this._canvas.toDataURL) {
|
|
|
|
|
|
+ if (this._IsCanvasElement(this._canvas)) {
|
|
serializationObject.base64String = this._canvas.toDataURL();
|
|
serializationObject.base64String = this._canvas.toDataURL();
|
|
}
|
|
}
|
|
serializationObject.invertY = this._invertY;
|
|
serializationObject.invertY = this._invertY;
|
|
serializationObject.samplingMode = this.samplingMode;
|
|
serializationObject.samplingMode = this.samplingMode;
|
|
return serializationObject;
|
|
return serializationObject;
|
|
};
|
|
};
|
|
|
|
+ DynamicTexture.prototype._IsCanvasElement = function (canvas) {
|
|
|
|
+ return canvas.toDataURL !== undefined;
|
|
|
|
+ };
|
|
/** @hidden */
|
|
/** @hidden */
|
|
DynamicTexture.prototype._rebuild = function () {
|
|
DynamicTexture.prototype._rebuild = function () {
|
|
this.update();
|
|
this.update();
|
|
@@ -130971,9 +130830,8 @@ var SubMesh = /** @class */ (function () {
|
|
if (rootMaterial === null || rootMaterial === undefined) {
|
|
if (rootMaterial === null || rootMaterial === undefined) {
|
|
return this._mesh.getScene().defaultMaterial;
|
|
return this._mesh.getScene().defaultMaterial;
|
|
}
|
|
}
|
|
- else if (rootMaterial.getSubMaterial) {
|
|
|
|
- var multiMaterial = rootMaterial;
|
|
|
|
- var effectiveMaterial = multiMaterial.getSubMaterial(this.materialIndex);
|
|
|
|
|
|
+ else if (this._IsMultiMaterial(rootMaterial)) {
|
|
|
|
+ var effectiveMaterial = rootMaterial.getSubMaterial(this.materialIndex);
|
|
if (this._currentMaterial !== effectiveMaterial) {
|
|
if (this._currentMaterial !== effectiveMaterial) {
|
|
this._currentMaterial = effectiveMaterial;
|
|
this._currentMaterial = effectiveMaterial;
|
|
this._materialDefines = null;
|
|
this._materialDefines = null;
|
|
@@ -130982,6 +130840,9 @@ var SubMesh = /** @class */ (function () {
|
|
}
|
|
}
|
|
return rootMaterial;
|
|
return rootMaterial;
|
|
};
|
|
};
|
|
|
|
+ SubMesh.prototype._IsMultiMaterial = function (material) {
|
|
|
|
+ return material.getSubMaterial !== undefined;
|
|
|
|
+ };
|
|
// Methods
|
|
// Methods
|
|
/**
|
|
/**
|
|
* Sets a new updated BoundingInfo object to the submesh
|
|
* Sets a new updated BoundingInfo object to the submesh
|
|
@@ -136600,6 +136461,17 @@ var cloneValue = function (source, destinationObject) {
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
};
|
|
};
|
|
|
|
+function getAllPropertyNames(obj) {
|
|
|
|
+ var props = [];
|
|
|
|
+ do {
|
|
|
|
+ Object.getOwnPropertyNames(obj).forEach(function (prop) {
|
|
|
|
+ if (props.indexOf(prop) === -1) {
|
|
|
|
+ props.push(prop);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } while (obj = Object.getPrototypeOf(obj));
|
|
|
|
+ return props;
|
|
|
|
+}
|
|
/**
|
|
/**
|
|
* Class containing a set of static utilities functions for deep copy.
|
|
* Class containing a set of static utilities functions for deep copy.
|
|
*/
|
|
*/
|
|
@@ -136614,7 +136486,9 @@ var DeepCopier = /** @class */ (function () {
|
|
* @param mustCopyList defines a list of properties to copy (even if they start with _)
|
|
* @param mustCopyList defines a list of properties to copy (even if they start with _)
|
|
*/
|
|
*/
|
|
DeepCopier.DeepCopy = function (source, destination, doNotCopyList, mustCopyList) {
|
|
DeepCopier.DeepCopy = function (source, destination, doNotCopyList, mustCopyList) {
|
|
- for (var prop in source) {
|
|
|
|
|
|
+ var proerties = getAllPropertyNames(source);
|
|
|
|
+ for (var _i = 0, proerties_1 = proerties; _i < proerties_1.length; _i++) {
|
|
|
|
+ var prop = proerties_1[_i];
|
|
if (prop[0] === "_" && (!mustCopyList || mustCopyList.indexOf(prop) === -1)) {
|
|
if (prop[0] === "_" && (!mustCopyList || mustCopyList.indexOf(prop) === -1)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -145646,7 +145520,7 @@ var MorphTarget = /** @class */ (function () {
|
|
}
|
|
}
|
|
var previous = this._influence;
|
|
var previous = this._influence;
|
|
this._influence = influence;
|
|
this._influence = influence;
|
|
- if (this.onInfluenceChanged.hasObservers) {
|
|
|
|
|
|
+ if (this.onInfluenceChanged.hasObservers()) {
|
|
this.onInfluenceChanged.notifyObservers(previous === 0 || influence === 0);
|
|
this.onInfluenceChanged.notifyObservers(previous === 0 || influence === 0);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -153746,7 +153620,7 @@ var ParticleSystem = /** @class */ (function (_super) {
|
|
result.particleTexture.update();
|
|
result.particleTexture.update();
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- result.particleTexture = new _Materials_Textures_texture__WEBPACK_IMPORTED_MODULE_10__["Texture"](this.particleTexture.url, this._scene);
|
|
|
|
|
|
+ result.particleTexture = new _Materials_Textures_texture__WEBPACK_IMPORTED_MODULE_10__["Texture"](this.particleTexture.url || this.particleTexture.name, this._scene);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// Clone gradients
|
|
// Clone gradients
|
|
@@ -158894,7 +158768,7 @@ var AmmoJSPlugin = /** @class */ (function () {
|
|
*/
|
|
*/
|
|
AmmoJSPlugin.prototype.setPhysicsBodyTransformation = function (impostor, newPosition, newRotation) {
|
|
AmmoJSPlugin.prototype.setPhysicsBodyTransformation = function (impostor, newPosition, newRotation) {
|
|
var trans = impostor.physicsBody.getWorldTransform();
|
|
var trans = impostor.physicsBody.getWorldTransform();
|
|
- // If rotation/position has changed update and activate riged body
|
|
|
|
|
|
+ // If rotation/position has changed update and activate rigged body
|
|
if (trans.getOrigin().x() != newPosition.x ||
|
|
if (trans.getOrigin().x() != newPosition.x ||
|
|
trans.getOrigin().y() != newPosition.y ||
|
|
trans.getOrigin().y() != newPosition.y ||
|
|
trans.getOrigin().z() != newPosition.z ||
|
|
trans.getOrigin().z() != newPosition.z ||
|
|
@@ -159400,7 +159274,8 @@ var CannonJSPlugin = /** @class */ (function () {
|
|
this._raycastResult = new _physicsRaycastResult__WEBPACK_IMPORTED_MODULE_6__["PhysicsRaycastResult"]();
|
|
this._raycastResult = new _physicsRaycastResult__WEBPACK_IMPORTED_MODULE_6__["PhysicsRaycastResult"]();
|
|
}
|
|
}
|
|
CannonJSPlugin.prototype.setGravity = function (gravity) {
|
|
CannonJSPlugin.prototype.setGravity = function (gravity) {
|
|
- this.world.gravity.copy(gravity);
|
|
|
|
|
|
+ var vec = gravity;
|
|
|
|
+ this.world.gravity.set(vec.x, vec.y, vec.z);
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.setTimeStep = function (timeStep) {
|
|
CannonJSPlugin.prototype.setTimeStep = function (timeStep) {
|
|
this._fixedTimeStep = timeStep;
|
|
this._fixedTimeStep = timeStep;
|
|
@@ -159484,7 +159359,8 @@ var CannonJSPlugin = /** @class */ (function () {
|
|
//Should be tested!
|
|
//Should be tested!
|
|
if (oldBody) {
|
|
if (oldBody) {
|
|
['force', 'torque', 'velocity', 'angularVelocity'].forEach(function (param) {
|
|
['force', 'torque', 'velocity', 'angularVelocity'].forEach(function (param) {
|
|
- impostor.physicsBody[param].copy(oldBody[param]);
|
|
|
|
|
|
+ var vec = oldBody[param];
|
|
|
|
+ impostor.physicsBody[param].set(vec.x, vec.y, vec.z);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
this._processChildMeshes(impostor);
|
|
this._processChildMeshes(impostor);
|
|
@@ -159543,10 +159419,10 @@ var CannonJSPlugin = /** @class */ (function () {
|
|
var jointData = impostorJoint.joint.jointData;
|
|
var jointData = impostorJoint.joint.jointData;
|
|
//TODO - https://github.com/schteppe/this.BJSCANNON.js/blob/gh-pages/demos/collisionFilter.html
|
|
//TODO - https://github.com/schteppe/this.BJSCANNON.js/blob/gh-pages/demos/collisionFilter.html
|
|
var constraintData = {
|
|
var constraintData = {
|
|
- pivotA: jointData.mainPivot ? new this.BJSCANNON.Vec3().copy(jointData.mainPivot) : null,
|
|
|
|
- pivotB: jointData.connectedPivot ? new this.BJSCANNON.Vec3().copy(jointData.connectedPivot) : null,
|
|
|
|
- axisA: jointData.mainAxis ? new this.BJSCANNON.Vec3().copy(jointData.mainAxis) : null,
|
|
|
|
- axisB: jointData.connectedAxis ? new this.BJSCANNON.Vec3().copy(jointData.connectedAxis) : null,
|
|
|
|
|
|
+ pivotA: jointData.mainPivot ? new this.BJSCANNON.Vec3().set(jointData.mainPivot.x, jointData.mainPivot.y, jointData.mainPivot.z) : null,
|
|
|
|
+ pivotB: jointData.connectedPivot ? new this.BJSCANNON.Vec3().set(jointData.connectedPivot.x, jointData.connectedPivot.y, jointData.connectedPivot.z) : null,
|
|
|
|
+ axisA: jointData.mainAxis ? new this.BJSCANNON.Vec3().set(jointData.mainAxis.x, jointData.mainAxis.y, jointData.mainAxis.z) : null,
|
|
|
|
+ axisB: jointData.connectedAxis ? new this.BJSCANNON.Vec3().set(jointData.connectedAxis.x, jointData.connectedAxis.y, jointData.connectedAxis.z) : null,
|
|
maxForce: jointData.nativeParams.maxForce,
|
|
maxForce: jointData.nativeParams.maxForce,
|
|
collideConnected: !!jointData.collision
|
|
collideConnected: !!jointData.collision
|
|
};
|
|
};
|
|
@@ -159825,31 +159701,31 @@ var CannonJSPlugin = /** @class */ (function () {
|
|
}
|
|
}
|
|
else if (impostor.type === _Physics_physicsImpostor__WEBPACK_IMPORTED_MODULE_3__["PhysicsImpostor"].MeshImpostor) {
|
|
else if (impostor.type === _Physics_physicsImpostor__WEBPACK_IMPORTED_MODULE_3__["PhysicsImpostor"].MeshImpostor) {
|
|
this._tmpDeltaPosition.copyFromFloats(0, 0, 0);
|
|
this._tmpDeltaPosition.copyFromFloats(0, 0, 0);
|
|
- //this._tmpPosition.copyFrom(object.position);
|
|
|
|
}
|
|
}
|
|
impostor.setDeltaPosition(this._tmpDeltaPosition);
|
|
impostor.setDeltaPosition(this._tmpDeltaPosition);
|
|
//Now update the impostor object
|
|
//Now update the impostor object
|
|
- impostor.physicsBody.position.copy(this._tmpPosition);
|
|
|
|
- impostor.physicsBody.quaternion.copy(quaternion);
|
|
|
|
|
|
+ impostor.physicsBody.position.set(this._tmpPosition.x, this._tmpPosition.y, this._tmpPosition.z);
|
|
|
|
+ impostor.physicsBody.quaternion.set(quaternion.x, quaternion.y, quaternion.z, quaternion.w);
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.setTransformationFromPhysicsBody = function (impostor) {
|
|
CannonJSPlugin.prototype.setTransformationFromPhysicsBody = function (impostor) {
|
|
- impostor.object.position.copyFrom(impostor.physicsBody.position);
|
|
|
|
|
|
+ impostor.object.position.set(impostor.physicsBody.position.x, impostor.physicsBody.position.y, impostor.physicsBody.position.z);
|
|
if (impostor.object.rotationQuaternion) {
|
|
if (impostor.object.rotationQuaternion) {
|
|
- impostor.object.rotationQuaternion.copyFrom(impostor.physicsBody.quaternion);
|
|
|
|
|
|
+ var q = impostor.object.rotationQuaternion;
|
|
|
|
+ impostor.object.rotationQuaternion.set(q.x, q.y, q.z, q.w);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.setPhysicsBodyTransformation = function (impostor, newPosition, newRotation) {
|
|
CannonJSPlugin.prototype.setPhysicsBodyTransformation = function (impostor, newPosition, newRotation) {
|
|
- impostor.physicsBody.position.copy(newPosition);
|
|
|
|
- impostor.physicsBody.quaternion.copy(newRotation);
|
|
|
|
|
|
+ impostor.physicsBody.position.set(newPosition.x, newPosition.y, newPosition.z);
|
|
|
|
+ impostor.physicsBody.quaternion.set(newRotation.x, newRotation.y, newRotation.z, newRotation.w);
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.isSupported = function () {
|
|
CannonJSPlugin.prototype.isSupported = function () {
|
|
return this.BJSCANNON !== undefined;
|
|
return this.BJSCANNON !== undefined;
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
|
|
CannonJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
|
|
- impostor.physicsBody.velocity.copy(velocity);
|
|
|
|
|
|
+ impostor.physicsBody.velocity.set(velocity.x, velocity.y, velocity.z);
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
|
|
CannonJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
|
|
- impostor.physicsBody.angularVelocity.copy(velocity);
|
|
|
|
|
|
+ impostor.physicsBody.angularVelocity.set(velocity.x, velocity.y, velocity.z);
|
|
};
|
|
};
|
|
CannonJSPlugin.prototype.getLinearVelocity = function (impostor) {
|
|
CannonJSPlugin.prototype.getLinearVelocity = function (impostor) {
|
|
var v = impostor.physicsBody.velocity;
|
|
var v = impostor.physicsBody.velocity;
|
|
@@ -159964,8 +159840,8 @@ var CannonJSPlugin = /** @class */ (function () {
|
|
b.position.vadd(interpvelo, b.interpolatedPosition);
|
|
b.position.vadd(interpvelo, b.interpolatedPosition);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- b.interpolatedPosition.copy(b.position);
|
|
|
|
- b.interpolatedQuaternion.copy(b.quaternion);
|
|
|
|
|
|
+ b.interpolatedPosition.set(b.position.x, b.position.y, b.position.z);
|
|
|
|
+ b.interpolatedQuaternion.set(b.quaternion.x, b.quaternion.y, b.quaternion.z, b.quaternion.w);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -160069,7 +159945,7 @@ var OimoJSPlugin = /** @class */ (function () {
|
|
this._raycastResult = new _physicsRaycastResult__WEBPACK_IMPORTED_MODULE_5__["PhysicsRaycastResult"]();
|
|
this._raycastResult = new _physicsRaycastResult__WEBPACK_IMPORTED_MODULE_5__["PhysicsRaycastResult"]();
|
|
}
|
|
}
|
|
OimoJSPlugin.prototype.setGravity = function (gravity) {
|
|
OimoJSPlugin.prototype.setGravity = function (gravity) {
|
|
- this.world.gravity.copy(gravity);
|
|
|
|
|
|
+ this.world.gravity.set(gravity.x, gravity.y, gravity.z);
|
|
};
|
|
};
|
|
OimoJSPlugin.prototype.setTimeStep = function (timeStep) {
|
|
OimoJSPlugin.prototype.setTimeStep = function (timeStep) {
|
|
this.world.timeStep = timeStep;
|
|
this.world.timeStep = timeStep;
|
|
@@ -160332,14 +160208,16 @@ var OimoJSPlugin = /** @class */ (function () {
|
|
while (parent_1.next) {
|
|
while (parent_1.next) {
|
|
parent_1 = parent_1.next;
|
|
parent_1 = parent_1.next;
|
|
}
|
|
}
|
|
- impostor.object.position.copyFrom(parent_1.position);
|
|
|
|
|
|
+ impostor.object.position.set(parent_1.position.x, parent_1.position.y, parent_1.position.z);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- impostor.object.position.copyFrom(impostor.physicsBody.getPosition());
|
|
|
|
|
|
+ var pos = impostor.physicsBody.getPosition();
|
|
|
|
+ impostor.object.position.set(pos.x, pos.y, pos.z);
|
|
}
|
|
}
|
|
//}
|
|
//}
|
|
if (impostor.object.rotationQuaternion) {
|
|
if (impostor.object.rotationQuaternion) {
|
|
- impostor.object.rotationQuaternion.copyFrom(impostor.physicsBody.getQuaternion());
|
|
|
|
|
|
+ var quat = impostor.physicsBody.getQuaternion();
|
|
|
|
+ impostor.object.rotationQuaternion.set(quat.x, quat.y, quat.z, quat.w);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -160349,8 +160227,8 @@ var OimoJSPlugin = /** @class */ (function () {
|
|
if (impostor.physicsBody.shapes.next) {
|
|
if (impostor.physicsBody.shapes.next) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- body.position.copy(newPosition);
|
|
|
|
- body.orientation.copy(newRotation);
|
|
|
|
|
|
+ body.position.set(newPosition.x, newPosition.y, newPosition.z);
|
|
|
|
+ body.orientation.set(newRotation.x, newRotation.y, newRotation.z, newRotation.w);
|
|
body.syncShapes();
|
|
body.syncShapes();
|
|
body.awake();
|
|
body.awake();
|
|
};
|
|
};
|
|
@@ -160362,10 +160240,10 @@ var OimoJSPlugin = /** @class */ (function () {
|
|
return lastShape;
|
|
return lastShape;
|
|
}*/
|
|
}*/
|
|
OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
|
|
OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
|
|
- impostor.physicsBody.linearVelocity.copy(velocity);
|
|
|
|
|
|
+ impostor.physicsBody.linearVelocity.set(velocity.x, velocity.y, velocity.z);
|
|
};
|
|
};
|
|
OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
|
|
OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
|
|
- impostor.physicsBody.angularVelocity.copy(velocity);
|
|
|
|
|
|
+ impostor.physicsBody.angularVelocity.set(velocity.x, velocity.y, velocity.z);
|
|
};
|
|
};
|
|
OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
|
|
OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
|
|
var v = impostor.physicsBody.linearVelocity;
|
|
var v = impostor.physicsBody.linearVelocity;
|
|
@@ -186298,8 +186176,10 @@ var WebXRCamera = /** @class */ (function (_super) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (pose.transform) {
|
|
if (pose.transform) {
|
|
- this._referencedPosition.copyFrom((pose.transform.position));
|
|
|
|
- this._referenceQuaternion.copyFrom((pose.transform.orientation));
|
|
|
|
|
|
+ var pos = pose.transform.position;
|
|
|
|
+ this._referencedPosition.set(pos.x, pos.y, pos.z);
|
|
|
|
+ var orientation_1 = pose.transform.orientation;
|
|
|
|
+ this._referenceQuaternion.set(orientation_1.x, orientation_1.y, orientation_1.z, orientation_1.w);
|
|
if (!this._scene.useRightHandedSystem) {
|
|
if (!this._scene.useRightHandedSystem) {
|
|
this._referencedPosition.z *= -1;
|
|
this._referencedPosition.z *= -1;
|
|
this._referenceQuaternion.z *= -1;
|
|
this._referenceQuaternion.z *= -1;
|
|
@@ -186447,8 +186327,7 @@ var WebXRCamera = /** @class */ (function (_super) {
|
|
var referenceSpace = this._xrSessionManager.referenceSpace.getOffsetReferenceSpace(transform);
|
|
var referenceSpace = this._xrSessionManager.referenceSpace.getOffsetReferenceSpace(transform);
|
|
var pose = this._xrSessionManager.currentFrame && this._xrSessionManager.currentFrame.getViewerPose(referenceSpace);
|
|
var pose = this._xrSessionManager.currentFrame && this._xrSessionManager.currentFrame.getViewerPose(referenceSpace);
|
|
if (pose) {
|
|
if (pose) {
|
|
- var pos = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"]();
|
|
|
|
- pos.copyFrom((pose.transform.position));
|
|
|
|
|
|
+ var pos = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"](pose.transform.position.x, pose.transform.position.y, pose.transform.position.z);
|
|
if (!this._scene.useRightHandedSystem) {
|
|
if (!this._scene.useRightHandedSystem) {
|
|
pos.z *= -1;
|
|
pos.z *= -1;
|
|
}
|
|
}
|
|
@@ -187564,8 +187443,10 @@ var WebXRInputSource = /** @class */ (function () {
|
|
var pose = xrFrame.getPose(this.inputSource.targetRaySpace, referenceSpace);
|
|
var pose = xrFrame.getPose(this.inputSource.targetRaySpace, referenceSpace);
|
|
// Update the pointer mesh
|
|
// Update the pointer mesh
|
|
if (pose) {
|
|
if (pose) {
|
|
- this.pointer.position.copyFrom((pose.transform.position));
|
|
|
|
- this.pointer.rotationQuaternion.copyFrom((pose.transform.orientation));
|
|
|
|
|
|
+ var pos = pose.transform.position;
|
|
|
|
+ this.pointer.position.set(pos.x, pos.y, pos.z);
|
|
|
|
+ var orientation_1 = pose.transform.orientation;
|
|
|
|
+ this.pointer.rotationQuaternion.set(orientation_1.x, orientation_1.y, orientation_1.z, orientation_1.w);
|
|
if (!this._scene.useRightHandedSystem) {
|
|
if (!this._scene.useRightHandedSystem) {
|
|
this.pointer.position.z *= -1;
|
|
this.pointer.position.z *= -1;
|
|
this.pointer.rotationQuaternion.z *= -1;
|
|
this.pointer.rotationQuaternion.z *= -1;
|
|
@@ -187576,8 +187457,10 @@ var WebXRInputSource = /** @class */ (function () {
|
|
if (this.inputSource.gripSpace && this.grip) {
|
|
if (this.inputSource.gripSpace && this.grip) {
|
|
var pose_1 = xrFrame.getPose(this.inputSource.gripSpace, referenceSpace);
|
|
var pose_1 = xrFrame.getPose(this.inputSource.gripSpace, referenceSpace);
|
|
if (pose_1) {
|
|
if (pose_1) {
|
|
- this.grip.position.copyFrom((pose_1.transform.position));
|
|
|
|
- this.grip.rotationQuaternion.copyFrom((pose_1.transform.orientation));
|
|
|
|
|
|
+ var pos = pose_1.transform.position;
|
|
|
|
+ var orientation_2 = pose_1.transform.orientation;
|
|
|
|
+ this.grip.position.set(pos.x, pos.y, pos.z);
|
|
|
|
+ this.grip.rotationQuaternion.set(orientation_2.x, orientation_2.y, orientation_2.z, orientation_2.w);
|
|
if (!this._scene.useRightHandedSystem) {
|
|
if (!this._scene.useRightHandedSystem) {
|
|
this.grip.position.z *= -1;
|
|
this.grip.position.z *= -1;
|
|
this.grip.rotationQuaternion.z *= -1;
|
|
this.grip.rotationQuaternion.z *= -1;
|