You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. Love the library - think it's my favourite way of doing web audio. But... I'm having a little trouble with 3D sound, in particular rotating the listener position, representing turning the player around, etc.
From looking at the example, it's very Thre.JS specific. However, the reason I came to sono was that I found Three.js a bit too heavy for just doing simple 3D sound in the web when you're not using any visuals. So I've been trying to crack it without it. I think when I understand this all a bit more I might try upping the documentation of it a bit.
So far, I've been minorly successful making a sound pan from left to right when I rotate, except the jump is huge and it doesn't go all the way around for some reason. I think my maths is wrong here.
Here's what I have, with pov being an instance of my PointOfView class.
/** The orientation X direction of the POV */
OrientationX: number/** The orientation Y direction of the POV */
OrientationY: number/** The orientation Z direction of the POV */
OrientationZ: numberrotateLeft(degrees: number){this.OrientationX-=degrees*Math.PI/180sono.panner.setListenerOrientation(this.OrientationX,this.OrientationY,this.OrientationZ)}rotateRight(degrees: number){this.OrientationX+=degrees*Math.PI/180sono.panner.setListenerOrientation(this.OrientationX,this.OrientationY,this.OrientationZ)}
Am I even close?
Sorry if this isn't the right forum to ask questions on library use, happy to move it if needs be.
The text was updated successfully, but these errors were encountered:
Hi there. Love the library - think it's my favourite way of doing web audio. But... I'm having a little trouble with 3D sound, in particular rotating the listener position, representing turning the player around, etc.
From looking at the example, it's very Thre.JS specific. However, the reason I came to sono was that I found Three.js a bit too heavy for just doing simple 3D sound in the web when you're not using any visuals. So I've been trying to crack it without it. I think when I understand this all a bit more I might try upping the documentation of it a bit.
So far, I've been minorly successful making a sound pan from left to right when I rotate, except the jump is huge and it doesn't go all the way around for some reason. I think my maths is wrong here.
Here's what I have, with pov being an instance of my PointOfView class.
In index.ts:
And in PointOfView class I have:
Am I even close?
Sorry if this isn't the right forum to ask questions on library use, happy to move it if needs be.
The text was updated successfully, but these errors were encountered: