Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

Commit

Permalink
pixi renderer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wellcaffeinated committed Dec 8, 2014
1 parent 1f3f79a commit a5b93b0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/renderers/pixi-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
* strokeStyle: '0xE8900C',
* lineWidth: 3,
* fillStyle: '0xD5DE4C',
* angleIndicator: '0xE8900C'
* angleIndicator: '0xE8900C',
* strokeAlpha: 1,
* fillAlpha: 1
* },
*
* 'convex-polygon' : {
Expand Down Expand Up @@ -109,6 +111,7 @@ Physics.renderer('pixi', function( parent ){
fillStyle: colors.blue,
angleIndicator: colors.white,
fillAlpha: 1,
strokeAlpha: 1,
alpha: 1
},

Expand All @@ -118,6 +121,7 @@ Physics.renderer('pixi', function( parent ){
fillStyle: colors.violet,
angleIndicator: colors.white,
fillAlpha: 1,
strokeAlpha: 1,
alpha: 1
},

Expand All @@ -127,6 +131,7 @@ Physics.renderer('pixi', function( parent ){
fillStyle: colors.violet,
angleIndicator: colors.white,
fillAlpha: 1,
strokeAlpha: 1,
alpha: 1
}
}
Expand Down Expand Up @@ -326,7 +331,7 @@ Physics.renderer('pixi', function( parent ){
graphics.fillAlpha = 0;
}

graphics.lineStyle( styles.lineWidth || 0, styles.strokeStyle );
graphics.lineStyle( styles.lineWidth || 0, styles.strokeStyle, styles.strokeAlpha !== undefined ? styles.strokeAlpha : 1 );
graphics.alpha = styles.alpha !== undefined ? styles.alpha : 1;

} else {
Expand Down Expand Up @@ -516,6 +521,9 @@ Physics.renderer('pixi', function( parent ){
view.lineStyle( styles.lineWidth, styles.angleIndicator );
view.moveTo( 0, 0 );
view.lineTo( hw, 0 );
}

if ( name !== 'compound' ){
view.cacheAsBitmap = true;
}

Expand Down

0 comments on commit a5b93b0

Please sign in to comment.