Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/threejs_4_deno/src/audio/Audio.d.ts>Audio

A simple transformation of three.js for use within a Deno workflow
Go to Latest
class Audio
extends Object3D
import { Audio } from "https://deno.land/x/threejs_4_deno@v121/src/audio/Audio.d.ts";

Constructors

new
Audio(listener: AudioListener)

Type Parameters

optional
NodeType extends AudioNode = GainNode

Properties

autoplay: boolean
buffer: null | AudioBuffer
context: AudioContext
detune: number
duration: number | undefined
filters: any[]
gain: GainNode
hasPlaybackControl: boolean
isPlaying: boolean
listener: AudioListener
loop: boolean
loopEnd: number
loopStart: number
offset: number
playbackRate: number
source: null | AudioBufferSourceNode
sourceType: string
type: "Audio"

Methods

connect(): this
disconnect(): this
getDetune(): number
getFilter(): any
getFilters(): any[]
getLoop(): boolean
getPlaybackRate(): number
getVolume(): number
deprecated
load(file: string): Audio
onEnded(): void
pause(): this
play(delay?: number): this
setBuffer(audioBuffer: AudioBuffer): this
setDetune(value: number): this
setFilter(filter: any): this
setFilters(value: any[]): this
setLoop(value: boolean): this
setLoopEnd(value: number): this
setLoopStart(value: number): this
setMediaElementSource(mediaElement: HTMLMediaElement): this
setMediaStreamSource(mediaStream: MediaStream): this
setNodeSource(audioNode: AudioBufferSourceNode): this
setPlaybackRate(value: number): this
setVolume(value: number): this
stop(): this