Skip to content

Commit

Permalink
remove dependency on representationProperty in LightSourcesScene, #217
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 9, 2022
1 parent 4403650 commit 8b21b8b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions js/lens/model/LightSourcesScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import Range from '../../../../dot/js/Range.js';
import geometricOptics from '../../geometricOptics.js';
import Optic from '../../common/model/Optic.js';
import Property from '../../../../axon/js/Property.js';
import Representation, { LIGHT_SOURCE_REPRESENTATION } from '../../common/model/Representation.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import merge from '../../../../phet-core/js/merge.js';
Expand All @@ -36,7 +34,6 @@ type LightSourcesSceneOptions = {

class LightSourcesScene {

readonly representationProperty: Property<Representation>;
readonly optic: Optic;
readonly lightSource1: LightSource;
readonly lightSource2: LightSource;
Expand All @@ -58,19 +55,16 @@ class LightSourcesScene {
* @param raysTypeProperty
* @param providedOptions
*/
constructor( optic: Optic, raysTypeProperty: IReadOnlyProperty<RaysType>, providedOptions: LightSourcesSceneOptions ) {
constructor( optic: Optic,
raysTypeProperty: IReadOnlyProperty<RaysType>,
providedOptions: LightSourcesSceneOptions ) {

const options = merge( {
//TODO
}, providedOptions );

this.optic = optic;

//TODO get rid of this
this.representationProperty = new Property( LIGHT_SOURCE_REPRESENTATION, {
validValues: [ LIGHT_SOURCE_REPRESENTATION ]
} );

this.lightSource1 = new LightSource( {
htmlImageElement: lamp1_png,
position: new Vector2( -170, 20 ),
Expand Down

0 comments on commit 8b21b8b

Please sign in to comment.