4 Commits

Author SHA1 Message Date
127e7441da [rshapes] Fix DrawPolyLinesEx() (#6004)
If `innerRadius` is less than 0, it causes the outline to overlap itself and even grow outside of the polygon's bounds when `thick` is greater than `radius`. Clamping `innerRadius` to 0 fixes these problems.
2026-07-23 09:50:11 +02:00
353268b7cf [rmodels] Fix GLTF animation interpolation (#6007) 2026-07-23 09:41:20 +02:00
8eb433518d [build][Zig] Update to raygui 5.0 (#6005) 2026-07-23 09:39:38 +02:00
7d4f5f79e7 [build][Zig] Fix web examples building all the time (#6006) 2026-07-23 09:38:45 +02:00
4 changed files with 8 additions and 10 deletions

View File

@ -719,7 +719,6 @@ fn addExamples(
.shell_file_path = b.path("src/shell.html"), .shell_file_path = b.path("src/shell.html"),
.install_dir = install_dir, .install_dir = install_dir,
}); });
b.getInstallStep().dependOn(emcc_step);
const html_filename = try std.fmt.allocPrint(b.allocator, "{s}.html", .{wasm.name}); const html_filename = try std.fmt.allocPrint(b.allocator, "{s}.html", .{wasm.name});
const emrun_step = emsdk.emrunStep( const emrun_step = emsdk.emrunStep(

View File

@ -12,8 +12,8 @@
.lazy = true, .lazy = true,
}, },
.raygui = .{ .raygui = .{
.url = "git+https://github.com/raysan5/raygui#3b2855842ab578a034f827c38cf8f62c042fc983", .url = "git+https://github.com/raysan5/raygui#3f81e2bd02bf08dcd9d350e8e8b3cf58044d6877",
.hash = "N-V-__8AAHvybwBw1kyBGn0BW_s1RqIpycNjLf_XbE-fpLUF", .hash = "N-V-__8AAPPCmABYkTrLoRGTR6whFQP1bvg7p5vpLsKIcn4G",
.lazy = true, .lazy = true,
}, },
.emsdk = .{ .emsdk = .{

View File

@ -6614,7 +6614,6 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo
cgltf_animation_channel *translate; cgltf_animation_channel *translate;
cgltf_animation_channel *rotate; cgltf_animation_channel *rotate;
cgltf_animation_channel *scale; cgltf_animation_channel *scale;
cgltf_interpolation_type interpolationType;
}; };
struct Channels *boneChannels = (struct Channels *)RL_CALLOC(animations[a].boneCount, sizeof(struct Channels)); struct Channels *boneChannels = (struct Channels *)RL_CALLOC(animations[a].boneCount, sizeof(struct Channels));
@ -6636,8 +6635,6 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo
if (boneIndex == -1) continue; // Animation channel for a node not in the skeleton if (boneIndex == -1) continue; // Animation channel for a node not in the skeleton
boneChannels[boneIndex].interpolationType = animData.channels[j].sampler->interpolation;
if (animData.channels[j].sampler->interpolation != cgltf_interpolation_type_max_enum) if (animData.channels[j].sampler->interpolation != cgltf_interpolation_type_max_enum)
{ {
if (channel.target_path == cgltf_animation_path_type_translation) if (channel.target_path == cgltf_animation_path_type_translation)
@ -6689,7 +6686,7 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo
if (boneChannels[k].translate) if (boneChannels[k].translate)
{ {
if (!GetPoseAtTimeGLTF(boneChannels[k].interpolationType, boneChannels[k].translate->sampler->input, boneChannels[k].translate->sampler->output, time, &translation)) if (!GetPoseAtTimeGLTF(boneChannels[k].translate->sampler->interpolation, boneChannels[k].translate->sampler->input, boneChannels[k].translate->sampler->output, time, &translation))
{ {
TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load translate pose data for bone %s", fileName, bones[k].name); TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load translate pose data for bone %s", fileName, bones[k].name);
} }
@ -6697,7 +6694,7 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo
if (boneChannels[k].rotate) if (boneChannels[k].rotate)
{ {
if (!GetPoseAtTimeGLTF(boneChannels[k].interpolationType, boneChannels[k].rotate->sampler->input, boneChannels[k].rotate->sampler->output, time, &rotation)) if (!GetPoseAtTimeGLTF(boneChannels[k].rotate->sampler->interpolation, boneChannels[k].rotate->sampler->input, boneChannels[k].rotate->sampler->output, time, &rotation))
{ {
TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load rotate pose data for bone %s", fileName, bones[k].name); TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load rotate pose data for bone %s", fileName, bones[k].name);
} }
@ -6705,7 +6702,7 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo
if (boneChannels[k].scale) if (boneChannels[k].scale)
{ {
if (!GetPoseAtTimeGLTF(boneChannels[k].interpolationType, boneChannels[k].scale->sampler->input, boneChannels[k].scale->sampler->output, time, &scale)) if (!GetPoseAtTimeGLTF(boneChannels[k].scale->sampler->interpolation, boneChannels[k].scale->sampler->input, boneChannels[k].scale->sampler->output, time, &scale))
{ {
TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load scale pose data for bone %s", fileName, bones[k].name); TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load scale pose data for bone %s", fileName, bones[k].name);
} }

View File

@ -1260,10 +1260,12 @@ void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Colo
void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float thick, Color color) void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float thick, Color color)
{ {
if (thick <= 0.0f) return;
if (sides < 3) sides = 3; if (sides < 3) sides = 3;
float centralAngle = rotation*DEG2RAD; float centralAngle = rotation*DEG2RAD;
float exteriorAngle = 360.0f/(float)sides*DEG2RAD; float exteriorAngle = 360.0f/(float)sides*DEG2RAD;
float innerRadius = radius - (thick*cosf(DEG2RAD*exteriorAngle/2.0f)); float innerRadius = fmaxf(0.0f, radius - (thick*cosf(DEG2RAD*exteriorAngle/2.0f)));
#if SUPPORT_QUADS_DRAW_MODE #if SUPPORT_QUADS_DRAW_MODE
rlSetTexture(GetShapesTexture().id); rlSetTexture(GetShapesTexture().id);