@loaders.gl/tiles
Advanced tools
Comparing version 2.1.0-alpha.5 to 2.1.0-alpha.6
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.TILE_REFINEMENT = exports.TILE_CONTENT_STATE = void 0; | ||
exports.TILE3D_OPTIMIZATION_HINT = exports.LOD_METRIC_TYPE = exports.TILESET_TYPE = exports.TILE_TYPE = exports.TILE_REFINEMENT = exports.TILE_CONTENT_STATE = void 0; | ||
var TILE_CONTENT_STATE = { | ||
@@ -18,6 +18,29 @@ UNLOADED: 0, | ||
var TILE_REFINEMENT = { | ||
ADD: 0, | ||
REPLACE: 1 | ||
ADD: 1, | ||
REPLACE: 2 | ||
}; | ||
exports.TILE_REFINEMENT = TILE_REFINEMENT; | ||
var TILE_TYPE = { | ||
EMPTY: 'empty', | ||
SCENEGRAPH: 'scenegraph', | ||
POINTCLOUD: 'pointcloud', | ||
MESH: 'mesh' | ||
}; | ||
exports.TILE_TYPE = TILE_TYPE; | ||
var TILESET_TYPE = { | ||
I3S: 'I3S', | ||
TILES3D: 'TILES3D' | ||
}; | ||
exports.TILESET_TYPE = TILESET_TYPE; | ||
var LOD_METRIC_TYPE = { | ||
GEOMETRIC_ERROR: 'geometricError', | ||
MAX_SCREEN_THRESHOLD: 'maxScreenThreshold' | ||
}; | ||
exports.LOD_METRIC_TYPE = LOD_METRIC_TYPE; | ||
var TILE3D_OPTIMIZATION_HINT = { | ||
NOT_COMPUTED: -1, | ||
USE_OPTIMIZATION: 1, | ||
SKIP_OPTIMIZATION: 0 | ||
}; | ||
exports.TILE3D_OPTIMIZATION_HINT = TILE3D_OPTIMIZATION_HINT; | ||
//# sourceMappingURL=constants.js.map |
@@ -8,2 +8,14 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Tileset3D", { | ||
enumerable: true, | ||
get: function get() { | ||
return _tileset3d["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Tile3D", { | ||
enumerable: true, | ||
get: function get() { | ||
return _tile3d["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "TilesetTraverser", { | ||
@@ -36,3 +48,3 @@ enumerable: true, | ||
get: function get() { | ||
return _getFrameState.getFrameState; | ||
return _frameState.getFrameState; | ||
} | ||
@@ -52,5 +64,27 @@ }); | ||
}); | ||
Object.defineProperty(exports, "TILE_TYPE", { | ||
enumerable: true, | ||
get: function get() { | ||
return _constants.TILE_TYPE; | ||
} | ||
}); | ||
Object.defineProperty(exports, "TILESET_TYPE", { | ||
enumerable: true, | ||
get: function get() { | ||
return _constants.TILESET_TYPE; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LOD_METRIC_TYPE", { | ||
enumerable: true, | ||
get: function get() { | ||
return _constants.LOD_METRIC_TYPE; | ||
} | ||
}); | ||
var _tilesetTraverser = _interopRequireDefault(require("./tileset/tileset-traverser")); | ||
var _tileset3d = _interopRequireDefault(require("./tileset/tileset-3d")); | ||
var _tile3d = _interopRequireDefault(require("./tileset/tile-3d")); | ||
var _tilesetTraverser = _interopRequireDefault(require("./tileset/traversers/tileset-traverser")); | ||
var _tilesetCache = _interopRequireDefault(require("./tileset/tileset-cache")); | ||
@@ -62,5 +96,5 @@ | ||
var _getFrameState = require("./tileset/get-frame-state"); | ||
var _frameState = require("./tileset/helpers/frame-state"); | ||
var _constants = require("./constants"); | ||
//# sourceMappingURL=index.js.map |
@@ -22,5 +22,5 @@ "use strict"; | ||
var defined = function defined(x) { | ||
return x !== undefined; | ||
}; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -27,0 +27,0 @@ var scratchMatrix = new _core.Matrix3(); |
@@ -20,3 +20,3 @@ "use strict"; | ||
var computedTransform = tileHeader.computedTransform, | ||
center = tileHeader._boundingVolume.center; | ||
center = tileHeader.boundingVolume.center; | ||
var modelMatrix = new _core.Matrix4(computedTransform); | ||
@@ -23,0 +23,0 @@ |
@@ -16,5 +16,5 @@ "use strict"; | ||
var defined = function defined(x) { | ||
return x !== undefined; | ||
}; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -25,3 +25,3 @@ var TilesetCache = function () { | ||
this._list = new _doublyLinkedList["default"](); | ||
this._sentinel = this._list.add(); | ||
this._sentinel = this._list.add('sentinel'); | ||
this._trimTiles = false; | ||
@@ -38,3 +38,3 @@ } | ||
value: function touch(tile) { | ||
var node = tile.cacheNode; | ||
var node = tile._cacheNode; | ||
@@ -48,4 +48,4 @@ if (defined(node)) { | ||
value: function add(tileset, tile, addCallback) { | ||
if (!defined(tile.cacheNode)) { | ||
tile.cacheNode = this._list.add(tile); | ||
if (!defined(tile._cacheNode)) { | ||
tile._cacheNode = this._list.add(tile); | ||
@@ -60,3 +60,3 @@ if (addCallback) { | ||
value: function unloadTile(tileset, tile, unloadCallback) { | ||
var node = tile.cacheNode; | ||
var node = tile._cacheNode; | ||
@@ -69,3 +69,3 @@ if (!defined(node)) { | ||
tile.cacheNode = undefined; | ||
tile._cacheNode = undefined; | ||
@@ -72,0 +72,0 @@ if (unloadCallback) { |
@@ -10,5 +10,24 @@ export const TILE_CONTENT_STATE = { | ||
export const TILE_REFINEMENT = { | ||
ADD: 0, | ||
REPLACE: 1 | ||
ADD: 1, | ||
REPLACE: 2 | ||
}; | ||
export const TILE_TYPE = { | ||
EMPTY: 'empty', | ||
SCENEGRAPH: 'scenegraph', | ||
POINTCLOUD: 'pointcloud', | ||
MESH: 'mesh' | ||
}; | ||
export const TILESET_TYPE = { | ||
I3S: 'I3S', | ||
TILES3D: 'TILES3D' | ||
}; | ||
export const LOD_METRIC_TYPE = { | ||
GEOMETRIC_ERROR: 'geometricError', | ||
MAX_SCREEN_THRESHOLD: 'maxScreenThreshold' | ||
}; | ||
export const TILE3D_OPTIMIZATION_HINT = { | ||
NOT_COMPUTED: -1, | ||
USE_OPTIMIZATION: 1, | ||
SKIP_OPTIMIZATION: 0 | ||
}; | ||
//# sourceMappingURL=constants.js.map |
@@ -1,7 +0,9 @@ | ||
export { default as TilesetTraverser } from './tileset/tileset-traverser'; | ||
export { default as Tileset3D } from './tileset/tileset-3d'; | ||
export { default as Tile3D } from './tileset/tile-3d'; | ||
export { default as TilesetTraverser } from './tileset/traversers/tileset-traverser'; | ||
export { default as TilesetCache } from './tileset/tileset-cache'; | ||
export { createBoundingVolume } from './tileset/helpers/bounding-volume'; | ||
export { calculateTransformProps } from './tileset/helpers/transform-utils'; | ||
export { getFrameState } from './tileset/get-frame-state'; | ||
export { TILE_CONTENT_STATE, TILE_REFINEMENT } from './constants'; | ||
export { getFrameState } from './tileset/helpers/frame-state'; | ||
export { TILE_CONTENT_STATE, TILE_REFINEMENT, TILE_TYPE, TILESET_TYPE, LOD_METRIC_TYPE } from './constants'; | ||
//# sourceMappingURL=index.js.map |
@@ -6,3 +6,5 @@ import { Vector3, Matrix3, Matrix4, degrees } from '@math.gl/core'; | ||
const defined = x => x !== undefined; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -9,0 +11,0 @@ const scratchMatrix = new Matrix3(); |
@@ -13,3 +13,3 @@ import { Ellipsoid } from '@math.gl/geospatial'; | ||
computedTransform, | ||
_boundingVolume: { | ||
boundingVolume: { | ||
center | ||
@@ -16,0 +16,0 @@ } |
import DoublyLinkedList from '../utils/doubly-linked-list'; | ||
const defined = x => x !== undefined; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -8,3 +10,3 @@ export default class TilesetCache { | ||
this._list = new DoublyLinkedList(); | ||
this._sentinel = this._list.add(); | ||
this._sentinel = this._list.add('sentinel'); | ||
this._trimTiles = false; | ||
@@ -18,3 +20,3 @@ } | ||
touch(tile) { | ||
const node = tile.cacheNode; | ||
const node = tile._cacheNode; | ||
@@ -27,4 +29,4 @@ if (defined(node)) { | ||
add(tileset, tile, addCallback) { | ||
if (!defined(tile.cacheNode)) { | ||
tile.cacheNode = this._list.add(tile); | ||
if (!defined(tile._cacheNode)) { | ||
tile._cacheNode = this._list.add(tile); | ||
@@ -38,3 +40,3 @@ if (addCallback) { | ||
unloadTile(tileset, tile, unloadCallback) { | ||
const node = tile.cacheNode; | ||
const node = tile._cacheNode; | ||
@@ -47,3 +49,3 @@ if (!defined(node)) { | ||
tile.cacheNode = undefined; | ||
tile._cacheNode = undefined; | ||
@@ -50,0 +52,0 @@ if (unloadCallback) { |
@@ -10,5 +10,24 @@ export var TILE_CONTENT_STATE = { | ||
export var TILE_REFINEMENT = { | ||
ADD: 0, | ||
REPLACE: 1 | ||
ADD: 1, | ||
REPLACE: 2 | ||
}; | ||
export var TILE_TYPE = { | ||
EMPTY: 'empty', | ||
SCENEGRAPH: 'scenegraph', | ||
POINTCLOUD: 'pointcloud', | ||
MESH: 'mesh' | ||
}; | ||
export var TILESET_TYPE = { | ||
I3S: 'I3S', | ||
TILES3D: 'TILES3D' | ||
}; | ||
export var LOD_METRIC_TYPE = { | ||
GEOMETRIC_ERROR: 'geometricError', | ||
MAX_SCREEN_THRESHOLD: 'maxScreenThreshold' | ||
}; | ||
export var TILE3D_OPTIMIZATION_HINT = { | ||
NOT_COMPUTED: -1, | ||
USE_OPTIMIZATION: 1, | ||
SKIP_OPTIMIZATION: 0 | ||
}; | ||
//# sourceMappingURL=constants.js.map |
@@ -1,7 +0,9 @@ | ||
export { default as TilesetTraverser } from './tileset/tileset-traverser'; | ||
export { default as Tileset3D } from './tileset/tileset-3d'; | ||
export { default as Tile3D } from './tileset/tile-3d'; | ||
export { default as TilesetTraverser } from './tileset/traversers/tileset-traverser'; | ||
export { default as TilesetCache } from './tileset/tileset-cache'; | ||
export { createBoundingVolume } from './tileset/helpers/bounding-volume'; | ||
export { calculateTransformProps } from './tileset/helpers/transform-utils'; | ||
export { getFrameState } from './tileset/get-frame-state'; | ||
export { TILE_CONTENT_STATE, TILE_REFINEMENT } from './constants'; | ||
export { getFrameState } from './tileset/helpers/frame-state'; | ||
export { TILE_CONTENT_STATE, TILE_REFINEMENT, TILE_TYPE, TILESET_TYPE, LOD_METRIC_TYPE } from './constants'; | ||
//# sourceMappingURL=index.js.map |
@@ -8,5 +8,5 @@ import _readOnlyError from "@babel/runtime/helpers/esm/readOnlyError"; | ||
var defined = function defined(x) { | ||
return x !== undefined; | ||
}; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -13,0 +13,0 @@ var scratchMatrix = new Matrix3(); |
@@ -10,3 +10,3 @@ import { Ellipsoid } from '@math.gl/geospatial'; | ||
var computedTransform = tileHeader.computedTransform, | ||
center = tileHeader._boundingVolume.center; | ||
center = tileHeader.boundingVolume.center; | ||
var modelMatrix = new Matrix4(computedTransform); | ||
@@ -13,0 +13,0 @@ |
@@ -5,5 +5,5 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
var defined = function defined(x) { | ||
return x !== undefined; | ||
}; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -15,3 +15,3 @@ var TilesetCache = function () { | ||
this._list = new DoublyLinkedList(); | ||
this._sentinel = this._list.add(); | ||
this._sentinel = this._list.add('sentinel'); | ||
this._trimTiles = false; | ||
@@ -28,3 +28,3 @@ } | ||
value: function touch(tile) { | ||
var node = tile.cacheNode; | ||
var node = tile._cacheNode; | ||
@@ -38,4 +38,4 @@ if (defined(node)) { | ||
value: function add(tileset, tile, addCallback) { | ||
if (!defined(tile.cacheNode)) { | ||
tile.cacheNode = this._list.add(tile); | ||
if (!defined(tile._cacheNode)) { | ||
tile._cacheNode = this._list.add(tile); | ||
@@ -50,3 +50,3 @@ if (addCallback) { | ||
value: function unloadTile(tileset, tile, unloadCallback) { | ||
var node = tile.cacheNode; | ||
var node = tile._cacheNode; | ||
@@ -59,3 +59,3 @@ if (!defined(node)) { | ||
tile.cacheNode = undefined; | ||
tile._cacheNode = undefined; | ||
@@ -62,0 +62,0 @@ if (unloadCallback) { |
{ | ||
"name": "@loaders.gl/tiles", | ||
"version": "2.1.0-alpha.5", | ||
"version": "2.1.0-alpha.6", | ||
"description": "Common components for different tiles loaders.", | ||
@@ -47,3 +47,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "de3b920ad0d80988cd5235217d238a32ec6ca12b" | ||
"gitHead": "65aeda6eadde659c30e86c154cf9e1d603c86783" | ||
} |
@@ -11,4 +11,28 @@ export const TILE_CONTENT_STATE = { | ||
export const TILE_REFINEMENT = { | ||
ADD: 0, // Render tile and, if screen space error exceeded, also refine to its children. | ||
REPLACE: 1 // Render tile or, if screen space error exceeded, refine to its descendants instead. | ||
ADD: 1, // Render tile and, if screen space error exceeded, also refine to its children. | ||
REPLACE: 2 // Render tile or, if screen space error exceeded, refine to its descendants instead. | ||
}; | ||
export const TILE_TYPE = { | ||
EMPTY: 'empty', | ||
SCENEGRAPH: 'scenegraph', | ||
POINTCLOUD: 'pointcloud', | ||
MESH: 'mesh' | ||
}; | ||
export const TILESET_TYPE = { | ||
I3S: 'I3S', | ||
TILES3D: 'TILES3D' | ||
}; | ||
export const LOD_METRIC_TYPE = { | ||
GEOMETRIC_ERROR: 'geometricError', | ||
MAX_SCREEN_THRESHOLD: 'maxScreenThreshold' | ||
}; | ||
// Cesium 3D Tiles Specific | ||
export const TILE3D_OPTIMIZATION_HINT = { | ||
NOT_COMPUTED: -1, | ||
USE_OPTIMIZATION: 1, | ||
SKIP_OPTIMIZATION: 0 | ||
}; |
@@ -1,2 +0,5 @@ | ||
export {default as TilesetTraverser} from './tileset/tileset-traverser'; | ||
export {default as Tileset3D} from './tileset/tileset-3d'; | ||
export {default as Tile3D} from './tileset/tile-3d'; | ||
export {default as TilesetTraverser} from './tileset/traversers/tileset-traverser'; | ||
export {default as TilesetCache} from './tileset/tileset-cache'; | ||
@@ -7,4 +10,10 @@ | ||
export {getFrameState} from './tileset/get-frame-state'; | ||
export {getFrameState} from './tileset/helpers/frame-state'; | ||
export {TILE_CONTENT_STATE, TILE_REFINEMENT} from './constants'; | ||
export { | ||
TILE_CONTENT_STATE, | ||
TILE_REFINEMENT, | ||
TILE_TYPE, | ||
TILESET_TYPE, | ||
LOD_METRIC_TYPE | ||
} from './constants'; |
@@ -12,3 +12,5 @@ // This file is derived from the Cesium code base under Apache 2 license | ||
const defined = x => x !== undefined; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
@@ -15,0 +17,0 @@ const scratchMatrix = new Matrix3(); |
@@ -12,3 +12,3 @@ import {Ellipsoid} from '@math.gl/geospatial'; | ||
computedTransform, | ||
_boundingVolume: {center} | ||
boundingVolume: {center} | ||
} = tileHeader; | ||
@@ -15,0 +15,0 @@ |
@@ -5,4 +5,7 @@ // This file is derived from the Cesium code base under Apache 2 license | ||
import DoublyLinkedList from '../utils/doubly-linked-list'; | ||
const defined = x => x !== undefined; | ||
function defined(x) { | ||
return x !== undefined && x !== null; | ||
} | ||
/** | ||
@@ -18,3 +21,3 @@ * Stores tiles with content loaded. | ||
this._list = new DoublyLinkedList(); | ||
this._sentinel = this._list.add(); | ||
this._sentinel = this._list.add('sentinel'); | ||
this._trimTiles = false; | ||
@@ -31,3 +34,3 @@ } | ||
touch(tile) { | ||
const node = tile.cacheNode; | ||
const node = tile._cacheNode; | ||
if (defined(node)) { | ||
@@ -39,4 +42,4 @@ this._list.splice(this._sentinel, node); | ||
add(tileset, tile, addCallback) { | ||
if (!defined(tile.cacheNode)) { | ||
tile.cacheNode = this._list.add(tile); | ||
if (!defined(tile._cacheNode)) { | ||
tile._cacheNode = this._list.add(tile); | ||
@@ -50,3 +53,3 @@ if (addCallback) { | ||
unloadTile(tileset, tile, unloadCallback) { | ||
const node = tile.cacheNode; | ||
const node = tile._cacheNode; | ||
if (!defined(node)) { | ||
@@ -57,3 +60,3 @@ return; | ||
this._list.remove(node); | ||
tile.cacheNode = undefined; | ||
tile._cacheNode = undefined; | ||
if (unloadCallback) { | ||
@@ -60,0 +63,0 @@ unloadCallback(tileset, tile); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1896764
138
30430
4