Radial menus / button banks not working with Web SDK

Post questions, comments and feedback to our 3Dconnexion Mac Development Team.

Moderator: Moderators

Post Reply
mirek.burkon
Posts: 9
Joined: Fri Jan 30, 2026 3:42 pm

Radial menus / button banks not working with Web SDK

Post by mirek.burkon »

Hi, I happen to be on Mac (Sequoia 15.7.3), but this issue is primarily related to the Web SDK. I'm implementing SpaceMouse support into my web app, I have 3DxWare v 10.8.11 and 3DxMacCore 1.4.2.604 installed. I'm able to connect to my SpaceMouse and control the camera as needed (although the driver is very unstable and I have to restart 3DconnexionHelper pretty often).

I am unable to use the web SDK to setup and control the radial menus and/or button mappings. This doesn't even work with the supplied samples. These all have some code similar to this:

Code: Select all

        this.on3dmouseCreated = function () {
            const self = this;
            const actionTree = new _3Dconnexion.ActionTree();
            const actionImages = new _3Dconnexion.ImageCache();

            // set ourselves as the timing source for the animation frames
            self.spaceMouse.update3dcontroller({
                frame: { timingSource: 1 },
            });

            actionImages.onload = function () {
                self.spaceMouse.update3dcontroller({
                    images: actionImages.images,
                });
            };

            // An actionset can also be considered to be a buttonbank, a menubar, or a set of toolbars
            // Define a unique string for the action set to be able to specify the active action set
            // Because we only have one action set use the 'Default' action set id to not display the label
            const buttonBank = actionTree.push(
                new _3Dconnexion.ActionSet("Default", "Custom action set")
            );
            getApplicationCommands(buttonBank, actionImages);

            // Expose the commands to 3Dxware and specify the active buttonbank / action set
            self.spaceMouse.update3dcontroller({
                commands: { activeSet: "Default", tree: actionTree },
            });
        };
        
        function getApplicationCommands(buttonBank, images) {
        // Add a couple of categories / menus / tabs to the buttonbank/menubar/toolbar
        // Use the categories to group actions so that the user can find them easily
        const fileNode = buttonBank.push(
            new _3Dconnexion.Category("CAT_ID_FILE", "File")
        );
        const editNode = buttonBank.push(
            new _3Dconnexion.Category("CAT_ID_EDIT", "Edit")
        );

        // Add menu items / actions
        fileNode.push(new _3Dconnexion.Action("ID_OPEN", "Open", "Open file"));
        fileNode.push(
            new _3Dconnexion.Action("ID_CLOSE", "Close", "Close file")
        );
        fileNode.push(
            new _3Dconnexion.Action("ID_EXIT", "Exit", "Exit program")
        );

        // Add menu items / actions
        editNode.push(
            new _3Dconnexion.Action("ID_UNDO", "Undo", "Shortcut is Ctrl + Z")
        );
        editNode.push(
            new _3Dconnexion.Action("ID_REDO", "Redo", "Shortcut is Ctrl + Y")
        );
        editNode.push(
            new _3Dconnexion.Action("ID_CUT", "Cut", "Shortcut is Ctrl + X")
        );
        editNode.push(
            new _3Dconnexion.Action("ID_COPY", "Copy", "Shortcut is Ctrl + C")
        );
        editNode.push(
            new _3Dconnexion.Action("ID_PASTE", "Paste", "Shortcut is Ctrl + V")
        );

        // Now add the images to the cache and associate it with the menu item by using the same id as the menu item / action
        // These images will be shown in the 3Dconnexion properties editor and in the UI elements which display the
        // active button configuration of the 3dmouse
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/open.png", "ID_OPEN")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/close.png", "ID_CLOSE")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/exit.png", "ID_EXIT")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/Macro_Cut.png", "ID_CUT")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/Macro_Copy.png", "ID_COPY")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/Macro_Paste.png", "ID_PASTE")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/Macro_Undo.png", "ID_UNDO")
        );
        images.push(
            _3Dconnexion.ImageItem.fromURL("images/Macro_Redo.png", "ID_REDO")
        );
    }
However, this has zero effect on my Radial Menus. As mentioned, the code doesn't even work with your own examples. For some reason, on my left button I have mapped "RM Tool"s with "OnShape Undo" and "OnShape Redo" in my web app. I do use OnShape, but have no clue how this Menu made it to my app. Resetting to defaults in the System Settings panel also has no effect on this issue.
mirek.burkon
Posts: 9
Joined: Fri Jan 30, 2026 3:42 pm

Re: Radial menus / button banks not working with Web SDK

Post by mirek.burkon »

3DxWare_SDK_v4-0-6_r22071
mirek.burkon
Posts: 9
Joined: Fri Jan 30, 2026 3:42 pm

Re: Radial menus / button banks not working with Web SDK

Post by mirek.burkon »

Here's one such example live where I'd expect custom RMs, but don't see the "File" / "Edit" (defined in code) anywhere: https://3dconnexion.com/technical_suppo ... reejs.html
ngomes
Moderator
Moderator
Posts: 3458
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Radial menus / button banks not working with Web SDK

Post by ngomes »

mirek.burkon wrote: Sat Feb 14, 2026 8:28 pm I am unable to use the web SDK to setup and control the radial menus and/or button mappings.
Perhaps I'm not following you but client applications (web and desktop) cannot control the radial menus. That's very much an end-user feature: only user can create and modify radial menus.

What applications can do is export a set of commands (aka an "action set"), allowing end-users to assign them to a radial menu "slice" or a device button.
Nuno Gomes
mirek.burkon
Posts: 9
Joined: Fri Jan 30, 2026 3:42 pm

Re: Radial menus / button banks not working with Web SDK

Post by mirek.burkon »

Omg, I get it now. I finally found my actions buried under Buttons > Mapping > Exported commands. It'd be nice to be able to define the defaults for my own app. Even if I export app's commands, the default aren't very useful to my users, my exports aren't used as I'd expect. Instead I get some unrelated "blank" buttons that do noting. It seems like a poor design choice, plus for instance, who needs to call OnShape's commands from Blender, etc?
ngomes
Moderator
Moderator
Posts: 3458
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Radial menus / button banks not working with Web SDK

Post by ngomes »

mirek.burkon wrote: Mon Mar 02, 2026 4:23 pm who needs to call OnShape's commands from Blender, etc?
You are asking it rhetorically but we do agree that should not be happening, no.

Our Mac driver has some limitations that we want to get rid of. One is that "global" list of keyboard macros. We do not have this limitation on Windows.
Post Reply