The Viewer.
Plugin configuration.
ID for this Plugin, unique within its Viewer.
ReadonlykeysEffective key bindings; actions of disabled modes have no keys.
The Viewer that contains this Plugin.
Starts walking from the camera's current look position.
Call it from a user gesture (e.g. a button click), so that the browser grants pointer lock.
Stops walking and gives control back to the Viewer's CameraControl.
Destroys this WalkModePlugin, deactivating walk mode first.
Logs an error message to the JavaScript developer console, prefixed with the ID of this Plugin.
The error message
Fires an event at this Plugin.
The event type name
The event parameters
Logs a message to the JavaScript developer console, prefixed with the ID of this Plugin.
The error message
Removes event subscription.
Subscription id
Subscribes to an event fired by this plugin.
Logs a warning message to the JavaScript developer console, prefixed with the ID of this Plugin.
The error message
Viewer plugin for first-person walking through a model, with gravity, collisions and steps.
Requires a Z-up World (
viewer.camera.worldAxis = [1, 0, 0, 0, 0, 1, 0, -1, 0]).Default controls: mouse to look (pointer lock), WASD to move, Shift to run, Space to fly up, G free flight (Space / Ctrl up / down), F go through the targeted door, Esc to exit. Keys are configurable with
cfg.keys, modes can be switched off withcfg.modes, and speeds, body dimensions, physics and object types are set by the WalkModeSettings options.