Skip to content

Commit

Permalink
working 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed Apr 23, 2024
1 parent ada2618 commit c3c7499
Show file tree
Hide file tree
Showing 8 changed files with 9,670 additions and 5,172 deletions.
20 changes: 19 additions & 1 deletion examples/miniquad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,32 @@ impl Stage {
backface_culling: true,
},
SpineDemo {
atlas_path: "assets/celestial-circus/export/celestial-circus.atlas",
skeleton_path: SpineSkeletonPath::Json("assets/celestial-circus/export/celestial-circus-pro.json"),
animation: "swing",
position: Vec2::new(0., -120.),
scale: 0.2,
skin: None,
backface_culling: true,
},
SpineDemo {
atlas_path: "assets/cloud-pot/export/cloud-pot.atlas",
skeleton_path: SpineSkeletonPath::Json("assets/cloud-pot/export/cloud-pot.json"),
animation: "playing-in-the-rain",
position: Vec2::new(0., -220.),
scale: 0.4,
skin: None,
backface_culling: true,
},
/*SpineDemo {
atlas_path: "assets/dragon/export/dragon.atlas",
skeleton_path: SpineSkeletonPath::Json("assets/dragon/export/dragon-ess.json"),
animation: "flying",
position: Vec2::new(0., -50.),
scale: 0.7,
skin: None,
backface_culling: true,
},
},*/
SpineDemo {
atlas_path: "assets/goblins/export/goblins.atlas",
skeleton_path: SpineSkeletonPath::Json("assets/goblins/export/goblins-pro.json"),
Expand Down
8 changes: 4 additions & 4 deletions src/animation_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ impl TrackEntry {
eventThreshold,
f32
);
c_accessor_mut!(
/*c_accessor_mut!(
/// When the mix percentage ([`mix_time`](`Self::mix_time`) /
/// [`mix_duration`](`Self::mix_duration`)) is less than the `attachment_threshold`,
/// attachment timelines are applied while this animation is being mixed out. Defaults to 0,
Expand All @@ -685,8 +685,8 @@ impl TrackEntry {
set_attachment_threshold,
attachmentThreshold,
f32
);
c_accessor_mut!(
);*/
/*c_accessor_mut!(
/// When the mix percentage ([`mix_time`](`Self::mix_time`) /
/// [`mix_duration`](`Self::mix_duration`)) is less than the `draw_order_threshold`, draw
/// order timelines are applied while this animation is being mixed out. Defaults to 0, so
Expand All @@ -697,7 +697,7 @@ impl TrackEntry {
set_draw_order_threshold,
drawOrderThreshold,
f32
);
);*/
c_accessor_mut!(
/// Seconds when this animation starts, both initially and after looping. Defaults to 0.
///
Expand Down
14 changes: 7 additions & 7 deletions src/bone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
spBone_rotateWorld, spBone_setToSetupPose, spBone_setYDown, spBone_update,
spBone_updateAppliedTransform, spBone_updateWorldTransform,
spBone_updateWorldTransformWith, spBone_worldToLocal, spBone_worldToLocalRotation,
spSkeleton, spTransformMode,
spSkeleton, spInherit,
},
c_interface::{NewFromPtr, SyncPtr},
Skeleton,
Expand Down Expand Up @@ -626,9 +626,9 @@ impl BoneData {
c_accessor_bool!(skin_required, skinRequired);
c_accessor_enum!(
/// The transform mode for how parent world transforms affect this bone.
transform_mode,
transformMode,
TransformMode
set_inherit,
inherit,
Inherit
);
c_accessor_tmp_ptr_optional!(parent, parent, BoneData, spBoneData);
}
Expand Down Expand Up @@ -664,7 +664,7 @@ impl BoneData {
/// The transform mode for how bones are affected by their parents.
///
/// See [`BoneData::transform_mode`].
pub enum TransformMode {
pub enum Inherit {
Normal = 0,
OnlyTranslation = 1,
NoRotationOrReflection = 2,
Expand All @@ -673,8 +673,8 @@ pub enum TransformMode {
Unknown = 99,
}

impl From<spTransformMode> for TransformMode {
fn from(mode: spTransformMode) -> Self {
impl From<spInherit> for Inherit {
fn from(mode: spInherit) -> Self {
match mode {
0 => Self::Normal,
1 => Self::OnlyTranslation,
Expand Down
Loading

0 comments on commit c3c7499

Please sign in to comment.