Creates a new VNEngine instance.
Engine configuration options
Gets all game variables.
Gets the current scene.
Gets the renderer instance.
Gets the script instance.
Gets the state manager instance.
Gets a game variable.
Variable name
The variable value, or undefined if not set
Moves to the next scene in the script order.
True if moved to next scene, false if no next scene exists
Removes an event listener.
The event type
The callback function to remove
Registers an event listener.
The event type to listen for
The callback function
Sets a game variable.
Variable name
Variable value
Main engine class for running visual novels.
The VNEngine orchestrates the visual novel experience by managing the script, game state, rendering, and event system. It provides methods for scene navigation, variable management, and event handling.
When created in a browser environment, it automatically instantiates a DOMRenderer to display the visual novel.
VNEngine
Example