mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
fix(rail): the selected route splits at the train and keeps its dark rim, as before
Before, the route was one clamped polyline whose material coloured it ahead of the train and dimmer behind it, split exactly where the train is, with a dark rim at its edges. Through the draw port it became per-segment colours chosen by each segment's midpoint (the split jumped from vertex to vertex) and lost its rim. The contract gains a draped line style `split`: `color` from `at` (a fraction of its length) on, `behind` before it (`reverse`: the other way), and an optional `rim` (the outer `widthFraction` of its width at `shade` of each colour). `at`, `reverse` and the colours change in place. The Cesium renderer draws it with one material; the rail route uses it, measuring its split in metres on the ground (one per vertex where the scene draws over the surface). New conformance check draw.lines.split.
This commit is contained in:
1 parent
96ef7f509e
commit
e72de07dab
7 files changed
+277
-51
No files matched your search
Vendored
+17
-1
@@ -242,7 +242,23 @@ export type LineStyle =
|
||||
| { kind: 'dash'; color: Color; length: number; pattern16?: number }
|
||||
| { kind: 'arrow'; color: Color }
|
||||
| { kind: 'pattern'; image: ImageRef; repeat: number }
|
||||
| { kind: 'flow'; color: Color; repeat: number; duty: number; speed: number };
|
||||
| { kind: 'flow'; color: Color; repeat: number; duty: number; speed: number }
|
||||
| {
|
||||
/**
|
||||
* Draped lines only. `color` from fraction `at` of the line's length
|
||||
* to its end, `behind` from its start to `at` (the other way round
|
||||
* with `reverse`); `at` outside 0..1 draws it all in `color`. With a
|
||||
* `rim`, the outer `widthFraction` of the width in all (half each
|
||||
* side) draws each colour's red, green and blue times `shade`, its
|
||||
* alpha kept. `at`, `reverse` and the colours change in place.
|
||||
*/
|
||||
kind: 'split';
|
||||
color: Color;
|
||||
behind: Color;
|
||||
at: number;
|
||||
reverse?: boolean;
|
||||
rim?: { shade: number; widthFraction: number };
|
||||
};
|
||||
|
||||
export interface LineItem {
|
||||
id: string;
|
||||
|
||||
Reference in new issue
Block a user