pub enum Command {
Show 198 variants
SpawnCube {
position: [f32; 3],
},
SpawnSphere {
position: [f32; 3],
},
SpawnCylinder {
position: [f32; 3],
},
SpawnCone {
position: [f32; 3],
},
SpawnPlane {
position: [f32; 3],
},
SpawnTorus {
position: [f32; 3],
},
SpawnFloor {
half_extent: f32,
},
SpawnGroup {
position: [f32; 3],
},
SpawnModel {
glb: Vec<u8>,
position: [f32; 3],
},
SpawnObject {
shape: Shape,
position: [f32; 3],
scale: [f32; 3],
color: [f32; 4],
body: Body,
},
SetColor {
entity: Ref,
color: [f32; 4],
},
SetMetallicRoughness {
entity: Ref,
metallic: f32,
roughness: f32,
},
SetEmissive {
entity: Ref,
color: [f32; 3],
strength: f32,
},
SetUnlit {
entity: Ref,
unlit: bool,
},
SetTexture {
entity: Ref,
texture: String,
},
SetTextureTiling {
entity: Ref,
repeats: f32,
},
SetNormalTexture {
entity: Ref,
texture: String,
},
SetMetallicRoughnessTexture {
entity: Ref,
texture: String,
},
SetEmissiveTexture {
entity: Ref,
texture: String,
},
SetOcclusionTexture {
entity: Ref,
texture: String,
},
SetPosition {
entity: Ref,
position: [f32; 3],
},
SetScale {
entity: Ref,
scale: [f32; 3],
},
SetRotation {
entity: Ref,
axis: [f32; 3],
radians: f32,
},
Rotate {
entity: Ref,
axis: [f32; 3],
radians: f32,
},
Position {
entity: Ref,
},
SetParent {
child: Ref,
parent: Option<Ref>,
},
SetVisible {
entity: Ref,
visible: bool,
},
Despawn {
entity: Ref,
},
Tag {
entity: Ref,
label: String,
},
Untag {
entity: Ref,
label: String,
},
HasTag {
entity: Ref,
label: String,
},
QueryTagged {
label: String,
},
PointLight {
position: [f32; 3],
color: [f32; 3],
intensity: f32,
},
SpotLight {
position: [f32; 3],
target: [f32; 3],
color: [f32; 3],
intensity: f32,
},
SetSun {
color: [f32; 3],
intensity: f32,
},
SetBackground {
background: Background,
},
ShowGrid {
enabled: bool,
},
SetAmbient {
color: [f32; 4],
},
SetBloom {
enabled: bool,
},
SetBloomIntensity {
intensity: f32,
},
SetSsao {
enabled: bool,
},
SetSsr {
enabled: bool,
},
SetSsgi {
enabled: bool,
},
SetFxaa {
enabled: bool,
},
SetExposure {
exposure: f32,
},
SetColorGrading {
saturation: f32,
contrast: f32,
brightness: f32,
},
SetTimeOfDay {
hour: f32,
},
SetTitle {
title: String,
},
EmitFire {
position: [f32; 3],
},
EmitSmoke {
position: [f32; 3],
},
EmitBurst {
position: [f32; 3],
color: [f32; 4],
count: u32,
},
DrawCube {
position: [f32; 3],
scale: [f32; 3],
color: [f32; 4],
},
DrawSphere {
position: [f32; 3],
radius: f32,
color: [f32; 4],
},
DrawCylinder {
position: [f32; 3],
scale: [f32; 3],
color: [f32; 4],
},
DrawCone {
position: [f32; 3],
scale: [f32; 3],
color: [f32; 4],
},
DrawTorus {
position: [f32; 3],
scale: [f32; 3],
color: [f32; 4],
},
DrawLine {
start: [f32; 3],
end: [f32; 3],
color: [f32; 4],
},
DrawText3d {
text: String,
position: [f32; 3],
},
SpawnLabel {
text: String,
position: [f32; 3],
},
SpawnText {
text: String,
anchor: ScreenAnchor,
},
SetText {
entity: Ref,
text: String,
},
SetTextColor {
entity: Ref,
color: [f32; 4],
},
SetTextSize {
entity: Ref,
size: f32,
},
SpawnPanel {
anchor: ScreenAnchor,
width: f32,
height: f32,
},
PanelLabel {
panel: Ref,
text: String,
},
PanelButton {
panel: Ref,
text: String,
},
ButtonClicked {
button: Ref,
},
ButtonHovered {
button: Ref,
},
DespawnPanel {
panel: Ref,
},
PanelRow {
panel: Ref,
height: f32,
},
PanelGrid {
panel: Ref,
columns: usize,
row_height: f32,
height: f32,
},
PanelScroll {
panel: Ref,
height: f32,
},
SetScrollOffset {
scroll_area: Ref,
offset: f32,
},
SetFocusOrder {
entity: Ref,
order: i32,
},
FocusWidget {
entity: Ref,
},
SpawnPanelAt {
anchor: ScreenAnchor,
offset: [f32; 2],
size: [f32; 2],
color: [f32; 4],
},
PanelText {
parent: Ref,
text: String,
rect: [f32; 4],
font_size: f32,
color: [f32; 4],
align: TextAlignment,
},
PanelBox {
parent: Ref,
offset: [f32; 2],
size: [f32; 2],
color: [f32; 4],
},
PanelButtonAt {
parent: Ref,
label: String,
offset: [f32; 2],
size: [f32; 2],
},
SetPanelRect {
node: Ref,
offset: [f32; 2],
size: [f32; 2],
},
SetPanelColor {
node: Ref,
color: [f32; 4],
},
SetPanelText {
label: Ref,
text: String,
},
SetPanelTextColor {
label: Ref,
color: [f32; 4],
},
SetPanelSelected {
button: Ref,
selected: bool,
accent: [f32; 4],
},
SetPanelVisible {
node: Ref,
visible: bool,
},
PlayAnimation {
entity: Ref,
clip: usize,
},
PlayAnimationNamed {
entity: Ref,
name: String,
},
SetAnimationLooping {
entity: Ref,
looping: bool,
},
SetAnimationSpeed {
entity: Ref,
speed: f32,
},
BlendToAnimation {
entity: Ref,
clip: usize,
seconds: f32,
},
PauseAnimation {
entity: Ref,
},
ResumeAnimation {
entity: Ref,
},
StopAnimation {
entity: Ref,
},
AnimationClips {
entity: Ref,
},
AddAnimationEvent {
entity: Ref,
clip_index: usize,
time: f32,
name: String,
},
AddAnimationEventNamed {
entity: Ref,
clip_name: String,
time: f32,
name: String,
},
SetAnimationLayerWeight {
entity: Ref,
layer_index: usize,
weight: f32,
},
ClearAnimationLayers {
entity: Ref,
},
AimAt {
bone: Ref,
target: [f32; 3],
forward: [f32; 3],
},
OrbitCamera {
focus: [f32; 3],
radius: f32,
},
FlyCamera {
position: [f32; 3],
},
FixedCamera {
eye: [f32; 3],
target: [f32; 3],
},
LookAt {
eye: [f32; 3],
target: [f32; 3],
},
SetOrbitFocus {
focus: [f32; 3],
},
SetOrbitView {
focus: [f32; 3],
radius: f32,
yaw: f32,
pitch: f32,
},
SetOrbitZoom {
enabled: bool,
},
SetFieldOfView {
degrees: f32,
},
SetOrthographic {
half_height: f32,
},
SetPerspective {
degrees: f32,
},
CameraPosition {},
CameraForward {},
FirstPerson {
position: [f32; 3],
},
DeltaTime {},
ElapsedSeconds {},
KeyDown {
key: String,
},
KeyPressed {
key: String,
},
MouseDown {
button: u8,
},
MouseClicked {
button: u8,
},
Wasd {},
PointerOverUi {},
MouseScroll {},
Push {
entity: Ref,
impulse: [f32; 3],
},
SetVelocity {
entity: Ref,
velocity: [f32; 3],
},
ApplyForce {
entity: Ref,
force: [f32; 3],
},
ApplyTorque {
entity: Ref,
torque: [f32; 3],
},
SetAngularVelocity {
entity: Ref,
velocity: [f32; 3],
},
Velocity {
entity: Ref,
},
AngularVelocity {
entity: Ref,
},
MakeSensor {
entity: Ref,
},
OverlapSphere {
center: [f32; 3],
radius: f32,
},
SetCollisionGroups {
entity: Ref,
membership: u32,
filter: u32,
},
SetFriction {
entity: Ref,
friction: f32,
},
SetRestitution {
entity: Ref,
restitution: f32,
},
SetLinearDamping {
entity: Ref,
damping: f32,
},
SetAngularDamping {
entity: Ref,
damping: f32,
},
SetMass {
entity: Ref,
mass: f32,
},
SetGravityScale {
entity: Ref,
scale: f32,
},
BakeNavmesh {},
SpawnWalker {
position: [f32; 3],
},
WalkTo {
agent: Ref,
destination: [f32; 3],
},
SetWalkSpeed {
agent: Ref,
speed: f32,
},
StopWalking {
agent: Ref,
},
ClickedEntity {},
EntityUnderCursor {},
CursorOnGround {},
SpawnWorldPanel {
position: [f32; 3],
width: f32,
height: f32,
color: [f32; 4],
},
WorldPanelButton {
panel: Ref,
x: f32,
y: f32,
width: f32,
height: f32,
color: [f32; 4],
},
WorldPanelLabel {
panel: Ref,
text: String,
x: f32,
y: f32,
},
WorldButtonClicked {
button: Ref,
},
PauseSound {
entity: Ref,
},
ResumeSound {
entity: Ref,
},
FadeVolume {
entity: Ref,
volume: f32,
seconds: f32,
},
Crossfade {
fade_out: Ref,
fade_in: Ref,
volume: f32,
seconds: f32,
},
SetBusVolume {
bus: AudioBus,
decibels: f32,
fade_seconds: f32,
},
DuckVoice {
amount: f32,
fade_seconds: f32,
},
DirectionalLight {
direction: [f32; 3],
color: [f32; 3],
intensity: f32,
},
AreaLight {
position: [f32; 3],
target: [f32; 3],
width: f32,
height: f32,
color: [f32; 3],
intensity: f32,
},
SetLightShadows {
light: Ref,
enabled: bool,
},
EmitSparks {
position: [f32; 3],
},
EmitFirework {
position: [f32; 3],
velocity: [f32; 3],
},
EmitParticles {
position: [f32; 3],
rate: f32,
lifetime: f32,
size: f32,
gravity: [f32; 3],
},
SetAlphaBlend {
entity: Ref,
enabled: bool,
},
SetAlphaCutoff {
entity: Ref,
cutoff: f32,
},
SetDoubleSided {
entity: Ref,
double_sided: bool,
},
SetIor {
entity: Ref,
ior: f32,
},
SetTransmission {
entity: Ref,
factor: f32,
},
SetClearcoat {
entity: Ref,
factor: f32,
roughness: f32,
},
SetAnisotropy {
entity: Ref,
strength: f32,
rotation: f32,
},
SetUvTransform {
entity: Ref,
offset: [f32; 2],
scale: [f32; 2],
rotation: f32,
},
SetSheen {
entity: Ref,
color: [f32; 3],
roughness: f32,
},
SetIridescence {
entity: Ref,
factor: f32,
ior: f32,
},
SetSpecular {
entity: Ref,
factor: f32,
color: [f32; 3],
},
SetNormalScale {
entity: Ref,
scale: f32,
},
SetOcclusionStrength {
entity: Ref,
strength: f32,
},
SetEmissiveStrength {
entity: Ref,
strength: f32,
},
SetThickness {
entity: Ref,
thickness: f32,
},
SetTextOutline {
entity: Ref,
width: f32,
color: [f32; 4],
},
SetMorphWeight {
entity: Ref,
index: u32,
weight: f32,
},
SetWindowTitle {
title: String,
},
LockCursor {
locked: bool,
},
RequestExit {},
SetRenderLayer {
entity: Ref,
layer: u32,
},
SetCameraLayers {
camera: Ref,
mask: u32,
},
ThirdPersonCamera {
target: Ref,
distance: f32,
},
SpawnCloth {
position: [f32; 3],
width: f32,
height: f32,
columns: u32,
rows: u32,
},
ResetCloth {
entity: Ref,
},
SetWind {
direction: [f32; 3],
strength: f32,
},
PauseCutscene {},
ResumeCutscene {},
StopCutscene {},
SeekCutscene {
seconds: f32,
},
SetCutsceneCamera {
camera: Ref,
},
BindCutsceneActor {
name: String,
entity: Ref,
},
SpawnCylinderBody {
position: [f32; 3],
half_height: f32,
radius: f32,
mass: f32,
color: [f32; 4],
},
SpawnCapsuleBody {
position: [f32; 3],
half_height: f32,
radius: f32,
mass: f32,
color: [f32; 4],
},
SetControllerSpeed {
entity: Ref,
speed: f32,
},
SetControllerJump {
entity: Ref,
impulse: f32,
},
IsGrounded {
entity: Ref,
},
}Expand description
One API call as data. Field names and types match the free function it mirrors. Positions, axes, and colors are plain arrays so the wire form is clean json rather than a math library’s internal layout.
Variants§
SpawnCube
SpawnSphere
SpawnCylinder
SpawnCone
SpawnPlane
SpawnTorus
SpawnFloor
SpawnGroup
SpawnModel
SpawnObject
SetColor
SetMetallicRoughness
SetEmissive
SetUnlit
SetTexture
SetTextureTiling
SetNormalTexture
SetMetallicRoughnessTexture
SetEmissiveTexture
SetOcclusionTexture
SetPosition
SetScale
SetRotation
Rotate
Position
SetParent
SetVisible
Despawn
Tag
Untag
HasTag
QueryTagged
PointLight
SpotLight
SetSun
SetBackground
Fields
§
background: BackgroundShowGrid
SetAmbient
SetBloom
SetBloomIntensity
SetSsao
SetSsr
SetSsgi
SetFxaa
SetExposure
SetColorGrading
SetTimeOfDay
SetTitle
EmitFire
EmitSmoke
EmitBurst
DrawCube
DrawSphere
DrawCylinder
DrawCone
DrawTorus
DrawLine
DrawText3d
SpawnLabel
SpawnText
SetText
SetTextColor
SetTextSize
SpawnPanel
PanelLabel
PanelButton
ButtonClicked
Fields
ButtonHovered
Fields
DespawnPanel
PanelRow
PanelGrid
PanelScroll
SetScrollOffset
SetFocusOrder
FocusWidget
SpawnPanelAt
PanelText
PanelBox
PanelButtonAt
SetPanelRect
SetPanelColor
SetPanelText
SetPanelTextColor
SetPanelSelected
SetPanelVisible
PlayAnimation
PlayAnimationNamed
SetAnimationLooping
SetAnimationSpeed
BlendToAnimation
PauseAnimation
ResumeAnimation
StopAnimation
AnimationClips
AddAnimationEvent
AddAnimationEventNamed
SetAnimationLayerWeight
ClearAnimationLayers
AimAt
OrbitCamera
FlyCamera
FixedCamera
LookAt
SetOrbitFocus
SetOrbitView
SetOrbitZoom
SetFieldOfView
SetOrthographic
SetPerspective
CameraPosition
CameraForward
FirstPerson
DeltaTime
ElapsedSeconds
KeyDown
KeyPressed
MouseDown
Fields
MouseClicked
Fields
Wasd
PointerOverUi
MouseScroll
Push
SetVelocity
ApplyForce
ApplyTorque
SetAngularVelocity
Velocity
AngularVelocity
MakeSensor
OverlapSphere
SetCollisionGroups
SetFriction
SetRestitution
SetLinearDamping
SetAngularDamping
SetMass
SetGravityScale
SpawnWalker
WalkTo
SetWalkSpeed
StopWalking
ClickedEntity
EntityUnderCursor
CursorOnGround
SpawnWorldPanel
WorldPanelButton
WorldPanelLabel
WorldButtonClicked
Fields
PauseSound
ResumeSound
FadeVolume
Crossfade
SetBusVolume
DuckVoice
DirectionalLight
AreaLight
SetLightShadows
EmitSparks
EmitFirework
EmitParticles
SetAlphaBlend
SetAlphaCutoff
SetDoubleSided
SetIor
SetTransmission
SetClearcoat
SetAnisotropy
SetUvTransform
SetSheen
SetIridescence
SetSpecular
SetNormalScale
SetOcclusionStrength
SetEmissiveStrength
SetThickness
SetTextOutline
SetMorphWeight
SetWindowTitle
LockCursor
RequestExit
SetRenderLayer
SetCameraLayers
ThirdPersonCamera
SpawnCloth
ResetCloth
SetWind
PauseCutscene
ResumeCutscene
StopCutscene
SeekCutscene
SetCutsceneCamera
BindCutsceneActor
SpawnCylinderBody
SpawnCapsuleBody
SetControllerSpeed
SetControllerJump
IsGrounded
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.