MCPcopy
hub / github.com/phaserjs/phaser / makeDrawingContext

Function makeDrawingContext

tests/gameobjects/layer/LayerWebGLRenderer.test.js:6–37  ·  view source on GitHub ↗
(blendMode)

Source from the content-addressed store, hash-verified

4var SKIP_CHECK = -1; // CONST.BlendModes.SKIP_CHECK
5
6function makeDrawingContext (blendMode)
7{
8 var ctx = {
9 camera: {},
10 blendMode: blendMode !== undefined ? blendMode : 0,
11 clones: [],
12 setBlendModeCalled: false,
13 useCalled: false,
14 releaseCalled: false,
15 setBlendMode: function (mode)
16 {
17 this.blendMode = mode;
18 this.setBlendModeCalled = true;
19 },
20 use: function ()
21 {
22 this.useCalled = true;
23 },
24 release: function ()
25 {
26 this.releaseCalled = true;
27 },
28 getClone: function ()
29 {
30 var clone = makeDrawingContext(this.blendMode);
31 clone.isClone = true;
32 this.clones.push(clone);
33 return clone;
34 }
35 };
36 return ctx;
37}
38
39function makeChild (options)
40{

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…