I have a hazy plan to animate out while loading data, and then animate back (much faster) to the initial viewport settings once everything is loaded.
KBDGS7PDKMQZTA6U2VLSHKZATFIXYAZJ4O77OTOTAFBPBJLDCPQAC
{"manifest_navigator_down":635,"on.initialize":695,"update_editor_box":711,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"order_of_magnitude":573,"font":353,"manifest_coord":636,"box_height":680,"manifest_index":637,"compute_layout":385,"manifest_navigator_candidates":638,"draw_cursor":639,"add_def_to_menu":640,"Cursor_node":172,"Manifest_navigator":495,"line_height":365,"tick_spec":660,"schema1_of_y":667,"Manifest":494,"fw_parent":734,"load_manifest":694,"fw_app":"driver","get_manifest":706,"load_definition":716,"Definitions":503,"new_definition":681,"on.save_settings":702,"on.load_settings":700,"on":1,"A":713,"table_and_array_both_empty":689,"Menu_command_color":613,"Menu_highlight_color":614,"draw_menu_bar":641,"add_thick_line":400,"copy_shape":396,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"Viewport":604,"Menu_background_color":611,"reset_manifest_navigator":621,"approximate":579,"on_handle":547,"on.draw":565,"approximate_up":658,"--":727,"on.mouse_press":722,"on_text":539,"draw_ticks":663,"Ticks_font":669,"add_hotkey_to_menu":616,"manifest_navigator_up":628,"Animating":726,"initialize_editor":678,"sx":544,"on.text_input":521,"vx":545,"on.mouse_release":721,"maybe_update_key_in_definitions":529,"on.update":731,"delete_definition":673,"on.keychord_press":719,"on.key_release":720,"Surface":422,"sy":469,"on.code_change":734,"Menu_border_color":612,"Page":475,"y_of_schema1":364,"text_input_on_manifest_navigator":634,"load_from_iterator":670,"mouse_cursor":558,"get_definition_from_app":735,"Mouse_cursor":559,"vy":546,"scale":712,"B":379,"set_mouse_cursor":562}
get_definition_from_app = function(name)
live.send_to_app('GET '..name)
local response_string
repeat
love.timer.sleep(0.01)
response_string = live.receive_from_app()
until response_string
return response_string
end
on.code_change = function()
print('code changed')
--[[
Animating = {
step = 0, frame_time = 0,
step_increment = -0.05,
start = Viewport.zoom,
viewport_key = 'zoom',
} --]]
A() -- just in case we edited Page
end
{"on.load_settings":700,"scale":712,"get_manifest":706,"table_and_array_both_empty":689,"Menu_border_color":612,"Definitions":503,"draw_cursor":639,"update_editor_box":711,"on.text_input":521,"Surface":422,"on.draw":565,"font":353,"schema1_of_y":667,"maybe_update_key_in_definitions":529,"y_of_schema1":364,"Menu_command_color":613,"Animating":726,"Menu_highlight_color":614,"initialize_editor":678,"draw_menu_bar":641,"on.keychord_press":719,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"on.mouse_press":722,"load_from_iterator":670,"get_definition_from_app":717,"sx":544,"vx":545,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"box_height":680,"mouse_cursor":558,"manifest_index":637,"vy":546,"manifest_navigator_candidates":638,"set_mouse_cursor":562,"on":1,"draw_ticks":663,"order_of_magnitude":573,"fw_parent":733,"on.initialize":695,"A":713,"Page":475,"Cursor_node":172,"sy":469,"B":379,"on.code_change":734,"tick_spec":660,"fw_app":"driver","on_text":539,"approximate_up":658,"compute_layout":385,"add_thick_line":400,"load_manifest":694,"on.update":731,"Ticks_font":669,"Manifest_navigator":495,"line_height":365,"on.key_release":720,"Mouse_cursor":559,"manifest_coord":636,"copy_shape":396,"load_definition":716,"on_handle":547,"add_def_to_menu":640,"on.mouse_release":721,"--":727,"approximate":579,"Menu_background_color":611,"Viewport":604,"new_definition":681,"Manifest":494,"on.save_settings":702}
on.code_change = function()
print('code changed')
Animating = {
step = 0, frame_time = 0,
step_increment = -0.05,
start = Viewport.zoom,
viewport_key = 'zoom',
}
A() -- just in case we edited Page
end
{"on.load_settings":700,"scale":712,"get_manifest":706,"table_and_array_both_empty":689,"Menu_border_color":612,"Definitions":503,"draw_cursor":639,"update_editor_box":711,"on.text_input":521,"Surface":422,"on.draw":565,"font":353,"schema1_of_y":667,"maybe_update_key_in_definitions":529,"y_of_schema1":364,"Menu_command_color":613,"Animating":726,"Menu_highlight_color":614,"initialize_editor":678,"draw_menu_bar":641,"on.keychord_press":719,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"on.mouse_press":722,"load_from_iterator":670,"get_definition_from_app":717,"sx":544,"vx":545,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"box_height":680,"mouse_cursor":558,"manifest_index":637,"vy":546,"manifest_navigator_candidates":638,"set_mouse_cursor":562,"on":1,"draw_ticks":663,"order_of_magnitude":573,"fw_parent":732,"on.initialize":695,"A":713,"Page":475,"Cursor_node":172,"sy":469,"B":379,"on.code_change":733,"tick_spec":660,"fw_app":"driver","on_text":539,"approximate_up":658,"compute_layout":385,"add_thick_line":400,"load_manifest":694,"on.update":731,"Ticks_font":669,"Manifest_navigator":495,"line_height":365,"on.key_release":720,"Mouse_cursor":559,"manifest_coord":636,"copy_shape":396,"load_definition":716,"on_handle":547,"add_def_to_menu":640,"on.mouse_release":721,"--":727,"approximate":579,"Menu_background_color":611,"Viewport":604,"new_definition":681,"Manifest":494,"on.save_settings":702}
on.code_change = function()
print('code changed')
Animating = {
step = 0, frame_time = 0,
step_increment = -0.02,
start = Viewport.zoom,
viewport_key = 'zoom',
}
A() -- just in case we edited Page
end
{"on.load_settings":700,"scale":712,"get_manifest":706,"table_and_array_both_empty":689,"Menu_border_color":612,"Definitions":503,"draw_cursor":639,"update_editor_box":711,"on.text_input":521,"Surface":422,"on.draw":565,"font":353,"schema1_of_y":667,"maybe_update_key_in_definitions":529,"y_of_schema1":364,"Menu_command_color":613,"Animating":726,"Menu_highlight_color":614,"initialize_editor":678,"draw_menu_bar":641,"on.keychord_press":719,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"on.mouse_press":722,"load_from_iterator":670,"get_definition_from_app":717,"sx":544,"vx":545,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"box_height":680,"mouse_cursor":558,"manifest_index":637,"vy":546,"manifest_navigator_candidates":638,"set_mouse_cursor":562,"on":1,"draw_ticks":663,"order_of_magnitude":573,"fw_parent":731,"on.initialize":695,"A":713,"Page":475,"Cursor_node":172,"sy":469,"B":379,"on.code_change":732,"tick_spec":660,"fw_app":"driver","on_text":539,"approximate_up":658,"compute_layout":385,"add_thick_line":400,"load_manifest":694,"on.update":731,"Ticks_font":669,"Manifest_navigator":495,"line_height":365,"on.key_release":720,"Mouse_cursor":559,"manifest_coord":636,"copy_shape":396,"load_definition":716,"on_handle":547,"add_def_to_menu":640,"on.mouse_release":721,"--":727,"approximate":579,"Menu_background_color":611,"Viewport":604,"new_definition":681,"Manifest":494,"on.save_settings":702}
on.update = function(dt)
if Animating then
Animating.frame_time = Animating.frame_time + dt
print(Animating.frame_time)
if Animating.frame_time > 0.01 then
Animating.frame_time = Animating.frame_time - 0.01
Animating.step = Animating.step+1
if Animating.step >= 10 then
Animating = nil
return
end
Viewport[Animating.viewport_key] = Animating.start + Animating.step * Animating.step_increment
B()
end
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
A()
return
end
end
{"on.load_settings":700,"scale":712,"get_manifest":706,"table_and_array_both_empty":689,"Menu_border_color":612,"Definitions":503,"draw_cursor":639,"update_editor_box":711,"on.text_input":521,"Surface":422,"on.draw":565,"font":353,"schema1_of_y":667,"maybe_update_key_in_definitions":529,"y_of_schema1":364,"Menu_command_color":613,"Animating":726,"Menu_highlight_color":614,"initialize_editor":678,"draw_menu_bar":641,"on.keychord_press":719,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"on.mouse_press":722,"load_from_iterator":670,"get_definition_from_app":717,"sx":544,"vx":545,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"box_height":680,"mouse_cursor":558,"manifest_index":637,"vy":546,"manifest_navigator_candidates":638,"set_mouse_cursor":562,"on":1,"draw_ticks":663,"order_of_magnitude":573,"fw_parent":730,"on.initialize":695,"A":713,"Page":475,"Cursor_node":172,"sy":469,"B":379,"on.code_change":730,"tick_spec":660,"fw_app":"driver","on_text":539,"approximate_up":658,"compute_layout":385,"add_thick_line":400,"load_manifest":694,"on.update":731,"Ticks_font":669,"Manifest_navigator":495,"line_height":365,"on.key_release":720,"Mouse_cursor":559,"manifest_coord":636,"copy_shape":396,"load_definition":716,"on_handle":547,"add_def_to_menu":640,"on.mouse_release":721,"--":727,"approximate":579,"Menu_background_color":611,"Viewport":604,"new_definition":681,"Manifest":494,"on.save_settings":702}
on.code_change = function()
print('code changed')
Animating = {
step = 0, frame_time = 0,
step_increment = -0.1,
start = Viewport.zoom,
viewport_key = 'zoom',
}
A() -- just in case we edited Page
end
{"on.load_settings":700,"scale":712,"get_manifest":706,"table_and_array_both_empty":689,"Menu_border_color":612,"Definitions":503,"draw_cursor":639,"update_editor_box":711,"on.text_input":521,"Surface":422,"on.draw":565,"font":353,"schema1_of_y":667,"maybe_update_key_in_definitions":529,"y_of_schema1":364,"Menu_command_color":613,"Animating":726,"Menu_highlight_color":614,"initialize_editor":678,"draw_menu_bar":641,"on.keychord_press":719,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"on.mouse_press":722,"load_from_iterator":670,"get_definition_from_app":717,"sx":544,"vx":545,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"box_height":680,"mouse_cursor":558,"manifest_index":637,"vy":546,"manifest_navigator_candidates":638,"set_mouse_cursor":562,"on":1,"draw_ticks":663,"order_of_magnitude":573,"fw_parent":729,"on.initialize":695,"A":713,"Page":475,"Cursor_node":172,"sy":469,"B":379,"on.code_change":730,"tick_spec":660,"fw_app":"driver","on_text":539,"approximate_up":658,"compute_layout":385,"add_thick_line":400,"load_manifest":694,"on.update":725,"Ticks_font":669,"Manifest_navigator":495,"line_height":365,"on.key_release":720,"Mouse_cursor":559,"manifest_coord":636,"copy_shape":396,"load_definition":716,"on_handle":547,"add_def_to_menu":640,"on.mouse_release":721,"--":727,"approximate":579,"Menu_background_color":611,"Viewport":604,"new_definition":681,"Manifest":494,"on.save_settings":702}
on.code_change = function()
print('code changed')
Animating = {
step = 0, frame_time = 0,
step_increment = -0.1,
start = Viewport.zoom,
viewport_key = 'zoom',
}
A() -- just in case we edited Page
end
{"font":353,"manifest_navigator_down":635,"scale":712,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"mouse_cursor":558,"Mouse_cursor":559,"manifest_coord":636,"load_definition":716,"manifest_index":637,"set_mouse_cursor":562,"Viewport":604,"on.key_release":720,"initialize_editor":678,"add_def_to_menu":640,"box_height":680,"fw_parent":728,"on.mouse_press":722,"on.save_settings":702,"on.load_settings":700,"on.update":725,"on.keychord_press":719,"table_and_array_both_empty":689,"on.initialize":695,"on":1,"load_manifest":694,"schema1_of_y":667,"draw_ticks":663,"draw_cursor":639,"Manifest_navigator":495,"update_editor_box":711,"approximate":579,"A":713,"line_height":365,"Manifest":494,"approximate_up":658,"on.mouse_release":721,"Ticks_font":669,"Surface":422,"B":379,"vx":545,"vy":546,"get_manifest":706,"add_thick_line":400,"copy_shape":396,"new_definition":681,"--":727,"sy":469,"on_handle":547,"Menu_background_color":611,"order_of_magnitude":573,"Menu_border_color":612,"reset_manifest_navigator":621,"Menu_command_color":613,"manifest_navigator_up":628,"Menu_highlight_color":614,"maybe_update_key_in_definitions":529,"draw_menu_bar":641,"Animating":726,"add_hotkey_to_menu":616,"tick_spec":660,"y_of_schema1":364,"draw_manifest_navigator":677,"text_input_on_manifest_navigator":634,"num_lines_for_manifest_navigator":676,"on.draw":565,"compute_layout":385,"on_text":539,"fw_app":"driver","on.code_change":729,"load_from_iterator":670,"Cursor_node":172,"get_definition_from_app":717,"sx":544,"manifest_navigator_candidates":638,"Definitions":503,"Page":475,"on.text_input":521}
on.code_change = function()
print('code changed')
Animating = {
step = 0,
step_increment = -0.1,
start = Viewport.zoom,
viewport_key = 'zoom',
}
A() -- just in case we edited Page
end
{"font":353,"manifest_navigator_down":635,"scale":712,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"mouse_cursor":558,"Mouse_cursor":559,"manifest_coord":636,"load_definition":716,"manifest_index":637,"set_mouse_cursor":562,"Viewport":604,"on.key_release":720,"initialize_editor":678,"add_def_to_menu":640,"box_height":680,"fw_parent":727,"on.mouse_press":722,"on.save_settings":702,"on.load_settings":700,"on.update":725,"on.keychord_press":719,"table_and_array_both_empty":689,"on.initialize":695,"on":1,"load_manifest":694,"schema1_of_y":667,"draw_ticks":663,"draw_cursor":639,"Manifest_navigator":495,"update_editor_box":711,"approximate":579,"A":713,"line_height":365,"Manifest":494,"approximate_up":658,"on.mouse_release":721,"Ticks_font":669,"Surface":422,"B":379,"vx":545,"vy":546,"get_manifest":706,"add_thick_line":400,"copy_shape":396,"new_definition":681,"--":727,"sy":469,"on_handle":547,"Menu_background_color":611,"order_of_magnitude":573,"Menu_border_color":612,"reset_manifest_navigator":621,"Menu_command_color":613,"manifest_navigator_up":628,"Menu_highlight_color":614,"maybe_update_key_in_definitions":529,"draw_menu_bar":641,"Animating":726,"add_hotkey_to_menu":616,"tick_spec":660,"y_of_schema1":364,"draw_manifest_navigator":677,"text_input_on_manifest_navigator":634,"num_lines_for_manifest_navigator":676,"on.draw":565,"compute_layout":385,"on_text":539,"fw_app":"driver","on.code_change":728,"load_from_iterator":670,"Cursor_node":172,"get_definition_from_app":717,"sx":544,"manifest_navigator_candidates":638,"Definitions":503,"Page":475,"on.text_input":521}
{"font":353,"manifest_navigator_down":635,"scale":712,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"mouse_cursor":558,"Mouse_cursor":559,"manifest_coord":636,"load_definition":716,"manifest_index":637,"set_mouse_cursor":562,"Viewport":604,"on.key_release":720,"initialize_editor":678,"add_def_to_menu":640,"box_height":680,"fw_parent":726,"on.mouse_press":722,"on.save_settings":702,"on.load_settings":700,"on.update":725,"on.keychord_press":719,"table_and_array_both_empty":689,"on.initialize":695,"on":1,"load_manifest":694,"schema1_of_y":667,"draw_ticks":663,"draw_cursor":639,"Manifest_navigator":495,"update_editor_box":711,"approximate":579,"A":713,"line_height":365,"Manifest":494,"approximate_up":658,"on.mouse_release":721,"Ticks_font":669,"Surface":422,"B":379,"vx":545,"vy":546,"get_manifest":706,"add_thick_line":400,"copy_shape":396,"new_definition":681,"--":727,"sy":469,"on_handle":547,"Menu_background_color":611,"order_of_magnitude":573,"Menu_border_color":612,"reset_manifest_navigator":621,"Menu_command_color":613,"manifest_navigator_up":628,"Menu_highlight_color":614,"maybe_update_key_in_definitions":529,"draw_menu_bar":641,"Animating":726,"add_hotkey_to_menu":616,"tick_spec":660,"y_of_schema1":364,"draw_manifest_navigator":677,"text_input_on_manifest_navigator":634,"num_lines_for_manifest_navigator":676,"on.draw":565,"compute_layout":385,"on_text":539,"fw_app":"driver","on.code_change":306,"load_from_iterator":670,"Cursor_node":172,"get_definition_from_app":717,"sx":544,"manifest_navigator_candidates":638,"Definitions":503,"Page":475,"on.text_input":521}
-- set this to enable animation (currently just in the viewport)
Animating = nil
{"font":353,"manifest_navigator_down":635,"scale":712,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"mouse_cursor":558,"Mouse_cursor":559,"manifest_coord":636,"load_definition":716,"manifest_index":637,"set_mouse_cursor":562,"Viewport":604,"on.key_release":720,"initialize_editor":678,"add_def_to_menu":640,"box_height":680,"fw_parent":725,"on.mouse_press":722,"on.save_settings":702,"on.load_settings":700,"on.update":725,"on.keychord_press":719,"table_and_array_both_empty":689,"on.initialize":695,"on":1,"load_manifest":694,"schema1_of_y":667,"draw_ticks":663,"draw_cursor":639,"Manifest_navigator":495,"update_editor_box":711,"approximate":579,"A":713,"line_height":365,"Manifest":494,"approximate_up":658,"on.mouse_release":721,"Ticks_font":669,"Surface":422,"B":379,"vx":545,"vy":546,"get_manifest":706,"add_thick_line":400,"copy_shape":396,"new_definition":681,"sy":469,"on_handle":547,"Menu_background_color":611,"order_of_magnitude":573,"Menu_border_color":612,"reset_manifest_navigator":621,"Menu_command_color":613,"manifest_navigator_up":628,"Menu_highlight_color":614,"maybe_update_key_in_definitions":529,"draw_menu_bar":641,"Animating":726,"add_hotkey_to_menu":616,"tick_spec":660,"y_of_schema1":364,"draw_manifest_navigator":677,"text_input_on_manifest_navigator":634,"num_lines_for_manifest_navigator":676,"on.draw":565,"compute_layout":385,"on_text":539,"fw_app":"driver","on.code_change":306,"load_from_iterator":670,"Cursor_node":172,"get_definition_from_app":717,"sx":544,"manifest_navigator_candidates":638,"Definitions":503,"Page":475,"on.text_input":521}
Animating = nil
on.update = function(dt)
if Animating then
Animating.frame_time = Animating.frame_time + dt
print(Animating.frame_time)
if Animating.frame_time > 0.01 then
Animating.frame_time = Animating.frame_time - 0.01
Animating.step = Animating.step+1
if Animating.step >= 10 then
Animating = nil
return
end
Viewport[Animating.viewport_key] = Animating.start + Animating.step * Animating.step_increment
end
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
A()
return
end
end
{"font":353,"manifest_navigator_down":635,"scale":712,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"mouse_cursor":558,"Mouse_cursor":559,"manifest_coord":636,"load_definition":716,"manifest_index":637,"set_mouse_cursor":562,"Viewport":604,"on.key_release":720,"initialize_editor":678,"add_def_to_menu":640,"box_height":680,"fw_parent":724,"on.mouse_press":722,"on.save_settings":702,"on.load_settings":700,"on.update":725,"on.keychord_press":719,"table_and_array_both_empty":689,"on.initialize":695,"on":1,"load_manifest":694,"schema1_of_y":667,"draw_ticks":663,"draw_cursor":639,"Manifest_navigator":495,"update_editor_box":711,"approximate":579,"A":713,"line_height":365,"Manifest":494,"approximate_up":658,"on.mouse_release":721,"Ticks_font":669,"Surface":422,"B":379,"vx":545,"vy":546,"get_manifest":706,"add_thick_line":400,"copy_shape":396,"new_definition":681,"sy":469,"on_handle":547,"Menu_background_color":611,"order_of_magnitude":573,"Menu_border_color":612,"reset_manifest_navigator":621,"Menu_command_color":613,"manifest_navigator_up":628,"Menu_highlight_color":614,"maybe_update_key_in_definitions":529,"draw_menu_bar":641,"Animating":718,"add_hotkey_to_menu":616,"tick_spec":660,"y_of_schema1":364,"draw_manifest_navigator":677,"text_input_on_manifest_navigator":634,"num_lines_for_manifest_navigator":676,"on.draw":565,"compute_layout":385,"on_text":539,"fw_app":"driver","on.code_change":306,"load_from_iterator":670,"Cursor_node":172,"get_definition_from_app":717,"sx":544,"manifest_navigator_candidates":638,"Definitions":503,"Page":475,"on.text_input":521}
on.update = function(dt)
--[[
if Animating then
Animating.frame_time = Animating.frame_time + dt
print(Animating.frame_time)
if Animating.frame_time > 0.01 then
Animating.frame_time = Animating.frame_time - 0.01
Animating.step = Animating.step+1
if Animating.step >= 10 then
Animating = false
return
end
Viewport[Animating.viewport_key] = Animating.start +
end
return
end
-- ]]
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
A()
return
end
end
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":722,"manifest_coord":636,"on.mouse_release":721,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":719,"Page":475,"add_def_to_menu":640,"on.key_release":720,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":723,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":724,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
on.update = function(dt)
--[[
if Animating then
if Animating.
Viewport[Animating.viewport_key] = Animating
return
end
-- ]]
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
A()
return
end
end
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":722,"manifest_coord":636,"on.mouse_release":721,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":719,"Page":475,"add_def_to_menu":640,"on.key_release":720,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":722,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":723,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":722,"manifest_coord":636,"on.mouse_release":721,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":719,"Page":475,"add_def_to_menu":640,"on.key_release":720,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":721,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":561,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
on.mouse_release = function(x,y, mouse_button)
if Animating then return end
if Pan then
Pan = nil
elseif Move then
Move = nil
elseif Cursor_node then
Cursor_node.show_cursor = true
edit.mouse_release(Cursor_node.editor, x,y, mouse_button)
end
end
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":617,"manifest_coord":636,"on.mouse_release":721,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":719,"Page":475,"add_def_to_menu":640,"on.key_release":720,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":720,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":561,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
on.key_release = function(key)
if Animating then return end
if Move then return end
end
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":617,"manifest_coord":636,"on.mouse_release":554,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":719,"Page":475,"add_def_to_menu":640,"on.key_release":720,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":719,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":561,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
on.keychord_press = function(chord, key)
if Animating then return end
if Move then return end
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":617,"manifest_coord":636,"on.mouse_release":554,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":719,"Page":475,"add_def_to_menu":640,"on.key_release":552,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":718,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":561,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
{"fw_app":"driver","Surface":422,"manifest_navigator_up":628,"on.draw":565,"manifest_navigator_down":635,"vx":545,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"vy":546,"keychord_press_on_manifest_navigator":675,"on_text":539,"text_input_on_manifest_navigator":634,"y_of_schema1":364,"on.mouse_press":617,"manifest_coord":636,"on.mouse_release":554,"manifest_index":637,"sx":544,"manifest_navigator_candidates":638,"on.keychord_press":666,"Page":475,"add_def_to_menu":640,"on.key_release":552,"Viewport":604,"compute_layout":385,"on.code_change":306,"mouse_cursor":558,"Mouse_cursor":559,"initialize_editor":678,"set_mouse_cursor":562,"draw_ticks":663,"tick_spec":660,"order_of_magnitude":573,"on":1,"approximate":579,"sy":469,"draw_cursor":639,"load_definition":716,"approximate_up":658,"A":713,"Ticks_font":669,"Manifest_navigator":495,"B":379,"on.initialize":695,"on.save_settings":702,"on.load_settings":700,"Animating":718,"line_height":365,"table_and_array_both_empty":689,"Manifest":494,"load_manifest":694,"get_manifest":706,"on.text_input":521,"font":353,"Definitions":503,"new_definition":681,"Menu_border_color":612,"Cursor_node":172,"Menu_command_color":613,"add_thick_line":400,"Menu_highlight_color":614,"fw_parent":717,"draw_menu_bar":641,"box_height":680,"add_hotkey_to_menu":616,"scale":712,"copy_shape":396,"draw_manifest_navigator":677,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"reset_manifest_navigator":621,"update_editor_box":711,"on.update":561,"Menu_background_color":611,"load_from_iterator":670,"on_handle":547,"get_definition_from_app":717}
Animating = false
{"Viewport":604,"approximate":579,"sy":469,"vy":546,"Surface":422,"on":1,"Ticks_font":669,"Manifest_navigator":495,"update_editor_box":711,"schema1_of_y":667,"Manifest":494,"y_of_schema1":364,"load_manifest":694,"get_manifest":706,"Menu_highlight_color":614,"draw_menu_bar":641,"add_hotkey_to_menu":616,"Definitions":503,"draw_manifest_navigator":677,"load_definition":716,"reset_manifest_navigator":621,"load_from_iterator":670,"get_definition_from_app":717,"on.save_settings":702,"fw_parent":716,"manifest_navigator_up":628,"fw_app":"driver","manifest_navigator_down":635,"on.draw":565,"delete_definition":673,"copy_shape":396,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"on.mouse_release":554,"on.update":561,"add_def_to_menu":640,"on.keychord_press":666,"draw_cursor":639,"on.mouse_press":617,"Page":475,"sx":544,"vx":545,"on.initialize":695,"new_definition":681,"A":713,"Menu_background_color":611,"on.key_release":552,"approximate_up":658,"B":379,"draw_ticks":663,"tick_spec":660,"on_handle":547,"maybe_update_key_in_definitions":529,"on.load_settings":700,"initialize_editor":678,"mouse_cursor":558,"table_and_array_both_empty":689,"Mouse_cursor":559,"line_height":365,"num_lines_for_manifest_navigator":676,"set_mouse_cursor":562,"box_height":680,"on.text_input":521,"compute_layout":385,"Menu_border_color":612,"Menu_command_color":613,"on.code_change":306,"on_text":539,"scale":712,"manifest_navigator_candidates":638,"Cursor_node":172,"font":353,"order_of_magnitude":573,"add_thick_line":400}
get_definition_from_app = function(name)
live.send_to_app('GET '..name)
local response_string
repeat
print('a')
love.timer.sleep(0.01)
response_string = live.receive_from_app()
until response_string
return response_string
end