kopia lustrzana https://github.com/robhawkes/vizicities
Updated comments
rodzic
2915f8793a
commit
ea2c14ae54
|
@ -4732,6 +4732,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
var _three2 = _interopRequireDefault(_three);
|
||||
|
||||
// TODO: Consider keeping a single TileLayer / LOD instance running by default
|
||||
// that keeps a standard LOD grid for other layers to utilise, rather than
|
||||
// having to create their own, unique LOD grid and duplicate calculations when
|
||||
// they're going to use the same grid setup anyway
|
||||
//
|
||||
// It still makes sense to be able to have a custom LOD grid for some layers as
|
||||
// they may want to customise things, maybe not even using a quadtree at all!
|
||||
//
|
||||
// Perhaps it makes sense to split out the quadtree stuff into a singleton and
|
||||
// pass in the necessary parameters each time for the calculation step.
|
||||
//
|
||||
// Either way, it seems silly to force layers to have to create a new LOD grid
|
||||
// each time and create extra, duplicated processing every frame.
|
||||
|
||||
// TODO: Allow passing in of options to define min/max LOD and a distance to use
|
||||
// for culling tiles beyond that distance.
|
||||
|
||||
// DONE: Prevent tiles from being loaded if they are further than a certain
|
||||
// distance from the camera and are unlikely to be seen anyway
|
||||
|
||||
|
@ -6847,7 +6864,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
// Initialise without requiring new keyword
|
||||
|
||||
// Request data for the various tile provider
|
||||
// Request data for the tile
|
||||
|
||||
_createClass(ImageTile, [{
|
||||
key: 'requestTileAsync',
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@ class ImageTile extends Tile {
|
|||
super(quadcode, path, layer);
|
||||
}
|
||||
|
||||
// Request data for the various tile provider
|
||||
// Request data for the tile
|
||||
requestTileAsync() {
|
||||
// Making this asynchronous really speeds up the LOD framerate
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -35,6 +35,14 @@ import THREE from 'three';
|
|||
// reach a ready state (eg. cancel image requests, etc). Need to ensure that the
|
||||
// images are re-requested when the tile is next in scene (even if from cache)
|
||||
|
||||
// TODO: Consider not performing an LOD calculation on every frame, instead only
|
||||
// on move end so panning, orbiting and zooming stays smooth. Otherwise it's
|
||||
// possible for performance to tank if you pan, orbit or zoom rapidly while all
|
||||
// the LOD calculations are being made and new tiles requested.
|
||||
//
|
||||
// Pending tiles should continue to be requested and output to the scene on each
|
||||
// frame, but no new LOD calculations should be made.
|
||||
|
||||
class ImageTileLayer extends TileLayer {
|
||||
constructor(path, options) {
|
||||
// Cache 1000 tiles
|
||||
|
|
|
@ -2,6 +2,23 @@ import Layer from '../Layer';
|
|||
import TileCache from './TileCache';
|
||||
import THREE from 'three';
|
||||
|
||||
// TODO: Consider keeping a single TileLayer / LOD instance running by default
|
||||
// that keeps a standard LOD grid for other layers to utilise, rather than
|
||||
// having to create their own, unique LOD grid and duplicate calculations when
|
||||
// they're going to use the same grid setup anyway
|
||||
//
|
||||
// It still makes sense to be able to have a custom LOD grid for some layers as
|
||||
// they may want to customise things, maybe not even using a quadtree at all!
|
||||
//
|
||||
// Perhaps it makes sense to split out the quadtree stuff into a singleton and
|
||||
// pass in the necessary parameters each time for the calculation step.
|
||||
//
|
||||
// Either way, it seems silly to force layers to have to create a new LOD grid
|
||||
// each time and create extra, duplicated processing every frame.
|
||||
|
||||
// TODO: Allow passing in of options to define min/max LOD and a distance to use
|
||||
// for culling tiles beyond that distance.
|
||||
|
||||
// DONE: Prevent tiles from being loaded if they are further than a certain
|
||||
// distance from the camera and are unlikely to be seen anyway
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue