|
|
@ -0,0 +1,33 @@ |
|
|
|
import {Component} from 'react'; |
|
|
|
import * as Tone from "tone"; |
|
|
|
|
|
|
|
export default class AudioHandler extends Component { |
|
|
|
|
|
|
|
playTabEarconSonification() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
playTabModelSonification() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
playDetailEarconSonification() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
playDetailModelSonification() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setRotation(angle) { |
|
|
|
Tone.Listener.forwardX.value = Math.sin(angle); |
|
|
|
Tone.Listener.forwardY.value = 0; |
|
|
|
Tone.Listener.forwardZ.value = -Math.cos(angle); |
|
|
|
} |
|
|
|
|
|
|
|
setRotationRamp(panner, angle, rampTime) { |
|
|
|
panner.positionX.rampTo(Math.sin(angle), rampTime); |
|
|
|
panner.positionY.rampTo(0, rampTime); |
|
|
|
panner.positionZ.rampTo(-Math.cos(angle), rampTime); |
|
|
|
} |
|
|
|
} |