mirror of
https://github.com/raysan5/raylib.git
synced 2026-11-25 09:01:47 -05:00
Compare commits
4 Commits
a6b2af8340
...
01b1c1c7a4
| Author | SHA1 | Date | |
|---|---|---|---|
| 01b1c1c7a4 | |||
| 20a738b64a | |||
| 54a3e96b45 | |||
| a291e2437f |
3355
src/external/miniaudio.h
vendored
3355
src/external/miniaudio.h
vendored
File diff suppressed because it is too large
Load Diff
@ -1710,8 +1710,8 @@ static EM_BOOL EmscriptenMouseWheelCallback(int eventType, const EmscriptenWheel
|
||||
if (wheelEvent->deltaMode == DOM_DELTA_LINE) wheelScale = 1.0f/3.0f;
|
||||
else if (wheelEvent->deltaMode == DOM_DELTA_PAGE) wheelScale = 80.0f;
|
||||
|
||||
CORE.Input.Mouse.currentWheelMove.x = (float)wheelEvent->deltaX*wheelScale;
|
||||
CORE.Input.Mouse.currentWheelMove.y = -(float)wheelEvent->deltaY*wheelScale;
|
||||
CORE.Input.Mouse.currentWheelMove.x -= (float)wheelEvent->deltaX*wheelScale;
|
||||
CORE.Input.Mouse.currentWheelMove.y -= (float)wheelEvent->deltaY*wheelScale;
|
||||
}
|
||||
|
||||
return 1; // The event was consumed by the callback handler
|
||||
|
||||
@ -2587,7 +2587,7 @@ static void UpdateModelAnimationVertexBuffers(Model model)
|
||||
if ((mesh->normals != NULL) && (mesh->animNormals != NULL ))
|
||||
{
|
||||
animNormal = (Vector3){ mesh->normals[vCounter], mesh->normals[vCounter + 1], mesh->normals[vCounter + 2] };
|
||||
animNormal = Vector3Transform(animNormal, MatrixTranspose(MatrixInvert(model.boneMatrices[boneIndex])));
|
||||
animNormal = Vector3Transform(animNormal, boneNormalMatrices[boneIndex]);
|
||||
mesh->animNormals[vCounter] += animNormal.x*boneWeight;
|
||||
mesh->animNormals[vCounter + 1] += animNormal.y*boneWeight;
|
||||
mesh->animNormals[vCounter + 2] += animNormal.z*boneWeight;
|
||||
|
||||
@ -79,11 +79,6 @@
|
||||
static Texture2D texShapes = { 1, 1, 1, 1, 7 }; // Texture used on shapes drawing (white pixel loaded by rlgl)
|
||||
static Rectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rectangle used on shapes drawing
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Internal Functions Declaration
|
||||
//----------------------------------------------------------------------------------
|
||||
static float EaseCubicInOut(float t, float b, float c, float d); // Cubic easing
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
@ -237,10 +232,17 @@ void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
||||
|
||||
for (int i = 1; i <= SPLINE_SEGMENT_DIVISIONS; i++)
|
||||
{
|
||||
current.x = previous.x + (endPos.x - startPos.x)/(float)SPLINE_SEGMENT_DIVISIONS;
|
||||
|
||||
// Cubic easing in-out
|
||||
// NOTE: Easing is calculated only for y position value
|
||||
current.y = EaseCubicInOut((float)i, startPos.y, endPos.y - startPos.y, (float)SPLINE_SEGMENT_DIVISIONS);
|
||||
current.x = previous.x + (endPos.x - startPos.x)/(float)SPLINE_SEGMENT_DIVISIONS;
|
||||
float t = (float)i/(0.5f*(float)SPLINE_SEGMENT_DIVISIONS);
|
||||
if (t < 1.0f) current.y = 0.5f*(endPos.y - startPos.y)*t*t*t + startPos.y;
|
||||
else
|
||||
{
|
||||
t -= 2.0f;
|
||||
current.y = 0.5f*(endPos.y - startPos.y)*(t*t*t + 2.0f) + startPos.y;
|
||||
}
|
||||
|
||||
float dy = current.y - previous.y;
|
||||
float dx = current.x - previous.x;
|
||||
@ -4546,24 +4548,4 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
|
||||
return overlap;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Internal Functions Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Cubic easing in-out
|
||||
// NOTE: Used by DrawLineBezier() only
|
||||
static float EaseCubicInOut(float t, float b, float c, float d)
|
||||
{
|
||||
float result = 0.0f;
|
||||
t /= 0.5f*d;
|
||||
if (t < 1) result = 0.5f*c*t*t*t + b;
|
||||
else
|
||||
{
|
||||
t -= 2;
|
||||
result = 0.5f*c*(t*t*t + 2.0f) + b;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // SUPPORT_MODULE_RSHAPES
|
||||
|
||||
Reference in New Issue
Block a user