PannerNode.hx 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\PannerNode.webidl. Do not edit!
  23. package js.html.audio;
  24. /**
  25. A `PannerNode` always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels!
  26. Documentation [PannerNode](https://developer.mozilla.org/en-US/docs/Web/API/PannerNode) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/PannerNode$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/PannerNode>
  28. **/
  29. @:native("PannerNode")
  30. extern class PannerNode extends AudioNode {
  31. /**
  32. An enumerated value determining which spatialisation algorithm to use to position the audio in 3D space.
  33. **/
  34. var panningModel : PanningModelType;
  35. /**
  36. Represents the horizontal position of the audio in a right-hand cartesian coordinate sytem. The default is 0. While this `AudioParam` cannot be directly changed, its value can be altered using its `AudioParam.value` property. The default is value is 0.
  37. **/
  38. var positionX(default,null) : AudioParam;
  39. /**
  40. Represents the vertical position of the audio in a right-hand cartesian coordinate sytem. The default is 0. While this `AudioParam` cannot be directly changed, its value can be altered using its `AudioParam.value` property. The default is value is 0.
  41. **/
  42. var positionY(default,null) : AudioParam;
  43. /**
  44. Represents the longitudinal (back and forth) position of the audio in a right-hand cartesian coordinate sytem. The default is 0. While this `AudioParam` cannot be directly changed, its value can be altered using its `AudioParam.value` property. The default is value is 0.
  45. **/
  46. var positionZ(default,null) : AudioParam;
  47. /**
  48. Represents the horizontal position of the audio source's vector in a right-hand cartesian coordinate sytem. While this `AudioParam` cannot be directly changed, its value can be altered using its `AudioParam.value` property. The default is value is 1.
  49. **/
  50. var orientationX(default,null) : AudioParam;
  51. /**
  52. Represents the vertical position of the audio source's vector in a right-hand cartesian coordinate sytem. The default is 0. While this `AudioParam` cannot be directly changed, its value can be altered using its `AudioParam.value` property. The default is value is 0.
  53. **/
  54. var orientationY(default,null) : AudioParam;
  55. /**
  56. Represents the longitudinal (back and forth) position of the audio source's vector in a right-hand cartesian coordinate sytem. The default is 0. While this `AudioParam` cannot be directly changed, its value can be altered using its `AudioParam.value` property. The default is value is 0.
  57. **/
  58. var orientationZ(default,null) : AudioParam;
  59. /**
  60. An enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.
  61. **/
  62. var distanceModel : DistanceModelType;
  63. /**
  64. A double value representing the reference distance for reducing volume as the audio source moves further from the listener.
  65. **/
  66. var refDistance : Float;
  67. /**
  68. A double value representing the maximum distance between the audio source and the listener, after which the volume is not reduced any further.
  69. **/
  70. var maxDistance : Float;
  71. /**
  72. A double value describing how quickly the volume is reduced as the source moves away from the listener. This value is used by all distance models.
  73. **/
  74. var rolloffFactor : Float;
  75. /**
  76. Is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction.
  77. **/
  78. var coneInnerAngle : Float;
  79. /**
  80. A double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the `coneOuterGain` attribute.
  81. **/
  82. var coneOuterAngle : Float;
  83. /**
  84. A double value describing the amount of volume reduction outside the cone defined by the `coneOuterAngle` attribute. Its default value is `0`, meaning that no sound can be heard.
  85. **/
  86. var coneOuterGain : Float;
  87. /** @throws DOMError */
  88. function new( context : BaseAudioContext, ?options : PannerOptions ) : Void;
  89. /**
  90. Defines the position of the audio source relative to the listener (represented by an `AudioListener` object stored in the `AudioContext.listener` attribute.)
  91. **/
  92. function setPosition( x : Float, y : Float, z : Float ) : Void;
  93. /**
  94. Defines the direction the audio source is playing in.
  95. **/
  96. function setOrientation( x : Float, y : Float, z : Float ) : Void;
  97. }