-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a VoicingCircle, for phetsims/trig-tour#108
- Loading branch information
1 parent
8ec1799
commit e7b7f94
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2025, University of Colorado Boulder | ||
|
||
/** | ||
* A Circle that mixes Voicing. | ||
* | ||
* @author Jesse Greenberg (PhET Interactive Simulations) | ||
*/ | ||
|
||
import { EmptySelfOptions } from '../../../../../phet-core/js/optionize.js'; | ||
import { Circle, CircleOptions, ReadingBlockOptions, scenery, Voicing } from '../../../imports.js'; | ||
|
||
type SelfOptions = EmptySelfOptions; | ||
type ParentOptions = ReadingBlockOptions & CircleOptions; | ||
export type VoicingTextOptions = SelfOptions & ParentOptions; | ||
|
||
class VoicingCircle extends Voicing( Circle ) { | ||
public constructor( radius?: number | CircleOptions, options?: CircleOptions ) { | ||
if ( typeof radius === 'object' || radius === undefined ) { | ||
super( options ); | ||
} | ||
else { | ||
super( radius, options ); | ||
} | ||
} | ||
} | ||
|
||
scenery.register( 'VoicingCircle', VoicingCircle ); | ||
export default VoicingCircle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters