Skip to content

Commit

Permalink
Converting away from Poolable2 => Pool, see phetsims/phet-core#103
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Mar 3, 2022
1 parent 36f579b commit 154f0fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions js/common/model/BioShapeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const BioShapeUtils = {
const rand = new Random( {
seed: seed
} );
let cp1 = Vector2.dirtyFromPool();
let cp2 = Vector2.dirtyFromPool();
let cp1 = Vector2.pool.fetch();
let cp2 = Vector2.pool.fetch();

shape.moveToPoint( points[ 0 ] );
for ( let i = 0; i < points.length; i++ ) {
Expand Down Expand Up @@ -130,8 +130,8 @@ const BioShapeUtils = {
assert && assert( points.length > 0 );

// Control points, used throughout the code below for curving the line.
let cp1 = Vector2.dirtyFromPool();
let cp2 = Vector2.dirtyFromPool();
let cp1 = Vector2.pool.fetch();
let cp2 = Vector2.pool.fetch();

const path = new Shape();
path.moveTo( points[ 0 ].x, points[ 0 ].y );
Expand Down
4 changes: 2 additions & 2 deletions js/common/model/ShapeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const ShapeUtils = {
createRoundedShapeFromPoints( points, existingShape ) {
const shape = existingShape || new Shape();
shape.moveToPoint( points[ 0 ] );
let cp1 = Vector2.dirtyFromPool();
let cp2 = Vector2.dirtyFromPool();
let cp1 = Vector2.pool.fetch();
let cp2 = Vector2.pool.fetch();
for ( let i = 0; i < points.length; i++ ) {
const segmentStartPoint = points[ i ];
const segmentEndPoint = points[ ( i + 1 ) % points.length ];
Expand Down

0 comments on commit 154f0fe

Please sign in to comment.