Skip to content

Commit 7ba604e

Browse files
committed
REXM: RENAME: models_animation_playing --> models_loading_iqm
1 parent fbd83ca commit 7ba604e

8 files changed

Lines changed: 18 additions & 21 deletions

File tree

examples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ MODELS = \
660660
models/models_animation_blending \
661661
models/models_animation_bone_blending \
662662
models/models_animation_gpu_skinning \
663-
models/models_animation_playing \
663+
models/models_loading_iqm \
664664
models/models_basic_voxel \
665665
models/models_billboard_rendering \
666666
models/models_bone_socket \

examples/Makefile.Web

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ MODELS = \
645645
models/models_animation_blending \
646646
models/models_animation_bone_blending \
647647
models/models_animation_gpu_skinning \
648-
models/models_animation_playing \
648+
models/models_loading_iqm \
649649
models/models_basic_voxel \
650650
models/models_billboard_rendering \
651651
models/models_bone_socket \
@@ -1217,7 +1217,7 @@ models/models_animation_gpu_skinning: models/models_animation_gpu_skinning.c
12171217
--preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \
12181218
--preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs
12191219

1220-
models/models_animation_playing: models/models_animation_playing.c
1220+
models/models_loading_iqm: models/models_loading_iqm.c
12211221
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
12221222
--preload-file models/resources/models/iqm/guy.iqm@resources/models/iqm/guy.iqm \
12231223
--preload-file models/resources/models/iqm/guytex.png@resources/models/iqm/guytex.png \

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Examples using raylib models functionality, including models loading/generation
188188

189189
| example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
190190
|-----------|--------|:-------------------:|:------------------:|:-----------------------:|:----------------------|
191-
| [models_animation_playing](models/models_animation_playing.c) | <img src="models/models_animation_playing.png" alt="models_animation_playing" width="80"> | ⭐⭐☆☆ | 2.5 | 3.5 | [Culacant](https://github.com/culacant) |
191+
| [models_loading_iqm](models/models_loading_iqm.c) | <img src="models/models_loading_iqm.png" alt="models_loading_iqm" width="80"> | ⭐⭐☆☆ | 2.5 | 3.5 | [Culacant](https://github.com/culacant) |
192192
| [models_billboard_rendering](models/models_billboard_rendering.c) | <img src="models/models_billboard_rendering.png" alt="models_billboard_rendering" width="80"> | ⭐⭐⭐☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |
193193
| [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐☆☆☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |
194194
| [models_cubicmap_rendering](models/models_cubicmap_rendering.c) | <img src="models/models_cubicmap_rendering.png" alt="models_cubicmap_rendering" width="80"> | ⭐⭐☆☆ | 1.8 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |

examples/examples_list.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ text;text_codepoints_loading;★★★☆;4.2;4.2;2022;2025;"Ramon Santamaria";@
144144
text;text_inline_styling;★★★☆;5.6-dev;5.6-dev;2025;2025;"Wagner Barongello";@SultansOfCode
145145
text;text_words_alignment;★☆☆☆;5.6-dev;5.6-dev;2025;2025;"JP Mortiboys";@themushroompirates
146146
text;text_strings_management;★★★☆;5.6-dev;5.6-dev;2025;2025;"David Buzatto";@davidbuzatto
147-
models;models_animation_playing;★★☆☆;2.5;3.5;2019;2025;"Culacant";@culacant
147+
models;models_loading_iqm;★★☆☆;2.5;3.5;2019;2025;"Culacant";@culacant
148148
models;models_billboard_rendering;★★★☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5
149149
models;models_box_collisions;★☆☆☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5
150150
models;models_cubicmap_rendering;★★☆☆;1.8;3.5;2015;2025;"Ramon Santamaria";@raysan5

examples/models/models_animation_playing.c renamed to examples/models/models_loading_iqm.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************************
22
*
3-
* raylib [models] example - animation playing
3+
* raylib [models] example - loading iqm
44
*
55
* Example complexity rating: [★★☆☆] 2/4
66
*
@@ -33,7 +33,7 @@ int main(void)
3333
const int screenWidth = 800;
3434
const int screenHeight = 450;
3535

36-
InitWindow(screenWidth, screenHeight, "raylib [models] example - animation playing");
36+
InitWindow(screenWidth, screenHeight, "raylib [models] example - loading iqm");
3737

3838
// Define the camera to look into our 3d world
3939
Camera camera = { 0 };
@@ -52,7 +52,7 @@ int main(void)
5252
// Load animation data
5353
int animsCount = 0;
5454
ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animsCount);
55-
int animFrameCounter = 0;
55+
float animFrameCounter = 0;
5656

5757
DisableCursor(); // Catch cursor
5858
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
@@ -63,15 +63,12 @@ int main(void)
6363
{
6464
// Update
6565
//----------------------------------------------------------------------------------
66-
UpdateCamera(&camera, CAMERA_FIRST_PERSON);
66+
UpdateCamera(&camera, CAMERA_ORBITAL);
6767

6868
// Play animation when spacebar is held down
69-
if (IsKeyDown(KEY_SPACE))
70-
{
71-
animFrameCounter++;
72-
UpdateModelAnimation(model, anims[0], animFrameCounter);
73-
if (animFrameCounter >= anims[0].frameCount) animFrameCounter = 0;
74-
}
69+
animFrameCounter += 1.0f;
70+
UpdateModelAnimation(model, anims[0], animFrameCounter);
71+
if (animFrameCounter >= anims[0].keyframeCount) animFrameCounter = 0;
7572
//----------------------------------------------------------------------------------
7673

7774
// Draw
@@ -84,9 +81,9 @@ int main(void)
8481

8582
DrawModelEx(model, position, (Vector3){ 1.0f, 0.0f, 0.0f }, -90.0f, (Vector3){ 1.0f, 1.0f, 1.0f }, WHITE);
8683

87-
for (int i = 0; i < model.boneCount; i++)
84+
for (int i = 0; i < model.skeleton.boneCount; i++)
8885
{
89-
DrawCube(anims[0].framePoses[animFrameCounter][i].translation, 0.2f, 0.2f, 0.2f, RED);
86+
//DrawCube(anims[0].keyframePoses[animFrameCounter][i].translation, 0.2f, 0.2f, 0.2f, RED);
9087
}
9188

9289
DrawGrid(10, 1.0f); // Draw a grid
File renamed without changes.

projects/VS2022/examples/models_animation_playing.vcxproj renamed to projects/VS2022/examples/models_loading_iqm.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
<PropertyGroup Label="Globals">
5454
<ProjectGuid>{AFDDE100-2D36-4749-817D-12E54C56312F}</ProjectGuid>
5555
<Keyword>Win32Proj</Keyword>
56-
<RootNamespace>models_animation_playing</RootNamespace>
56+
<RootNamespace>models_loading_iqm</RootNamespace>
5757
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
58-
<ProjectName>models_animation_playing</ProjectName>
58+
<ProjectName>models_loading_iqm</ProjectName>
5959
</PropertyGroup>
6060
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
6161
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -553,7 +553,7 @@
553553
</PostBuildEvent>
554554
</ItemDefinitionGroup>
555555
<ItemGroup>
556-
<ClCompile Include="..\..\..\examples\models\models_animation_playing.c" />
556+
<ClCompile Include="..\..\..\examples\models\models_loading_iqm.c" />
557557
</ItemGroup>
558558
<ItemGroup>
559559
<ResourceCompile Include="..\..\..\examples\examples.rc" />

projects/VS2022/raylib.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_window_letterbox", "ex
8383
EndProject
8484
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_world_screen", "examples\core_world_screen.vcxproj", "{79417CE2-FEEB-42F0-BC53-62D5267B19B1}"
8585
EndProject
86-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_playing", "examples\models_animation_playing.vcxproj", "{AFDDE100-2D36-4749-817D-12E54C56312F}"
86+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_loading_iqm", "examples\models_loading_iqm.vcxproj", "{AFDDE100-2D36-4749-817D-12E54C56312F}"
8787
EndProject
8888
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_billboard_rendering", "examples\models_billboard_rendering.vcxproj", "{B7812167-50FB-4934-996F-DF6FE4CBBFDF}"
8989
EndProject

0 commit comments

Comments
 (0)