Blockbench Reference Docs
    Preparing search index...

    Interface BlockbenchEventMap

    interface BlockbenchEventMap {
        add_animation_controller: { state: AnimationController };
        add_animation_controller_animation: { state: AnimationControllerState };
        add_animation_controller_particle: { state: AnimationControllerState };
        add_animation_controller_sound: { state: AnimationControllerState };
        add_animation_controller_transition: { state: AnimationControllerState };
        add_armature: { object: Armature };
        add_armature_bone: { object: ArmatureBone };
        add_bounding_box: { object: BoundingBox };
        add_cube: { object: Cube };
        add_group: { object: Group };
        add_mesh: { object: Mesh };
        add_texture: { texture: Texture };
        add_texture_mesh: { object: TextureMesh };
        added_to_selection: { added: OutlinerElement[] };
        before_closing: {};
        cancel_selection_change: { selection_before: UndoSelectionSave };
        canvas_click: RaycastResult;
        canvas_select: RaycastResult;
        change_active_panel: { last_panel: Panel; panel: Panel };
        change_color: { color: string; secondary?: boolean };
        change_texture_path: { texture: Texture };
        change_view_mode: { previous_view_mode: string; view_mode: string };
        close_project: { on_quit?: boolean; project: ModelProject };
        compile_bedrock_animation: { animation: Animation; json: any };
        compile_bedrock_animation_controller: {
            json: any;
            state: AnimationController;
        };
        compile_bedrock_animation_controller_state: {
            json: any;
            state: AnimationControllerState;
        };
        compile_texture_mcmeta: { mcmeta: any };
        construct_format: { format: ModelFormat };
        construct_model_loader: { loader: ModelLoader };
        convert_format: { format: ModelFormat; old_format: ModelFormat };
        create_session: { peer: Peer; token: string };
        create_undo_save: { aspects: UndoAspects; save: UndoSave };
        delete_format: { format: ModelFormat };
        delete_model_loader: { loader: ModelLoader };
        display_animation_frame: { in_loop: true };
        display_default_pose: { reduced_updates: boolean };
        display_model_stats: { stats: { label: string; value: string | number }[] };
        drop_text: { text: string };
        edit_animation_controller_properties: { state: AnimationController };
        edit_animation_properties: { animation: BBAnimation };
        edit_collection_properties: { collection: Collection };
        edit_layer_properties: { layer: TextureLayerItem };
        finish_edit: { aspects: UndoAspects; message: string };
        finish_selection_change: { aspects: UndoAspects };
        finished_edit: { aspects: UndoAspects; message: string } | { remote: true };
        finished_selection_change: { aspects: UndoAspects };
        flip_node_name: {
            axis: axisNumber;
            node: OutlinerNode;
            original_name?: string;
            pairs: Record<string, string>;
        };
        generate_texture_template: {
            data: { box_uv_templates: any; face_list: any };
            elements: OutlinerElement[];
            options: Record<string, any>;
            resolution_multiplier: number;
            texture: Texture;
        };
        get_face_texture: { element: OutlinerElement; face: Face };
        get_outliner_node_classes: { classes: string[]; node: OutlinerNode };
        group_elements: { object: Group };
        init_edit: { amended: boolean; aspects: UndoAspects; save: UndoSave };
        init_selection_change: { aspects: UndoAspects; save: UndoSelectionSave };
        installed_plugin: { plugin: Plugin };
        interpolate_keyframes: {
            animator: BoneAnimator;
            keyframe_after: BBKeyframe;
            keyframe_before: BBKeyframe;
            t: number;
            time: number;
            use_quaternions: boolean;
        };
        invert_selection: {};
        join_session: { conn: DataConnection };
        load_animation: { animation: Animation; json: any };
        load_animation_controller: {
            animation_controller: AnimationController;
            json: any;
        };
        load_editor_state: { project: ModelProject };
        load_from_recent_project_data: { data: RecentProjectData };
        load_project: { model: any; path: string };
        load_undo_save: { mode: "session"; reference: UndoSave; save: UndoSave };
        loaded_plugin: { plugin: Plugin };
        merge_project: { model: any; path: string };
        new_project: { project: ModelProject };
        open_bar_menu: { menu: BarMenu };
        paste_text: { text: string };
        pre_stack_node_animations: {
            animations: BBAnimation[];
            controller_blend_values?: number;
            in_loop: boolean;
            node: OutlinerNode;
        };
        press_key: {
            capture: () => void;
            event: KeyboardEvent;
            input_in_focus?: HTMLElement;
        };
        process_chat_message: { color: string; text: string };
        quick_save_model: {};
        quit_session: {};
        receive_session_data: { data: any; type: string };
        redo: { entry: UndoEntry };
        register_element_type: { constructor: any; id: string };
        remove_animation: { animations: BBAnimation[] };
        render_frame: {};
        reset_layout: {};
        resize_window: { event?: Event };
        save_editor_state: { project: ModelProject };
        save_project: { model: any; options?: any };
        saved_state_changed: { project: ModelProject; saved: boolean };
        select_all: {};
        select_animation: { animation: BBAnimation };
        select_animation_controller_state: { state: AnimationControllerState };
        select_format: { format: ModelFormat; project: ModelProject };
        select_mode: { mode: Mode };
        select_no_project: {};
        select_preview_scene: { scene: PreviewScene };
        select_project: { project: ModelProject };
        select_texture: { event: Event; texture: Texture };
        send_session_data: { data: any; type: string };
        setup_project: { project: ModelProject };
        timeline_pause: {};
        timeline_play: {};
        undo: { entry: UndoEntry };
        uninstalled_plugin: { plugin: Plugin };
        unloaded_plugin: { plugin: Plugin };
        unselect_all: {};
        unselect_interface: { event: Event };
        unselect_mode: { mode: Mode };
        unselect_preview_scene: { scene: PreviewScene };
        unselect_project: { project: ModelProject };
        update_camera_position: { preview: Preview };
        update_keyframe_selection: void;
        update_pressed_modifier_keys: {
            before: { alt: boolean; ctrl: boolean; shift: boolean };
            event: KeyboardEvent;
            now: { alt: boolean; ctrl: boolean; shift: boolean };
        };
        update_project_resolution: { project: ModelProject };
        update_project_settings: Record<string, any>;
        update_recent_project_data: { data: RecentProjectData };
        update_recent_project_thumbnail: {
            data: RecentProjectData;
            thumbnail: string;
        };
        update_scene_shading: any;
        update_selection: void;
        update_settings: {};
        update_texture_selection: void;
        update_view: UpdateViewOptions;
        user_joins_session: Client;
        user_leaves_session: Client;
    }
    Index

    Properties

    add_animation_controller add_animation_controller_animation add_animation_controller_particle add_animation_controller_sound add_animation_controller_transition add_armature add_armature_bone add_bounding_box add_cube add_group add_mesh add_texture add_texture_mesh added_to_selection before_closing cancel_selection_change canvas_click canvas_select change_active_panel change_color change_texture_path change_view_mode close_project compile_bedrock_animation compile_bedrock_animation_controller compile_bedrock_animation_controller_state compile_texture_mcmeta construct_format construct_model_loader convert_format create_session create_undo_save delete_format delete_model_loader display_animation_frame display_default_pose display_model_stats drop_text edit_animation_controller_properties edit_animation_properties edit_collection_properties edit_layer_properties finish_edit finish_selection_change finished_edit finished_selection_change flip_node_name generate_texture_template get_face_texture get_outliner_node_classes group_elements init_edit init_selection_change installed_plugin interpolate_keyframes invert_selection join_session load_animation load_animation_controller load_editor_state load_from_recent_project_data load_project load_undo_save loaded_plugin merge_project new_project open_bar_menu paste_text pre_stack_node_animations press_key process_chat_message quick_save_model quit_session receive_session_data redo register_element_type remove_animation render_frame reset_layout resize_window save_editor_state save_project saved_state_changed select_all select_animation select_animation_controller_state select_format select_mode select_no_project select_preview_scene select_project select_texture send_session_data setup_project timeline_pause timeline_play undo uninstalled_plugin unloaded_plugin unselect_all unselect_interface unselect_mode unselect_preview_scene unselect_project update_camera_position update_keyframe_selection update_pressed_modifier_keys update_project_resolution update_project_settings update_recent_project_data update_recent_project_thumbnail update_scene_shading update_selection update_settings update_texture_selection update_view user_joins_session user_leaves_session

    Properties

    add_animation_controller: { state: AnimationController }
    add_animation_controller_animation: { state: AnimationControllerState }
    add_animation_controller_particle: { state: AnimationControllerState }
    add_animation_controller_sound: { state: AnimationControllerState }
    add_animation_controller_transition: { state: AnimationControllerState }
    add_armature: { object: Armature }
    add_armature_bone: { object: ArmatureBone }
    add_bounding_box: { object: BoundingBox }
    add_cube: { object: Cube }
    add_group: { object: Group }
    add_mesh: { object: Mesh }
    add_texture: { texture: Texture }
    add_texture_mesh: { object: TextureMesh }
    added_to_selection: { added: OutlinerElement[] }
    before_closing: {}
    cancel_selection_change: { selection_before: UndoSelectionSave }
    canvas_click: RaycastResult
    canvas_select: RaycastResult
    change_active_panel: { last_panel: Panel; panel: Panel }
    change_color: { color: string; secondary?: boolean }
    change_texture_path: { texture: Texture }
    change_view_mode: { previous_view_mode: string; view_mode: string }
    close_project: { on_quit?: boolean; project: ModelProject }
    compile_bedrock_animation: { animation: Animation; json: any }
    compile_bedrock_animation_controller: { json: any; state: AnimationController }
    compile_bedrock_animation_controller_state: {
        json: any;
        state: AnimationControllerState;
    }
    compile_texture_mcmeta: { mcmeta: any }
    construct_format: { format: ModelFormat }
    construct_model_loader: { loader: ModelLoader }
    convert_format: { format: ModelFormat; old_format: ModelFormat }
    create_session: { peer: Peer; token: string }
    create_undo_save: { aspects: UndoAspects; save: UndoSave }
    delete_format: { format: ModelFormat }
    delete_model_loader: { loader: ModelLoader }
    display_animation_frame: { in_loop: true }
    display_default_pose: { reduced_updates: boolean }
    display_model_stats: { stats: { label: string; value: string | number }[] }
    drop_text: { text: string }
    edit_animation_controller_properties: { state: AnimationController }
    edit_animation_properties: { animation: BBAnimation }
    edit_collection_properties: { collection: Collection }
    edit_layer_properties: { layer: TextureLayerItem }
    finish_edit: { aspects: UndoAspects; message: string }
    finish_selection_change: { aspects: UndoAspects }
    finished_edit: { aspects: UndoAspects; message: string } | { remote: true }
    finished_selection_change: { aspects: UndoAspects }
    flip_node_name: {
        axis: axisNumber;
        node: OutlinerNode;
        original_name?: string;
        pairs: Record<string, string>;
    }
    generate_texture_template: {
        data: { box_uv_templates: any; face_list: any };
        elements: OutlinerElement[];
        options: Record<string, any>;
        resolution_multiplier: number;
        texture: Texture;
    }
    get_face_texture: { element: OutlinerElement; face: Face }
    get_outliner_node_classes: { classes: string[]; node: OutlinerNode }
    group_elements: { object: Group }
    init_edit: { amended: boolean; aspects: UndoAspects; save: UndoSave }
    init_selection_change: { aspects: UndoAspects; save: UndoSelectionSave }
    installed_plugin: { plugin: Plugin }
    interpolate_keyframes: {
        animator: BoneAnimator;
        keyframe_after: BBKeyframe;
        keyframe_before: BBKeyframe;
        t: number;
        time: number;
        use_quaternions: boolean;
    }
    invert_selection: {}
    join_session: { conn: DataConnection }
    load_animation: { animation: Animation; json: any }
    load_animation_controller: {
        animation_controller: AnimationController;
        json: any;
    }
    load_editor_state: { project: ModelProject }
    load_from_recent_project_data: { data: RecentProjectData }
    load_project: { model: any; path: string }
    load_undo_save: { mode: "session"; reference: UndoSave; save: UndoSave }
    loaded_plugin: { plugin: Plugin }
    merge_project: { model: any; path: string }
    new_project: { project: ModelProject }
    open_bar_menu: { menu: BarMenu }
    paste_text: { text: string }
    pre_stack_node_animations: {
        animations: BBAnimation[];
        controller_blend_values?: number;
        in_loop: boolean;
        node: OutlinerNode;
    }
    press_key: {
        capture: () => void;
        event: KeyboardEvent;
        input_in_focus?: HTMLElement;
    }
    process_chat_message: { color: string; text: string }
    quick_save_model: {}
    quit_session: {}
    receive_session_data: { data: any; type: string }
    redo: { entry: UndoEntry }
    register_element_type: { constructor: any; id: string }
    remove_animation: { animations: BBAnimation[] }
    render_frame: {}
    reset_layout: {}
    resize_window: { event?: Event }
    save_editor_state: { project: ModelProject }
    save_project: { model: any; options?: any }
    saved_state_changed: { project: ModelProject; saved: boolean }
    select_all: {}
    select_animation: { animation: BBAnimation }
    select_animation_controller_state: { state: AnimationControllerState }
    select_format: { format: ModelFormat; project: ModelProject }
    select_mode: { mode: Mode }
    select_no_project: {}
    select_preview_scene: { scene: PreviewScene }
    select_project: { project: ModelProject }
    select_texture: { event: Event; texture: Texture }
    send_session_data: { data: any; type: string }
    setup_project: { project: ModelProject }
    timeline_pause: {}
    timeline_play: {}
    undo: { entry: UndoEntry }
    uninstalled_plugin: { plugin: Plugin }
    unloaded_plugin: { plugin: Plugin }
    unselect_all: {}
    unselect_interface: { event: Event }
    unselect_mode: { mode: Mode }
    unselect_preview_scene: { scene: PreviewScene }
    unselect_project: { project: ModelProject }
    update_camera_position: { preview: Preview }
    update_keyframe_selection: void
    update_pressed_modifier_keys: {
        before: { alt: boolean; ctrl: boolean; shift: boolean };
        event: KeyboardEvent;
        now: { alt: boolean; ctrl: boolean; shift: boolean };
    }
    update_project_resolution: { project: ModelProject }
    update_project_settings: Record<string, any>
    update_recent_project_data: { data: RecentProjectData }
    update_recent_project_thumbnail: { data: RecentProjectData; thumbnail: string }
    update_scene_shading: any
    update_selection: void
    update_settings: {}
    update_texture_selection: void
    update_view: UpdateViewOptions
    user_joins_session: Client
    user_leaves_session: Client