|
@@ -35,13 +35,16 @@
|
|
import { WebGLRenderer } from 'three/src/renderers/WebGLRenderer';
|
|
import { WebGLRenderer } from 'three/src/renderers/WebGLRenderer';
|
|
import anime from 'animejs';
|
|
import anime from 'animejs';
|
|
import { randInt } from 'three/src/math/MathUtils';
|
|
import { randInt } from 'three/src/math/MathUtils';
|
|
|
|
+ import { LinearToneMapping } from 'three/src/constants';
|
|
|
|
|
|
const scene = new Scene()
|
|
const scene = new Scene()
|
|
const camera = new PerspectiveCamera(80, 1, 0.1, 1000)
|
|
const camera = new PerspectiveCamera(80, 1, 0.1, 1000)
|
|
const renderer = new WebGLRenderer({ antialias: true, alpha: true })
|
|
const renderer = new WebGLRenderer({ antialias: true, alpha: true })
|
|
renderer.setPixelRatio(window.devicePixelRatio);
|
|
renderer.setPixelRatio(window.devicePixelRatio);
|
|
- const directionalLight = new DirectionalLight(0x808080)
|
|
|
|
- const ambientLight = new AmbientLight(0x808080*1.75)
|
|
|
|
|
|
+ renderer.toneMapping = LinearToneMapping
|
|
|
|
+ renderer.toneMappingExposure = 2.5
|
|
|
|
+ const directionalLight = new DirectionalLight(0xffffff)
|
|
|
|
+ const ambientLight = new AmbientLight(0xffffff)
|
|
const geometry = new BoxGeometry(1, 1, 1)
|
|
const geometry = new BoxGeometry(1, 1, 1)
|
|
const blueMaterial = new MeshStandardMaterial({ color: 'dodgerblue' })
|
|
const blueMaterial = new MeshStandardMaterial({ color: 'dodgerblue' })
|
|
const greenMaterial = new MeshStandardMaterial({ color: 'greenyellow' })
|
|
const greenMaterial = new MeshStandardMaterial({ color: 'greenyellow' })
|