Skip to content

Commit

Permalink
Sort imports and run grunt modulify, see phetsims/chipper#1462
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 27, 2024
1 parent 38f2303 commit 3fe0752
Show file tree
Hide file tree
Showing 30 changed files with 123 additions and 123 deletions.
28 changes: 14 additions & 14 deletions js/common/GravityAndOrbitsScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@
*/

import BooleanProperty from '../../../axon/js/BooleanProperty.js';
import EnumerationProperty from '../../../axon/js/EnumerationProperty.js';
import Multilink from '../../../axon/js/Multilink.js';
import NumberProperty from '../../../axon/js/NumberProperty.js';
import Property from '../../../axon/js/Property.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import { Units } from '../../../axon/js/units.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import Rectangle from '../../../dot/js/Rectangle.js';
import Vector2 from '../../../dot/js/Vector2.js';
import Vector2Property from '../../../dot/js/Vector2Property.js';
import merge from '../../../phet-core/js/merge.js';
import optionize from '../../../phet-core/js/optionize.js';
import ModelViewTransform2 from '../../../phetcommon/js/view/ModelViewTransform2.js';
import TimeSpeed from '../../../scenery-phet/js/TimeSpeed.js';
import { Node } from '../../../scenery/js/imports.js';
import PhetioObject, { PhetioObjectOptions } from '../../../tandem/js/PhetioObject.js';
import phetioStateSetEmitter from '../../../tandem/js/phetioStateSetEmitter.js';
import Tandem from '../../../tandem/js/Tandem.js';
import IOType from '../../../tandem/js/types/IOType.js';
import ReferenceIO from '../../../tandem/js/types/ReferenceIO.js';
import gravityAndOrbits from '../gravityAndOrbits.js';
import GravityAndOrbitsConstants from './GravityAndOrbitsConstants.js';
import Body from './model/Body.js';
import GravityAndOrbitsClock from './model/GravityAndOrbitsClock.js';
import GravityAndOrbitsPhysicsEngine from './model/GravityAndOrbitsPhysicsEngine.js';
import GravityAndOrbitsSceneView from './view/GravityAndOrbitsSceneView.js';
import { Node } from '../../../scenery/js/imports.js';
import GravityAndOrbitsModel from './model/GravityAndOrbitsModel.js';
import GravityAndOrbitsPhysicsEngine from './model/GravityAndOrbitsPhysicsEngine.js';
import ModeConfig from './model/ModeConfig.js';
import BodyNode from './view/BodyNode.js';
import Body from './model/Body.js';
import Pair from './model/Pair.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import EnumerationProperty from '../../../axon/js/EnumerationProperty.js';
import TimeSpeed from '../../../scenery-phet/js/TimeSpeed.js';
import Multilink from '../../../axon/js/Multilink.js';
import optionize from '../../../phet-core/js/optionize.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import { Units } from '../../../axon/js/units.js';
import phetioStateSetEmitter from '../../../tandem/js/phetioStateSetEmitter.js';
import BodyNode from './view/BodyNode.js';
import GravityAndOrbitsSceneView from './view/GravityAndOrbitsSceneView.js';

// constants
const PLAY_AREA_WIDTH = GravityAndOrbitsSceneView.STAGE_SIZE.width;
Expand Down
16 changes: 8 additions & 8 deletions js/common/SceneFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
* @author Aaron Davis (PhET Interactive Simulations)
*/

import DerivedStringProperty from '../../../axon/js/DerivedStringProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Utils from '../../../dot/js/Utils.js';
import Vector2 from '../../../dot/js/Vector2.js';
import optionize from '../../../phet-core/js/optionize.js';
import StringUtils from '../../../phetcommon/js/util/StringUtils.js';
import { Color, HBox, Image, Line, Mipmap, Node } from '../../../scenery/js/imports.js';
import Tandem from '../../../tandem/js/Tandem.js';
import earth_png from '../../mipmaps/earth_png.js';
import moonGeneric_png from '../../mipmaps/moonGeneric_png.js';
import moon_png from '../../mipmaps/moon_png.js';
import moonGeneric_png from '../../mipmaps/moonGeneric_png.js';
import planetGeneric_png from '../../mipmaps/planetGeneric_png.js';
import spaceStation_png from '../../mipmaps/spaceStation_png.js';
import sun_png from '../../mipmaps/sun_png.js';
Expand All @@ -25,19 +30,14 @@ import GravityAndOrbitsScene from './GravityAndOrbitsScene.js';
import Body, { BodyOptions } from './model/Body.js';
import BodyConfiguration from './model/BodyConfiguration.js';
import GravityAndOrbitsClock from './model/GravityAndOrbitsClock.js';
import GravityAndOrbitsModel from './model/GravityAndOrbitsModel.js';
import ModeConfig from './model/ModeConfig.js';
import Pair from './model/Pair.js';
import BodyNode from './view/BodyNode.js';
import { ImageRenderer, SwitchableBodyRenderer } from './view/BodyRenderer.js';
import EarthMassReadoutNode from './view/EarthMassReadoutNode.js';
import SpaceStationMassReadoutNode from './view/SpaceStationMassReadoutNode.js';
import VectorNode from './view/VectorNode.js';
import GravityAndOrbitsModel from './model/GravityAndOrbitsModel.js';
import Tandem from '../../../tandem/js/Tandem.js';
import BodyNode from './view/BodyNode.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import optionize from '../../../phet-core/js/optionize.js';
import TProperty from '../../../axon/js/TProperty.js';
import DerivedStringProperty from '../../../axon/js/DerivedStringProperty.js';

// These constants are only used in SceneFactory, and SceneFactory is used to create the specific model instantiations,
// so we keep them here instead of the model.
Expand Down
20 changes: 10 additions & 10 deletions js/common/model/Body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import Emitter from '../../../../axon/js/Emitter.js';
import NumberProperty from '../../../../axon/js/NumberProperty.js';
import Property from '../../../../axon/js/Property.js';
import TEmitter from '../../../../axon/js/TEmitter.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import Vector2, { Vector2StateObject } from '../../../../dot/js/Vector2.js';
import Vector2Property from '../../../../dot/js/Vector2Property.js';
import optionize from '../../../../phet-core/js/optionize.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import { Color } from '../../../../scenery/js/imports.js';
import PhetioObject, { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import ArrayIO from '../../../../tandem/js/types/ArrayIO.js';
import BooleanIO from '../../../../tandem/js/types/BooleanIO.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import NumberIO from '../../../../tandem/js/types/NumberIO.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import GravityAndOrbitsStrings from '../../GravityAndOrbitsStrings.js';
import BodyState from './BodyState.js';
import BodyTypeEnum from './BodyTypeEnum.js';
import RewindableProperty from './RewindableProperty.js';
import BodyConfiguration from './BodyConfiguration.js';
import { Color } from '../../../../scenery/js/imports.js';

// Used as a type annotation only
// eslint-disable-next-line phet/no-view-imported-from-model
import BodyRenderer from '../view/BodyRenderer.js';
import BodyConfiguration from './BodyConfiguration.js';
import BodyState from './BodyState.js';
import BodyTypeEnum from './BodyTypeEnum.js';
import GravityAndOrbitsModel from './GravityAndOrbitsModel.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import optionize from '../../../../phet-core/js/optionize.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import TEmitter from '../../../../axon/js/TEmitter.js';
import RewindableProperty from './RewindableProperty.js';

// reduce Vector2 allocation by reusing this Vector2 in collidesWith computation
const tempVector = new Vector2( 0, 0 );
Expand Down
2 changes: 1 addition & 1 deletion js/common/model/BodyState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* @author Aaron Davis (PhET Interactive Simulations)
*/

import gravityAndOrbits from '../../gravityAndOrbits.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import Body from './Body.js';

class BodyState {
Expand Down
10 changes: 5 additions & 5 deletions js/common/model/GravityAndOrbitsClock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
*/

import BooleanProperty from '../../../../axon/js/BooleanProperty.js';
import EnumerationProperty from '../../../../axon/js/EnumerationProperty.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import EventTimer, { ConstantEventModel } from '../../../../phet-core/js/EventTimer.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import TimeSpeed from '../../../../scenery-phet/js/TimeSpeed.js';
import EnumerationProperty from '../../../../axon/js/EnumerationProperty.js';
import RewindableProperty from './RewindableProperty.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import NumberIO from '../../../../tandem/js/types/NumberIO.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import RewindableProperty from './RewindableProperty.js';

// constants
// frames per second, was 25 in the Java version but changed to 60 for consistency and smoothness
Expand Down
8 changes: 4 additions & 4 deletions js/common/model/GravityAndOrbitsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
*/

import BooleanProperty from '../../../../axon/js/BooleanProperty.js';
import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import EnumerationProperty from '../../../../axon/js/EnumerationProperty.js';
import Property from '../../../../axon/js/Property.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import TModel from '../../../../joist/js/TModel.js';
import PhysicalConstants from '../../../../phet-core/js/PhysicalConstants.js';
import TimeSpeed from '../../../../scenery-phet/js/TimeSpeed.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import ReferenceIO from '../../../../tandem/js/types/ReferenceIO.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import SceneFactory from '../SceneFactory.js';
import GravityAndOrbitsScene from '../GravityAndOrbitsScene.js';
import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import TModel from '../../../../joist/js/TModel.js';
import SceneFactory from '../SceneFactory.js';

// constants
const G = PhysicalConstants.GRAVITATIONAL_CONSTANT;
Expand Down
8 changes: 4 additions & 4 deletions js/common/model/GravityAndOrbitsPhysicsEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
*/

import Emitter from '../../../../axon/js/Emitter.js';
import Property from '../../../../axon/js/Property.js';
import TEmitter from '../../../../axon/js/TEmitter.js';
import TimeSpeed from '../../../../scenery-phet/js/TimeSpeed.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import ModelState from './ModelState.js';
import Body from './Body.js';
import GravityAndOrbitsClock from './GravityAndOrbitsClock.js';
import Property from '../../../../axon/js/Property.js';
import BodyTypeEnum from './BodyTypeEnum.js';
import TEmitter from '../../../../axon/js/TEmitter.js';
import GravityAndOrbitsClock from './GravityAndOrbitsClock.js';
import ModelState from './ModelState.js';

/**
* Return the smaller of two Body instances, for determining which survives a collision.
Expand Down
4 changes: 2 additions & 2 deletions js/common/model/ModeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
*/

import Vector2 from '../../../../dot/js/Vector2.js';
import { Line } from '../../../../scenery/js/imports.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import GravityAndOrbitsClock from './GravityAndOrbitsClock.js';
import BodyConfiguration from './BodyConfiguration.js';
import { Line } from '../../../../scenery/js/imports.js';
import GravityAndOrbitsClock from './GravityAndOrbitsClock.js';

// constants
const DEFAULT_DT = GravityAndOrbitsClock.DEFAULT_DT;
Expand Down
4 changes: 2 additions & 2 deletions js/common/model/Pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*/

import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import NumberIO from '../../../../tandem/js/types/NumberIO.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import Body from './Body.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';

class Pair {
private readonly body1: Body;
Expand Down
10 changes: 5 additions & 5 deletions js/common/model/RewindableProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@

import BooleanProperty from '../../../../axon/js/BooleanProperty.js';
import Property, { PropertyOptions } from '../../../../axon/js/Property.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import { Units } from '../../../../axon/js/units.js';
import { combineOptions } from '../../../../phet-core/js/optionize.js';
import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import PickRequired from '../../../../phet-core/js/types/PickRequired.js';
import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js';
import IOTypeCache from '../../../../tandem/js/IOTypeCache.js';
import { Units } from '../../../../axon/js/units.js';
import { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';

type RewindablePropertyOptions<T> = {
units?: Units;
Expand Down
10 changes: 5 additions & 5 deletions js/common/view/BodyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
*/

import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import Body from '../model/Body.js';
import Multilink from '../../../../axon/js/Multilink.js';
import Property from '../../../../axon/js/Property.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import { Shape } from '../../../../kite/js/imports.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import PhetFont from '../../../../scenery-phet/js/PhetFont.js';
import { DragListener, Line, Node, Rectangle, Text } from '../../../../scenery/js/imports.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import GravityAndOrbitsColors from '../GravityAndOrbitsColors.js';
import GravityAndOrbitsScene from '../GravityAndOrbitsScene.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import Body from '../model/Body.js';
import BodyRenderer from './BodyRenderer.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import Multilink from '../../../../axon/js/Multilink.js';

class BodyNode extends Node {
private readonly modelViewTransformProperty: Property<ModelViewTransform2>;
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/BodyRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*/

import Matrix3 from '../../../../dot/js/Matrix3.js';
import Body from '../model/Body.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import { Shape } from '../../../../kite/js/imports.js';
import { Image, Mipmap, Node, Path } from '../../../../scenery/js/imports.js';
import sun_png from '../../../mipmaps/sun_png.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import Body from '../model/Body.js';

export default abstract class BodyRenderer extends Node {
private readonly body: Body;
Expand Down
6 changes: 3 additions & 3 deletions js/common/view/CheckboxPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
import Property from '../../../../axon/js/Property.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import merge from '../../../../phet-core/js/merge.js';
import optionize, { combineOptions, EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import ArrowNode from '../../../../scenery-phet/js/ArrowNode.js';
import GridNode from '../../../../scenery-phet/js/GridNode.js';
import MeasuringTapeNode from '../../../../scenery-phet/js/MeasuringTapeNode.js';
import PhetColorScheme from '../../../../scenery-phet/js/PhetColorScheme.js';
import PhetFont from '../../../../scenery-phet/js/PhetFont.js';
import { colorProfileProperty, HBox, HBoxOptions, Image, SceneryConstants, Text, TextOptions } from '../../../../scenery/js/imports.js';
import VerticalCheckboxGroup, { VerticalCheckboxGroupItem, VerticalCheckboxGroupOptions } from '../../../../sun/js/VerticalCheckboxGroup.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import iconMass_png from '../../../images/iconMass_png.js';
import pathIcon_png from '../../../images/pathIcon_png.js';
import pathIconProjector_png from '../../../images/pathIconProjector_png.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import GravityAndOrbitsStrings from '../../GravityAndOrbitsStrings.js';
import GravityAndOrbitsColors from '../GravityAndOrbitsColors.js';
import GridNode from '../../../../scenery-phet/js/GridNode.js';
import GravityAndOrbitsModel from '../model/GravityAndOrbitsModel.js';
import optionize, { combineOptions, EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import VerticalCheckboxGroup, { VerticalCheckboxGroupItem, VerticalCheckboxGroupOptions } from '../../../../sun/js/VerticalCheckboxGroup.js';

// constants
const FONT = new PhetFont( 18 );
Expand Down
12 changes: 6 additions & 6 deletions js/common/view/DraggableVectorNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
* @author Aaron Davis (PhET Interactive Simulations)
*/

import Multilink from '../../../../axon/js/Multilink.js';
import Property from '../../../../axon/js/Property.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import { Shape } from '../../../../kite/js/imports.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import PhetFont from '../../../../scenery-phet/js/PhetFont.js';
import { Color, DragListener, Path, PressListenerEvent, Text } from '../../../../scenery/js/imports.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import VectorNode from './VectorNode.js';
import Body from '../model/Body.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import Multilink from '../../../../axon/js/Multilink.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import VectorNode from './VectorNode.js';

class DraggableVectorNode extends VectorNode {

Expand Down
6 changes: 3 additions & 3 deletions js/common/view/ExplosionNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
*/

import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import Property from '../../../../axon/js/Property.js';
import LinearFunction from '../../../../dot/js/LinearFunction.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import { Node } from '../../../../scenery/js/imports.js';
import gravityAndOrbits from '../../gravityAndOrbits.js';
import BodyRenderer, { SunRenderer } from './BodyRenderer.js';
import Body from '../model/Body.js';
import Property from '../../../../axon/js/Property.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import BodyRenderer, { SunRenderer } from './BodyRenderer.js';

// constants
const NUM_STEPS_FOR_ANIMATION = 10;
Expand Down
Loading

0 comments on commit 3fe0752

Please sign in to comment.