base_ext.ts 578 B

123456789101112131415161718192021222324252627282930313233
  1. function base_ext_init() {
  2. }
  3. function base_ext_render() {
  4. if (context_raw.frame == 2) {
  5. util_render_make_material_preview();
  6. ui_base_hwnds[tab_area_t.SIDEBAR1].redraws = 2;
  7. base_init_undo_layers();
  8. }
  9. if (context_raw.tool == tool_type_t.GIZMO) {
  10. sim_init();
  11. sim_update();
  12. }
  13. }
  14. function base_ext_init_config(raw: config_t) {
  15. }
  16. function base_ext_update() {
  17. if (context_raw.tool == tool_type_t.GIZMO) {
  18. if (keyboard_down("control") && keyboard_started("d")) {
  19. sim_duplicate();
  20. }
  21. if (keyboard_started("delete")) {
  22. sim_delete();
  23. }
  24. }
  25. }