Skip to content

Conversation

GCodergr
Copy link
Contributor

Added models_animation_playing.odin.odin example which is based on raylib models_animation_playing.c .
The original c example is playable here .

Checklist before submitting:

  • This example has been added to .github/workflows/check.yml (for automatic testing)
  • This example compiles cleanly with flags -vet -strict-style -vet-tabs -disallow-do -warnings-as-errors
  • This example the naming and style convention: https://github.com/odin-lang/examples/wiki/Naming-and-style-convention (exceptions can be made for ports of examples that need to match 1:1 to the original source).
  • By submitting, I understand that this example is made available under these licenses: Public Domain and Odin's BSD-3 license. Only for third-party dependencies are other licenses allowed.

Copy link
Collaborator

@karl-zylinski karl-zylinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. This is a lot nicer out-of-the-box compared to the previous PR!

position := rl.Vector3{ 0.0, 0.0, 0.0 } // Set model position

// Load animation data
animsCount : i32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I missed that 😄 .

if rl.IsKeyDown(.SPACE) {
animFrameCounter += 1
rl.UpdateModelAnimation(model, anims[0], animFrameCounter)
if (animFrameCounter >= anims[0].frameCount) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parens

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C naming convention strikes again 😄 .

@GCodergr
Copy link
Contributor Author

Thanks for the feedback, Karl!

I hope the naming style looks good.

Also, is there a recommended .editorconfig file to help with style conventions? I’m using VS Code for my Odin projects.

@karl-zylinski karl-zylinski merged commit a7488c2 into odin-lang:master Oct 13, 2025
1 check passed
@karl-zylinski
Copy link
Collaborator

Merged, thank you. I don't know about any such vs code file I'm afraid.

@GCodergr GCodergr deleted the feature/examples-raylib-models-animation-playing branch October 13, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants