@casual-simulation/aux-vm
Advanced tools
Changelog
V0.9.39
stripe.publishableKey
tag.stripe.secretKey
tag.player.checkout(options)
: Starts the checkout process for the user. Accepts an object with the following properties:
productId
: The ID of the product that is being purchased. This is a value that you make up to distinguish different products from each other so you know what to charge.title
: The title message that should appear in the checkout box.description
: The description message that should appear in the checkout box.processingChannel
: The channel that payment processing should happen on. This is the channel you made from step 3.requestBillingAddress
: Whether to request billing address information with the purchase.paymentRequest
: Optional values for the "payment request" that gives users the option to use Apple Pay or their saved credit card information to checkout. It's an object that takes the following properties:
country
: The two-letter country code of your Stripe account.currency
: The three letter currency code. For example, "usd" is for United States Dollars.total
: The label and amount for the total. An object that has the following properties:
label
: The label that should be shown for the total.amount
: The amount that should be charged in the currency's smallest unit. (cents, etc.)server.finishCheckout(options)
: Finishes the checkout process by actually charging the user for the product. Takes an object with the following properties:
token
: The token that was produced from the onCheckout()
call in the processing channel.amount
: The amount that should be charged in the currency's smallest unit.currency
: The three character currency code.description
: The description that should be included in the receipt.extra
: Extra data that should be sent to the onPaymentSuccessful()
or onPaymentFailed()
actions.onCheckout()
: This action is called on both the normal channel and the processing channel when the user submits a payment option to pay for the product/service. that
is an object with the following properties:
token
: The Stripe token that was created to represent the payment details. In the processing channel, this token can be passed to server.finishCheckout()
to complete the payment process.productId
: The ID of the product that is being purchased. This is useful to determine which product is being bought and which price to charge.user
: (Processing channel only) Info about the user that is currently purchasing the item. It is an object containing the following properties:
username
: The username of the user. (Shared for every tab & device that the user is logged into)device
: The device ID of the user. (Shared for every tab on a single device that the user is logged into)session
: The session ID of the user. (Unique to a single tab)onPaymentSuccessful()
: This action is called on the processing channel when payment has been accepted after server.finishCheckout()
has completed. that
is an object with the following properties:
bot
: The bot that was created for the order.charge
: The info about the charge that the Stripe API returned. (Direct result from /api/charges/create
)extra
: The extra info that was included in the server.finishCheckout()
call.onPaymentFailed()
: This action is called on the processing channel when payment has failed after server.finishCheckout()
was called. that
is an object with the following properties:
bot
: The bot that was created for the error.error
: The error object.extra
: The extra info that was included in the server.finishCheckout()
call.remote(command, target)
function.
remote(player.toast("hi!"), { username: 'test' })
will send a toast message with "hi!" to all sessions that the user "test" has open.player.toast()
or player.goToURL()
work. Shouts and whispers are not supported yet.Changelog
V0.9.32
onDropInContext()
, onAnyDropInContext()
, onDropInInventory()
, onAnyDropInInventory()
, onDragOutOfContext()
, onAnyDragOutOfContext()
, onDragOutOfInventory()
and onAnyDragOutOfInventory()
to onBotDrop()
, onAnyBotDrop()
, onBotDrag()
, onAnyBotDrag()
.aux.context.inventory.height
from 0 to 1 to instead be 1 to 10 defining the default number of rows to view in the inventory on page load.DIRECTORY_TOKEN_SECRET
and DIRECTORY_WEBHOOK
environment variables.DIRECTORY_TOKEN_SECRET
environmenv variable is not specified, then the directory API will not be enabled.DIRECTORY_TOKEN_SECRET
.DIRECTORY_WEBHOOK
variable specifies the URL that updated entry information should be POSTed to.
key
: The key/hash that the uniquely identifies the AUX that was updated.externalIpAddress
: The external (public facing) IP Address that the AUX is using.internalIpAddress
: The internal (non-public facing) IP Address that the AUX is using.GET /api/directory
PUT /api/directory
key
: The unique key identifying the AUXPlayer. Recommended to use a hash of the MAC address and hostname.privateIpAddress
: The local network IP Address that has been assigned to the AUXPlayer.publicName
: The name that can be shown to other users publicly.password
: The password that is required to update the record. If this is the first request for the key
then the password will be saved such that the record can only be updated in the future when given the same password.aux.context.player.rotation.x
and aux.context.player.rotation.y
from one another to let the user only need to fill in one of the fields for player's initial rotation to work.Changelog
V0.9.31
mod.subtract
function to removed certain tags defined by a mod.createdBy()
function that get the filter of bots that have been created by another bot.getBotsInContext
, getBotsInStack
, getFilessAtPosition
, getNeighboringBots
.onCombine()
actions to pass the other bot as that.bot
.Changelog
V0.9.30
onDropInContext()
, onAnyDropInContext()
, onDropInInventory()
and onAnyDropInInventory()
now return the previous context the bots were in before the drop.aux.context.player.zoom
and its rotation with the tags aux.context.player.rotation.x
and aux.context.player.rotation.y
.player.showBarcode(code, format)
function.
player.openBarcodeScanner()
function.
onBarcodeScanned()
event will be sent containing the barcode that was detected.onBarcodeScannerOpened()
and onBarcodeScannerClosed()
.byMod()
as an additional way to query bots.
getBots(byMod({ "aux.color": "red", "aux.scale": 2 }))
gets all the bots with aux.color
set to "red"
and aux.scale
set to 2
.getBots(byMod({ "aux.color": null, "aux.label": "Hi!" }))
gets all the bots without an aux.color
but with aux.label
set to "Hi!"
.Changelog
V0.9.29
hasFileInInventory()
function to hasBotInInventory()
.onMerge()
action tag to onMod()
.aux._editingFile
hidden tag to aux._editingBot
.#
or by pressing Ctrl+Space
.Ctrl+Space
.Shift+F12
.Shift+F12
.Alt+Shift+F
.Ctrl+F
.Channel doesn't exist. Do you want to create it?
to Channel doesn't exist. Click here to create it.
for better user direction.getBot()
function not working in the search bar.setTag()
not working with multiple files when fed a false or null value to set.onPointerExit()
function will now execute before an onPointerEnter()
function when hovering over multiple bots.RemoveTags()
function where providing a string with a .
in its tag section failed to remove the correct tags.aux.context
can now be set to a value type of boolean or number.Create Channel
toast message to give it more processing time so it works more consistently.onAnyDropInContext
and what was appearing in the tag dropdown onDropAnyInContext
to read correctly, and other similar cases of this.aux.context.inventory.height
to work in the context bot's tag list.Changelog
V0.9.28
onPointerUp()
action tag to fire on button release.Changelog
V0.9.27
that
of the onAnyBotClicked()
action tag.that
of the onKeyDown()
and onKeyUp
action tags.that
of the onPointer
action tags.getBots()
and getBot()
by adding the ability to search by multiple parameters.
byTag(tag, value)
: Filters for bots that have the given tag and value.inContext(context)
: Filters for bots that are in the given context.inStack(bot, context)
: Filters for bots that are in the same stack as the given bot in the given context.atPosition(context, x, y)
: Filters for bots that are at the given position in the given context.neighboring(bot, context, direction)
: Filters for bots that are neighboring the given bot in the given context in the given direction.either(filter1, filter2)
: Filters for bots that match either of the given filters.not(filter)
: Filters for bots that do not match the given filter.getBots()
like this:
getBots(byTag("abc", 123), byTag("name", "test"))
getBots(not(inContext("hello")))
getBots(inContext("hello"), not(inStack(this, "hello")))
getBots(atPosition("test", 1, 2))
getBots(either(byTag("abc", true), byTag("def", true)))
getBot("name", "bob")
.aux.user.active
and is on every player bot.aux.context.surface.grid
, aux.context.surface.defaultHeight
, aux.input
, aux.input.target
, and aux.input.placeholder
.event()
function from action scripts.onPointerDown()
tag to the tag dropdown list.player.currentChannel()
function will now work in builder.Changelog
V0.9.26
aux.scale.z
or {context}.z
values on bots now updates the other bots in the same stack.player.tweenTo()
call can now be canceled by user input.player.tweenTo()
function have been clamped to their set limits to avoid issues.tweenTo
function has been fixed.Changelog
V0.9.25
Changelog
V0.9.24
onPlayerContextEnter()
to onPlayerEnterContext()
.player.currentChannel()
for users to query the channel id in player.=
sign as the first character.Destroyed {bot ID}
messages to not show when the bot doesn't actually get destroyed.aux.stackable
being false stopped mods from being applied to the bot, mods can now be applied.