CruisePlugin
Overview
CruisePlugin provides automatic cruise preview along a path while in panorama mode.
Live Demo
Drag the VR view and rotate the camera to see the path-guidance effect. Click "Start Cruise" to begin a cruise preview along the current path.
Open the official CruisePlugin demo.
Installation
import { CruisePlugin } from "@realsee/dnalogel"Development Guide
Initialization
When creating a Five instance, pass CruisePlugin in the plugin initialization parameters.
import { Five } from '@realsee/five'
import { CruisePlugin } from "@realsee/dnalogel";
const five = new Five({
plugins: [
[
CruisePlugin,
'cruisePlugin', // custom plugin name
]
]
})Loading Data
You must load cruise path data in order to see the correct result:
// custom path data
const currentGuideLine = [0, 1, 2, 3, 4, 5];
// load the path data
five.plugins.cruisePlugin.load({
panoIndexList: currentGuideLine,
moveToFirstPanoEffect: 'montage',
stay: 1000,
})
// start the cruise
five.plugins.cruisePlugin.play();Core Methods
load(serverData: PluginServerData | PluginServerData['data'])loads the plugin data
You need to load the plugin data manually. For the data source, see the OpenAPI reference.
play: () => voidstarts the cruiseplayFrom: (options: { index?: number; id?: string }) => voidstarts the cruise from a specific nodeplayFromStart: () => voidstarts the cruise from the first nodepause: () => voidpauses the cruisesetState: (state: Partial<PluginState>) => voidsets cruise parametersshow: () => voidshows the cruise pathhide: () => voidhides the cruise pathenable: () => voidenables the plugindisable: () => voiddisables the plugindispose: () => voiddestroys the plugin
