Skip to content
Last updated

API / geotoolkit3d / scene / compass / Compass / Compass

Class: Compass

compass.Compass.Compass

A 3D compass.<br> <br> This class adds a canvas in the given HTML element that will be used to render a 3D compass shape.<br> <br> The compass will rotate the camera to look at the compass shape in the same direction that the parent plot is looking.<br> The compass shape itself can be static.<br>

Table of contents

Constructors
  • [new Compass(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.scene-3.compass.compass.compass.md#new compass(options))
Methods

Contents

Constructors

new Compass(options)

• new Compass(options)

Parameters

Name Type
optionsOptions
Methods

getClassName

▸ getClassName(): string

Returns

string


getCompassObject

▸ getCompassObject(): Object3D<Object3DEventMap&gt;

Return the compass shape

Returns

Object3D<Object3DEventMap&gt;

The compass shape


setCompassObject

▸ setCompassObject(newObject): Compass

Sets the compass shape

Parameters

Name Type Description
newObjectObject3D<Object3DEventMap&gt;The new compass shape

Returns

Compass

this


getClassName

▸ Static getClassName(): string

Returns

string