Added talkey to texty
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user