Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow slider step values in SoundPlugin to be changed #179

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.6.0] - unreleased

### Added

- Added option parameter to `SoundPlugin` to allow overriding of step value on range inputs.

## [2.5.1] - unreleased

### Fixed
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ The sound plugin supports a total of eight controls:
- A global sound volume slider
- Volume sliders for each of the three audio channels mentioned above - VO, SFX, Music

The sound plugin also supports customizing the step value (default = 0.1) of the volume sliders via the `stepOverride` param, this can be any value between 0 and 1.

e.g. if you'd like your volume slider to have only 4 volume levels you'd set it to 0.25 and the slider would use 0, 0.25, 0.5, 0.75, and 1.

```javascript
import { SoundPlugin, Container } from 'springroll-container';

Expand All @@ -213,6 +217,7 @@ const container = new Container('#game', {
musicSliders: '#musicSlider', // controls the game's music volume
voSliders: '#voSlider', // controls the game's voice-over volume
sfxSliders: '#sfxSlider', // controls the game's sound effects volume
stepOverride: 0.1 // allows control over the step value for the range inputs
}),
]
});
Expand Down
2 changes: 1 addition & 1 deletion dist/SpringRoll-Container-umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/SpringRoll-Container-umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading
Loading