Separate Engine Service Functionality from Component

This commit is contained in:
Marty Oehme 2018-08-25 09:33:15 +02:00
parent 842cbeca1f
commit 976ec8097d
4 changed files with 47 additions and 23 deletions

View file

@ -8,7 +8,6 @@ import 'package:rules_of_living/service/engine_service.dart';
templateUrl: "simulation_component.html",
directives: [coreDirectives],
providers: [],
// styleUrls: const ['package:angular_components/app_layout/layout.scss.css'],
)
class SimulationComponent implements OnInit {
final EngineService engineService;
@ -29,13 +28,6 @@ class SimulationComponent implements OnInit {
If you see this\n
the app is broken :(
''', canvas.width / 2 - 50, canvas.height / 2);
engineService.create(canvas);
html.window.animationFrame.then(animFrame);
}
void animFrame(num now) {
engineService.engine.process(now);
html.window.animationFrame.then(animFrame);
// engineService.create(canvas);
}
}