APIGENERAL
SPACES OVERVIEW
Introduction
Spaces Changelog
DESIGNING SPACES

World Creation

Overview
Creating Models
Importing Objects
Adjusting Looks
Recommended external tools

World Constraints

Scene Limitations
Health Monitor

Using Plugins

Media: Audio
Places
PLUGINS IN SPACES

Build & Publish

Overview
Publishing
Support & Feedback
Examples

Plugin Guides

Creating a Plugin
Creating a Component
Custom Avatars

Plugin Core API

Globals
App
Audio
Menus
Messages
Objects
Paths
Textures
User
World

Plugin Hooks

Hooks
General Hooks
Media Playback Hooks
Change LogForum

Paths

Allows you to access file paths.

When extending BasePlugin, these functions can be accessed via this.paths.*

When extending BaseComponent, these functions can be accessed via this.plugin.paths.*

Functions

absolute(url: string) : string

Converts a relative path to an absolute path, starting from the URL where the plugin is located.

Returns the absolute path as a string.

FieldTypeDescriptionExample
urlstringRelative URL to a file'./sound.wav'

Example

const url = this.paths.absolute('./sound.wav')
console.log(url) // => 'https://example.com/sound.wav'