andreasplesch / aframe-keyframes-component

keyframe interpolation for aframe
https://andreasplesch.github.io/aframe-keyframes-component/examples/basic/
MIT License
4 stars 0 forks source link

Duplicate keys #9

Closed andreasplesch closed 7 years ago

andreasplesch commented 7 years ago

Do not deduplicate . The intention of duplicate keys is to allow for a jump from one end value to a start value. The simplest implementation is to replace duplicates with a minimally larger number, eg.

0, 0.5, 0.5,1 0, 0.5, 0.5000001, 1

Check if there is a THREE.epsilon .

This avoids additional checking in the easing function which is called a lot.

andreasplesch commented 7 years ago

THREE just uses 0, hoping for the best.

andreasplesch commented 7 years ago

in glitch, commit