@casual-simulation/causal-tree-store-browser
Advanced tools
Changelog
V2.0.30
CAUSAL_REPO_CONNECTION_PROTOCOL
are now websocket
and apiary-aws
.apiary-aws
, we've used native WebSockets for more connections. As such, it should be safe to use native WebSockets in place of socket.io.menuItemText
tag value instead of the (empty) menuItemText
tag mask value.
false
for the menuItemText
tempLocal
tag mask when a normal tag value is present for menuItemText
. If the bot has no tag value for menuItemText
, then null
is used.os.registerApp()
multiple times would cause the app to be destroyed and re-created.
Changelog
V2.0.22
os.publishRecord()
os.getRecords()
os.destroyRecord()
byAuthID()
withAuthToken()
byAddress()
byPrefix()
os.publishRecord()
) and introduces a new paradigm.os.getPublicRecordKey(recordName)
has been added as a way to retrieve a key that can be used to write data and files to a public record.os.recordData(recordKey, address, data)
can be used to store a piece of data at an address inside a record. This data can later be retrieved with os.getData(recordKeyOrName, address)
.os.getData(recordKeyOrName, address)
can be used to retrieve data that was stored in a record.os.recordFile(recordKey, data, options?)
can be used to store a file inside a record. Files can be any size and can be accessed via webhook()
or os.getFile(url)
.os.getFile(urlOrRecordFileResult)
can be used to easily retrieve a file.os.isRecordKey(value)
is useful for determining if a value represents a record key.Changelog
V2.0.14
local
space to delete the oldest inst when localStorage is full.pointerPixelX
and pointerPixelY
tags to the gridPortalBot to track the mouse pointer position on the screen.dataURL
instead of data
that points to where the record can be downloaded from.os.getFocusPoint()
) would always return null data..getMoreRecords()
function did not work.Changelog
V2.0.12
os.createDebugger(options?)
function.
os.createDebugger()
can be used to create a separate sandbox area where bots can be tested without causing external effects.create()
and getBots()
) that can be used like normal.
For example:
const debug = os.createDebugger();
const debugBot = debug.create({ home: true, color: 'red' });
Creates a bot that is contained in the debugger. Therefore, scripts on the debugBot
will only affect bots that were created in the debugger.assert(condition, message?)
and assertEqual(received, expected)
functions.
meetPortalAnchorPoint
to left
or right
would not shift the gridPortal
to the remaining space.Changelog
V2.0.11
server
to inst
.
configBot.tags.inst
instead of configBot.tags.server
.https://casualos.com?inst=my-aux
instead of https://casualos.com?server=my-aux
.server
with inst
on the first load so old links will continue to work.pagePortal
to gridPortal
pagePortal
with gridPortal
on first load (so old links will continue to work) but any scripts that change pagePortal
will need to be updated to change gridPortal
.pagePortal
on the configBot
should now be gridPortal
.pagePortalBot
is now gridPortalBot
.os.getCameraPosition('page')
-> os.getCameraPosition('grid')
os.getCameraRotation('page')
-> os.getCameraRotation('grid')
os.getFocusPoint('page')
-> os.getFocusPoint('grid')
os.getPortalDimension('page')
-> os.getPortalDimension('grid')
@onPortalChanged
now uses gridPortal
for that.portal
.miniPortal
to miniGridPortal
miniPortal
on the configBot
should now be miniGridPortal
.miniPortalBot
should now be miniGridPortalBot
.os.getCameraPosition('mini')
-> os.getCameraPosition('miniGrid')
os.getCameraRotation('mini')
-> os.getCameraRotation('miniGrid')
os.getFocusPoint('mini')
-> os.getFocusPoint('miniGrid')
os.getPortalDimension('mini')
-> os.getPortalDimension('miniGrid')
@onPortalChanged
now uses miniGridPortal
for that.portal
.os.downloadServer()
-> os.downloadInst()
os.loadServer()
-> os.loadInst()
os.unloadServer()
-> os.unloadInst()
os.getCurrentServer()
-> os.getCurrentInst()
server.remotes()
-> os.remotes()
server.serverRemoteCount()
-> os.remoteCount()
server.servers()
-> os.instances()
server.serverStatuses()
-> os.instStatuses()
server.restoreHistoryMarkToServer()
-> server.restoreHistoryMarkToInst()
.os
namespace from the server
namespace. This is because most server
functions do not work on CasualOS.com and are only designed to work with a server-based system (which CasualOS.com is not). To clarify this, functions that work all the time are now in the os
namespace while the others are in the server
namespace.@onServerJoined
-> @onInstJoined
@onServerLeave
-> @onInstLeave
@onServerStreaming
-> @onInstStreaming
@onServerStreamLost
-> @onInstStreamLost
@onServerAction
-> @onAnyAction
os.enablePointOfView(center?)
to take an additional argument that determines whether to use the device IMU to control the camera rotation while in POV mode.
os.enablePointOfView(center?, imu?)
.os.enablePointOfView(undefined, true)
will enable using the IMU for controlling the camera rotation.