add feedback
This commit is contained in:
parent
a740e6c863
commit
a4bb1f7dc9
@ -3,23 +3,42 @@ import { Settings } from './settings.js';
|
||||
import { Pointer } from './pointer.js';
|
||||
|
||||
export class App {
|
||||
#version;
|
||||
|
||||
constructor(
|
||||
canvas,
|
||||
w,
|
||||
h,
|
||||
options = {
|
||||
backgroundColor: '#ffcc68',
|
||||
welcome: true,
|
||||
}
|
||||
) {
|
||||
this.#version = '0.1.0';
|
||||
|
||||
this.view = document.createElement('canvas');
|
||||
|
||||
this.canvas = this.view;
|
||||
this.context = this.canvas.getContext('2d');
|
||||
this.options = options;
|
||||
|
||||
// check options || FIXIT:
|
||||
if (typeof this.options.backgroundColor === 'undefined') {
|
||||
this.options.backgroundColor = '#ffcc68';
|
||||
}
|
||||
if (typeof this.options.welcome === 'undefined') {
|
||||
this.options.welcome = true;
|
||||
}
|
||||
|
||||
this.scene = new Scene(this.canvas, this.context, w, h);
|
||||
this.prevTime = Date.now();
|
||||
|
||||
if (this.options.welcome) {
|
||||
console.log('ujs engine');
|
||||
console.log('version:', this.#version);
|
||||
console.log('feedback:', 'iiiypuk {dog} fastmail.fm');
|
||||
}
|
||||
|
||||
Pointer.init();
|
||||
|
||||
this.run();
|
||||
|
Loading…
Reference in New Issue
Block a user