Skip to main content
Documentation

Model Chassis Compass

Show model orientation with a compass chassis in Five SDK model mode.

ModelChassisCompassPlugin

Overview

The Model Chassis Compass plugin provides a compass chassis that lets you view the model's orientation while in model mode.

Detailed feature points:

  • In model mode, the compass model indicates the model's physical orientation.

External Demo

Open the Model Chassis Compass demo. In the external demo, choose Space Overview to view the compass in spatial-overview mode.

Installation

Choose either yarn or npm as needed:

npm install @realsee/dnalogel

Import via ES modules:

import { ModelChassisCompassPlugin } from "@realsee/dnalogel"

Development Guide

Initialization

When creating a Five instance, pass ModelChassisCompassPlugin in the plugin initialization parameters.

import { Five } from '@realsee/five'
import { ModelChassisCompassPlugin } from "@realsee/dnalogel";

const five = new Five({
    plugins: [
        [
            ModelChassisCompassPlugin,
            'modelChassisCompassPlugin', // custom plugin name
            {
                // parameter configuration
            }
        ]
    ]
})

React Initialization

When creating a FiveProvider, pass ModelChassisCompassPlugin in the plugin initialization parameters.

import { ModelChassisCompassPlugin } from "@realsee/dnalogel";
import { createFiveProvider, FiveCanvas } from "@realsee/five/react";

const FiveProvider = createFiveProvider({
    plugins: [
        [
            ModelChassisCompassPlugin,
            'modelChassisCompassPlugin', // custom plugin name
            {
                // parameter configuration
            }
        ]
    ]
});

Vue Initialization

When using FiveProvider, pass ModelChassisCompassPlugin in the plugin initialization parameters.

<template>
  <FiveProvider :fiveInitArgs="fiveInitArgs">
  </FiveProvider>
</template>
<script setup>
import ModelChassisCompassPlugin from "@realsee/dnalogel/libs/ModelChassisCompassPlugin";
import { FiveProvider, FiveCanvas } from "@realsee/five/vue";
const fiveInitArgs = {
    plugins: [
        [
            ModelChassisCompassPlugin,
            'modelChassisCompassPlugin', // custom plugin name
            {
                // parameter configuration
            }
        ]
    ]
}
</script>

Loading Data

// Get the plugin instance, where `modelChassisCompassPlugin` is the custom name set during initialization
const pluginInstance = five.plugins.modelChassisCompassPlugin 

// Call the `load` method to load the model house tag data
pluginInstance.load(modelChassisCompassPluginData)

Core Methods

  • load(data: ModelChassisCompassPluginData) loads the plugin data

You need to load the plugin data manually. For the data source, see the OpenAPI reference.

  • enable: () => void enables the plugin
  • disable: () => void disables the plugin

Source Reference

ModelChassisCompassPlugin example source