MCPcopy Create free account
hub / github.com/melonjs/melonJS / beginPath

Method beginPath

packages/melonjs/src/geometries/path2d.js:225–233  ·  view source on GitHub ↗

* begin a new path

()

Source from the content-addressed store, hash-verified

223 * begin a new path
224 */
225 beginPath() {
226 // empty the cache and recycle all vectors
227 this.points.forEach((point) => {
228 pointPool.release(point);
229 });
230 this.isDirty = true;
231 this.points.length = 0;
232 this.startPoint.set(0, 0);
233 }
234
235 /**
236 * causes the point of the pen to move back to the start of the current path.

Callers 15

parseSVGPathMethod · 0.95
drawTriangleMethod · 0.45
drawMethod · 0.45
toCanvasMethod · 0.45
bezier.spec.jsFile · 0.45
path2d.spec.jsFile · 0.45
linedash.spec.jsFile · 0.45
drawFrameGraphFunction · 0.45
drawMemGraphFunction · 0.45
makeReticleTextureFunction · 0.45
bakeLayerFunction · 0.45

Calls 3

releaseMethod · 0.65
forEachMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected