MCPcopy Index your code
hub / github.com/phaserjs/phaser / createMockPath

Function createMockPath

tests/gameobjects/components/PathFollower.test.js:18–41  ·  view source on GitHub ↗
(startX, startY)

Source from the content-addressed store, hash-verified

16}
17
18function createMockPath (startX, startY)
19{
20 startX = startX || 0;
21 startY = startY || 0;
22
23 return {
24 getStartPoint: function (vec)
25 {
26 vec.x = startX;
27 vec.y = startY;
28 return vec;
29 },
30 getPoint: function (t, vec)
31 {
32 if (vec)
33 {
34 vec.x = t * 100;
35 vec.y = t * 50;
36 return vec;
37 }
38 return { x: t * 100, y: t * 50 };
39 }
40 };
41}
42
43function createFollower ()
44{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…