リファレンス
地球上の目印
import { … } from "@johnmorrisdotca/chikyu-earth/markers";
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
attachMarkers | 関数 | Put markers on a globe, for either look: dots drawn in one pass on a canvas, a few labels as real buttons, crowded places gathered into clusters. |
canvasRatio | 関数 | The pixel ratio for an overlay canvas: the device's, to 2, held to 4096 a side and 6 million pixels (the same budget as the 3D canvas). |
Cluster | 型 | Several points gathered into one on the screen: where it is drawn and which points are in it. |
clusterPoints | 関数 | Group the points indices (into xs and ys) by the grid cell they fall in. |
GroupInfo | 型 | One group of markers: its name, how many it holds and whether it is shown. |
LabelItem | 型 | One label to place: its dot's centre and radius, its box's size and its priority. |
MarkerEventDetail | 型 | What the chikyu-marker-hover, chikyu-marker-click and chikyu-marker-focus events carry in event.detail. |
MarkerIcon | 型 | The shapes a marker can be drawn as: dot, ring, square or diamond. |
MarkerInput | 型 | A place on the Earth. |
MarkerOptions | 型 | What attachMarkers may be asked: the most labels, how close markers gather, and the default colour. |
Markers | 型 | The markers on one globe: add, update, remove and find them, show or hide groups, and detach. |
OverlayElement | 型 | An element markers can be put on: any HTML element with an overlay (both <chikyu-earth> and <chikyu-earth-realistic> have one). |
OverlayHost | 型 | What an element gives the markers (element.overlay): a box laid over its view, the pose of its last draw, and a way to hear the next ones. |
OverlayPose | 型 | The pose of an element's last drawing, with the size of its box and the CSS transform its picture carries between redraws. |
placeLabels | 関数 | Place up to max labels inside width x height. |
Placement | 型 | Where one label goes: which item it is and its box's top-left corner. |
Pose | 型 | The view: the point of the Earth at the middle of the disc, the disc's radius and its centre, in CSS pixels. |
project | 関数 | Project a longitude and latitude (degrees) to the screen. |
projectAll | 関数 | Project many points into flat arrays (reused between calls); z is the cosine used for a point's facing test. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。