Initial Commit

This commit is contained in:
Marty Oehme 2018-07-05 17:59:11 +02:00
parent 869faf2919
commit 0277e5ddc7
13 changed files with 268 additions and 1 deletions

BIN
web/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

22
web/index.html Normal file
View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="scaffolded-by" content="https://github.com/google/stagehand">
<title>rules_of_living</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico">
<script defer src="main.dart.js"></script>
</head>
<body>
<div id="output">
<canvas id="canvas"></canvas>
</div>
</body>
</html>

19
web/main.dart Normal file
View file

@ -0,0 +1,19 @@
import 'dart:html' as html;
import 'package:rules_of_living/App.dart';
html.CanvasElement el;
App engine;
void main() {
el = new html.CanvasElement(width: 500, height: 500);
html.querySelector('#output').append(el);
engine = new App(el);
html.window.animationFrame.then(animFrame);
}
void animFrame(num now) {
engine.process(now);
html.window.animationFrame.then(animFrame);
}

14
web/styles.css Normal file
View file

@ -0,0 +1,14 @@
@import url(https://fonts.googleapis.com/css?family=Roboto);
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
}
#output {
padding: 20px;
text-align: center;
}