import {AxisGizmoPlugin} from '@xeokit/xeokit-sdk/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js'
AxisGizmoPlugin
Extends:
Viewer plugin that shows the axii of the World-space coordinate system.
Usage
import {Viewer, XKTLoaderPlugin, AxisGizmoPlugin} from "xeokit-sdk.es.js";
const viewer = new Viewer({
canvasId: "myCanvas"
});
viewer.camera.eye = [-2.56, 8.38, 8.27];
viewer.camera.look = [13.44, 3.31, -14.83];
viewer.camera.up = [0.10, 0.98, -0.14];
const xktLoader = new XKTLoaderPlugin(viewer);
new AxisGizmoPlugin(viewer, {
canvasId: "myAxisGizmoCanvas"
});
const model = xktLoader.load({
id: "myModel",
src: "../assets/models/xkt/Schependomlaan.xkt",
edges: true
});
Constructor Summary
Public Constructor | ||
public |
constructor(viewer: Viewer, cfg: Object) |
Method Summary
Public Methods | ||
public |
destroy() Destroys this AxisGizmoPlugin. |
|
public |
setVisible(visible: *) Shows or hides this AxisGizmoPlugin. |
Inherited Summary
From class Plugin | ||
public |
ID for this Plugin, unique within its Viewer. |
|
public |
The Viewer that contains this Plugin. |
|
public |
destroy() Destroys this Plugin and removes it from its Viewer. |
|
public |
Logs an error message to the JavaScript developer console, prefixed with the ID of this Plugin. |
|
public |
Fires an event on this Plugin. |
|
public |
Returns true if there are any subscribers to the given event on this Plugin. |
|
public |
Logs a message to the JavaScript developer console, prefixed with the ID of this Plugin. |
|
public |
Cancels an event subscription that was previously made with Plugin#on or Plugin#once. |
|
public |
Subscribes to an event on this Plugin. |
|
public |
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd. |
|
public |
scheduleTask(task: *) Schedule a task to perform on the next browser interval |
|
public |
Logs a warning message to the JavaScript developer console, prefixed with the ID of this Plugin. |
Public Constructors
public constructor(viewer: Viewer, cfg: Object) source
Creates this Plugin and installs it into the given Viewer.
Override:
Plugin#constructorParams:
Name | Type | Attribute | Description |
viewer | Viewer | The Viewer. |
|
cfg | Object | Plugin configuration. |
|
cfg.id | String |
|
Optional ID for this plugin, so that we can find it within Viewer#plugins. |
cfg.canvasId | String |
|
ID of an existing HTML canvas to display the AxisGizmo - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID. |
cfg.canvasElement | HTMLCanvasElement |
|
Reference of an existing HTML canvas to display the AxisGizmo - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID. |
Public Methods
public setVisible(visible: *) source
Shows or hides this AxisGizmoPlugin.
Params:
Name | Type | Attribute | Description |
visible | * |