From 7ba604eb69d140dccdfc8de62857b28512c147bd Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 22 Feb 2026 23:08:41 +0100 Subject: [PATCH] REXM: RENAME: `models_animation_playing` --> `models_loading_iqm` --- examples/Makefile | 2 +- examples/Makefile.Web | 4 ++-- examples/README.md | 2 +- examples/examples_list.txt | 2 +- ...imation_playing.c => models_loading_iqm.c} | 21 ++++++++---------- ...ion_playing.png => models_loading_iqm.png} | Bin ...ing.vcxproj => models_loading_iqm.vcxproj} | 6 ++--- projects/VS2022/raylib.sln | 2 +- 8 files changed, 18 insertions(+), 21 deletions(-) rename examples/models/{models_animation_playing.c => models_loading_iqm.c} (88%) rename examples/models/{models_animation_playing.png => models_loading_iqm.png} (100%) rename projects/VS2022/examples/{models_animation_playing.vcxproj => models_loading_iqm.vcxproj} (99%) diff --git a/examples/Makefile b/examples/Makefile index 40906ebfc..b7c2cee81 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -660,7 +660,7 @@ MODELS = \ models/models_animation_blending \ models/models_animation_bone_blending \ models/models_animation_gpu_skinning \ - models/models_animation_playing \ + models/models_loading_iqm \ models/models_basic_voxel \ models/models_billboard_rendering \ models/models_bone_socket \ diff --git a/examples/Makefile.Web b/examples/Makefile.Web index b91f59267..ce5ee4784 100644 --- a/examples/Makefile.Web +++ b/examples/Makefile.Web @@ -645,7 +645,7 @@ MODELS = \ models/models_animation_blending \ models/models_animation_bone_blending \ models/models_animation_gpu_skinning \ - models/models_animation_playing \ + models/models_loading_iqm \ models/models_basic_voxel \ models/models_billboard_rendering \ models/models_bone_socket \ @@ -1217,7 +1217,7 @@ models/models_animation_gpu_skinning: models/models_animation_gpu_skinning.c --preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \ --preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs -models/models_animation_playing: models/models_animation_playing.c +models/models_loading_iqm: models/models_loading_iqm.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \ --preload-file models/resources/models/iqm/guy.iqm@resources/models/iqm/guy.iqm \ --preload-file models/resources/models/iqm/guytex.png@resources/models/iqm/guytex.png \ diff --git a/examples/README.md b/examples/README.md index 2b8b9dd98..cfd7442ca 100644 --- a/examples/README.md +++ b/examples/README.md @@ -188,7 +188,7 @@ Examples using raylib models functionality, including models loading/generation | example | image | difficulty
level | version
created | last version
updated | original
developer | |-----------|--------|:-------------------:|:------------------:|:-----------------------:|:----------------------| -| [models_animation_playing](models/models_animation_playing.c) | models_animation_playing | ⭐⭐☆☆ | 2.5 | 3.5 | [Culacant](https://github.com/culacant) | +| [models_loading_iqm](models/models_loading_iqm.c) | models_loading_iqm | ⭐⭐☆☆ | 2.5 | 3.5 | [Culacant](https://github.com/culacant) | | [models_billboard_rendering](models/models_billboard_rendering.c) | models_billboard_rendering | ⭐⭐⭐☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | | [models_box_collisions](models/models_box_collisions.c) | models_box_collisions | ⭐☆☆☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | | [models_cubicmap_rendering](models/models_cubicmap_rendering.c) | models_cubicmap_rendering | ⭐⭐☆☆ | 1.8 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | diff --git a/examples/examples_list.txt b/examples/examples_list.txt index 85b997ec4..981636ed8 100644 --- a/examples/examples_list.txt +++ b/examples/examples_list.txt @@ -144,7 +144,7 @@ text;text_codepoints_loading;★★★☆;4.2;4.2;2022;2025;"Ramon Santamaria";@ text;text_inline_styling;★★★☆;5.6-dev;5.6-dev;2025;2025;"Wagner Barongello";@SultansOfCode text;text_words_alignment;★☆☆☆;5.6-dev;5.6-dev;2025;2025;"JP Mortiboys";@themushroompirates text;text_strings_management;★★★☆;5.6-dev;5.6-dev;2025;2025;"David Buzatto";@davidbuzatto -models;models_animation_playing;★★☆☆;2.5;3.5;2019;2025;"Culacant";@culacant +models;models_loading_iqm;★★☆☆;2.5;3.5;2019;2025;"Culacant";@culacant models;models_billboard_rendering;★★★☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5 models;models_box_collisions;★☆☆☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5 models;models_cubicmap_rendering;★★☆☆;1.8;3.5;2015;2025;"Ramon Santamaria";@raysan5 diff --git a/examples/models/models_animation_playing.c b/examples/models/models_loading_iqm.c similarity index 88% rename from examples/models/models_animation_playing.c rename to examples/models/models_loading_iqm.c index fd708b7dd..97d97ad40 100644 --- a/examples/models/models_animation_playing.c +++ b/examples/models/models_loading_iqm.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [models] example - animation playing +* raylib [models] example - loading iqm * * Example complexity rating: [★★☆☆] 2/4 * @@ -33,7 +33,7 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [models] example - animation playing"); + InitWindow(screenWidth, screenHeight, "raylib [models] example - loading iqm"); // Define the camera to look into our 3d world Camera camera = { 0 }; @@ -52,7 +52,7 @@ int main(void) // Load animation data int animsCount = 0; ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animsCount); - int animFrameCounter = 0; + float animFrameCounter = 0; DisableCursor(); // Catch cursor SetTargetFPS(60); // Set our game to run at 60 frames-per-second @@ -63,15 +63,12 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - UpdateCamera(&camera, CAMERA_FIRST_PERSON); + UpdateCamera(&camera, CAMERA_ORBITAL); // Play animation when spacebar is held down - if (IsKeyDown(KEY_SPACE)) - { - animFrameCounter++; - UpdateModelAnimation(model, anims[0], animFrameCounter); - if (animFrameCounter >= anims[0].frameCount) animFrameCounter = 0; - } + animFrameCounter += 1.0f; + UpdateModelAnimation(model, anims[0], animFrameCounter); + if (animFrameCounter >= anims[0].keyframeCount) animFrameCounter = 0; //---------------------------------------------------------------------------------- // Draw @@ -84,9 +81,9 @@ int main(void) DrawModelEx(model, position, (Vector3){ 1.0f, 0.0f, 0.0f }, -90.0f, (Vector3){ 1.0f, 1.0f, 1.0f }, WHITE); - for (int i = 0; i < model.boneCount; i++) + for (int i = 0; i < model.skeleton.boneCount; i++) { - DrawCube(anims[0].framePoses[animFrameCounter][i].translation, 0.2f, 0.2f, 0.2f, RED); + //DrawCube(anims[0].keyframePoses[animFrameCounter][i].translation, 0.2f, 0.2f, 0.2f, RED); } DrawGrid(10, 1.0f); // Draw a grid diff --git a/examples/models/models_animation_playing.png b/examples/models/models_loading_iqm.png similarity index 100% rename from examples/models/models_animation_playing.png rename to examples/models/models_loading_iqm.png diff --git a/projects/VS2022/examples/models_animation_playing.vcxproj b/projects/VS2022/examples/models_loading_iqm.vcxproj similarity index 99% rename from projects/VS2022/examples/models_animation_playing.vcxproj rename to projects/VS2022/examples/models_loading_iqm.vcxproj index 292c45fb6..b5364fc37 100644 --- a/projects/VS2022/examples/models_animation_playing.vcxproj +++ b/projects/VS2022/examples/models_loading_iqm.vcxproj @@ -53,9 +53,9 @@ {AFDDE100-2D36-4749-817D-12E54C56312F} Win32Proj - models_animation_playing + models_loading_iqm 10.0 - models_animation_playing + models_loading_iqm @@ -553,7 +553,7 @@ - + diff --git a/projects/VS2022/raylib.sln b/projects/VS2022/raylib.sln index 873db235b..938f23bf4 100644 --- a/projects/VS2022/raylib.sln +++ b/projects/VS2022/raylib.sln @@ -83,7 +83,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_window_letterbox", "ex EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_world_screen", "examples\core_world_screen.vcxproj", "{79417CE2-FEEB-42F0-BC53-62D5267B19B1}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_playing", "examples\models_animation_playing.vcxproj", "{AFDDE100-2D36-4749-817D-12E54C56312F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_loading_iqm", "examples\models_loading_iqm.vcxproj", "{AFDDE100-2D36-4749-817D-12E54C56312F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_billboard_rendering", "examples\models_billboard_rendering.vcxproj", "{B7812167-50FB-4934-996F-DF6FE4CBBFDF}" EndProject