Add Path Roaming
CruisePlugins
Function Description
CruisePlugin provides the ability to roaming preview by path in a panorama mode.
Effect Display
Drag VR to rotate the path guide effect and click "Start roaming" to preview the current path.
Install reference
import { CruisePlugin } from "@realsee/dnalogel"
Development Guides
Initialize
When initializing Five instances, configure CruisePlugin in initialize plugin parameters.
import { Five } from '@realsee/five'
import { CruisePlugin } from "@realsee/dnalogel";
const five = new Five({
    plugins: [
        [
            CruisePlugin,
            'cruisePlugin', // Custom plugin name
        ]
    ]
})
React initialization
When creating FiveProvider , configure CruisePlugin in initialize plugin parameters.
import { CruisePlugin } from "@realsee/dnalogel";
import { createFiveProvider, FiveCanvas } from "@realsee/five/react";
const FiveProvider = createFiveProvider({
    plugins: [
        [
            CruisePlugin,
            'cruisePlugin', // Custom plugin name
        ]
    ]
});
Vue initialization
When FiveProvider , configure CruisePlugin in initialize plugin parameters.
<template>
  <FiveProvider :fiveInitArgs="fiveInitArgs">
  </FiveProvider>
</template>
<script setup>
import CruisePlugin from "@realsee/dnalogel/libs/CruisePlugin";
import { FiveProvider, FiveCanvas } from "@realsee/five/vue";
const fiveInitArgs = {
    plugins: [
        [
            CruisePlugin,
            'cruisePlugin', // custom plugin name
        ]
    ]
}
</script>
Load data
You needloading path roaming datato see the correct effect:
// Custom path data
const currentGuideLine = [0, 1, 2, 3, 4, 5];
// Load path data
five.plugins.cruisePlugin.load({ 
    panoIndexList: currentGuideLine,
    moveToFirstPanoEffect: 'montage',
    stay: 1000,
})
// Start roaming
five.plugins.cruisePlugin.play();
Core approach
load(serverData: PluginServerData | PluginServerData['data'])Loading plugin data
You need to manually load the plug-in data, please readRealsee Open Platform APIfor the data source.
play: (options?: { userAction?: boolean }) => voidto start roamingplayFrom: (options: { userAction?: boolean; index?: number; id?: string }) => voidroaming from a certain nodeplayFromStart: (options?: { userAction?: boolean }) => voidfrom first nodepause: (options?: { userAction?: boolean }) => voidpaused roamingsetState: (state: Partial<PluginState>, options?: BaseOptions & Record<string, any>) => voidset roaming parametersshow: (options?: { userAction?: boolean }) => voidshow roaming pathhide: (options?: { userAction?: boolean }) => voidhidden roaming pathenable: (options?: { userAction?: boolean }) => voidenable pluginsdisable: (options?: { userAction?: boolean }) => voidDisable plugindispose: () => voiddestroyed plugin