()
| 1907 | } |
| 1908 | |
| 1909 | function update_flights() { |
| 1910 | if (!flight_point_cloud_geom) { |
| 1911 | return; |
| 1912 | } |
| 1913 | flight_point_cloud_geom.attributes.position.needsUpdate = true; |
| 1914 | |
| 1915 | for (var i = start_flight_idx; i < end_flight_idx; ++i) { |
| 1916 | |
| 1917 | if (Date.now() > flight_point_start_time[i]) { |
| 1918 | var ease_val = easeOutQuadratic(Date.now() - flight_point_start_time[i], 0, 1, flight_point_end_time[i] - flight_point_start_time[i]); |
| 1919 | |
| 1920 | if (ease_val < 0 || flight_point_speed_changed) { |
| 1921 | ease_val = 0; |
| 1922 | setFlightTimes(i); |
| 1923 | } |
| 1924 | |
| 1925 | var pos = flight_path_splines[i].getPoint(ease_val); |
| 1926 | positions[3 * i + 0] = pos.x; |
| 1927 | positions[3 * i + 1] = pos.y; |
| 1928 | positions[3 * i + 2] = pos.z; |
| 1929 | } |
| 1930 | } |
| 1931 | } |
| 1932 | |
| 1933 | function setFlightTimes(index) { |
| 1934 | var scaling_factor = (flight_point_speed_scaling - flight_point_speed_min_scaling) / (flight_point_speed_max_scaling - flight_point_speed_min_scaling); |
no test coverage detected