Skip to content

Commit

Permalink
add a field for supportsTier1Voicing, see phetsims/joist#1002
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jan 8, 2025
1 parent a4d03c1 commit 2b66078
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions js/browser/initialize-globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,19 @@
defaultValue: !!packageSimFeatures.supportsVoicing
},

/**
* Controls whether Tier 1 Voicing is enabled. This is a subset of the Voicing feature, the Voicing toolbar,
* name responses, and hint responses are all avialable. Context and Object responses are disabled and cannot
* be enabled from the Preferences dialog.
*
* This feature is enabled by default when supportsTier1Voicing is true in package.json. The query parameter will always
* override the package.json entry.
*/
supportsTier1Voicing: {
type: 'boolean',
defaultValue: !!packageSimFeatures.supportsTier1Voicing
},

/**
* Switches the Vello rendering of Text to use Swash (with embedded fonts), instead of Canvas.
*
Expand Down Expand Up @@ -966,6 +979,11 @@
window.phet.chipper.queryParameters.fuzzBoard
);

window.phet.chipper.supportsAnyVoicing = () => {
return window.phet.chipper.queryParameters.supportsVoicing ||
window.phet.chipper.queryParameters.supportsTier1Voicing;
};

// Add a log function that displays messages to the console. Examples:
// phet.log && phet.log( 'You win!' );
// phet.log && phet.log( 'You lose', { color: 'red' } );
Expand Down Expand Up @@ -1261,6 +1279,7 @@
const simFeaturesSchema = {
supportsInteractiveDescription: { type: 'boolean' },
supportsVoicing: { type: 'boolean' },
supportsTier1Voicing: { type: 'boolean' },
supportsInteractiveHighlights: { type: 'boolean' },
supportsDescriptionPlugin: { type: 'boolean' },
supportsSound: { type: 'boolean' },
Expand Down

0 comments on commit 2b66078

Please sign in to comment.