diff --git a/Public/AnimeJS Resources/Scripts/Examples/ColorLerpExample.js b/Public/AnimeJS Resources/Scripts/Examples/ColorLerpExample.js index 1dde6e2..349332f 100644 --- a/Public/AnimeJS Resources/Scripts/Examples/ColorLerpExample.js +++ b/Public/AnimeJS Resources/Scripts/Examples/ColorLerpExample.js @@ -20,11 +20,13 @@ var colorA = script.colorA var colorB = script.colorB anime({ + targets: {x: 0}, + x: 1, duration: 1, loop: true, direction: 'alternate', easing: 'linear', update(anim){ - material.mainPass.baseColor = vec4.lerp(colorA, colorB, anim.progress*.01) + material.mainPass.baseColor = vec4.lerp(colorA, colorB, anim.animations[0].currentValue) } })