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
PIXI.Graphics.prototype.drawDashLine = function(toX, toY, dashPct = 7, gapPct = 3) { | |
const lastPosition = this.currentPath.points; | |
let ax = lastPosition[lastPosition.length - 2] || 0; | |
let ay = lastPosition[lastPosition.length - 1] || 0; | |
let pctAt = dashPct; | |
while(pctAt < 101){ | |
let p = getCoordsAlongPath([ay,ax,toY,toX], pctAt); | |
let pd = getCoordsAlongPath([ay,ax,toY,toX], pctAt + gapPct); | |
this.lineTo(p.lng, p.lat); | |
this.moveTo(pd.lng, pd.lat); |
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
PIXI.Graphics.prototype.drawDashLine = function(toX, toY, dash = 7, gap = 3) { | |
//TYPE B. actual points | |
const lastPos = this.currentPath.points; | |
let ax = lastPos[lastPos.length - 2] || 0; | |
let ay = lastPos[lastPos.length - 1] || 0; | |
let xlen = toX - ax; | |
let ylen = toY - ay; | |
let lineLen = getDistanceBetweenPoints(ax, ay, toX, toY); | |
let totalDashes = lineLen / (dash + gap); | |
let dashes = 0; |
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
$out = array(); | |
exec('cmd /c whoami 2>&1', $out, $exitcode); | |
print_r($out); |