From 2bfafac90d0f6ca6e0c93c076bcbd9bf24b8f941 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Wed, 28 Oct 2020 21:57:12 +0100 Subject: [PATCH] Sample animations with non linear interpolation --- js/io/formats/gltf.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/io/formats/gltf.js b/js/io/formats/gltf.js index a33244a0..30bf0dca 100644 --- a/js/io/formats/gltf.js +++ b/js/io/formats/gltf.js @@ -18,11 +18,15 @@ function buildAnimationTracks() { // Sampling calculated (molang) values let contains_script for (var kf of keyframes) { + if (kf.interpolation != 'linear') { + contains_script = true; break; + } for (var data_point of kf.data_points) { if (isNaN(data_point.x) || isNaN(data_point.y) || isNaN(data_point.z)) { contains_script = true; break; } } + if (contains_script) break; } if (contains_script) { var last_values;