Initial commit

This commit is contained in:
MiltonCandelero
2020-09-03 22:58:43 -03:00
commit 28901ad7c3
8 changed files with 7408 additions and 0 deletions

33
src/index.html Normal file
View File

@@ -0,0 +1,33 @@
<html>
<head>
<title>Pixi Hotwire</title>
<meta id="viewport" name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
#pixi-content {
background: #000000;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<noscript>Please enable JavaScript in your web browser to view this page.</noscript>
<div id="pixi-content"><canvas id="pixi-canvas" /></div>
</body>
<script defer src="./index.ts"></script>
</html>

18
src/index.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Application, Sprite } from 'pixi.js'
const app = new Application({
view: document.getElementById("pixi-canvas") as HTMLCanvasElement,
resolution: window.devicePixelRatio || 1,
backgroundColor: 0x6495ed,
width: 640,
height: 480
});
const clampy: Sprite = Sprite.from("clampy.png");
clampy.anchor.set(0.5);
clampy.x = app.screen.width / 2;
clampy.y = app.screen.height / 2;
app.stage.addChild(clampy);