MCPcopy Create free account
hub / github.com/codecombat/codecombat / showMe

Function showMe

test/app/lib/surface/SingularSprite.spec.js:20–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 let stage = null;
19
20 const showMe = function() {
21 const canvas = $('<canvas width="600" height="400"></canvas>').css('position', 'absolute').css('index', 1000).css('background', 'white');
22 $('body').append(canvas);
23 stage = new createjs.Stage(canvas[0]);
24 stage.addChild(singularSprite);
25 const scale = 3;
26 stage.scaleX = (stage.scaleY = scale);
27 stage.regX = -300 / scale;
28 stage.regY = -200 / scale;
29 window.stage = stage;
30
31 let ticks = 0;
32 const listener = {
33 handleEvent() {
34 if (ticks >= 100) { return; }
35 ticks += 1;
36 return stage.update();
37 }
38 };
39 return createjs.Ticker.addEventListener("tick", listener);
40 };
41
42 afterEach(function() {
43 const g = new createjs.Graphics();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected