MCPcopy Create free account
hub / github.com/phaserjs/phaser / createMockOp

Function createMockOp

tests/gameobjects/particles/Particle.test.js:19–28  ·  view source on GitHub ↗
(returnValue)

Source from the content-addressed store, hash-verified

17}
18
19function createMockOp (returnValue)
20{
21 var val = (returnValue !== undefined) ? returnValue : 0;
22 return {
23 active: false,
24 steps: 0,
25 onEmit: function (particle, key) { return val; },
26 onUpdate: function (particle, key, t, current) { return current; }
27 };
28}
29
30// An op that always returns its fixed value from both onEmit and onUpdate
31function createFixedOp (returnValue)

Callers 2

createMockOpsFunction · 0.85
Particle.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…