Created
September 11, 2018 20:14
-
-
Save Jorger/58a966e4feb651d96bbe6d38f07e2d5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (dataPipe[3] !== dataPipe[5]) { | |
const indexRotate = pipesRotate.map(v => v[0]).indexOf(index); | |
if (indexRotate >= 0) { | |
const newAngule = angles[dataPipe[5]] === 0 ? 360 : angles[dataPipe[5]]; | |
if (pipesRotate[indexRotate][1] + 15 <= newAngule) { | |
pipesRotate[indexRotate][1] += 15; | |
angle = pipesRotate[indexRotate][1]; | |
} else { | |
angle = newAngule; | |
pipesRotate.splice(indexRotate, 1); | |
actualWorld[1][index][3] = dataPipe[5]; | |
//Revisará las conexiones... | |
checkConectionPipe(); | |
} | |
} | |
} | |
//Realizar giro... | |
ctx.rotate((angle * Math.PI) / 180); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment