Web app support

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

Moderator: Moderators

Post Reply
bill.coggins
Posts: 2
Joined: Tue Dec 15, 2020 3:13 pm

Web app support

Post by bill.coggins »

I have a web based 3D CAD app that I would like to add support for 3DConnexion devices. I have searched for WebGL, Typescript, and Three.js in the forums with limited success. Could someone point me in the right direction in order to find the information necessary to add support for 3DConnexion devices for a Typescript/Three.js/Angular 3D CAD web app.

Thank you in advance
ngomes
Moderator
Moderator
Posts: 3318
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Web app support

Post by ngomes »

Hi bill.coggins,
bill.coggins wrote: Tue Dec 15, 2020 3:24 pm I have a web based 3D CAD app that I would like to add support for 3DConnexion devices. I have searched for WebGL, Typescript, and Three.js in the forums with limited success.
Sorry for the late reply.

Have a look in the "web" directory of the 3DxWare SDK for Windows. It includes samples (WebGL) and documentation for 3DconnexionJS, a JavaScript framework that can be used to support our products in web programs on the Mac and Windows. Note that end-users will need to have a driver installation (3DxWare 10).
Nuno Gomes
bill.coggins
Posts: 2
Joined: Tue Dec 15, 2020 3:13 pm

Re: Web app support

Post by bill.coggins »

Thx. I did find the web examples and it turns out my problems are more deeply rooted than I knew/know. I have pseudo support through the GamePad API, which I would not recommend. My legacy code really objects to the inclusion of the 3DConnectionJS. A simple import statement breaks the build. I need to get my house in order then try again.
wtcoggins
Posts: 1
Joined: Thu Aug 12, 2021 11:43 am

Re: Web app support

Post by wtcoggins »

I'm baaaaaaccckkk!

Different company, same problem. I'm working on a 3D web app in Typescript. Typescript is not a friend to requirejs, it prefers

Code: Select all

import * as CONNEXION from `../../3dconnexion.min.js`
However when I try this

Code: Select all

let mouse3D = new CONNEXION._3Dconnexion(this)
what I get is a compile error that says is that the _3Dconnexion() call is undefined. So in short, while I can get the code to see and import the 3dconnexion.min.js file it doesn't recognize the code inside the file. Note that I'm doing all of this in a Typescript file, not Javascript and not HTML. Note that I'm making this call from a class instantiation and not a canvas object. What I have a is a class used to capture and manage the user's positioning and orientation and that is where I'm trying to implement this.

Any ideas on how to fix this?
ngomes
Moderator
Moderator
Posts: 3318
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Web app support

Post by ngomes »

wtcoggins wrote: Fri Oct 29, 2021 11:08 am [...] I'm working on a 3D web app in Typescript. Typescript is not a friend to requirejs, it prefers

Code: Select all

import * as CONNEXION from `../../3dconnexion.min.js`
[...]
Any ideas on how to fix this?
We don't have experience with TypeScript but perhaps you can try compiling using the "3Dconnexion.js" file instead of the "minified" "3dconnexion.min.js". You will probably find that other dependencies may be getting in the way, notably Autobahn.js and the fact that we're using WAMP 1.0.
SnowWindSaveYou
Posts: 10
Joined: Sun Jan 09, 2022 8:42 pm

Re: Web app support

Post by SnowWindSaveYou »

did you solve it? same problem
SnowWindSaveYou
Posts: 10
Joined: Sun Jan 09, 2022 8:42 pm

Re: Web app support

Post by SnowWindSaveYou »

Code: Select all

devScripts.js:6523 TypeError: Cannot read properties of undefined (reading 'connect')
    at XMLHttpRequest.xmlhttp.onreadystatechange (3dconnexion.js:236)
already include autobahn in script tag, can you provide a example of use this sdk in nodejs?
Post Reply