Skip to content

Commit

Permalink
the default renderer instance is now passed as parameter when emittin…
Browse files Browse the repository at this point in the history
…g the global `VIDEO_INIT` event
  • Loading branch information
obiot committed Jul 15, 2023
1 parent c4565a5 commit 9b9117d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Audio: expose the audio `load` method in the documentation and typings
- Loader: melonJS now dynamically assign parser/preload functions to known asset types
- Loader: add the possibility to specify a user defined parser/preload function for a given asset type
- Renderer: the default renderer instance is now passed as parameter when emitting the global `VIDEO_INIT` event

### Fixed
- Core: fix some leftover direct global references to `document` (now using `globalThis.document`)
Expand Down
2 changes: 1 addition & 1 deletion src/system/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const STAGE_RESET = "me.stage.onReset";

/**
* event for when the video is initialized<br>
* Data passed : none <br>
* Data passed : {Renderer} the renderer instance created
* @public
* @constant
* @type {string}
Expand Down
2 changes: 1 addition & 1 deletion src/video/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function init(width, height, options) {
}, 100), false);

// notify the video has been initialized
event.emit(event.VIDEO_INIT);
event.emit(event.VIDEO_INIT, game.renderer);

return true;
}
Expand Down

0 comments on commit 9b9117d

Please sign in to comment.