DelayNoMore/jsexport/index.html

19 lines
844 B
HTML

<html>
<head>
<script src="jsexport.js"></script>
</head>
<script>
var minStep = 8;
var space = gopkgs.NewCollisionSpaceJs(2048, 2048, 8, 8);
var snapIntoPlatformOverlap = 0.1;
var spaceOffsetX = 0;
var spaceOffsetY = 0;
var a = gopkgs.GenerateRectColliderJs(189, 497, 48, 48, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, spaceOffsetX, spaceOffsetY, "Player");
space.Add(a);
var b = gopkgs.GenerateRectColliderJs(189, 504, 48, 48, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, spaceOffsetX, spaceOffsetY, "Player");
space.Add(b);
var collision = gopkgs.CheckCollisionJs(a, 0, 0);
console.log(collision);
</script>
</html>