1
0
This commit is contained in:
syui 2024-03-19 21:40:29 +09:00
parent 5ca23af90d
commit fc4891b100
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
3 changed files with 8 additions and 24 deletions

5
dist/css/style.css vendored
View File

@ -28,6 +28,7 @@ button {
a { a {
text-decoration: none; text-decoration: none;
color: #000;
} }
a:hover{ a:hover{
@ -42,8 +43,8 @@ footer {
text-align: center; text-align: center;
} }
@media screen and (max-width:1000px) { @media screen and (max-width:700px) {
footer { footer {
font-size: 30px; font-size: 30px;
} }
} }

BIN
dist/img/2.hdr vendored Normal file

Binary file not shown.

View File

@ -16,10 +16,8 @@ window.addEventListener("DOMContentLoaded", () => {
if (canvas == null) return; if (canvas == null) return;
const scene = new THREE.Scene(); const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera( 70, canvas.clientWidth/canvas.clientHeight, 0.1, 2000);
const camera = new THREE.PerspectiveCamera( camera.position.set(0, 1, -1.5)
30, canvas.clientWidth/canvas.clientHeight, 0.1, 20);
camera.position.set(0.0, 0.9, -4.0)
camera.rotation.set(0.0, Math.PI, 0.0) camera.rotation.set(0.0, Math.PI, 0.0)
camera.lookAt(new THREE.Vector3(0, 0, 0)); camera.lookAt(new THREE.Vector3(0, 0, 0));
@ -115,7 +113,7 @@ window.addEventListener("DOMContentLoaded", () => {
const ambientLight = new THREE.AmbientLight(0x333333); const ambientLight = new THREE.AmbientLight(0x333333);
scene.add(ambientLight); scene.add(ambientLight);
const floor = new Mesh( let floor = new Mesh(
new BoxGeometry(50, 100), new BoxGeometry(50, 100),
new MeshLambertMaterial({ new MeshLambertMaterial({
color: 0xffffff, color: 0xffffff,
@ -140,18 +138,7 @@ window.addEventListener("DOMContentLoaded", () => {
const ambientLight = new THREE.AmbientLight(0x333333); const ambientLight = new THREE.AmbientLight(0x333333);
scene.add(ambientLight); scene.add(ambientLight);
//const floor = new Mesh( let grid = new GridHelper(500, 1000, 0xffffff, 0xffffff);
// new BoxGeometry(50, 100),
// new MeshLambertMaterial({
// color: 0xffffff,
// depthWrite: true,
// })
//);
//floor.position.y = -1.0;
//floor.rotation.x = -Math.PI / 2;
//scene.add(floor);
const grid = new GridHelper(50, 100, 0xffffff, 0xffffff);
scene.add(grid); scene.add(grid);
grid.position.set(Math.round(0), 0, Math.round(0)); grid.position.set(Math.round(0), 0, Math.round(0));
scene.fog = new Fog(0xffffff, 3, 20); scene.fog = new Fog(0xffffff, 3, 20);
@ -249,11 +236,7 @@ window.addEventListener("DOMContentLoaded", () => {
let hdr_r = 0; let hdr_r = 0;
function hdr_s() { function hdr_s() {
if (hdr_r == 0) { if (hdr_r >= 2) { hdr_r = 0; } else { hdr_r++; };
hdr_r = 1;
} else {
hdr_r = 0;
}
let hdr = "/img/" + hdr_r + ".hdr"; let hdr = "/img/" + hdr_r + ".hdr";
new RGBELoader().load(hdr, function (texture) { new RGBELoader().load(hdr, function (texture) {
texture.mapping = THREE.EquirectangularReflectionMapping; texture.mapping = THREE.EquirectangularReflectionMapping;