|
@@ -65380,10 +65380,6 @@ var BABYLON;
|
|
|
if (format === void 0) { format = BABYLON.Engine.TEXTUREFORMAT_RGBA; }
|
|
|
var _this = _super.call(this, null, scene, !generateMipMaps) || this;
|
|
|
_this.isCube = isCube;
|
|
|
- /**
|
|
|
- * Use this list to define the list of mesh you want to render.
|
|
|
- */
|
|
|
- _this.renderList = new Array();
|
|
|
_this.renderParticles = true;
|
|
|
_this.renderSprites = false;
|
|
|
_this.coordinatesMode = BABYLON.Texture.PROJECTION_MODE;
|
|
@@ -65421,6 +65417,7 @@ var BABYLON;
|
|
|
if (!scene) {
|
|
|
return _this;
|
|
|
}
|
|
|
+ _this.renderList = new Array();
|
|
|
_this._engine = scene.getEngine();
|
|
|
_this.name = name;
|
|
|
_this.isRenderTarget = true;
|
|
@@ -65479,6 +65476,45 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
+ Object.defineProperty(RenderTargetTexture.prototype, "renderList", {
|
|
|
+ /**
|
|
|
+ * Use this list to define the list of mesh you want to render.
|
|
|
+ */
|
|
|
+ get: function () {
|
|
|
+ return this._renderList;
|
|
|
+ },
|
|
|
+ set: function (value) {
|
|
|
+ this._renderList = value;
|
|
|
+ if (this._renderList) {
|
|
|
+ this._hookArray(this._renderList);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ RenderTargetTexture.prototype._hookArray = function (array) {
|
|
|
+ var _this = this;
|
|
|
+ var oldPush = array.push;
|
|
|
+ array.push = function () {
|
|
|
+ var items = [];
|
|
|
+ for (var _i = 0; _i < arguments.length; _i++) {
|
|
|
+ items[_i] = arguments[_i];
|
|
|
+ }
|
|
|
+ var result = oldPush.apply(array, items);
|
|
|
+ _this.getScene().meshes.forEach(function (mesh) {
|
|
|
+ mesh._markSubMeshesAsLightDirty();
|
|
|
+ });
|
|
|
+ return result;
|
|
|
+ };
|
|
|
+ var oldSplice = array.splice;
|
|
|
+ array.splice = function (index, deleteCount) {
|
|
|
+ var deleted = oldSplice.apply(array, [index, deleteCount]);
|
|
|
+ _this.getScene().meshes.forEach(function (mesh) {
|
|
|
+ mesh._markSubMeshesAsLightDirty();
|
|
|
+ });
|
|
|
+ return deleted;
|
|
|
+ };
|
|
|
+ };
|
|
|
Object.defineProperty(RenderTargetTexture.prototype, "onAfterUnbind", {
|
|
|
set: function (callback) {
|
|
|
if (this._onAfterUnbindObserver) {
|