mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
44 lines
No EOL
1.3 KiB
HTML
44 lines
No EOL
1.3 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>phaser.js - a(nother) new beginning</title>
|
|
<script src="../src/Phaser.js"></script>
|
|
<script src="../src/system/Device.js"></script>
|
|
<script src="../src/core/SignalBinding.js"></script>
|
|
<script src="../src/core/Signal.js"></script>
|
|
<script src="../src/math/RandomDataGenerator.js"></script>
|
|
<script src="../src/math/Math.js"></script>
|
|
<script src="../src/geom/Point.js"></script>
|
|
<script src="../src/geom/Circle.js"></script>
|
|
<script src="../src/net/Net.js"></script>
|
|
<script src="../src/time/Time.js"></script>
|
|
<script src="../src/animation/Animation.js"></script>
|
|
<script src="../src/animation/Frame.js"></script>
|
|
<script src="../src/animation/FrameData.js"></script>
|
|
<script src="../src/animation/Parser.js"></script>
|
|
<script src="../src/loader/Cache.js"></script>
|
|
<script src="../src/loader/Loader.js"></script>
|
|
<script src="../src/Game.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var game = new Phaser.Game(this, '', 800, 600);
|
|
|
|
var a = new Phaser.Point(100, 100);
|
|
var b = new Phaser.Point(200, 100);
|
|
|
|
console.log('Point A', a.toString());
|
|
console.log('Point B', b.toString());
|
|
|
|
a.add(b.x, b.y);
|
|
|
|
console.log('Point A + B', a.toString());
|
|
|
|
console.log('Distance between A and B', Phaser.Point.distance(a, b));
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html> |