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

Function makeItem

tests/actions/FitToRegion.test.js:8–41  ·  view source on GitHub ↗
(overrides)

Source from the content-addressed store, hash-verified

6 var region;
7
8 function makeItem (overrides)
9 {
10 var base = {
11 x: 0,
12 y: 0,
13 width: 100,
14 height: 100,
15 originX: 0.5,
16 originY: 0.5,
17 scaleX: 1,
18 scaleY: 1,
19 setScale: function (x, y)
20 {
21 this.scaleX = x;
22 this.scaleY = (y === undefined) ? x : y;
23 },
24 scene: {
25 scale: {
26 width: 800,
27 height: 600
28 }
29 }
30 };
31
32 if (overrides)
33 {
34 for (var key in overrides)
35 {
36 base[key] = overrides[key];
37 }
38 }
39
40 return base;
41 }
42
43 beforeEach(function ()
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…