Skip to content

CGjupoulton/sound-module-experimental

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Description

An experimental SDK module for loading and playing sounds

Usage

  • Paste this module into your project
  • Configure your config.js to include import { AnimatedEventModule } from './animations/AnimatedEventModule.js'; and add AnimatedEventModule to the declaration of the modules array.
  • In your Referee, include @Inject AnimatedEventModule animatedEventModule;.
  • Include sounds in the assets/sounds/ folder.
  • Delete any already existing demo.js file from src/main/resources/view/

Example

In your Referee's gameTurn:

// Play sound at t = 0
ViewerEvent soundEvent = animatedEventModule.createAnimationEvent("Sound", 0.0);
soundEvent.params.put("path", "sounds/death.wav");

TODO

  • on/off switch
  • Preload sounds instead of downloading them when first played.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published