Added talkey to texty

This commit is contained in:
2023-01-22 14:00:30 -08:00
parent 3ee07af4db
commit 6f75e8b7a4
37 changed files with 289 additions and 69 deletions

View File

@ -164,7 +164,7 @@ void RenderPipeline::renderSceneCamera(Scene *scene, Camera *camera) {
std::sort(
shaderPassItems.begin(),
shaderPassItems.end(),
[](struct ShaderPassItem &a, struct ShaderPassItem &b){
[](struct ShaderPassItem &a, struct ShaderPassItem &b) {
if(a.priority == b.priority) {
return a.w < b.w;
}

View File

@ -24,6 +24,19 @@ namespace Dawn {
}
/**
* Sorts internal keyframes by their time to make them conform correctly.
*/
void sortKeyframes() {
std::sort(
this->keyframes.begin(),
this->keyframes.end(),
[](struct SimpleKeyframe<T> &a, struct SimpleKeyframe<T> &b) {
return a.time < b.time;
}
);
}
public:
easefunction_t *easing = &easeLinear;
T *modifies;
@ -54,6 +67,8 @@ namespace Dawn {
this->duration = mathMax<float_t>(this->duration, time);
this->finished = false;
this->keyframes.push_back(keyframe);
if(time < this->duration) this->sortKeyframes();
}
/**