mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 03:32:19 +00:00
A line can show only the part of it within a time span of the scene clock (#1894)
* A line can show only the part of it within a time span of the scene clock LineAgeFade.showMs (capability lineTimeWindow) draws only the part of an aged line whose time, interpolated along it, lies between showMs before the scene clock and the clock itself, cut as the clock moves without the line being sent again. A moving trail can then be sent once as its whole track. The Cesium port discards by time in its aged line material, draped or not, and the conformance check draw.lines.timeWindow pins it. Without showMs the fade is unchanged. * Changelog for line time window (#1894)
This commit is contained in:
1 parent
561f5885c2
commit
e4caf5d3af
11 files changed
+221
-8
No files matched your search
Vendored
+2
@@ -209,6 +209,8 @@ export type Capability =
|
||||
| 'courseGlide'
|
||||
/** Lines that fade with the age of their points (`LineItem.ageFade`). */
|
||||
| 'lineAgeFade'
|
||||
/** Lines drawn only within a span of the scene clock (`LineAgeFade.showMs`). */
|
||||
| 'lineTimeWindow'
|
||||
/** Screen-space clustering of icons. */
|
||||
| 'cluster'
|
||||
/** Post-processing styles. */
|
||||
|
||||
Vendored
+14
@@ -309,6 +309,14 @@ export type LineStyle =
|
||||
* wide, about its path. A point at or past the window draws at the floors, a
|
||||
* point at or after now at full strength. New `times` with new positions are
|
||||
* an ordinary update.
|
||||
*
|
||||
* `lineTimeWindow`: with `showMs`, only the part of the line within `showMs`
|
||||
* of now is drawn, cut along it where its interpolated time crosses: parts
|
||||
* whose time is after now, or before `now - showMs`, are not drawn (nor
|
||||
* picked). The cut follows the scene clock as the fade does, so a moving
|
||||
* object's trail can be its whole track, sent once: drawn from `showMs` ago
|
||||
* up to where the object is now. A renderer without the capability ignores
|
||||
* `showMs` and draws the whole line.
|
||||
*/
|
||||
export interface LineAgeFade {
|
||||
/** Each position's time, epoch ms on the scene clock: one per position. */
|
||||
@@ -321,6 +329,12 @@ export interface LineAgeFade {
|
||||
squaredAlphaFloor?: number;
|
||||
/** A fully aged point's width multiplier, 0..1 [1, no narrowing]. */
|
||||
widthFloor?: number;
|
||||
/**
|
||||
* `lineTimeWindow`: draw only the part of the line from `showMs` before
|
||||
* now up to now, ms; positive (`Infinity`: up to now, however old).
|
||||
* [absent: the whole line]
|
||||
*/
|
||||
showMs?: number;
|
||||
}
|
||||
|
||||
export interface LineItem {
|
||||
|
||||
@@ -42,6 +42,7 @@ export const CAPABILITIES = Object.freeze([
|
||||
'fields',
|
||||
'courseGlide',
|
||||
'lineAgeFade',
|
||||
'lineTimeWindow',
|
||||
'cluster',
|
||||
'styles',
|
||||
'bloom',
|
||||
|
||||
Reference in new issue
Block a user