mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
3D models only within 3 km of the camera, at true size
An aircraft, vessel, transit or rail vehicle now draws as its 3D model only when it is within 3 km of the camera, and as its icon farther away. A model already drawn is kept out to 3.6 km, so a vehicle on the edge does not flicker. Proximity and All use the same distance and still differ by how many models they allow (150 and 350). Models are drawn at their true size: the minimum pixel size that inflated distant models is gone. The camera altitude above which no model is considered is now the highest aircraft the layers draw (30 km) plus the 3.6 km, so a camera high above the ground still models an aircraft close to it. Cockpit's aircraft silhouettes keep their own 150/185 km and 400/450 km bands, since they are icons.
This commit is contained in:
1 parent
624c229bc2
commit
36624cd329
22 files changed
+260
-181
No files matched your search
@@ -111,8 +111,9 @@ let instances = 0;
|
||||
* @param {object} options.viewer The scene host.
|
||||
* @param {() => object|null} [options.display] `{models3d, models3dMode,
|
||||
* irBoost}`.
|
||||
* @param {object} options.policy `{altitudeCeilingM, minimumPixelSize,
|
||||
* cap, capAll, addM, addAllM, keepM, keepAllM, intervalMs}`.
|
||||
* @param {object} options.policy `{altitudeCeilingM, cap, capAll, addM,
|
||||
* keepM, intervalMs}`: both 3D modes share the add/keep radii and differ
|
||||
* by their caps. Models are drawn at their true size.
|
||||
* @param {(url: string) => string} [options.resolveAsset]
|
||||
* @param {boolean} [options.waterline] Clip each model at its waterline.
|
||||
* @param {object} [options.draw] Stands in for the viewer's draw port (tests).
|
||||
@@ -202,8 +203,7 @@ export function createFleetModelLayer({
|
||||
function refreshEligibility(items, prefs, eye) {
|
||||
const all = prefs.models3dMode === 'all';
|
||||
const cap = all ? policy.capAll : policy.cap;
|
||||
const addM = all ? policy.addAllM : policy.addM;
|
||||
const keepM = all ? policy.keepAllM : policy.keepM;
|
||||
const { addM, keepM } = policy;
|
||||
const candidates = [];
|
||||
for (const [id, item] of items) {
|
||||
if (!item.position || item.show === false || !item.spec?.url) continue;
|
||||
@@ -249,7 +249,6 @@ export function createFleetModelLayer({
|
||||
...(fleetAxisScale(item.spec)
|
||||
? { axisScale: fleetAxisScale(item.spec) }
|
||||
: {}),
|
||||
minPixelSize: policy.minimumPixelSize,
|
||||
environmentMap: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS.enabled,
|
||||
...(boost
|
||||
? {
|
||||
|
||||
Reference in new issue
Block a user