Initial Commit
This commit is contained in:
parent
869faf2919
commit
0277e5ddc7
13 changed files with 268 additions and 1 deletions
19
web/main.dart
Normal file
19
web/main.dart
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue