@casual-simulation/aux-custom-portals
Advanced tools
Changelog
V1.5.10
onStreamData
to onSerialData
.serialConnect
, serialStream
, serialOpen
, serialUpdate
, serialWrite
, serialRead
, serialClose
, serialFlush
,serialDrain
, serialPause
, serialResume
serialStream
now requires a bot id to send the stream to that bot.idePortal
tag on the config bot to true
.Ctrl+Shift+F
hotkey.sheetPortalAddedTags
tag for the sheetPortalBot
which specifies additional tags that should always be shown in the sheet portal.url
tag would not be created on initial load unless the URL was updated.Changelog
V1.5.9
Ctrl+P
.imuPortal
would return values that were incorrect for usage on the camera.
imuPortal
sets the deviceRotationX
, deviceRotationY
, deviceRotationZ
and deviceRotationW
values which is the rotation of the device represented as a quaternion.pagePortal
also now supports setting cameraRotationOffsetW
to indicate that the offset should be applied as a quaternion.imuExample01
auxCode for an example.action.perform()
would be treated like they were being performed by the user themselves.
action.perform()
.Changelog
V1.5.7
imuPortal
to support Safari on iOS.crypto.isEncrypted(cyphertext)
, crypto.asymmetric.isEncrypted(cyphertext)
, and crypto.asymmetric.isKeypair(keypair)
functions.
shared
space but was actually in the tempLocal
space.Changelog
V1.5.6
os.addDropSnap()
and os.addBotDropSnap()
.
experiment.speakText(text, options?)
and experiment.getVoices()
functions.
os.getGeolocation()
function.
imuPortal
to be able to stream IMU data into CasualOS.
imuPortalBot
will be updated with IMU data from the device.imuSupported
- Whether reading from the IMU is supported. This will be shortly after the imuPortal
is defined.deviceRotationX
, deviceRotationY
, deviceRotationZ
- The X, Y, and Z values that represent the orientation of the device.portalCameraType
tag to allow switching between perspective
and orthographic
projections.
orthographic
- This projection preserves parallel lines from the 3D scene in the output 2D image. As a result, same-sized objects appear the same size on the screen, regardless of how far away they are from the camera.perspective
- This projection makes same-sized objects appear larger or smaller based on how far away they are from the camera. Closer objects appear larger and vice versa.os.enablePointOfView(center?)
and os.disablePointOfView()
functions.
os.enableVR()
or os.enableAR()
and can be used to give the player a "ground level" perspective in the page portal.os.enablePointOfView(center?)
- Enables POV mode by moving the camera to the given position, setting the camera type to perspective
, and changing the controls so that it is only possible to rotate the camera.os.disablePointOfView()
- Disables POV mode by resetting the camera, camera type, and controls.Changelog
V1.5.5
server
URL parameter when loaded in non-collaborative mode.Changelog
V1.5.4
os.download()
to add the correct file extension if one is omitted from the given filename.shared
, tempShared
, and remoteTempShared
) act like they are tempLocal
spaces.os.isCollaborative()
function to get whether CasualOS was loaded in a collaborative mode or non-collaborative mode.Changelog
V1.5.3
{dimension}SortOrder
tags still exist and are used by the menu portal to order bots.#draggable
to false and still get a @onDrag
or @onAnyBotDrag
event for it.@onDrag
/@onDrop
.#draggableMode
and #positioningMode
tags have been removed.
#draggableMode
can be emulated by setting #draggable
to false and adding custom @onDrag
events to limit which dimensions the bot can be moved to.#positioningMode
has been replaced with the os.addDropSnap()
and os.addBotDropSnap()
functions.@onAnyBotDropEnter
and @onAnyBotDropExit
shouts.@onAnyBotPointerDown
and @onAnyBotPointerUp
shouts.os.addDropSnap(...targets)
and os.addBotDropSnap(bot, ...targets)
functions.
"ground"
- The bot will snap to the ground as it is being dragged. (Default when not in VR)"grid"
- The bot will snap to individual grid tiles as it is being dragged."face"
- The bot will snap to the face of other bots as it is being dragged.position
- An object with x
, y
, and z
values representing the world position of the snap point.distance
- The distance that the pointer ray should be from the position in order to trigger snapping to the position.os.addBotDropSnap(bot, ...targets)
function accepts a bot as its first parameter which limits the specified snap targets to when the given bot is being dropped on.experiment.beginRecording(options?)
and experiment.endRecording()
functions.
Changelog
V1.5.19
labelPaddingX
and labelPaddingY
tags to allow controlling the padding along the width and height of labels separately.cursor
and portalCursor
tags.cursorHotspotX
, cursorHotspotY
, portalCursorHotspotX
, and portalCursorHotspotY
tags to allow specifying the location that clicks should happen at in the custom cursor image. For example, a cursor that is a circle would have the hotspot in the middle but the default cursor has the hotspot at the top left.