diff --git a/js/common/model/LaserViewEnum.ts b/js/common/model/LaserViewEnum.ts index 2368d79c..be10fcbe 100644 --- a/js/common/model/LaserViewEnum.ts +++ b/js/common/model/LaserViewEnum.ts @@ -1,3 +1,3 @@ // Copyright 2021, University of Colorado Boulder -type ColorModeEnum = 'ray' | 'wave'; -export default ColorModeEnum; \ No newline at end of file +type LaserViewEnum = 'ray' | 'wave'; +export default LaserViewEnum; \ No newline at end of file diff --git a/js/common/model/RayTypeEnum.ts b/js/common/model/RayTypeEnum.ts new file mode 100644 index 00000000..f53fb3fc --- /dev/null +++ b/js/common/model/RayTypeEnum.ts @@ -0,0 +1,3 @@ +// Copyright 2021, University of Colorado Boulder +type RayTypeEnum = 'incident' | 'reflected' | 'transmitted'; +export default RayTypeEnum; \ No newline at end of file diff --git a/js/intro/view/AngleNode.ts b/js/intro/view/AngleNode.ts index 42945e70..196125a7 100644 --- a/js/intro/view/AngleNode.ts +++ b/js/intro/view/AngleNode.ts @@ -19,6 +19,7 @@ import Text from '../../../../scenery/js/nodes/Text.js'; import Panel from '../../../../sun/js/Panel.js'; import bendingLight from '../../bendingLight.js'; import LightRay from '../../common/model/LightRay.js'; +import RayTypeEnum from '../../common/model/RayTypeEnum.js'; // constants const CIRCLE_RADIUS = 50; // radius of the circular arc in stage coordinates @@ -150,7 +151,7 @@ class AngleNode extends Node { * @param type * @returns {LightRay} */ - const getRay = ( type: 'incident' | 'reflected' | 'transmitted' | null ) => { // TODO: enum + const getRay = ( type: RayTypeEnum | null ) => { let selected = null; for ( let i = 0; i < rays.length; i++ ) { const ray = rays[ i ];