mirror of
https://github.com/raysan5/raylib.git
synced 2026-08-25 05:38:27 -04:00
Compare commits
4 Commits
aa4cf20eae
...
127e7441da
| Author | SHA1 | Date | |
|---|---|---|---|
| 127e7441da | |||
| 353268b7cf | |||
| 8eb433518d | |||
| 7d4f5f79e7 |
@ -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(
|
||||||
|
|||||||
@ -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 = .{
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user