render params
This commit is contained in:
parent
53e27ce186
commit
b340f675bf
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@freeblox/engine",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"description": "Freeblox Engine",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -10,7 +10,9 @@
|
||||
"dev": "tsc --watch",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"files": ["dist"],
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
|
@ -3,10 +3,11 @@ import {
|
||||
Scene,
|
||||
Vector2,
|
||||
WebGLRenderer as ThreeWebGLRenderer,
|
||||
WebGLRendererParameters,
|
||||
} from 'three';
|
||||
|
||||
export class WebGLRenderer {
|
||||
public renderer = new ThreeWebGLRenderer();
|
||||
public renderer = new ThreeWebGLRenderer(this.params);
|
||||
public camera = new PerspectiveCamera(
|
||||
75,
|
||||
this.resolution.x / this.resolution.y,
|
||||
@ -17,7 +18,8 @@ export class WebGLRenderer {
|
||||
|
||||
constructor(
|
||||
public viewport: HTMLElement,
|
||||
public resolution = new Vector2(1080, 720)
|
||||
public resolution = new Vector2(1080, 720),
|
||||
private params?: WebGLRendererParameters
|
||||
) {
|
||||
this.renderer.setSize(resolution.x, resolution.y);
|
||||
viewport.appendChild(this.renderer.domElement);
|
||||
|
Loading…
Reference in New Issue
Block a user