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';
|
import { Pointer } from './pointer.js';
|
||||||
|
|
||||||
export class App {
|
export class App {
|
||||||
|
#version;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
canvas,
|
canvas,
|
||||||
w,
|
w,
|
||||||
h,
|
h,
|
||||||
options = {
|
options = {
|
||||||
backgroundColor: '#ffcc68',
|
backgroundColor: '#ffcc68',
|
||||||
|
welcome: true,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
this.#version = '0.1.0';
|
||||||
|
|
||||||
this.view = document.createElement('canvas');
|
this.view = document.createElement('canvas');
|
||||||
|
|
||||||
this.canvas = this.view;
|
this.canvas = this.view;
|
||||||
this.context = this.canvas.getContext('2d');
|
this.context = this.canvas.getContext('2d');
|
||||||
this.options = options;
|
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.scene = new Scene(this.canvas, this.context, w, h);
|
||||||
this.prevTime = Date.now();
|
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();
|
Pointer.init();
|
||||||
|
|
||||||
this.run();
|
this.run();
|
||||||
|
Loading…
Reference in New Issue
Block a user