MCPcopy Index your code
hub / github.com/NikLever/ThreeJS-PathEditor / convertPathToScreen

Method convertPathToScreen

graph.js:345–350  ·  view source on GitHub ↗
( x, y )

Source from the content-addressed store, hash-verified

343 }
344
345 convertPathToScreen( x, y ){
346 const xOrg = this.canvas.width * this.config.yAxis;
347 const yOrg = this.canvas.height - this.canvas.height * this.config.xAxis;
348 const scale = (this.canvas.width * 0.95 - xOrg)/ this.config.xMax;
349 return { x: x * scale + xOrg, y: y * scale + yOrg };
350 }
351
352 scalePathValueToScreen( value ){
353 const xOrg = this.canvas.width * this.config.yAxis;

Callers 3

drawNodeMethod · 0.95
drawGhostsMethod · 0.95
insertNodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected