|
@@ -34449,6 +34449,42 @@ var Engine = /** @class */ (function (_super) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+ /**
|
|
|
|
+ * Updates a dynamic vertex buffer.
|
|
|
|
+ * @param vertexBuffer the vertex buffer to update
|
|
|
|
+ * @param data the data used to update the vertex buffer
|
|
|
|
+ * @param byteOffset the byte offset of the data
|
|
|
|
+ * @param byteLength the byte length of the data
|
|
|
|
+ */
|
|
|
|
+ Engine.prototype.updateDynamicVertexBuffer = function (vertexBuffer, data, byteOffset, byteLength) {
|
|
|
|
+ this.bindArrayBuffer(vertexBuffer);
|
|
|
|
+ if (byteOffset === undefined) {
|
|
|
|
+ byteOffset = 0;
|
|
|
|
+ }
|
|
|
|
+ if (byteLength === undefined) {
|
|
|
|
+ if (data instanceof Array) {
|
|
|
|
+ this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, new Float32Array(data));
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, data);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if (data instanceof Array) {
|
|
|
|
+ this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, new Float32Array(data).subarray(byteOffset, byteOffset + byteLength));
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if (data instanceof ArrayBuffer) {
|
|
|
|
+ data = new Uint8Array(data, byteOffset, byteLength);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ data = new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);
|
|
|
|
+ }
|
|
|
|
+ this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this._resetVertexBufferBinding();
|
|
|
|
+ };
|
|
Engine.prototype._deletePipelineContext = function (pipelineContext) {
|
|
Engine.prototype._deletePipelineContext = function (pipelineContext) {
|
|
var webGLPipelineContext = pipelineContext;
|
|
var webGLPipelineContext = pipelineContext;
|
|
if (webGLPipelineContext && webGLPipelineContext.program) {
|
|
if (webGLPipelineContext && webGLPipelineContext.program) {
|
|
@@ -38278,6 +38314,7 @@ var ThinEngine = /** @class */ (function () {
|
|
this.wipeCaches();
|
|
this.wipeCaches();
|
|
};
|
|
};
|
|
// VBOs
|
|
// VBOs
|
|
|
|
+ /** @hidden */
|
|
ThinEngine.prototype._resetVertexBufferBinding = function () {
|
|
ThinEngine.prototype._resetVertexBufferBinding = function () {
|
|
this.bindArrayBuffer(null);
|
|
this.bindArrayBuffer(null);
|
|
this._cachedVertexBuffers = null;
|
|
this._cachedVertexBuffers = null;
|
|
@@ -38315,42 +38352,6 @@ var ThinEngine = /** @class */ (function () {
|
|
ThinEngine.prototype.createDynamicVertexBuffer = function (data) {
|
|
ThinEngine.prototype.createDynamicVertexBuffer = function (data) {
|
|
return this._createVertexBuffer(data, this._gl.DYNAMIC_DRAW);
|
|
return this._createVertexBuffer(data, this._gl.DYNAMIC_DRAW);
|
|
};
|
|
};
|
|
- /**
|
|
|
|
- * Updates a dynamic vertex buffer.
|
|
|
|
- * @param vertexBuffer the vertex buffer to update
|
|
|
|
- * @param data the data used to update the vertex buffer
|
|
|
|
- * @param byteOffset the byte offset of the data
|
|
|
|
- * @param byteLength the byte length of the data
|
|
|
|
- */
|
|
|
|
- ThinEngine.prototype.updateDynamicVertexBuffer = function (vertexBuffer, data, byteOffset, byteLength) {
|
|
|
|
- this.bindArrayBuffer(vertexBuffer);
|
|
|
|
- if (byteOffset === undefined) {
|
|
|
|
- byteOffset = 0;
|
|
|
|
- }
|
|
|
|
- if (byteLength === undefined) {
|
|
|
|
- if (data instanceof Array) {
|
|
|
|
- this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, new Float32Array(data));
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, data);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- if (data instanceof Array) {
|
|
|
|
- this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, new Float32Array(data).subarray(byteOffset, byteOffset + byteLength));
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- if (data instanceof ArrayBuffer) {
|
|
|
|
- data = new Uint8Array(data, byteOffset, byteLength);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- data = new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);
|
|
|
|
- }
|
|
|
|
- this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this._resetVertexBufferBinding();
|
|
|
|
- };
|
|
|
|
ThinEngine.prototype._resetIndexBufferBinding = function () {
|
|
ThinEngine.prototype._resetIndexBufferBinding = function () {
|
|
this.bindIndexBuffer(null);
|
|
this.bindIndexBuffer(null);
|
|
this._cachedIndexBuffer = null;
|
|
this._cachedIndexBuffer = null;
|
|
@@ -38668,7 +38669,7 @@ var ThinEngine = /** @class */ (function () {
|
|
this._gl.enableVertexAttribArray(ai.index);
|
|
this._gl.enableVertexAttribArray(ai.index);
|
|
this._vertexAttribArraysEnabled[ai.index] = true;
|
|
this._vertexAttribArraysEnabled[ai.index] = true;
|
|
}
|
|
}
|
|
- this._vertexAttribPointer(instancesBuffer, ai.index, ai.attributeSize, ai.attribyteType || this._gl.FLOAT, ai.normalized || false, stride, ai.offset);
|
|
|
|
|
|
+ this._vertexAttribPointer(instancesBuffer, ai.index, ai.attributeSize, ai.attributeType || this._gl.FLOAT, ai.normalized || false, stride, ai.offset);
|
|
this._gl.vertexAttribDivisor(ai.index, 1);
|
|
this._gl.vertexAttribDivisor(ai.index, 1);
|
|
this._currentInstanceLocations.push(ai.index);
|
|
this._currentInstanceLocations.push(ai.index);
|
|
this._currentInstanceBuffers.push(instancesBuffer);
|
|
this._currentInstanceBuffers.push(instancesBuffer);
|
|
@@ -47845,6 +47846,7 @@ var PhotoDome = /** @class */ (function (_super) {
|
|
onError(message, exception);
|
|
onError(message, exception);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ _this.photoTexture.anisotropicFilteringLevel = 1;
|
|
_this.photoTexture.onLoadObservable.addOnce(function () {
|
|
_this.photoTexture.onLoadObservable.addOnce(function () {
|
|
_this._setReady(true);
|
|
_this._setReady(true);
|
|
});
|
|
});
|
|
@@ -48236,6 +48238,7 @@ var VideoDome = /** @class */ (function (_super) {
|
|
var material = _this._material = new _Materials_Background_backgroundMaterial__WEBPACK_IMPORTED_MODULE_5__["BackgroundMaterial"](name + "_material", scene);
|
|
var material = _this._material = new _Materials_Background_backgroundMaterial__WEBPACK_IMPORTED_MODULE_5__["BackgroundMaterial"](name + "_material", scene);
|
|
var texture = _this._videoTexture = new _Materials_Textures_videoTexture__WEBPACK_IMPORTED_MODULE_4__["VideoTexture"](name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, _Materials_Textures_texture__WEBPACK_IMPORTED_MODULE_3__["Texture"].TRILINEAR_SAMPLINGMODE, tempOptions);
|
|
var texture = _this._videoTexture = new _Materials_Textures_videoTexture__WEBPACK_IMPORTED_MODULE_4__["VideoTexture"](name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, _Materials_Textures_texture__WEBPACK_IMPORTED_MODULE_3__["Texture"].TRILINEAR_SAMPLINGMODE, tempOptions);
|
|
_this._mesh = _Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["Mesh"].CreateSphere(name + "_mesh", options.resolution, options.size, scene, false, _Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["Mesh"].BACKSIDE);
|
|
_this._mesh = _Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["Mesh"].CreateSphere(name + "_mesh", options.resolution, options.size, scene, false, _Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["Mesh"].BACKSIDE);
|
|
|
|
+ texture.anisotropicFilteringLevel = 1;
|
|
texture.onLoadObservable.addOnce(function () {
|
|
texture.onLoadObservable.addOnce(function () {
|
|
_this._setReady(true);
|
|
_this._setReady(true);
|
|
});
|
|
});
|
|
@@ -157011,7 +157014,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
__webpack_require__.r(__webpack_exports__);
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutlineRenderer", function() { return OutlineRenderer; });
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutlineRenderer", function() { return OutlineRenderer; });
|
|
/* harmony import */ var _Meshes_buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Meshes/buffer */ "./Meshes/buffer.ts");
|
|
/* harmony import */ var _Meshes_buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Meshes/buffer */ "./Meshes/buffer.ts");
|
|
-/* harmony import */ var _Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Meshes/abstractMesh */ "./Meshes/abstractMesh.ts");
|
|
|
|
|
|
+/* harmony import */ var _Meshes_mesh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Meshes/mesh */ "./Meshes/mesh.ts");
|
|
/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scene */ "./scene.ts");
|
|
/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scene */ "./scene.ts");
|
|
/* harmony import */ var _Engines_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Engines/constants */ "./Engines/constants.ts");
|
|
/* harmony import */ var _Engines_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Engines/constants */ "./Engines/constants.ts");
|
|
/* harmony import */ var _sceneComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../sceneComponent */ "./sceneComponent.ts");
|
|
/* harmony import */ var _sceneComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../sceneComponent */ "./sceneComponent.ts");
|
|
@@ -157038,7 +157041,7 @@ _scene__WEBPACK_IMPORTED_MODULE_2__["Scene"].prototype.getOutlineRenderer = func
|
|
}
|
|
}
|
|
return this._outlineRenderer;
|
|
return this._outlineRenderer;
|
|
};
|
|
};
|
|
-Object.defineProperty(_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__["AbstractMesh"].prototype, "renderOutline", {
|
|
|
|
|
|
+Object.defineProperty(_Meshes_mesh__WEBPACK_IMPORTED_MODULE_1__["Mesh"].prototype, "renderOutline", {
|
|
get: function () {
|
|
get: function () {
|
|
return this._renderOutline;
|
|
return this._renderOutline;
|
|
},
|
|
},
|
|
@@ -157052,7 +157055,7 @@ Object.defineProperty(_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__["Abstrac
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
-Object.defineProperty(_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__["AbstractMesh"].prototype, "renderOverlay", {
|
|
|
|
|
|
+Object.defineProperty(_Meshes_mesh__WEBPACK_IMPORTED_MODULE_1__["Mesh"].prototype, "renderOverlay", {
|
|
get: function () {
|
|
get: function () {
|
|
return this._renderOverlay;
|
|
return this._renderOverlay;
|
|
},
|
|
},
|
|
@@ -157256,9 +157259,12 @@ var OutlineRenderer = /** @class */ (function () {
|
|
// Overlay
|
|
// Overlay
|
|
if (mesh.renderOverlay) {
|
|
if (mesh.renderOverlay) {
|
|
var currentMode = this._engine.getAlphaMode();
|
|
var currentMode = this._engine.getAlphaMode();
|
|
|
|
+ var alphaBlendState = this._engine.alphaState.alphaBlend;
|
|
this._engine.setAlphaMode(_Engines_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ALPHA_COMBINE);
|
|
this._engine.setAlphaMode(_Engines_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ALPHA_COMBINE);
|
|
this.render(subMesh, batch, true);
|
|
this.render(subMesh, batch, true);
|
|
this._engine.setAlphaMode(currentMode);
|
|
this._engine.setAlphaMode(currentMode);
|
|
|
|
+ this._engine.setDepthWrite(this._savedDepthWrite);
|
|
|
|
+ this._engine.alphaState.alphaBlend = alphaBlendState;
|
|
}
|
|
}
|
|
// Outline - step 2
|
|
// Outline - step 2
|
|
if (mesh.renderOutline && this._savedDepthWrite) {
|
|
if (mesh.renderOutline && this._savedDepthWrite) {
|