vuer.events
Event
An event is a message sent from the server to the client.
ClientEvent
Event received from the client (browser).
Subclasses must define etype as a class attribute. For deserialization,
etype is passed via kwargs and set via __dict__.update().
Example::
class MyEvent(ClientEvent): etype = "MY_EVENT"
ClientEvent.init
Inherited members
ts— fromvuer.events.Event
InitEvent
Inherited members
value— fromvuer.events.ClientEvent__init__— fromvuer.events.ClientEventts— fromvuer.events.Event
NullEvent
Inherited members
value— fromvuer.events.ClientEvent__init__— fromvuer.events.ClientEventts— fromvuer.events.Event
ServerEvent
Event sent from the server to the client (browser).
Subclasses must define etype as a class attribute. The __init__
copies self.etype to the instance dict for serialization.
Example::
class MyServerEvent(ServerEvent): etype = "MY_SERVER_EVENT"
def init(self, data): super().init(data)
ServerEvent.init
Inherited members
ts— fromvuer.events.Event
Noop
Noop.init
Inherited members
ts— fromvuer.events.Event
Set
Set Operation (Server Event).
SET Operator is used exclusively to set the root Scene node. Throws an error (on the client side) if the data is not a Scene object.
Set.init
:param data: The data to set.
Inherited members
ts— fromvuer.events.Event
Update
UPDATE Operator is used to update a specific node in the scene graph.
Use "$delete" value for elements you want to remove. Or "$strict" mode to copy the element verbatim.
Example: app.update @ { "key": "my_key", "value": "$delete" }
app.update({ "key": "my_key", "value": "$delete" }, strict=True)
app.update @ [ { "key": "my_key", "value": "$delete" }, ... ]
app.update({ "key": "my_key", "value": "$delete" }, ..., strict=True)
Update.init
Inherited members
ts— fromvuer.events.Event
Add
ADD Operator is used to insert new nodes to the scene graph. By default, it
inserts into the root node, but you can specify a parent node to insert into
via the to argument.
Note: only supports a single parent key right timestamp.
Example: app.add @ Element(...)
app.add @ [ Element(...), Element(...), ... ]
app.add(Element, to="my_parent_key")
app.add([Element, ...], to="my_parent_key")
Add.init
Inherited members
ts— fromvuer.events.Event
Upsert
UPSERT Operator is used to update nodes to new values, when then they do not exist, insert new ones to the scene graph.
Note: only supports a single parent key right timestamp.
Example: app.upsert @ Element(...)
app.upsert @ [ Element(...), Element(...), ... ]
app.upsert(Element, to="my_parent_key")
app.upsert([Element, ...], to="my_parent_key")
Upsert.init
Inherited members
ts— fromvuer.events.Event
Remove
An Update ServerEvent is sent to the client when the server wants to update the client's state. It appends the data sent in the Update ServerEvent to the client's current state.
Remove.init
Inherited members
ts— fromvuer.events.Event
HapticActuatorPulse
Haptic Actuator Pulse event to trigger haptic feedback on the client side.
HapticActuatorPulse.init
Haptic Actuator Pulse event to trigger haptic feedback on the client side.
:param left: Optional dictionary with 'strength' and 'duration' for left actuator. :param right: Optional dictionary with 'strength' and 'duration' for right actuator. :param kwargs: Additional keyword arguments.
Inherited members
ts— fromvuer.events.Event
Frame
A higher-level ServerEvent that wraps other ServerEvents
Frame.init
Frame object returns a NOOP client event, to keep the on_socket generator running at a constant rate.
:param data: :param frame_rate: default to 60, set this for wait time between frames :param kwargs:
Inherited members
ts— fromvuer.events.Event
End
A higher-level ServerEvent that wraps other ServerEvents
End.init
Inherited members
ts— fromvuer.events.Event
ServerRPC
ServerRPC.init
Inherited members
ts— fromvuer.events.Event
GrabRender
A higher-level ServerEvent that wraps other ServerEvents
GrabRender.init
Inherited members
uuid— fromvuer.events.ServerRPCrtype— fromvuer.events.ServerRPCts— fromvuer.events.Event
MjStep
A higher-level ServerEvent that wraps other ServerEvents
MjStep.init
Inherited members
uuid— fromvuer.events.ServerRPCrtype— fromvuer.events.ServerRPCts— fromvuer.events.Event
MjRender
A higher-level ServerEvent that wraps other ServerEvents
MjRender.init
Inherited members
uuid— fromvuer.events.ServerRPCrtype— fromvuer.events.ServerRPCts— fromvuer.events.Event
GetWebXRMesh
Request WebXR mesh data from the client.
This RPC event is used to request real-world mesh detection data from WebXR AR sessions. The client will respond with mesh data including vertices, indices, semantic labels, and transformation matrices.
Example Usage::
Request mesh data from the client
mesh_data = await session.get_webxr_mesh(key="webxr-mesh")
Access the mesh data
for mesh in mesh_data.value['meshes']: vertices = mesh['vertices'] indices = mesh['indices'] semantic_label = mesh.get('semanticLabel') matrix = mesh['matrix']
:param key: The key of the WebXRMesh component to query (default: "webxr-mesh") :param kwargs: Additional keyword arguments
GetWebXRMesh.init
Inherited members
uuid— fromvuer.events.ServerRPCrtype— fromvuer.events.ServerRPCts— fromvuer.events.Event
Public imports
These symbols are available from this module. Their definitions are documented in the linked modules.
Element—vuer.schemas.html_components.ElementScene—vuer.schemas.scene_components.Sceneserializer—vuer.serdes.serializer