Skip to content
Snippets Groups Projects
Commit 58984a1e authored by Eric Rosenbaum's avatar Eric Rosenbaum
Browse files

instantiate audio engine on stage

parent f9172d3a
No related branches found
No related tags found
No related merge requests found
const bindAll = require('lodash.bindall');
const React = require('react');
const Renderer = require('scratch-render');
const AudioEngine = require('scratch-audioengine');
const VM = require('scratch-vm');
const StageComponent = require('../components/stage/stage.jsx');
......@@ -20,6 +21,8 @@ class Stage extends React.Component {
componentDidMount () {
this.renderer = new Renderer(this.canvas);
this.props.vm.attachRenderer(this.renderer);
this.audioEngine = new AudioEngine();
this.props.vm.attachAudioEngine(this.audioEngine);
this.attachMouseEvents(this.canvas);
}
componentWillUnmount () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment