|
@@ -35929,7 +35929,52 @@ var substr = 'ab'.substr(-1) === 'b'
|
|
|
}
|
|
|
;
|
|
|
|
|
|
-},{"process":"../node_modules/process/browser.js"}],"../src/utilities/LRUCache.js":[function(require,module,exports) {
|
|
|
+},{"process":"../node_modules/process/browser.js"}],"../src/utilities/urlJoin.js":[function(require,module,exports) {
|
|
|
+"use strict";
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.urlJoin = urlJoin;
|
|
|
+
|
|
|
+var _path = _interopRequireDefault(require("path"));
|
|
|
+
|
|
|
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
+
|
|
|
+function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
|
+
|
|
|
+function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
|
+
|
|
|
+function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
|
+
|
|
|
+function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
|
+
|
|
|
+// Function that properly handles path resolution for parts that have
|
|
|
+// a protocol component like "http://".
|
|
|
+function urlJoin() {
|
|
|
+ var protocolRegex = /^[a-zA-Z]+:\/\//;
|
|
|
+ var lastRoot = -1;
|
|
|
+
|
|
|
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
+ args[_key] = arguments[_key];
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0, l = args.length; i < l; i++) {
|
|
|
+ if (protocolRegex.test(args[i])) {
|
|
|
+ lastRoot = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (lastRoot === -1) {
|
|
|
+ return _path.default.join.apply(_path.default, args).replace(/\\/g, '/');
|
|
|
+ } else {
|
|
|
+ var parts = lastRoot <= 0 ? args : args.slice(lastRoot);
|
|
|
+ var protocol = parts[0].match(protocolRegex)[0];
|
|
|
+ parts[0] = parts[0].substring(protocol.length);
|
|
|
+ return (protocol + _path.default.join.apply(_path.default, _toConsumableArray(parts))).replace(/\\/g, '/');
|
|
|
+ }
|
|
|
+}
|
|
|
+},{"path":"../node_modules/path-browserify/index.js"}],"../src/utilities/LRUCache.js":[function(require,module,exports) {
|
|
|
"use strict";
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -36471,7 +36516,7 @@ function skipTraversal(tile, renderer) {
|
|
|
|
|
|
tile.__active = true;
|
|
|
stats.active++;
|
|
|
- } else if (!lruCache.isFull()) {
|
|
|
+ } else if (!lruCache.isFull() && !tile.__contentEmpty) {
|
|
|
renderer.requestTileContents(tile);
|
|
|
}
|
|
|
|
|
@@ -36586,6 +36631,8 @@ exports.TilesRendererBase = void 0;
|
|
|
|
|
|
var _path = _interopRequireDefault(require("path"));
|
|
|
|
|
|
+var _urlJoin = require("../utilities/urlJoin.js");
|
|
|
+
|
|
|
var _LRUCache = require("../utilities/LRUCache.js");
|
|
|
|
|
|
var _PriorityQueue = require("../utilities/PriorityQueue.js");
|
|
@@ -36717,7 +36764,7 @@ function () {
|
|
|
}
|
|
|
|
|
|
if (tile.content.uri) {
|
|
|
- tile.content.uri = _path.default.join(tileSetDir, tile.content.uri);
|
|
|
+ tile.content.uri = (0, _urlJoin.urlJoin)(tileSetDir, tile.content.uri);
|
|
|
} // NOTE: fix for some cases where tilesets provide the bounding volume
|
|
|
// but volumes are not present.
|
|
|
|
|
@@ -36935,13 +36982,21 @@ function () {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ }, {
|
|
|
+ key: "dispose",
|
|
|
+ value: function dispose() {
|
|
|
+ var lruCache = this.lruCache;
|
|
|
+ this.traverse(function (tile) {
|
|
|
+ lruCache.remove(tile);
|
|
|
+ });
|
|
|
+ }
|
|
|
}]);
|
|
|
|
|
|
return TilesRendererBase;
|
|
|
}();
|
|
|
|
|
|
exports.TilesRendererBase = TilesRendererBase;
|
|
|
-},{"path":"../node_modules/path-browserify/index.js","../utilities/LRUCache.js":"../src/utilities/LRUCache.js","../utilities/PriorityQueue.js":"../src/utilities/PriorityQueue.js","./traverseFunctions.js":"../src/base/traverseFunctions.js","./constants.js":"../src/base/constants.js"}],"../src/utilities/arrayToString.js":[function(require,module,exports) {
|
|
|
+},{"path":"../node_modules/path-browserify/index.js","../utilities/urlJoin.js":"../src/utilities/urlJoin.js","../utilities/LRUCache.js":"../src/utilities/LRUCache.js","../utilities/PriorityQueue.js":"../src/utilities/PriorityQueue.js","./traverseFunctions.js":"../src/base/traverseFunctions.js","./constants.js":"../src/base/constants.js"}],"../src/utilities/arrayToString.js":[function(require,module,exports) {
|
|
|
"use strict";
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -40716,6 +40771,7 @@ function (_TilesRendererBase) {
|
|
|
_this.visibleTiles = new Set();
|
|
|
_this._autoDisableRendererCulling = true;
|
|
|
_this.onLoadModel = null;
|
|
|
+ _this.onDisposeModel = null;
|
|
|
return _this;
|
|
|
}
|
|
|
/* Public API */
|
|
@@ -41137,6 +41193,10 @@ function (_TilesRendererBase) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (this.onDisposeModel) {
|
|
|
+ this.onDisposeModel(cached.scene, tile);
|
|
|
+ }
|
|
|
+
|
|
|
cached.scene = null;
|
|
|
cached.materials = null;
|
|
|
cached.textures = null;
|
|
@@ -46309,6 +46369,7 @@ var params = {
|
|
|
'enableUpdate': true,
|
|
|
'raycast': _index.NONE,
|
|
|
'enableCacheDisplay': false,
|
|
|
+ 'enableRendererStats': false,
|
|
|
'orthographic': false,
|
|
|
'errorTarget': 6,
|
|
|
'errorThreshold': 60,
|
|
@@ -46331,6 +46392,7 @@ function reinstantiateTiles() {
|
|
|
|
|
|
if (tiles) {
|
|
|
offsetParent.remove(tiles.group);
|
|
|
+ tiles.dispose();
|
|
|
}
|
|
|
|
|
|
tiles = new _index.DebugTilesRenderer(url);
|
|
@@ -46481,6 +46543,7 @@ function init() {
|
|
|
FIRST_HIT_ONLY: FIRST_HIT_ONLY
|
|
|
});
|
|
|
exampleOptions.add(params, 'enableCacheDisplay');
|
|
|
+ exampleOptions.add(params, 'enableRendererStats');
|
|
|
exampleOptions.open();
|
|
|
gui.add(params, 'reload');
|
|
|
gui.open();
|
|
@@ -46758,6 +46821,12 @@ function render() {
|
|
|
str += "<br/>Cache: ".concat((100 * cacheFullness).toFixed(2), "% ~").concat((count / 1000 / 1000).toFixed(2), "mb");
|
|
|
}
|
|
|
|
|
|
+ if (params.enableRendererStats) {
|
|
|
+ var memory = renderer.info.memory;
|
|
|
+ var programCount = renderer.info.programs.length;
|
|
|
+ str += "<br/>Geometries: ".concat(memory.geometries, " Textures: ").concat(memory.textures, " Programs: ").concat(programCount);
|
|
|
+ }
|
|
|
+
|
|
|
if (statsContainer.innerHTML !== str) {
|
|
|
statsContainer.innerHTML = str;
|
|
|
}
|
|
@@ -46790,7 +46859,7 @@ var parent = module.bundle.parent;
|
|
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
|
|
var hostname = "" || location.hostname;
|
|
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
|
|
- var ws = new WebSocket(protocol + '://' + hostname + ':' + "55398" + '/');
|
|
|
+ var ws = new WebSocket(protocol + '://' + hostname + ':' + "50124" + '/');
|
|
|
|
|
|
ws.onmessage = function (event) {
|
|
|
checkedAssets = {};
|