Skip to content

Scene

Access the scene object within event scripts:

js
export default {
    run(save, story, loader) {
        // Scene object in Yin.Object
        const scene = story.scene,
            // Scene node in Vue
            vnode = story.sceneVNode

        console.log('Scene [Yin.Object]:', scene)
        console.log('Scene [Vue]:', vnode)
    }
}

Scene Group

Scene groups allow grouping multiple scenes while preserving playback progress and playback state across transitions.

js
// Scene groups share state between scenes
// On scene switch:
// - subject.remainScene   → retained scene object
// - subject.remainStatus  → { currentTime, played }

When a scene belongs to a group, media playback progress is retained across switches for seamless transitions.

Hide in Node Panel

Scenes support the hideInNode property. When enabled:

  • The scene and its downstream scenes are hidden in the node panel
  • If the scene is directly referenced by another event, it will still appear
  • Useful for hidden branches not meant for player preview

Events also support hideInNode to hide subsequent story nodes triggered by that event.