Skip to content

Commit

Permalink
mixin => mixInto() and trait (with added assertions). See phetsims/sc…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Oct 26, 2017
1 parent 327b185 commit e228eb2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js/Bounds2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ define( function( require ) {
}
} );

Poolable.mixin( Bounds2, {
Poolable.mixInto( Bounds2, {
defaultFactory: function() { return Bounds2.NOTHING.copy(); },
constructorDuplicateFactory: function( pool ) {
return function( minX, minY, maxX, maxY ) {
Expand Down
2 changes: 1 addition & 1 deletion js/Bounds3.js
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ define( function( require ) {
}
} );

Poolable.mixin( Bounds3, {
Poolable.mixInto( Bounds3, {
defaultFactory: function() { return Bounds3.NOTHING.copy(); },
constructorDuplicateFactory: function( pool ) {
return function( minX, minY, minZ, maxX, maxY, maxZ ) {
Expand Down
2 changes: 1 addition & 1 deletion js/Matrix3.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ define( function( require ) {
}
};

Poolable.mixin( Matrix3, {
Poolable.mixInto( Matrix3, {

//The default factory creates an identity matrix
defaultFactory: function() { return new Matrix3(); },
Expand Down
2 changes: 1 addition & 1 deletion js/Quaternion.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ define( function( require ) {
);
};

Poolable.mixin( Quaternion, {
Poolable.mixInto( Quaternion, {
defaultFactory: function() { return new Quaternion(); },
constructorDuplicateFactory: function( pool ) {
return function( x, y, z, w ) {
Expand Down
2 changes: 1 addition & 1 deletion js/Vector2.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ define( function( require ) {
} );

// Sets up pooling on Vector2
Poolable.mixin( Vector2, {
Poolable.mixInto( Vector2, {
defaultFactory: function() { return new Vector2(); },
constructorDuplicateFactory: function( pool ) {
return function( x, y ) {
Expand Down
2 changes: 1 addition & 1 deletion js/Vector3.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ define( function( require ) {
} );

// Sets up pooling on Vector3
Poolable.mixin( Vector3, {
Poolable.mixInto( Vector3, {
defaultFactory: function() { return new Vector3(); },
constructorDuplicateFactory: function( pool ) {
return function( x, y, z ) {
Expand Down
2 changes: 1 addition & 1 deletion js/Vector4.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ define( function( require ) {
} );

// Sets up pooling on Vector4
Poolable.mixin( Vector4, {
Poolable.mixInto( Vector4, {
defaultFactory: function() { return new Vector4(); },
constructorDuplicateFactory: function( pool ) {
return function( x, y, z, w ) {
Expand Down

0 comments on commit e228eb2

Please sign in to comment.