what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

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

Moderator: Moderators

Post Reply
SnowWindSaveYou
Posts: 8
Joined: Sun Jan 09, 2022 8:42 pm

what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by SnowWindSaveYou » Tue Jan 11, 2022 4:11 am

hi, i'm trying to integrate it in js,
but the problem is that every times after i refresh page and first time move the space mouse,
the debug log stop at get frustum, and after this log, i can't get any evens reply from sdk by move mouse.

Code: Select all

focus on 
VM178 3dconnexion.min.js:13 update3dmouse 3615011761
VM178 3dconnexion.min.js:13 self.viewport has focus
3dMouse.tsx:407 SpaceMouse- on3dmouseCreated
3dMouse.tsx:411 ƒ (n){"use strict";var t=this;t.debug&&console.log("update3dmouse "+t._3dcontroller);try{if(!t._3dcontroller)throw"exception 3dx_rpc:update: 3dcontroller not initialized";t.session.call("3dx_rpc:update…
VM178 3dconnexion.min.js:13 update3dmouse 3615011761
VM178 3dconnexion.min.js:13 update3dmouse 3615011761
3dMouse.tsx:525 updateScene
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'SGW5AgwbHw96cO1r', 'self:update', '', 'hit.selectionOnly', false]
3dMouse.tsx:504 setSelectionOnly false
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, '3EOwGuYAaMguR8YG', 'self:read', '', 'view.affine']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'TIBaPyWC4P0bRB9c', 'self:read', '', 'coordinateSystem']
3dMouse.tsx:473 getCoordinateSystem
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, '0G4hTqEhCX7jnj5C', 'self:read', '', 'views.front']
3dMouse.tsx:483 getFrontView
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'mi3SZ5Ql0YxnfBdY', 'self:read', '', 'view.perspective']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, '1qNY46TwvmtCkKQc', 'self:read', '', 'view.frustum']
3dMouse.tsx:279 ViewPort getViewFrustum
3dMouse.tsx:284 frustum=[-0.002962134949620803, 0.002962134949620803, -0.002962134949620803, 0.002962134949620803, 0.01, 1000]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'QKTwQ4aJoz0b9ml5', 'self:read', '', 'model.extents']
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'WHJ0uJhgz1rtYA7R', 'self:read', '', 'view.target']
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'KC5gxGWseQvt70ad', 'self:read', '', 'view.affine']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, '832Ezqxd03bZoJL4', 'self:read', '', 'view.perspective']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'A1MjtMZMCJ6tQHPP', 'self:read', '', 'view.frustum']
3dMouse.tsx:279 ViewPort getViewFrustum
3dMouse.tsx:284 frustum=[-0.002962134949620803, 0.002962134949620803, -0.002962134949620803, 0.002962134949620803, 0.01, 1000]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'GZYwM6bp1WHuhOHS', 'self:update', '', 'pivot.position', Array(3)]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'fQZBfALotEiZ9Zks', 'self:update', '', 'pivot.visible', false]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'pMe7TSpVmeUkemjf', 'self:update', '', 'settings.changed', 1]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'gipULtu4QIG6cUp3', 'self:update', '', 'hit.selectionOnly', false]
3dMouse.tsx:504 setSelectionOnly false
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, '4uuuxPV1QeG9iG2Z', 'self:read', '', 'view.affine']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, '4huuzsBOpQfCxZRU', 'self:update', '', 'pivot.position', Array(3)]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'wyqA06kAiu1q1rJg', 'self:update', '', 'pivot.visible', false]
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (6) [2, 'dAeiyhhm1kI0Utzi', 'self:update', '', 'settings.changed', 2]
3dMouse.tsx:566 click
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'tzaNgV0jP5kh9Fz8', 'self:read', '', 'selection.empty']
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'p3TDIC4bJoc259Dh', 'self:read', '', 'view.perspective']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'ow82wxtFcYMPdKjk', 'self:read', '', 'view.affine']
3dMouse.tsx:288 ViewPort getPerspective
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'Vlo9ns1xqliNEKmO', 'self:read', '', 'view.target']
VM178 3dconnexion.min.js:13 3dconnexion:3dcontroller/3615011761
VM178 3dconnexion.min.js:13 (5) [2, 'VvQlyKr2KlSqF89J', 'self:read', '', 'view.frustum']
3dMouse.tsx:279 ViewPort getViewFrustum
3dMouse.tsx:284 frustum=[-0.002962134949620803, 0.002962134949620803, -0.002962134949620803, 0.002962134949620803, 0.01, 1000]

ngomes
Moderator
Moderator
Posts: 2844
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by ngomes » Tue Jan 11, 2022 4:17 am

Is there a way for us to run your program to analyse what is up with that?
Nuno Gomes

SnowWindSaveYou
Posts: 8
Joined: Sun Jan 09, 2022 8:42 pm

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by SnowWindSaveYou » Tue Jan 11, 2022 4:38 am

ngomes wrote:
Tue Jan 11, 2022 4:17 am
Is there a way for us to run your program to analyse what is up with that?
thank you for reply, i just fixed it by a process of elimination...
just a simple grammar problem of js with no error message ,this cost my a day to find it :cry: ...

Code: Select all

//this.getViewMatrix  = myViewPort.getViewMatrix;
// change to below
this.getViewMatrix  = ()=>{return myViewPort.getViewMatrix();}
but actually what a expect output for me bought this mouse is merely a move direction, the 3d space manage is too complex for our program which runs on the server and no much process in browser. is there a simpler way to use it rather than manage a 3d space?

ngomes
Moderator
Moderator
Posts: 2844
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by ngomes » Tue Jan 11, 2022 4:53 am

SnowWindSaveYou wrote:
Tue Jan 11, 2022 4:38 am
is there a simpler way to use it rather than manage a 3d space?
Perhaps the Gamepad API is something you can use.

We developed the 3DconnexionJS framework to ensure the user experience in a web program matched what we have on the desktop but if you're looking for something simpler, then the Gamepad API may be what you're looking for. Note that we can't really help with that API since the implementations vary greatly from browser to browser.

SnowWindSaveYou
Posts: 8
Joined: Sun Jan 09, 2022 8:42 pm

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by SnowWindSaveYou » Tue Jan 11, 2022 7:11 am

ngomes wrote:
Tue Jan 11, 2022 4:53 am
SnowWindSaveYou wrote:
Tue Jan 11, 2022 4:38 am
is there a simpler way to use it rather than manage a 3d space?
Perhaps the Gamepad API is something you can use.

We developed the 3DconnexionJS framework to ensure the user experience in a web program matched what we have on the desktop but if you're looking for something simpler, then the Gamepad API may be what you're looking for. Note that we can't really help with that API since the implementations vary greatly from browser to browser.
so i can't simply get the rotate angle and move direction of space mouse from this sdk?

ngomes
Moderator
Moderator
Posts: 2844
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by ngomes » Tue Jan 11, 2022 7:57 am

SnowWindSaveYou wrote:
Tue Jan 11, 2022 7:11 am
so i can't simply get the rotate angle and move direction of space mouse from this sdk?
You might be able to do so by fixing a camera matrix (always returning the identity matrix, say) and extracting the Euler angles (or axis-angle vector) from it but we don't have code to demo that approach.

SnowWindSaveYou
Posts: 8
Joined: Sun Jan 09, 2022 8:42 pm

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by SnowWindSaveYou » Wed Jan 12, 2022 1:34 am

ngomes wrote:
Tue Jan 11, 2022 7:57 am
SnowWindSaveYou wrote:
Tue Jan 11, 2022 7:11 am
so i can't simply get the rotate angle and move direction of space mouse from this sdk?
You might be able to do so by fixing a camera matrix (always returning the identity matrix, say) and extracting the Euler angles (or axis-angle vector) from it but we don't have code to demo that approach.
thanks for reply, i just tried it,
but the problem is even i fixing the getViewMatrix value, the result of setViewMatrix still not fixed, the motion is aggravate after few times i move space mouse, and i also found that it only execute getViewMatrix once at beginning of the moving, the setViewMatrix i during moving seems like based on some inside sdk state.
what else i need to make fixed?

ngomes
Moderator
Moderator
Posts: 2844
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by ngomes » Wed Jan 12, 2022 2:36 am

SnowWindSaveYou wrote:
Wed Jan 12, 2022 1:34 am
but the problem is even i fixing the getViewMatrix value, the result of setViewMatrix still not fixed,
Try returning an error from the setViewMatrix call (not sure if this feasible from a web program). What you want is having the driver re-querying your program for the matrix (which you will then return identity).

Again, not sure this is feasible on a web program. I know it can be done on a desktop program but the event handling in JS may be asynchronous.

SnowWindSaveYou
Posts: 8
Joined: Sun Jan 09, 2022 8:42 pm

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by SnowWindSaveYou » Wed Jan 12, 2022 3:55 am

ngomes wrote:
Wed Jan 12, 2022 2:36 am
SnowWindSaveYou wrote:
Wed Jan 12, 2022 1:34 am
but the problem is even i fixing the getViewMatrix value, the result of setViewMatrix still not fixed,
Try returning an error from the setViewMatrix call (not sure if this feasible from a web program). What you want is having the driver re-querying your program for the matrix (which you will then return identity).

Again, not sure this is feasible on a web program. I know it can be done on a desktop program but the event handling in JS may be asynchronous.
i don't known is this my miss understanding or this is not feasible for web, i tried to throw a error in setViewMatrix, and then the sdk is stop to reply any messages ( but connection looks still exist)

ngomes
Moderator
Moderator
Posts: 2844
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: what‘s the possible problem of log stop at 'self:read', 'view.frustum'?

Post by ngomes » Wed Jan 12, 2022 4:07 am

SnowWindSaveYou wrote:
Wed Jan 12, 2022 3:55 am
i tried to throw a error in setViewMatrix, and then the sdk is stop to reply any messages ( but connection looks still exist)
Throwing an error won't work, no. In all likelihood, returning an error isn't feasible from a web program (async comms).

Post Reply