@casual-simulation/aux-records
Advanced tools
Changelog
V3.2.19
implements
, interface
, let
, package
, private
, protected
, public
, static
, yield
keywords are no longer allowed to be used as identifiers.Infinity
, undefined
, etc.) are no longer allowed.0
.
0
and having every digit less than 8
let num = 0123; // This does not equal 123, but is actually 83 in decimal
preact/compat
for custom apps.
preact/compat
improves Preact compatibility with React behavior and features.os.appCompat
API.
preact/compat
.Suspense
, lazy()
, createPortal()
, forwardRef()
, memo()
, and PureComponent
.createRef()
and createContext()
to os.appHooks
.@onGridClick
, @onGridUp
, and @onGridDown
shouts to all loaded insts.Changelog
V3.2.18
import
and export
statements.
import
and export
statements in scripts.import {abc} from "example.system.tag"
can be used to import the abc
variable or function from the bot with the example.system
system and the tag
tag.import { sortBy } from 'https://esm.run/lodash-es';"
imports the sortBy
function from the lodash-es
module provided by https://esm.run.casualos
module. This module exports all of CasualOS's built-in functions. It is the only module that cannot be overriden with @onResolveModule
. For example:
import { os } from 'casualos';
os.toast('Hello from my module!');
@onResolveModule
.
@onResolveModule
for more information.let casted = <any>value;
syntax for casting types is not supported since all scripts support JSX.📄
prefix for "library" scripts.
@
prefix. Using the @
prefix makes what we call a "listener script" or "listener tag".📄
prefix instead of @
. Using 📄
makes what we call a "library script" or "library tag".shout()
or whisper()
to communicate with a library script. Additionally, thisBot.script()
does not work either.os.toast()
, you have to first import the casualos
module. For example:
import { os } from 'casualos';
os.toast('Hello from my module!');
.transferControlToOffscreen()
and .getContext()
functions on <canvas>
HTML elements..setPointerCapture()
and .releasePointerCapture()
functions on HTML elements.?owner=player
in the URL while not being logged in would cause a public inst to be loaded instead of prompting the user to login.os.getCurrentInst()
would return undefined
if the inst is a static inst.Changelog
V3.2.17
os.calculateRayFromCamera()
would return incorrect results for the ray origin.miniMapPortal
and miniGridPortal
were not able to be resized.Changelog
V3.2.16
formLDrawPartsAddress
to set the address that LDraw parts should be loaded from.ai.chat()
.ai.chat()
requests.
ai.chat()
messages now support accepting an array of content which can either represent text or image data.@onInstJoined
shout.ai.chat()
would not actually honor any options.