Skip to content

Commit

Permalink
Adding specific IOTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jul 28, 2021
1 parent 0e090fe commit 9b4b30c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/common/model/Cone.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Vector2 from '../../../../dot/js/Vector2.js';
import Vector3 from '../../../../dot/js/Vector3.js';
import Shape from '../../../../kite/js/Shape.js';
import merge from '../../../../phet-core/js/merge.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import densityBuoyancyCommon from '../../densityBuoyancyCommon.js';
import Mass from './Mass.js';

Expand Down Expand Up @@ -294,5 +295,12 @@ class Cone extends Mass {
}
}

// @public {IOType}
Cone.ConeIO = new IOType( 'ConeIO', {
valueType: Cone,
supertype: Mass.MassIO,
documentation: 'Represents an up/down cone'
} );

densityBuoyancyCommon.register( 'Cone', Cone );
export default Cone;
8 changes: 8 additions & 0 deletions js/common/model/Ellipsoid.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Vector2 from '../../../../dot/js/Vector2.js';
import Vector3 from '../../../../dot/js/Vector3.js';
import Shape from '../../../../kite/js/Shape.js';
import merge from '../../../../phet-core/js/merge.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import densityBuoyancyCommon from '../../densityBuoyancyCommon.js';
import Mass from './Mass.js';

Expand Down Expand Up @@ -247,5 +248,12 @@ class Ellipsoid extends Mass {
}
}

// @public {IOType}
Ellipsoid.EllipsoidIO = new IOType( 'EllipsoidIO', {
valueType: Ellipsoid,
supertype: Mass.MassIO,
documentation: 'Represents an ellipsoid'
} );

densityBuoyancyCommon.register( 'Ellipsoid', Ellipsoid );
export default Ellipsoid;
8 changes: 8 additions & 0 deletions js/common/model/HorizontalCylinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Utils from '../../../../dot/js/Utils.js';
import Vector3 from '../../../../dot/js/Vector3.js';
import Shape from '../../../../kite/js/Shape.js';
import merge from '../../../../phet-core/js/merge.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import densityBuoyancyCommon from '../../densityBuoyancyCommon.js';
import Mass from './Mass.js';

Expand Down Expand Up @@ -255,5 +256,12 @@ class HorizontalCylinder extends Mass {
}
}

// @public {IOType}
HorizontalCylinder.HorizontalCylinderIO = new IOType( 'HorizontalCylinderIO', {
valueType: HorizontalCylinder,
supertype: Mass.MassIO,
documentation: 'Represents a cylinder laying on its side'
} );

densityBuoyancyCommon.register( 'HorizontalCylinder', HorizontalCylinder );
export default HorizontalCylinder;
8 changes: 8 additions & 0 deletions js/common/model/Scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Vector3 from '../../../../dot/js/Vector3.js';
import Shape from '../../../../kite/js/Shape.js';
import Enumeration from '../../../../phet-core/js/Enumeration.js';
import merge from '../../../../phet-core/js/merge.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import densityBuoyancyCommon from '../../densityBuoyancyCommon.js';
import Cuboid from './Cuboid.js';
import InterpolatedProperty from './InterpolatedProperty.js';
Expand Down Expand Up @@ -198,5 +199,12 @@ Scale.SCALE_FRONT_OFFSET = SCALE_FRONT_OFFSET;
// @public {Enumeration}
Scale.DisplayType = DisplayType;

// @public {IOType}
Scale.ScaleIO = new IOType( 'ScaleIO', {
valueType: Scale,
supertype: Mass.MassIO,
documentation: 'Represents scale used for measuring mass/weight'
} );

densityBuoyancyCommon.register( 'Scale', Scale );
export default Scale;
8 changes: 8 additions & 0 deletions js/common/model/VerticalCylinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Vector2 from '../../../../dot/js/Vector2.js';
import Vector3 from '../../../../dot/js/Vector3.js';
import Shape from '../../../../kite/js/Shape.js';
import merge from '../../../../phet-core/js/merge.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import densityBuoyancyCommon from '../../densityBuoyancyCommon.js';
import Mass from './Mass.js';

Expand Down Expand Up @@ -270,5 +271,12 @@ class VerticalCylinder extends Mass {
}
}

// @public {IOType}
VerticalCylinder.VerticalCylinderIO = new IOType( 'VerticalCylinderIO', {
valueType: VerticalCylinder,
supertype: Mass.MassIO,
documentation: 'Represents a cylinder laying on its end'
} );

densityBuoyancyCommon.register( 'VerticalCylinder', VerticalCylinder );
export default VerticalCylinder;

0 comments on commit 9b4b30c

Please sign in to comment.