22 lines
511 B
TypeScript
22 lines
511 B
TypeScript
import { WebGLCanvas } from "state/WebGLCanvas";
|
|
import { WebGLState } from "state/WebGLState";
|
|
import type { WebGLCanvasOption } from "state/WebGLCanvas";
|
|
|
|
type WebGLRendererOption = WebGLCanvasOption;
|
|
|
|
class WebGLRenderer {
|
|
|
|
public canvas: WebGLCanvas;
|
|
|
|
public state: WebGLState;
|
|
|
|
public constructor(option: WebGLRendererOption) {
|
|
|
|
this.canvas = new WebGLCanvas(option);
|
|
|
|
this.state = new WebGLState();
|
|
this.state.bindCanvas(this.canvas);
|
|
}
|
|
}
|
|
|
|
export { WebGLRenderer }; |