Skip to content

Commit

Permalink
Namespace john-travoltage, see phetsims/joist#307
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed May 3, 2016
1 parent 0041898 commit c330103
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/john-travoltage/JohnTravoltageScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define( function( require ) {
var JohnTravoltageModel = require( 'JOHN_TRAVOLTAGE/john-travoltage/model/JohnTravoltageModel' );
var JohnTravoltageView = require( 'JOHN_TRAVOLTAGE/john-travoltage/view/JohnTravoltageView' );
var Screen = require( 'JOIST/Screen' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

// strings
var johnTravoltageTitleString = require( 'string!JOHN_TRAVOLTAGE/john-travoltage.title' );
Expand All @@ -37,5 +38,7 @@ define( function( require ) {
);
}

johnTravoltage.register( 'JohnTravoltageScreen', JohnTravoltageScreen );

return inherit( Screen, JohnTravoltageScreen );
} );
3 changes: 3 additions & 0 deletions js/john-travoltage/model/Arm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define( function( require ) {
var Vector2 = require( 'DOT/Vector2' );
var PropertySet = require( 'AXON/PropertySet' );
var inherit = require( 'PHET_CORE/inherit' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

function Arm() {
PropertySet.call( this, { angle: -0.5 } );
Expand All @@ -28,6 +29,8 @@ define( function( require ) {
this.dragging = false;
}

johnTravoltage.register( 'Arm', Arm );

return inherit( PropertySet, Arm, {
getFingerPosition: function() {

Expand Down
3 changes: 3 additions & 0 deletions js/john-travoltage/model/Leg.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define( function( require ) {
var PropertySet = require( 'AXON/PropertySet' );
var inherit = require( 'PHET_CORE/inherit' );
var Vector2 = require( 'DOT/Vector2' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

function Leg() {
this.initialAngle = 1.3175443221852239;
Expand All @@ -23,6 +24,8 @@ define( function( require ) {
this.dragging = false;
}

johnTravoltage.register( 'Leg', Leg );

return inherit( PropertySet, Leg, {
deltaAngle: function() { return this.angle - this.initialAngle; }
} );
Expand Down
3 changes: 3 additions & 0 deletions js/john-travoltage/model/LineSegment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define( function( require ) {
// modules
var Vector2 = require( 'DOT/Vector2' );
var inherit = require( 'PHET_CORE/inherit' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

/**
* Create a LineSegment from Number,Number,Number,Number or Vector2,Vector2
Expand All @@ -37,6 +38,8 @@ define( function( require ) {
this.pre1 = this.p0.blend( this.p1, 1 - epsilon );
}

johnTravoltage.register( 'LineSegment', LineSegment );

return inherit( Object, LineSegment, {

//No need for speed, only used in debugging
Expand Down
3 changes: 3 additions & 0 deletions js/john-travoltage/view/AppendageNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ define( function( require ) {
var Leg = require( 'JOHN_TRAVOLTAGE/john-travoltage/model/Leg' );
var AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
var Input = require( 'SCENERY/input/Input' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

//Compute the distance (in radians) between angles a and b, using an inlined dot product (inlined to remove allocations)
var distanceBetweenAngles = function( a, b ) {
Expand Down Expand Up @@ -169,5 +170,7 @@ define( function( require ) {
}
}

johnTravoltage.register( 'AppendageNode', AppendageNode );

return inherit( Node, AppendageNode );
} );
3 changes: 3 additions & 0 deletions js/john-travoltage/view/BackgroundElementsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ define( function( require ) {
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Pattern = require( 'SCENERY/util/Pattern' );
var Image = require( 'SCENERY/nodes/Image' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

// images
var wallpaper = require( 'image!JOHN_TRAVOLTAGE/wallpaper.png' );
Expand Down Expand Up @@ -77,5 +78,7 @@ define( function( require ) {
} ) );
}

johnTravoltage.register( 'BackgroundElementsNode', BackgroundElementsNode );

return inherit( Node, BackgroundElementsNode );
} );
3 changes: 3 additions & 0 deletions js/john-travoltage/view/DebugPositions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ define( function( require ) {
// modules
var Shape = require( 'KITE/Shape' );
var inherit = require( 'PHET_CORE/inherit' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

function DebugPositions() {}

johnTravoltage.register( 'DebugPositions', DebugPositions );

return inherit( Object, DebugPositions, {

//Sample model points for bounds, see JohnTravoltageModel.bodyVertices
Expand Down
3 changes: 3 additions & 0 deletions js/john-travoltage/view/ElectronNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ define( function( require ) {
var Electron = require( 'JOHN_TRAVOLTAGE/john-travoltage/model/Electron' );
var Image = require( 'SCENERY/nodes/Image' );
var Vector2 = require( 'DOT/Vector2' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

var radius = Electron.radius;

Expand Down Expand Up @@ -180,5 +181,7 @@ define( function( require ) {
} );
}

johnTravoltage.register( 'ElectronNode', ElectronNode );

return inherit( Node, ElectronNode );
} );
3 changes: 3 additions & 0 deletions js/john-travoltage/view/JohnTravoltageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ define( function( require ) {
var Circle = require( 'SCENERY/nodes/Circle' );
var platform = require( 'PHET_CORE/platform' );
var HBox = require( 'SCENERY/nodes/HBox' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

// images
var arm = require( 'image!JOHN_TRAVOLTAGE/arm.png' );
Expand Down Expand Up @@ -126,6 +127,8 @@ define( function( require ) {
}
}

johnTravoltage.register( 'JohnTravoltageView', JohnTravoltageView );

return inherit( ScreenView, JohnTravoltageView, {
showBody: function() {
//vertices and body path
Expand Down
3 changes: 3 additions & 0 deletions js/john-travoltage/view/SparkNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define( function( require ) {
var Node = require( 'SCENERY/nodes/Node' );
var Shape = require( 'KITE/Shape' );
var Path = require( 'SCENERY/nodes/Path' );
var johnTravoltage = require( 'JOHN_TRAVOLTAGE/johnTravoltage' );

/**
* Constructor for the SparkNode, which shows the animated spark from the finger to the doorknob when electrons are flowing out.
Expand Down Expand Up @@ -67,5 +68,7 @@ define( function( require ) {
} );
}

johnTravoltage.register( 'SparkNode', SparkNode );

return inherit( Node, SparkNode );
} );

0 comments on commit c330103

Please sign in to comment.