Let's try this on the meta driver, see how it feels. 10 frames might be too quick.
IIGGIT4GLZLUM34VTEKORAKZXBGRU4OBOKKXXAVDXQLDK5PCL4LAC
survey_animation = function()
---[[
local minx, miny, maxx, maxy = surface_bounds(Definitions)
local zoom = math.min(App.screen.width/(maxx-minx), App.screen.height/(maxy-miny))
Animating = {
{x=minx, y=miny, w=maxx-minx, h=maxy-miny, zoom=zoom},
{x=Viewport.x, y=Viewport.y, w=Viewport.w, h=Viewport.h, zoom=Viewport.zoom},
}
Viewport.x = -App.screen.width/2
Viewport.y = -App.screen.height/2
Viewport.w = App.screen.width
Viewport.h = App.screen.height
Viewport.zoom = 1.0 --]]
end
{"vy":546,"on.update":802,"add_def_to_menu":640,"maybe_update_key_in_definitions":529,"on.code_change":820,"load_manifest":694,"get_manifest":768,"on.keychord_press":785,"Menu_background_color":611,"Menu_border_color":612,"box_height":680,"Menu_highlight_color":614,"draw_menu_bar":641,"Manifest":769,"tick_spec":660,"Cursor_node":172,"draw_manifest_navigator":677,"Page":475,"B":379,"on.text_input":521,"sx":544,"mouse_cursor":558,"on.code_submit":787,"Mouse_cursor":559,"set_mouse_cursor":562,"initialize_editor":678,"fw_parent":825,"on":1,"fw_app":"driver","schema1_of_y":667,"get_multiple_definitions_from_app":783,"wait_for_response":781,"interpolate_viewport":824,"load_definition":716,"from_viewport":823,"Spawn_point":822,"manifest_navigator_candidates":638,"line_height":365,"on.draw":797,"manifest_index":637,"draw_run_time_error":808,"font":353,"manifest_coord":636,"sy":469,"keychord_press_on_manifest_navigator":765,"on.load_settings":782,"text_input_on_manifest_navigator":634,"scale":712,"draw_cursor":639,"copy_shape":396,"y_of_schema1":364,"table_and_array_both_empty":689,"survey_animation":826,"on.initialize":807,"animate_next":809,"Manifest_navigator":495,"on_text":539,"add_hotkey_to_menu":616,"on.save_settings":742,"delete_definition":673,"animate_next_frame":825,"on_handle":547,"vx":545,"reset_manifest_navigator":772,"Viewport":604,"approximate":579,"load_from_iterator":670,"Menu_command_color":613,"get_definition_from_app":784,"new_definition":821,"surface_bounds":814,"update_editor_box":711,"on.mouse_press":722,"manifest_navigator_up":628,"approximate_up":658,"manifest_navigator_down":635,"draw_ticks":663,"compute_layout":385,"A":713,"Definitions":503,"move_candidate_to_front_of_manifest":632,"Ticks_font":669,"add_thick_line":400,"Surface":422,"Animating":813,"num_lines_for_manifest_navigator":676,"order_of_magnitude":573,"on.key_release":720,"initialize_manifest_navigator":773,"on.mouse_release":721}
{"vy":546,"on.update":802,"add_def_to_menu":640,"maybe_update_key_in_definitions":529,"on.code_change":820,"load_manifest":694,"get_manifest":768,"on.keychord_press":785,"Menu_background_color":611,"Menu_border_color":612,"box_height":680,"Menu_highlight_color":614,"draw_menu_bar":641,"Manifest":769,"tick_spec":660,"Cursor_node":172,"draw_manifest_navigator":677,"Page":475,"B":379,"on.text_input":521,"sx":544,"mouse_cursor":558,"on.code_submit":787,"Mouse_cursor":559,"set_mouse_cursor":562,"initialize_editor":678,"fw_parent":824,"on":1,"fw_app":"driver","schema1_of_y":667,"get_multiple_definitions_from_app":783,"wait_for_response":781,"interpolate_viewport":824,"load_definition":716,"from_viewport":823,"Spawn_point":822,"manifest_navigator_candidates":638,"line_height":365,"on.draw":797,"manifest_index":637,"draw_run_time_error":808,"font":353,"manifest_coord":636,"sy":469,"keychord_press_on_manifest_navigator":765,"on.load_settings":782,"text_input_on_manifest_navigator":634,"scale":712,"draw_cursor":639,"copy_shape":396,"y_of_schema1":364,"table_and_array_both_empty":689,"survey_animation":816,"on.initialize":807,"animate_next":809,"Manifest_navigator":495,"on_text":539,"add_hotkey_to_menu":616,"on.save_settings":742,"delete_definition":673,"animate_next_frame":825,"on_handle":547,"vx":545,"reset_manifest_navigator":772,"Viewport":604,"approximate":579,"load_from_iterator":670,"Menu_command_color":613,"get_definition_from_app":784,"new_definition":821,"surface_bounds":814,"update_editor_box":711,"on.mouse_press":722,"manifest_navigator_up":628,"approximate_up":658,"manifest_navigator_down":635,"draw_ticks":663,"compute_layout":385,"A":713,"Definitions":503,"move_candidate_to_front_of_manifest":632,"Ticks_font":669,"add_thick_line":400,"Surface":422,"Animating":813,"num_lines_for_manifest_navigator":676,"order_of_magnitude":573,"on.key_release":720,"initialize_manifest_navigator":773,"on.mouse_release":721}
animate_next_frame = function(state, dt)
if state.initial == nil then
state.initial = from_viewport(state)
-- once we've checked keys, pollute the keyspace
state.step = 0
state.frame_time = 0
return
end
state.frame_time = state.frame_time + dt
if state.frame_time > 0.01 then
state.frame_time = state.frame_time - 0.01
state.step = state.step+1
interpolate_viewport(state.initial, state, state.step)
B()
end
end
{"vy":546,"on.update":802,"add_def_to_menu":640,"maybe_update_key_in_definitions":529,"on.code_change":820,"load_manifest":694,"get_manifest":768,"on.keychord_press":785,"Menu_background_color":611,"Menu_border_color":612,"box_height":680,"Menu_highlight_color":614,"draw_menu_bar":641,"Manifest":769,"tick_spec":660,"Cursor_node":172,"draw_manifest_navigator":677,"Page":475,"B":379,"on.text_input":521,"sx":544,"mouse_cursor":558,"on.code_submit":787,"Mouse_cursor":559,"set_mouse_cursor":562,"initialize_editor":678,"fw_parent":823,"on":1,"fw_app":"driver","schema1_of_y":667,"get_multiple_definitions_from_app":783,"wait_for_response":781,"interpolate_viewport":824,"load_definition":716,"from_viewport":823,"Spawn_point":822,"manifest_navigator_candidates":638,"line_height":365,"on.draw":797,"manifest_index":637,"draw_run_time_error":808,"font":353,"manifest_coord":636,"sy":469,"keychord_press_on_manifest_navigator":765,"on.load_settings":782,"text_input_on_manifest_navigator":634,"scale":712,"draw_cursor":639,"copy_shape":396,"y_of_schema1":364,"table_and_array_both_empty":689,"survey_animation":816,"on.initialize":807,"animate_next":809,"Manifest_navigator":495,"on_text":539,"add_hotkey_to_menu":616,"on.save_settings":742,"delete_definition":673,"animate_next_frame":817,"on_handle":547,"vx":545,"reset_manifest_navigator":772,"Viewport":604,"approximate":579,"load_from_iterator":670,"Menu_command_color":613,"get_definition_from_app":784,"new_definition":821,"surface_bounds":814,"update_editor_box":711,"on.mouse_press":722,"manifest_navigator_up":628,"approximate_up":658,"manifest_navigator_down":635,"draw_ticks":663,"compute_layout":385,"A":713,"Definitions":503,"move_candidate_to_front_of_manifest":632,"Ticks_font":669,"add_thick_line":400,"Surface":422,"Animating":813,"num_lines_for_manifest_navigator":676,"order_of_magnitude":573,"on.key_release":720,"initialize_manifest_navigator":773,"on.mouse_release":721}
interpolate_viewport = function(initial, final, step)
for k,v in pairs(initial) do
Viewport[k] = (initial[k]*(10-step) + final[k]*step) / 10
end
end
{"vy":546,"on.update":802,"add_def_to_menu":640,"maybe_update_key_in_definitions":529,"on.code_change":820,"load_manifest":694,"get_manifest":768,"on.keychord_press":785,"Menu_background_color":611,"Menu_border_color":612,"box_height":680,"Menu_highlight_color":614,"draw_menu_bar":641,"Manifest":769,"tick_spec":660,"Cursor_node":172,"draw_manifest_navigator":677,"Page":475,"B":379,"on.text_input":521,"sx":544,"mouse_cursor":558,"on.code_submit":787,"Mouse_cursor":559,"set_mouse_cursor":562,"initialize_editor":678,"fw_parent":822,"on":1,"fw_app":"driver","schema1_of_y":667,"get_multiple_definitions_from_app":783,"wait_for_response":781,"load_definition":716,"from_viewport":823,"Spawn_point":822,"manifest_navigator_candidates":638,"line_height":365,"on.draw":797,"manifest_index":637,"draw_run_time_error":808,"font":353,"manifest_coord":636,"sy":469,"keychord_press_on_manifest_navigator":765,"on.load_settings":782,"text_input_on_manifest_navigator":634,"scale":712,"draw_cursor":639,"copy_shape":396,"y_of_schema1":364,"table_and_array_both_empty":689,"survey_animation":816,"on.initialize":807,"animate_next":809,"Manifest_navigator":495,"on_text":539,"add_hotkey_to_menu":616,"on.save_settings":742,"delete_definition":673,"animate_next_frame":817,"on_handle":547,"vx":545,"reset_manifest_navigator":772,"Viewport":604,"approximate":579,"load_from_iterator":670,"Menu_command_color":613,"get_definition_from_app":784,"new_definition":821,"surface_bounds":814,"update_editor_box":711,"on.mouse_press":722,"manifest_navigator_up":628,"approximate_up":658,"manifest_navigator_down":635,"draw_ticks":663,"compute_layout":385,"A":713,"Definitions":503,"move_candidate_to_front_of_manifest":632,"Ticks_font":669,"add_thick_line":400,"Surface":422,"Animating":813,"num_lines_for_manifest_navigator":676,"order_of_magnitude":573,"on.key_release":720,"initialize_manifest_navigator":773,"on.mouse_release":721}
from_viewport = function(state)
local result = {}
for k,v in pairs(state) do
if Viewport[k] then
result[k] = Viewport[k]
end
end
return result
end