@casual-simulation/aux-custom-portals
Advanced tools
Changelog
V2.0.9
os.requestPermanentAuthToken()
and os.destroyRecord(record)
functions.
os.requestPermanentAuthToken()
is used to get auth tokens that can publish records to a app bundle from anywhere - including from other app bundles.os.destroyRecord(record)
destroys the given record and makes it inaccessable via os.getRecords()
. You must be logged in to destroy records and you can only destroy records that have been created by your user account and app bundle.Changelog
V2.0.8
os.requestAuthBot()
function.
authBot
global variable to represent whether the user is signed in.autoLoad
query parameter.os.publishRecord(recordDescription)
function to be able to save arbitrary JSON data.
tempRestricted
- (Default) Records are temporary (they are deleted at the end of the day) and they are only retrievable by the user and appBundle that created them.tempGlobal
- Records are temporary and they are they are retrievable by everyone.permanentRestricted
- Records are permanent and they are only retrievable by the user and appBundle that created them.permanentGlobal
- Records are permanent and they are retrievable by everyone.os.getRecords()
function.os.requestAuthBot()
.recordDescription
is an object with the following properties:
space
- The space that the record should be published to.record
- The data that should be included in the record.address
- (Optional) The address that the record should be published at. This can be omitted if a prefix
is specified instead.prefix
- (Optional) The prefix that the record should be published at. If used instead of address
, CasualOS will calculate the address
by concatenating the given prefix and ID like this: "{prefix}{id}"
.id
- (Optional) The ID that the record should be published at. If used with prefix
, then CasualOS will combine the given id
with the given prefix
to calculate the address
. If omitted, then CasualOS will generate a UUID to be used with the prefix
.authToken
- (Optional) The auth token that should be used to publish the record. This is useful for allowing other users to be able to publish records to an app bundle on your account. If omitted, then the authToken
tag from the authBot
will be used.os.getRecords(...filters)
function to be able to find and retrieve records.
getBots()
except that the list of possible filters is different and more limited.byAuthID(id)
- Searches for records that were published by the given auth ID. This filter is required for all os.getRecords()
queries.inSpace(space)
- Searches for records that were published to the given space. If omitted, only tempRestricted
records will be searched.byAddress(address)
- Searches for the record with the given address. Useful for finding a specific record.byPrefix(prefix)
- Searches for records whose address starts with the given prefix. Useful for finding a list of records.byID(id)
- Searches for records whose address equals {prefix}{id}
. Works similarly to byAddress()
except that you must also use byPrefix()
. Useful for finding a specific record.getMoreRecords()
function.records
- The list of records that were retrieved. This list may contain all the records that were found or it might only contain some of the records that were found. You can retrieve all of the records by looping and calling getMoreRecords()
until it returns an object with hasMoreRecords
set to false
.totalCount
- The total number of records that the query found.hasMoreRecords
- Whether there are more records that can be retrieved for the query.getMoreRecords()
- A function that can be called to get the next set of records for the query. Like os.getRecords()
, this function returns a promise with an object that has the structure described above.byID(id)
bot filter.
getBots()
or as a record filter with os.getRecords()
.formAnimationAddress
prevented formAnimation
from working correctly on first load.os.focusOn()
would not work on mobile devices.Changelog
V2.0.7
Changelog
V2.0.6
formAnimationAddress
tag to allow specifying a separate GLTF/GLB URL that should be used for animations.
formAddress
GLTF mesh.mapPortal
tag on the configBot
to null
would not close the map portal.Changelog
V2.0.4
.pdf
extension to os.downloadBots()
.os.parseBotsFromData(data)
function.
os.downloadBots()
.create()
to add them to the server.os.unregisterApp(appID)
function to allow removing apps after they have been registered.html
string helper.
let result = <h1>Hello, World!</h1>;
html
string helper will still be available.Changelog
V2.0.36
Ctrl+Shift+F
while the systemPortal is open or by selecting the eyeglass icon on the left side of the screen.portalBackgroundAddress
to casualos://camera-feed
.casualos://camera-feed/rear
and casualos://camera-feed/front
.// in @onSetupApp
const parent = that.document.createElement('div');
const child = that.document.createElement('span');
parent.appendChild(child);
parent.appendChild(child); // This would cause the issue
os.compileApp()
.
os.compileApp()
uses a change detection algorithm to limit the number of HTML elements it needs to create.Changelog
V2.0.29
formAddress
and portalBackgroundAddress
URLs.