Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

source function

The element's source.

View as Markdown
import { source } from '@dioramajs/diorama/audio/graph'

The first call takes the element's sound into the graph for good (the browser allows one source per element), so the source goes to the output at once and stays connected; analysers come and go beside it.

function source(
  graph: AudioContext,
  media: HTMLMediaElement,
): MediaElementAudioSourceNode

Parameters

NameTypeDescription
graphAudioContext
mediaHTMLMediaElement

Also exported from @dioramajs/audio/graph.

Defined in packages/audio/src/graph.ts.