You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
657 B
31 lines
657 B
import React from 'react';
|
|
import './App.css';
|
|
import { Demo1 } from "./examples/Demo1";
|
|
import { Test } from "./examples/Test";
|
|
import { Application } from "./renderi/core/Application";
|
|
|
|
function fCallback(app: Application): void {
|
|
console.log(app.fps);
|
|
}
|
|
|
|
|
|
function test() {
|
|
let canvas: HTMLCanvasElement | null = document.getElementById('render') as HTMLCanvasElement;
|
|
let rect: ClientRect = canvas.getBoundingClientRect();
|
|
console.log(rect);
|
|
let instance = new Test(canvas);
|
|
//instance.frameCallback = fCallback;
|
|
instance.start();
|
|
}
|
|
|
|
function App() {
|
|
|
|
test();
|
|
|
|
return (
|
|
<div className="App">
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default App;
|