Skip to main content

Interface: TrajectoryTubeOptions

Defined in: packages/sdvplot/src/three/tube.ts:67

trajectoryTube options: the radius in world units, and either a colour or a team.

Extends​

Properties​

background?​

optional background?: string

Defined in: packages/sdvplot/src/three/tube.ts:23

The scene's background (what the colours are seen against, such as the surface under them). Given, a colour under 3:1 contrast against it is swapped for the team's other colour, else moved towards white (on a dark background) or black (a light one) until it reads; a colour that would then sit too close to an earlier team's (CIE76 ΔE under 20) takes the team's other colour, or the nearest colour to its own that is distinct and still reads; failing that it is kept, with one warning. A team that does not resolve keeps fallback and stays out of that search.

Inherited from​

ThreeColorOptions.background


color?​

optional color?: string

Defined in: packages/sdvplot/src/three/tube.ts:76

The tube's colour, #rrggbb. Give this or team and league.


fallback?​

optional fallback?: string

Defined in: packages/sdvplot/src/three/tube.ts:81

The colour of a team that does not resolve. Default "#808080".


idSystem?​

optional idSystem?: IdSystem

Defined in: packages/sdvplot/src/three/tube.ts:13

Inherited from​

ThreeColorOptions.idSystem


league?​

optional league?: "aaf" | "ahl" | "ajhl" | "bchl" | "cchl" | "cebl" | "cfb" | "cfl" | "chl" | "cricket" | "easl" | "echl" | "f1" | "fiba" | "gojhl" | "iihf" | "kijhl" | "lba" | "mbb" | "mhl" | "milb" | "mjhl" | "mlb" | "nba" | "nbagl" | "nbl" | "ncaa_baseball" | "ncaa_mhockey" | "ncaa_softball" | "ncaa_whockey" | "nfl" | "nhl" | "nojhl" | "ohl" | "ojhl" | "phf" | "pwhl" | "qmjhl" | "sjhl" | "soccer" | "sphl" | "ufl" | "usfl" | "ushl" | "vijhl" | "wbb" | "whl" | "wnba" | "xfl"

Defined in: packages/sdvplot/src/three/tube.ts:79


radialSegments?​

optional radialSegments?: number

Defined in: packages/sdvplot/src/three/tube.ts:74

Vertices round each ring, 3 or more. Default 12.


radius​

radius: number

Defined in: packages/sdvplot/src/three/tube.ts:72

The tube's radius in world units: the points' own units (feet for a pitch over a baseball field), not px. Three.js draws in the scene's units, so a tube is as thick as this whatever the camera; a baseball's radius is 0.121 ft.


season?​

optional season?: SeasonInput

Defined in: packages/sdvplot/src/three/tube.ts:12

Inherited from​

ThreeColorOptions.season


team?​

optional team?: unknown

Defined in: packages/sdvplot/src/three/tube.ts:78

The team whose colour the tube takes (abbreviation, name or id), with league.


which?​

optional which?: Which

Defined in: packages/sdvplot/src/three/tube.ts:11

"primary" (default) or "secondary": the team colour each team gets.

Inherited from​

ThreeColorOptions.which