-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
7,864 additions
and
14,912 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import { render } from 'lit-html'; | ||
import * as THREE from 'three'; | ||
// import { render } from 'lit-html'; | ||
// import * as THREE from 'three'; | ||
|
||
const scene = new THREE.Scene(); | ||
const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); | ||
// const scene = new THREE.Scene(); | ||
// const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); | ||
|
||
const renderer = new THREE.WebGLRenderer({ | ||
canvas: document.querySelector('#bg3') | ||
}); | ||
// const renderer = new THREE.WebGLRenderer({ | ||
// canvas: document.querySelector('#bg3') | ||
// }); | ||
|
||
const sizes = { | ||
width: window.innerWidth, | ||
height: window.innerHeight | ||
} | ||
// const sizes = { | ||
// width: window.innerWidth, | ||
// height: window.innerHeight | ||
// } | ||
|
||
window.addEventListener('resize', () => | ||
{ | ||
// Update sizes | ||
sizes.width = window.innerWidth | ||
sizes.height = window.innerHeight | ||
// window.addEventListener('resize', () => | ||
// { | ||
// // Update sizes | ||
// sizes.width = window.innerWidth | ||
// sizes.height = window.innerHeight | ||
|
||
// Update camera | ||
camera.aspect = sizes.width / sizes.height | ||
camera.updateProjectionMatrix() | ||
// // Update camera | ||
// camera.aspect = sizes.width / sizes.height | ||
// camera.updateProjectionMatrix() | ||
|
||
// Update renderer | ||
renderer.setSize(sizes.width, sizes.height) | ||
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)) | ||
}) | ||
// // Update renderer | ||
// renderer.setSize(sizes.width, sizes.height) | ||
// renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)) | ||
// }) | ||
|
||
camera.position.z = 2; | ||
// camera.position.z = 2; | ||
|
||
|
||
renderer.render(scene,camera); | ||
// renderer.render(scene,camera); |