mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
Audio3DManager: accept tuple in setSoundVelocity/setListenerVelocity
This commit is contained in:
parent
d106fd6a3a
commit
6e730a2e95
@ -122,9 +122,11 @@ class Audio3DManager:
|
|||||||
This is relative to the sound root (probably render).
|
This is relative to the sound root (probably render).
|
||||||
Default: VBase3(0, 0, 0)
|
Default: VBase3(0, 0, 0)
|
||||||
"""
|
"""
|
||||||
|
if isinstance(velocity, tuple) and len(velocity) == 3:
|
||||||
|
velocity = VBase3(*velocity)
|
||||||
if not isinstance(velocity, VBase3):
|
if not isinstance(velocity, VBase3):
|
||||||
raise TypeError("Invalid argument 1, expected <VBase3>")
|
raise TypeError("Invalid argument 1, expected <VBase3>")
|
||||||
self.vel_dict[sound]=velocity
|
self.vel_dict[sound] = velocity
|
||||||
|
|
||||||
def setSoundVelocityAuto(self, sound):
|
def setSoundVelocityAuto(self, sound):
|
||||||
"""
|
"""
|
||||||
@ -155,9 +157,11 @@ class Audio3DManager:
|
|||||||
This is relative to the sound root (probably render).
|
This is relative to the sound root (probably render).
|
||||||
Default: VBase3(0, 0, 0)
|
Default: VBase3(0, 0, 0)
|
||||||
"""
|
"""
|
||||||
|
if isinstance(velocity, tuple) and len(velocity) == 3:
|
||||||
|
velocity = VBase3(*velocity)
|
||||||
if not isinstance(velocity, VBase3):
|
if not isinstance(velocity, VBase3):
|
||||||
raise TypeError("Invalid argument 0, expected <VBase3>")
|
raise TypeError("Invalid argument 0, expected <VBase3>")
|
||||||
self.listener_vel=velocity
|
self.listener_vel = velocity
|
||||||
|
|
||||||
def setListenerVelocityAuto(self):
|
def setListenerVelocityAuto(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
------------------------ RELEASE 1.10.1 -----------------------
|
||||||
|
|
||||||
|
* Audio3DManager accepts tuple in setSoundVelocity/setListenerVelocity
|
||||||
|
|
||||||
------------------------ RELEASE 1.10.0 -----------------------
|
------------------------ RELEASE 1.10.0 -----------------------
|
||||||
|
|
||||||
This is a major release with significant changes. Please review the
|
This is a major release with significant changes. Please review the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user