From 8042b7728348f000bb2b831e7efdb50dac6fb892 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Sun, 3 Mar 2024 17:24:01 -0700 Subject: [PATCH] REVIEW comments, https://github.com/phetsims/projectile-data-lab/issues/225 --- js/common/model/Histogram.ts | 1 + js/common/model/HistogramSonifier.ts | 1 + js/common/model/Projectile.ts | 1 + js/common/model/ProjectileSound.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/js/common/model/Histogram.ts b/js/common/model/Histogram.ts index cc4867b1..e269bfd8 100644 --- a/js/common/model/Histogram.ts +++ b/js/common/model/Histogram.ts @@ -23,6 +23,7 @@ import PickRequired from '../../../../phet-core/js/types/PickRequired.js'; import { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js'; import PDLPreferences from '../PDLPreferences.js'; +//REVIEW document and create 'type ZoomLevel' export const ZOOM_LEVELS = [ { maxCount: 500, minorSpacing: 10, diff --git a/js/common/model/HistogramSonifier.ts b/js/common/model/HistogramSonifier.ts index 9e636a46..a1749552 100644 --- a/js/common/model/HistogramSonifier.ts +++ b/js/common/model/HistogramSonifier.ts @@ -32,6 +32,7 @@ const MEAN_HIGHLIGHT_DURATION = 0.4; export default class HistogramSonifier { + //REVIEW document public readonly histogramSonifierPhaseProperty = new Property( { phaseName: 'idlePhase' } ); // The sorted data from the left to the rightmost bin diff --git a/js/common/model/Projectile.ts b/js/common/model/Projectile.ts index fffdf996..7896088e 100644 --- a/js/common/model/Projectile.ts +++ b/js/common/model/Projectile.ts @@ -31,6 +31,7 @@ import ProjectileType from './ProjectileType.js'; export default class Projectile { + //REVIEW document - not obvious why we need to know what screen a Projectile belongs to public screenIdentifier: ScreenIdentifier; public fieldIdentifier: string; diff --git a/js/common/model/ProjectileSound.ts b/js/common/model/ProjectileSound.ts index 9aa4596e..c6dee38d 100644 --- a/js/common/model/ProjectileSound.ts +++ b/js/common/model/ProjectileSound.ts @@ -38,6 +38,7 @@ export const playbackRateForPosition = ( x: number ): number => { return Utils.linear( 0, 100, 0.2, 3.5, x ); }; +//REVIEW Lots of if-then-else logic and duplicated code here. Should soundClip be an attribute of ProjectileType? export default class ProjectileSound { public static play( projectileType: ProjectileType, x: number, isLanding: boolean ): void {