Struct vtubestudio::data::ItemAnimationControlRequest
source · [−]pub struct ItemAnimationControlRequest {
pub item_instance_id: String,
pub framerate: Option<f64>,
pub frame: Option<i32>,
pub brightness: Option<f64>,
pub opacity: Option<f64>,
pub set_auto_stop_frames: bool,
pub auto_stop_frames: Vec<i32>,
pub set_animation_play_state: bool,
pub animation_play_state: bool,
}
Expand description
Controling items and item animations.
You can control certain aspects of items in the scene. This request allows you to make
items darker (black overlay), change the opacity, and control the animation of animated
items. This request does not work with Live2D items and will return an error of type
ItemAnimationControlUnsupportedItemType
if you try. This can be useful for “reactive
PNG”-type plugins and more.
This request returns ItemAnimationControlResponse
.
Fields
item_instance_id: String
Item instance ID.
framerate: Option<f64>
Frame rate for animated items, clamped between 0.1
and 120
.
frame: Option<i32>
Jump to a specific frame, zero-indexed.
May return an error if the frame index is invalid, or if the item type does not support animation.
brightness: Option<f64>
Brightness.
opacity: Option<f64>
Opacity.
set_auto_stop_frames: bool
Whether to set auto-stop frames.
auto_stop_frames: Vec<i32>
List of frame indices that the animation will automatically stop playing on.
Once the animation reaches one of those frames, it will stop playing and can only
be started again via the API using this request to set the animation play state to
true
.
This only takes effect if set_auto_stop_frames
is true
. You can have a maximum
of 1024 auto-stop frames.
set_animation_play_state: bool
Whether to set the animation play state.
animation_play_state: bool
The animation play state (set to false
to stop the animation).
This only takes effect if set_animation_play_state
is true
.
Trait Implementations
sourceimpl Clone for ItemAnimationControlRequest
impl Clone for ItemAnimationControlRequest
sourcefn clone(&self) -> ItemAnimationControlRequest
fn clone(&self) -> ItemAnimationControlRequest
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for ItemAnimationControlRequest
impl Debug for ItemAnimationControlRequest
sourceimpl Default for ItemAnimationControlRequest
impl Default for ItemAnimationControlRequest
sourcefn default() -> ItemAnimationControlRequest
fn default() -> ItemAnimationControlRequest
sourceimpl<'de> Deserialize<'de> for ItemAnimationControlRequest
impl<'de> Deserialize<'de> for ItemAnimationControlRequest
sourcefn 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>,
sourceimpl PartialEq<ItemAnimationControlRequest> for ItemAnimationControlRequest
impl PartialEq<ItemAnimationControlRequest> for ItemAnimationControlRequest
sourcefn eq(&self, other: &ItemAnimationControlRequest) -> bool
fn eq(&self, other: &ItemAnimationControlRequest) -> bool
sourceimpl Request for ItemAnimationControlRequest
impl Request for ItemAnimationControlRequest
type Response = ItemAnimationControlResponse
type Response = ItemAnimationControlResponse
Response
type for this request.