Skip to content

Commit

Permalink
fix scene.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wheattoast11 committed Nov 30, 2024
1 parent c9fbd64 commit 1da28aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/three/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass';
import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass';

export class Scene {
constructor() {
constructor(container, dimensions) {
this.scene = new THREE.Scene();
this.camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
this.camera = new THREE.PerspectiveCamera(75, dimensions.width / dimensions.height, 0.1, 1000);
this.renderer = new THREE.WebGLRenderer({
canvas: document.querySelector('#bg'),
antialias: true,
alpha: true
});
this.renderer.setSize(dimensions.width, dimensions.height);
container.appendChild(this.renderer.domElement);

this.composer = null;
this.flowField = new FlowField();
Expand Down

0 comments on commit 1da28aa

Please sign in to comment.