@casual-simulation/aux-vm
Advanced tools
Changelog
V0.11.19
Changelog
V0.11.0
Improvements
Changes
action.perform()
now needs to be used to run actions on the server.
remote()
function.onAnyAction()
as that.action.type === "device"
onAnyAction()
has to detect remove events and execute the inner action via action.perform(that.action.event)
.server.grantRole()
server.revokeRole()
onAnyAction()
to handle them.
server.backupAsDownload()
server.backupToGithub()
server.shell()
server.backupAsDownload()
has been updated to accept a "session selector" which determines which session the ZIP file should be sent to.
server.backupAsDownload({ username: getTag(player.getBot(), "#aux._user") })
aux._lastEditedBy
tag.
onAnyAction()
.aux.context.zoomable.min
, aux.context.zoomable.max
aux.context.pannable.min.x
, aux.context.pannable.max.x
, aux.context.pannable.min.y
, aux.context.pannable.max.y
.Bug Fixes
Changelog
V0.10.10
Changelog
V0.10.5
player.showHtml(html)
function that shows a modal with the given HTML.
Changelog
V0.10.4
onAnyAction()
action tag to intercept and change actions before they are executed.
onAnyAction()
runs for every action, including when a bot is created, changed, or deleted.type
property.
type
property is a string that indicates what the action does.add_bot
: A bot should be added (i.e. created).remove_bot
: A bot should be removed (i.e. deleted).update_bot
: A bot should be updated.apply_state
: The given bot state should be applied. (i.e. a set of bots should be created/updated)shout
: A shout should be executed.show_toast
: A toast message should be shown on the device.show_barcode
: A barcode should be shown.tween_to
: The camera should be tweened to show a bot.that
is an object with the following properties:
action
: The action that is going to be executed.onAnyAction()
on the config bot.
action.reject(action)
: Prevents the given action from being performed. Returns the rejection action.action.perform(action)
: Adds the given action to the performance queue so it will be performed. This can be used to re-enable an action after it has been rejected (you can also reject the rejection action). Returns the action that will be performed.local
bot which is stored in the browser's local storage.
local
bot is a bot that is unique to the device and channel.getBot("#id", "local")
.onShout()
to onAnyListen()
.onListen()
which is an alternative to onAnyListen()
that is only called on the targeted bots.plater.toast("message", durationNum)
.Changelog
V0.10.3
aux.context.pannable
: Controls whether the main camera is able to be panned.aux.context.zoomable
: Controls whether the main camera is able to be zoomed.aux.context.rotatable
: Controls whether the main camera is able to be rotated.player.moveTo()
to instantly tween the camera to a bot.
onCombineExit
action will now fire alongside the onCombine
action.remote(webhook())
.player.tweenTo()
to not change the zoom level when it is not specified.onPlayerEnterContext
action.Changelog
V0.10.2
player.goToContext()
.Changelog
V0.10.10
Changelog
V0.10.0
webhook(options)
- options is an object that takes the following properties:
method
- The HTTP Method that should be used for the request.url
- The URL that the request should be made to.responseShout
- (Optional) The shout that should happen when a response is received from the server.headers
- (Optional) The HTTP headers that should be sent with the request.data
- (Optional) The data that should be sent with the request.webhook.post(url, data, options)
- Sends a HTTP Post request.
url
- The URL that the request should be made to.data
- (Optional) The data that should be sent with the request.options
- (Optional) An object that takes the following properties:
responseShout
- (Optional) The shout that should happen when a response is received from the server.headers
- (Optional) The headers that should be sent with the request.onWebhook()
action and send requests to https://auxplayer.com/{context}/{channel}/whatever-you-want
.
onWebhook()
is shouted to the channel that the request was made to and that
is an object with the following properties:
method
- The HTTP Method that the request was made with.url
- The URL that the request was made to.data
- The JSON data that the request included.headers
- The HTTP headers that were included with the request.onShout()
event.
onShout()
is executed on every bot whenever a shout or whisper happens.
that
is an object with the following properties:
name
is the name of the action being shouted.that
is the argument which was provided for the shout.targets
is an array of bots that the shout was sent to.listeners
is an array of bots that ran a script for the shout.responses
is an array of responses that were returned from the listeners.onChannelSubscribed()
- happens the first time a channel is loaded. Sent to every channel that is currently loaded.onChannelUnsubscribed()
- happens when a channel is unloaded. Sent to every channel that remains after the channel is unloaded.onChannelStreaming()
- happens when a channel is connected and fully synced. Sent to every channel that is currently loaded.onChannelStreamLost()
- happens when a channel is disconnected and may not be fully synced. Sent to every channel that is currently loaded.that
is an object with the following properties:
channel
- The channel that the event is for.onConnected()
onDisconnected()
aux.context.inventory.pannable
enables and disables the inventory's ability to pan, off by default.aux.context.inventory.resizable
enables and disables the inventory's drag to resize functionality, on by default.aux.context.inventory.rotatable
enables and disables the inventory's ability to rotate, on by default.aux.context.inventory.zoomable
enables and disables the inventory's ability to zoom, on by default.Changelog
V0.9.40