@casual-simulation/aux-vm-client
Advanced tools
Changelog
V0.11.24
_auxUserDimension
-> auxPagePortal
_auxUserInventoryDimension
-> auxInventoryPortal
_auxUserMenuDimension
-> auxMenuPortal
_auxUserUniverse
-> auxUniverse
auxDimensionColor
-> auxPortalColor
auxDimensionLocked
-> auxPortalLocked
auxDimensionRotatable
-> auxPortalRotatable
auxDimensionPannable
-> auxPortalPannable
auxDimensionPannableMaxX
-> auxPortalPannableMaxX
auxDimensionPannableMaxY
-> auxPortalPannableMaxY
auxDimensionPannableMinX
-> auxPortalPannableMinX
auxDimensionPannableMinY
-> auxPortalPannableMinY
auxDimensionZoomable
-> auxPortalZoomable
auxDimensionZoomableMax
-> auxPortalZoomableMax
auxDimensionZoomableMin
-> auxPortalZoomableMin
auxDimensionPlayerZoom
-> auxPortalPlayerZoom
auxDimensionPlayerRotationX
-> auxPortalPlayerRotationX
auxDimensionPlayerRotationY
-> auxPortalPlayerRotationY
auxDimensionGridScale
-> auxPortalGridScale
auxDimensionSurfaceScale
-> auxPortalSurfaceScale
auxDimensionInventoryHeight
-> auxInventoryPortalHeight
auxDimensionInventoryResizable
-> auxInventoryPortalResizable
auxDimensionInventoryColor
is now just auxPortalColor
aux._lastActiveTime
_auxSelection
aux.connected
_auxUser
auxUserUniversesDimension
auxDimensionConfig
player.isConnected()
player.isInDimension()
function has been updated to check whether the page portal is showing the given dimension.auxDimensionConfig
tag.
aux{type}PortalConfigBot
(like auxPagePortalConfigBot
) tags to specify the bot that should configure the portal.auxplayer.com/*{dimension}/{universe}
to get the sheet, you now have to specify the portals via URL query parameters. (e.g. auxplayer.com?auxUniverse={universe}&auxSheetPortal={dimension}
)auxSheetPortal
- Loads the sheet with the given dimension.auxPagePortal
- Loads the normal 3D view with the given dimension.auxMenuPortal
- Loads the menu with the given dimension.auxInventoryPortal
- Loads the inventory with the given dimension.casualos.com/{dimension}/{universe}
and it will redirect you to auxplayer.com?auxUniverse={universe}&auxPagePortal={dimension}
or auxplayer.com?auxUniverse={universe}&auxSheetPortal={dimension}
depending on if you include the *
for the dimension.player.getPortalDimension(portal)
function.
portal
is a string with the name of the portal. Can be one of the following options:
page
- Gets the auxPagePortal
tag.inventory
- Gets the auxInventoryPortal
tag.menu
- Gets the auxMenuPortal
tag.sheet
- Gets the auxSheetPortal
tag.universes
- Gets the auxUniversesPortal
tag."Portal"
to get that tag directly. (e.g. auxPagePortal
will return auxPagePortal
)player.getDimensionalDepth(dimension)
function.
dimension
is the dimension that should be searched for.0
means that the player bot is in the given dimension.1
means that the player bot is viewing the given dimension through a portal.-1
means that the player bot cannot access the given dimension at this moment.auxSheetPortal
tag on the player bot.auxInventoryPortal
to null or undefined
would not hide it.Changelog
V0.11.23
player.inDesigner()
function to player.inSheet()
.player.showChat(placeholder)
function to set the placeholder of the chat bar instead of the prefill.player.showChat(options)
.
options
is an object with the following properties:
placeholder
- The placeholder. Will override the existing placeholder. (optional)prefill
- The prefill. Will only be set if there is no text already in the chat bar. (optional)id
tag in the sheet to load all the bots.player.version()
function which gets information about the current version number.
hash
- The Git hash that the build was made from.version
- The Git tag that the build was made from.major
- The major number of the build.minor
- The minor number of the build.patch
- The patch number of the build.player.device()
function which gets information about the current device.
supportsAR
- Whether AR is supported.supportsVR
- Whether VR is supported.player.enableAR()
and player.disableAR()
functions.player.enableVR()
and player.disableVR()
functions.space
tag in the sheet would sometimes show an incorrect value.Changelog
V0.11.22
tempLocal
space.
player.loadUniverse()
will now create bots in the tempLocal
space.
shared
space.player.markHistory(options)
function creates a history mark for the current version.
options
is an object with the following properties:
message
- The message that the new mark should have.player.browseHistory()
function loads the history
space with all the marks that the universe has.player.restoreHistoryMark(mark)
function restores the state in the given mark to the universe.
mark
- The bot or bot ID of the mark that should be restored.player.restoreHistoryMarkToUniverse(mark, universe)
function restores the state in the given mark to the given universe.
mark
- The bot or bot ID of the mark that should be restored.universe
- The universe that the mark should be restored to.Changelog
V0.11.21
player.showUploadUniverse()
function to player.showUploadAuxFile()
.@onAnyCreate
shout listener.
that
is an object with the following properties:
bot
- The bot that was created.Changelog
V0.11.20
auxContext*
tags have been renamed to auxDimension*
.@onDrop
, @onModDrop
, @onClick
, etc. now have a dimension
property in the data
argument instead of context
.@onPlayerEnterContext
listener has been renamed to @onPlayerEnterDimension
._auxUserContext
, _auxUserMenuContext
, _auxUserInventoryContext
, and _auxUserChannelsContext
have been renamed to use dimension instead of context.auxChannel*
tags have been renamed to auxUniverse*
._auxUserChannelsContext
tag has been renamed to _auxUserUniversesDimension
._auxUserChannel
tag has been renamed to _auxUserUniverse
.player.setupChannel()
function has been renamed to player.setupUniverse()
.player.loadChannel()
and player.unloadChannel()
functions have been renamed to player.loadUniverse()
and player.unloadUniverse()
.player.getCurrentChannel()
function has been renamed to player.getCurrentUniverse()
.setup_channel
action type has been renamed to setup_universe
.@onChannel*
listen tags have been renamed to @onUniverse*
.
channel
property in the data
argument has been renamed to universe
.auxDimensionRotation
(auxContextRotation
) tags to auxDimensionOrientation
.auxDimensionConfig
tag (renamed from auxContext
).*
in front of the dimension name in the URL.
https://auxplayer.com/*home/example
if you wanted to view the home
dimension in the sheet from the example
universe.*
will show all bots in the universe in the sheet. (which is very slow at the moment)player.isDesigner()
function.auxShape
to auxForm
.auxImage
to auxFormAddress
.player.showChat()
and player.hideChat()
functions.
@onChatUpdated
shout with the text in the chat bar.@onChatEnter
shout with the text in the chat bar.@onChat
shout listener.
that
is an object with the following properties:
message
- The message that was sent.@onChatTyping
shout listener.
that
is an object with the following properties:
message
- The message that is in the chat bar after the user edited it.player.run(script)
function.
script
is the script text that should be executed.run_script
action. This allows @onUniverseAction()
listener to intercept and prevent scripts.player.downloadBots(bots, filename)
function.
player.showUploadUniverse()
function.
.aux
files.auxIframe
now supports URLs with *
characters in them.Changelog
V0.11.18
shared
tag.Changelog
V0.11.17
@onDrop
, @onDropEnter
, and @onDropExit
to use the same parameters.
that
is an object with the following properties:
dragBot
- The bot that is being dragged.to
- an object with the following properties:
context
- The context the bot is being dragged into.x
- The X grid position the bot is being dragged to.y
- The Y grid position the bot is being dragged to.bot
- The bot that the dragBot
is being dragged onto.from
- an object with the following properties:
context
The context the bot is being dragged from.x
- The X grid position the bot is being dragged from.y
- The Y grid position the bot is being dragged from.create()
will now automatically set the auxCreator
tag to null
if it references a bot that is in a different space from the created bot.create()
will not set the auxCreator
tag to null
if it references a non-existent bot.changeState(bot, stateName, groupName)
function to help with building state machines.
[groupName]
tag to [stateName]
on bot
and sends "on enter" and "on exit" whispers to the bot that was updated.groupName
defaults to "state"
if not specified.@[groupName][previousStateName]OnExit()
and @[groupName][stateName]OnEnter()
whispers are sent to the updated bot.
that
is a object with the following properties:
from
- The previous state name.to
- The next state name.changeState(bot, "Running")
will set the state
tag to "Running"
and will send a @stateRunningOnEnter()
whisper to the bot.Changelog
V0.11.16
onBotDrag
and onBotDrop
to onDrag
and onDrop
respectively.onMod
to onModDrop
.onCombine
, onCombineEnter
, and onCombineExit
.auxPositioningMode
to absolute
will no longer prevent mods.applyMod()
and subtractMods()
to not send onMod()
events.diffs
property on the onModDrop
argument to mod
.onModDropEnter
and onModDropExit
listeners for when a mod is dragged onto or off of a bot.
onModDropEnter
and onModDropExit
events.onModDrop
listener is provided, then the mod will not be applied. It is up to the onModDrop
listener to apply the mod via applyMod(this, that.mod)
.onDropEnter
and onDropExit
listeners for when a bot is dragged onto or off of another bot.
onDropEnter
and onDropExit
events.onDropEnter
and onDropExit
events will fire even if one of the bots is not stackable.draggedBot
- the bot that is being dragged.otherBot
- the bot that the dragged bot is on top of.context
- the context that this is happening in.onDrop
to be sent to both the dragged bot and the bot that it is dropped on top of.
auxPositioningMode
set to absolute
.player.setClipboard()
function that is able to set the user's clipboard to the given text.
player.setClipboard("abc")
will set the user's clipboard to "abc".getTag()
, setTag()
, getBot()
, getBots()
, byTag()
, shout()
, and whisper()
.tags
variable in scripts as a reference to tags.
raw
variable.bot
or this
variables. (e.g. bot.tags.abc
)otherBot.tags.abc
)tags.name.toString()
)getTag()
function.Changelog
V0.11.15
player.replaceDragBot()
actions were not getting processed because some data was improperly formatted.Changelog
V0.11.14
Breaking Changes
auxStackable
and replaced it with auxPositioningMode
.
auxPositioningMode
has two possible values:
stack
- Indicates that the bot will stack on top of other bots (default)absolute
- Indicates that the bot will ignore other bots when positioning.createTemp()
function.
{ space: "value" }
mod.createTemp()
you should use create({ space: "tempLocal" })
.cookie
bot. It has been replaced with the local
space.addToContextMod()
removeFromContextMod()
addToMenuMod()
removeFromMenuMod()
setPositionMod()
from()
getID()
function to achieve the same functionality:{ auxCreator: getID(bot) }
createdBy()
filter function to byCreator()
.Improvements
space
tag which indicates where a bot will be stored.
shared
- This space is shared among multiple users and is persistent. This is the default space for bots if not specified.tempLocal
- This space is not shared and is cleared every time the browser refreshes.local
- This space is kept on your device and is persistent.{ space: "value" }
mod.
create({ space: "local" })
will create a new bot in the local
space.tempLocal
bot will produce another tempLocal
bot. You can of course override this using a mod.bySpace()
filter function.
getBots(bySpace("local"))
will get all the bots in the local
space.getBots(byTag("space", value))
.getID(bot)
gets the ID of a bot. If given a string, then that will be returned instead.getJSON(data)
gets a JSON string for the given data.Bug Fixes