GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — added test for collision position override · onaluf/gameQuery@d28d5f5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tests/human
    • collision
      • test1.html
    • index.html
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tests/human/collision/test1.html‎

Copy file name to clipboardExpand all lines: tests/human/collision/test1.html
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
var blue = new $.gameQuery.Animation({imageURL: "blue.png",
1111
type: $.gameQuery.ANIMATION_HORIZONTAL});
1212

13-
$("#playground").playground({height: 640, width: 350});
13+
$("#playground").playground({height: 450, width: 350});
1414

1515
// no group, no translation, no transformation
1616
$.playground()
@@ -54,6 +54,11 @@
5454
.addSprite("b7",{animation: red, width: 30, height: 30, posx: 30, posy: 315});
5555
$("#b7").scale(1.5);
5656

57+
// no group, no translation, override
58+
$.playground()
59+
.addSprite("a8",{animation: red, width: 30, height: 30, posx: 0, posy: 370})
60+
.addSprite("b8",{animation: red, width: 30, height: 30, posx: 40, posy: 385});
61+
5762

5863
// now we try to turn every b* sprites blue
5964
$("#a1").collision().each(function() {
@@ -84,12 +89,16 @@
8489
$(this).setAnimation(blue);
8590
});
8691

92+
$("#a8").collision({x: 35}).each(function() {
93+
$(this).setAnimation(blue);
94+
});
95+
8796
$.playground().startGame();
8897
});
8998
</script>
9099
</head>
91100
<body>
92101
<h2>Each line shoud contains a blue square in front of a red one:</h2>
93-
<div id="playground" style="width: 350px; height: 50px; background: white"></div>
102+
<div id="playground" style="width: 350px; height: 450px; background: white"></div>
94103
</body>
95104
</html>
Collapse file

‎tests/human/index.html‎

Copy file name to clipboardExpand all lines: tests/human/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<iframe src="./transformation/test2.html" width="100%" height="200px" frameborder="0"></iframe>
77
<iframe src="./tiles/test1.html" width="100%" height="200px" frameborder="0"></iframe>
88
<iframe src="./tiles/test2.html" width="100%" height="200px" frameborder="0"></iframe>
9-
<iframe src="./collision/test1.html" width="100%" height="400px" frameborder="0"></iframe>
9+
<iframe src="./collision/test1.html" width="100%" height="500px" frameborder="0"></iframe>
1010
</body>
1111
</html>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.