cellular-automata/web/main.dart
2018-07-05 17:59:11 +02:00

19 lines
394 B
Dart

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);
}