globekit-public
v1.0.6
Published
GlobeKit Public Package
Readme
GlobeKit.js
Files:
globekit.ems.js - GlobeKit module, used in nearly all applications so most likely you need to copy this file.
globekit.cjs.js - GlobeKit common js
globekit.umd.js - GlobeKit UMD.
gkweb_bg.wasm - needs to be served as a static resource
./assets - has the files for pointglobe and lowpoly globes.
'./examples' - get a sense of how to use GlobeKit in your projects.
Getting Started
- Copy
globekit.esm.jsinto your source directory - Copy
gkweb_bg.wasminto your static resources - Get your API Key from your GlobeKit Account Page
Hello World
import { GlobeKitView, Icosphere } from "{path/to/globekit.esm.js}";
const apiKey = {your api key};
const options = {
apiKey: apiKey,
wasmPath: {path/to/gkweb_bg.wasm},
};
this.onInitCB = () => {};
this.gkview = new GlobeKitView(canvas, options, this.onInitCB);
this.icosphere = new Icosphere('{path/to/image/}');
this.gkview.addDrawable(this.icosphere, () => {
this.gkview.startDrawing();
});Run examples
- Change
{YOUR_API_KEY}to your api key in the source files - Start a server in
/examplespython3 -m http.server - Open a browser
