rm func
This commit is contained in:
parent
03c6ac0447
commit
25b3bb2925
31
src/index.ts
31
src/index.ts
@ -9,10 +9,9 @@ import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader";
|
||||
//import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
|
||||
//import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass';
|
||||
//import { RenderPass } from "three/examples/jsm/postprocessing/RenderPass";
|
||||
// https://github.com/pmndrs/postprocessing
|
||||
import { BloomEffect, EffectComposer, EffectPass, RenderPass } from "postprocessing";
|
||||
|
||||
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
// vrma
|
||||
@ -124,33 +123,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
controls.enableRotate = true;
|
||||
controls.target.set( 0.0, 1.0, 0.0 );
|
||||
|
||||
function floor_default(){
|
||||
scene.background = new THREE.Color(0xffffff);
|
||||
const directionalLight = new THREE.DirectionalLight(0xffffff);
|
||||
directionalLight.position.set(1, 1, 1);
|
||||
|
||||
scene.add(directionalLight);
|
||||
const ambientLight = new THREE.AmbientLight(0x333333);
|
||||
scene.add(ambientLight);
|
||||
|
||||
let floor = new Mesh(
|
||||
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);
|
||||
grid.position.set(Math.round(0), 0, Math.round(0));
|
||||
scene.fog = new Fog(0xffffff, 3, 20);
|
||||
scene.fog?.color.set(0xffffff);
|
||||
}
|
||||
|
||||
//scene.background = new THREE.Color(0xffffff);
|
||||
const directionalLight = new THREE.DirectionalLight(0xffffff);
|
||||
directionalLight.position.set(1, 1, 1);
|
||||
@ -179,7 +151,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
camera.updateProjectionMatrix();
|
||||
}
|
||||
|
||||
// https://github.com/pmndrs/postprocessing
|
||||
let composer = new EffectComposer(renderer, {
|
||||
frameBufferType: HalfFloatType
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user