Skip to content

Commit

Permalink
tweaked simulation constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
krikienoid committed Jul 17, 2016
1 parent b683da7 commit 9de5777
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/flagwaver-ui.js
Expand Up @@ -51,10 +51,10 @@
toggleWind : function () {
flagWaverOpts.isWindOn = !flagWaverOpts.isWindOn;
if ( flagWaverOpts.isWindOn ) {
flagWaver.setWind( 300 );
flagWaver.setWind( 200 );
}
else {
flagWaver.setWind( 0 );
flagWaver.setWind( 0.001 );
}
},
flag : {
Expand Down
6 changes: 3 additions & 3 deletions js/flagwaver.js
Expand Up @@ -85,7 +85,7 @@

// Wind settings
var wind = true,
windStrength = 300,
windStrength = 200,
windForce = new THREE.Vector3( 0, 0, 0 );

// Ball settings
Expand Down Expand Up @@ -175,7 +175,7 @@
correction;

diff.subVectors( p1.position, p2.position );
currentDist = diff.length();
currentDist = diff.length() / SLACK;
diff.normalize();
correction = diff.multiplyScalar( currentDist - distance );
if ( currentDist > distance ) {
Expand Down Expand Up @@ -1106,7 +1106,7 @@
}

function setWind ( value ) {
if ( Util.isNumeric( value ) ) {
if ( Util.isNumeric( value ) && value > 0 ) {
windStrength = value;
}
else {
Expand Down

0 comments on commit 9de5777

Please sign in to comment.