Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.
Merged
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
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [3.0.0] - 2025-01-03

This is the start of the websquad's fork of https://github.com/springroll/SpringRollContainer to be used in the pbskids redesign (project name "Puma").
This is the start of the websquad's fork of https://github.com/pbs/SpringRollContainer to be used in the pbskids redesign (project name "Puma").

### Changed

Expand All @@ -17,7 +17,7 @@ This is the start of the websquad's fork of https://github.com/springroll/Spring

### Fixed

- Ensured that CaptionsTogglePlugin internal state is maintained when reading from localStorage on startup
- Ensured that CaptionsTogglePlugin internal state is maintained when reading from localStorage on startup

## [2.5.1] - 2024-04-16

Expand All @@ -29,13 +29,13 @@ This is the start of the websquad's fork of https://github.com/springroll/Spring

### Changed

- Prevent SoundPlugin from sending mute state before Application is loaded.
- Prevent CaptionsTogglePlugin from sending mute state before Application is loaded.
- Prevent SoundPlugin from sending mute state before Application is loaded.
- Prevent CaptionsTogglePlugin from sending mute state before Application is loaded.
- updated .nvmrc to 18

### Added

- Added a check to make sure plugin preloads are finished before opening up the application to avoid race conditions.
- Added a check to make sure plugin preloads are finished before opening up the application to avoid race conditions.

## [2.4.6] - 2023-10-16

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ container.openPath('/path/to/game.html');

## Plugins

This section provides instructions on how to use the built-in plugins for SpringRoll Container. For writing or updating older plugins, see the [Plugin Authoring Guide](https://github.com/SpringRoll/SpringRollContainer/tree/main/src/plugins).
This section provides instructions on how to use the built-in plugins for SpringRoll Container. For writing or updating older plugins, see the [Plugin Authoring Guide](https://github.com/pbs/SpringRollContainer/tree/main/src/plugins).

The Container has several built-in plugins that allow the user to control various aspects of a game/application.
These are initialized with either a query selector string (similar to what you would pass to [document.querySelector](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector))
Expand Down
2 changes: 1 addition & 1 deletion dist/SpringRoll-Container-umd.js

Large diffs are not rendered by default.

3 changes: 2 additions & 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.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "springroll-container",
"version": "2.5.2",
"version": "3.0.0",
"description": "The iframe controller for interacting with SpringRoll applications",
"main": "./dist/index.js",
"license": "MIT",
"typings": "typings/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/SpringRoll/SpringRollContainer"
"url": "https://github.com/pbs/SpringRollContainer"
},
"devDependencies": {
"@babel/core": "^7.4.3",
Expand Down Expand Up @@ -70,7 +70,7 @@
},
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/SpringRoll/SpringRollContainer/issues"
"url": "https://github.com/pbs/SpringRollContainer/issues"
},
"homepage": "https://github.com/SpringRoll/SpringRollContainer"
"homepage": "https://github.com/pbs/SpringRollContainer"
}
24 changes: 12 additions & 12 deletions src/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,37 +75,37 @@ export class MyPlugin {
## Internal a.k.a. Built-In Plugins
If you're developing for SpringrollContainer directly the process is still the same but there are base plugin classes available to keep your plugins DRY and more consistent.

### [BasePlugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/base-plugins/BasePlugin.js)
[Example Plugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/plugins/KeyboardMapPlugin.js)
### [BasePlugin](https://github.com/pbs/SpringRollContainer/blob/main/src/base-plugins/BasePlugin.js)
[Example Plugin](https://github.com/pbs/SpringRollContainer/blob/main/src/plugins/KeyboardMapPlugin.js)
The most barebones plugin class avaialable. Should be used if none of the other plugins match your needs.
Provides very basic implementations of `preload()`, `init()`, and `start()`.

| It also provides a few useful helper functions: | |
| --- | --- |
| `SendProperty(prop, value)` | Sends a single property and it's value through Bellhop to the application. `prop` should match the springroll feature name. Also [saves the property](https://github.com/SpringRoll/SpringRollContainer#saved-data-api) for re-use |
| `SendProperty(prop, value)` | Sends a single property and it's value through Bellhop to the application. `prop` should match the springroll feature name. Also [saves the property](https://github.com/pbs/SpringRollContainer#saved-data-api) for re-use |
| `warn(warningText)` | prints out an informative console warning |
---

### [ButtonPlugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/base-plugins/ButtonPlugin.js)
[Example Plugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/plugins/CaptionsTogglePlugin.js)
### [ButtonPlugin](https://github.com/pbs/SpringRollContainer/blob/main/src/base-plugins/ButtonPlugin.js)
[Example Plugin](https://github.com/pbs/SpringRollContainer/blob/main/src/plugins/CaptionsTogglePlugin.js)
The `ButtonPlugin` is useful for any plugin that requires a `mute` state (i.e. on or off). It extends the `BasePlugin` and has access to all of the methods above.
| It also includes: | |
| --- | --- |
| `_setMuteProp(prop, button, muted)` | Sets the current state of the property, and sends it to the application. This also handles applying styles to the button or buttons to match. `button` can be a single instance of a button or an array of matching buttons.
---

### [SliderPlugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/base-plugins/SliderPlugin.js)
[Example Plugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/plugins/LayersPlugin.js)
### [SliderPlugin](https://github.com/pbs/SpringRollContainer/blob/main/src/base-plugins/SliderPlugin.js)
[Example Plugin](https://github.com/pbs/SpringRollContainer/blob/main/src/plugins/LayersPlugin.js)
If your plugin requires a range input to control volume or a similar setting this plugin will handle most of it. It can only accept one setting to control however so if you require more than one setting (e.g. `MusicVolume` and `VoiceOverVolume`) consider breaking it out into multiple plugins or just using `BasePlugin`. If your plugin extends this base class all you have to do is pass the configuration options through the `super()` call and the `SliderPlugin` handles the rest.

### [RadioGroupPlugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/base-plugins/RadioGroupPlugin.js)
[Example Plugin](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/plugins/ColorVisionPlugin.js)
### [RadioGroupPlugin](https://github.com/pbs/SpringRollContainer/blob/main/src/base-plugins/RadioGroupPlugin.js)
[Example Plugin](https://github.com/pbs/SpringRollContainer/blob/main/src/plugins/ColorVisionPlugin.js)
The RadioGroupPlugin is used for any plugin that uses groups of radio buttons to allow selection between pre-determined options. Similarly to the SliderPlugin above, the RadioGroupPlugin handles most of the set up behind the scenes and you won't have to interact directly with any of its methods.

### UI-Elements
Container also provides a few base ui-element classes to help set up any HTML controls you have. These are:
- [Slider](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/ui-elements/Slider.js)
- [Button](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/ui-elements/Button.js)
- [RadioGroup](https://github.com/SpringRoll/SpringRollContainer/blob/main/src/ui-elements/RadioGroup.js)
- [Slider](https://github.com/pbs/SpringRollContainer/blob/main/src/ui-elements/Slider.js)
- [Button](https://github.com/pbs/SpringRollContainer/blob/main/src/ui-elements/Button.js)
- [RadioGroup](https://github.com/pbs/SpringRollContainer/blob/main/src/ui-elements/RadioGroup.js)

Note: these are used automatically by the `RadioGroupPlugin` and `SliderPlugin`. So these should only be required if you're not using one of those two as your base.