-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,30 @@ | ||
import Phenomenon from "phenomenon"; | ||
|
||
declare namespace OptionKey { | ||
const OPT_PHI = "phi"; | ||
const OPT_THETA = "theta"; | ||
const OPT_DOTS = "mapSamples"; | ||
const OPT_MAP_BRIGHTNESS = "mapBrightness"; | ||
const OPT_BASE_COLOR = "baseColor"; | ||
const OPT_MARKER_COLOR = "markerColor"; | ||
const OPT_GLOW_COLOR = "glowColor"; | ||
const OPT_MARKERS = "markers"; | ||
const OPT_DIFFUSE = "diffuse"; | ||
const OPT_DPR = "devicePixelRatio"; | ||
const OPT_DARK = "dark"; | ||
} | ||
import Phenomenon from 'phenomenon' | ||
|
||
export interface Marker { | ||
location: [number, number]; | ||
size: number; | ||
location: [number, number] | ||
size: number | ||
} | ||
|
||
export interface COBEOptions { | ||
width: number; | ||
height: number; | ||
onRender: (state: Record<string, any>) => void; | ||
[OptionKey.OPT_PHI]: number; | ||
[OptionKey.OPT_THETA]: number; | ||
[OptionKey.OPT_DOTS]: number; | ||
[OptionKey.OPT_MAP_BRIGHTNESS]: number; | ||
[OptionKey.OPT_BASE_COLOR]: [number, number, number]; | ||
[OptionKey.OPT_MARKER_COLOR]: [number, number, number]; | ||
[OptionKey.OPT_GLOW_COLOR]: [number, number, number]; | ||
[OptionKey.OPT_MARKERS]: Marker[]; | ||
[OptionKey.OPT_DIFFUSE]: number; | ||
[OptionKey.OPT_DPR]: number; | ||
[OptionKey.OPT_DARK]: number; | ||
width: number | ||
height: number | ||
onRender: (state: Record<string, any>) => void | ||
phi: number | ||
theta: number | ||
mapSamples: number | ||
mapBrightness: number | ||
baseColor: [number, number, number] | ||
markerColor: [number, number, number] | ||
glowColor: [number, number, number] | ||
markers: Marker[] | ||
diffuse: number | ||
devicePixelRatio: number | ||
dark: number | ||
offset?: [number, number] | ||
scale?: number | ||
} | ||
|
||
export default function createGlobe( | ||
canvas: HTMLCanvasElement, | ||
opts: COBEOptions | ||
): Phenomenon; | ||
): Phenomenon |