
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
visualiser.js
Advanced tools
An audio visualiser interface & plugin system.
Visualiser.js is an ES6 Module, so you can
import Visualiser from './visualiser/Visualiser.js'
const visualiser = new Visualiser({width: 1920, height: 1080})
and you're almost up and running!
Visualiser.js runs plugins (think 'visual components') on layers (think like photoshop). These layers have to be defined as 2D or 3D content and is done like so
import { default as Visualiser, Layer2D, Layer3D } from './visualiser/Visualiser.js'
import Bar from './plugins/Bar.js'
const width = 1920
const height = 1080
const visualiser = new Visualiser({width, height})
const layer = new Layer2D({width, height})
visualiser.addLayer(layer)
const bar = new Bar({width, height, color: '#FF897E'})
layer.addPlugin(bar)
Now you have a visualiser that will actually make something when fed an audio source, but first it must be added to the page
document.body.appendChild(visualiser.canvas)
and fed some audio!
const audioElement = document.createElement('audio')
const source = visualiser.audioElementToSource(audioElement);
visualiser.connectAudioSource(source);
audioElement.src = 'audio.webm'
audioElement.play()
but you might notice the nothing happens, this is due to the web browser blocking auto-playing audio. This is a great thing but means we must wait for user interaction using window.addEventListener
<script type="module">
import { default as Visualiser, Layer2D, Layer3D } from './visualiser/Visualiser.js'
import Bar from './plugins/Bar.js'
const width = 1920
const height = 1080
const audioPath = 'audio.webm'
window.addEventListener('click', ()=>{
const visualiser = new Visualiser({width, height})
const layer = new Layer2D({width, height})
visualiser.addLayer(layer)
const bar = new Bar({width, height, color: '#FF897E'})
layer.addPlugin(bar)
document.body.appendChild(visualiser.canvas)
const audioElement = document.createElement('audio')
const source = visualiser.audioElementToSource(audioElement);
visualiser.connectAudioSource(source);
audioElement.src = audioPath
audioElement.play()
}, {once: true})
</script>
FAQs
An audio visualiser interface & plugin system.
The npm package visualiser.js receives a total of 1 weekly downloads. As such, visualiser.js popularity was classified as not popular.
We found that visualiser.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.