tweaking
This commit is contained in:
parent
0521e2f0ba
commit
c42ee23b5f
@ -33,27 +33,27 @@ export class TetraGUI extends GUI {
|
||||
let darkTexture, colorfullTexture
|
||||
switch (background) {
|
||||
case "Plasma":
|
||||
darkTexture = new THREE.TextureLoader(loadingManager).load("./images/plasma2.jpg", texture => {
|
||||
texture.wrapS = THREE.RepeatWrapping
|
||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||
texture.repeat.set(2, 1)
|
||||
})
|
||||
colorfullTexture = new THREE.TextureLoader(loadingManager).load("./images/plasma.jpg", texture => {
|
||||
darkTexture = new THREE.TextureLoader(loadingManager).load("./images/plasma.jpg", texture => {
|
||||
texture.wrapS = THREE.RepeatWrapping
|
||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||
texture.repeat.set(1, 1)
|
||||
})
|
||||
colorfullTexture = new THREE.TextureLoader(loadingManager).load("./images/plasma2.jpg", texture => {
|
||||
texture.wrapS = THREE.RepeatWrapping
|
||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||
texture.repeat.set(2, 1)
|
||||
})
|
||||
loadingManager.onLoad = function() {
|
||||
scene.vortex.darkCylinder.material.map = darkTexture
|
||||
scene.vortex.darkCylinder.material.opacity = 0.75
|
||||
scene.vortex.darkCylinder.material.opacity = 0.1
|
||||
scene.vortex.colorFullCylinder.material.map = colorfullTexture
|
||||
scene.vortex.colorFullCylinder.material.opacity = 0.075
|
||||
scene.vortex.colorFullCylinder.material.opacity = 0.7
|
||||
|
||||
scene.vortex.globalRotation = 0.028
|
||||
scene.vortex.darkTextureRotation = 0.005
|
||||
scene.vortex.darkMoveForward = 0.012
|
||||
scene.vortex.darkMoveForward = 0.009
|
||||
scene.vortex.colorFullTextureRotation = 0.006
|
||||
scene.vortex.colorFullMoveForward = 0.016
|
||||
scene.vortex.colorFullMoveForward = 0.013
|
||||
|
||||
scene.ambientLight.intensity = 0.5
|
||||
scene.directionalLight.intensity = 6
|
||||
@ -133,6 +133,10 @@ export class TetraGUI extends GUI {
|
||||
cameraPosition.add(scene.camera.position, "x")
|
||||
cameraPosition.add(scene.camera.position, "y")
|
||||
cameraPosition.add(scene.camera.position, "z")
|
||||
|
||||
let light = this.debug.addFolder("lights intensity").close()
|
||||
light.add(scene.ambientLight, "intensity").name("ambient").min(0).max(20)
|
||||
light.add(scene.directionalLight, "intensity").name("directional").min(0).max(20)
|
||||
|
||||
let directionalLightPosition = this.debug.addFolder("directionalLight.position").close()
|
||||
directionalLightPosition.add(scene.directionalLight.position, "x")
|
||||
@ -144,19 +148,15 @@ export class TetraGUI extends GUI {
|
||||
directionalLightTargetPosition.add(scene.directionalLight.target.position, "y")
|
||||
directionalLightTargetPosition.add(scene.directionalLight.target.position, "z")
|
||||
|
||||
let light = this.debug.addFolder("lights intensity").close()
|
||||
light.add(scene.ambientLight, "intensity").name("ambient").min(0).max(20)
|
||||
light.add(scene.directionalLight, "intensity").name("directional").min(0).max(20)
|
||||
|
||||
let vortex = this.debug.addFolder("vortex opacity").close()
|
||||
vortex.add(scene.vortex.darkCylinder.material, "opacity").name("dark").min(0).max(1)
|
||||
vortex.add(scene.vortex.colorFullCylinder.material, "opacity").name("colorFull").min(0).max(1)
|
||||
|
||||
let material = this.debug.addFolder("minoes material").close()
|
||||
material.add(minoMaterial, "opacity").min(0).max(1)
|
||||
//material.add(minoMaterial, "reflectivity").min(0).max(1)
|
||||
material.add(minoMaterial, "roughness").min(0).max(1)
|
||||
material.add(minoMaterial, "metalness").min(0).max(1)
|
||||
material.add(minoMaterial, "reflectivity").min(0).max(1)
|
||||
//material.add(minoMaterial, "roughness").min(0).max(1)
|
||||
//material.add(minoMaterial, "metalness").min(0).max(1)
|
||||
//material.add(minoMaterial, "attenuationDistance").min(0).max(1).hide()
|
||||
//material.add(minoMaterial, "ior").min(1).max(2).hide()
|
||||
//material.add(minoMaterial, "sheen").min(0).max(1).hide()
|
||||
|
@ -16,10 +16,10 @@ export class TetraScene extends THREE.Scene {
|
||||
this.add(this.ambientLight)
|
||||
|
||||
this.directionalLight = new THREE.DirectionalLight(0xffffff, 6)
|
||||
this.directionalLight.position.set(5, -20, 0)
|
||||
this.directionalLight.position.set(5, -100, -20)
|
||||
this.add(this.directionalLight)
|
||||
this.directionalLight.target = new THREE.Object3D()
|
||||
this.directionalLight.target.position.set(5, -10, 20)
|
||||
this.directionalLight.target.position.set(5, 0, 0)
|
||||
this.add(this.directionalLight.target)
|
||||
|
||||
|
||||
|
@ -8,10 +8,10 @@ export class Vortex extends THREE.Group {
|
||||
this.globalRotation = 0.028
|
||||
|
||||
this.darkTextureRotation = 0.006
|
||||
this.darkMoveForward = 0.011
|
||||
this.darkMoveForward = 0.009
|
||||
|
||||
this.colorFullTextureRotation = 0.006
|
||||
this.colorFullMoveForward = 0.09
|
||||
this.colorFullMoveForward = 0.013
|
||||
|
||||
const commonCylinderGeometry = new THREE.CylinderGeometry(35, 35, 500, 12, 1, true)
|
||||
|
||||
@ -21,13 +21,13 @@ export class Vortex extends THREE.Group {
|
||||
commonCylinderGeometry,
|
||||
new THREE.MeshLambertMaterial({
|
||||
side: THREE.BackSide,
|
||||
map: new THREE.TextureLoader(loadingManager).load("./images/plasma.jpg", (texture) => {
|
||||
map: new THREE.TextureLoader(loadingManager).load("./images/plasma2.jpg", (texture) => {
|
||||
texture.wrapS = THREE.RepeatWrapping
|
||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||
texture.repeat.set(2, 1)
|
||||
texture.repeat.set(1, 1)
|
||||
}),
|
||||
blending: THREE.AdditiveBlending,
|
||||
opacity: 0.75
|
||||
opacity: 0.1
|
||||
})
|
||||
)
|
||||
this.add(this.darkCylinder)
|
||||
@ -36,13 +36,13 @@ export class Vortex extends THREE.Group {
|
||||
commonCylinderGeometry,
|
||||
new THREE.MeshBasicMaterial({
|
||||
side: THREE.BackSide,
|
||||
map: new THREE.TextureLoader(loadingManager).load("./images/plasma2.jpg", (texture) => {
|
||||
map: new THREE.TextureLoader(loadingManager).load("./images/plasma.jpg", (texture) => {
|
||||
texture.wrapS = THREE.RepeatWrapping
|
||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||
texture.repeat.set(1, 1)
|
||||
texture.repeat.set(2, 1)
|
||||
}),
|
||||
blending: THREE.AdditiveBlending,
|
||||
opacity: 0.075
|
||||
opacity: 0.7
|
||||
})
|
||||
)
|
||||
this.add(this.colorFullCylinder)
|
||||
|
@ -71,21 +71,21 @@ const minoExtrudeSettings = {
|
||||
}
|
||||
let minoGeometry = new THREE.ExtrudeGeometry(minoFaceShape, minoExtrudeSettings)
|
||||
|
||||
/*let minoMaterial = new THREE.MeshBasicMaterial({
|
||||
let minoMaterial = new THREE.MeshBasicMaterial({
|
||||
envMap: environnement,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8,
|
||||
reflectivity: 0.9,
|
||||
})*/
|
||||
let minoMaterial = new THREE.MeshStandardMaterial({
|
||||
})
|
||||
/*let minoMaterial = new THREE.MeshStandardMaterial({
|
||||
envMap: environnement,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.6,
|
||||
roughness: 0.1,
|
||||
metalness: 0.9,
|
||||
})
|
||||
})/*
|
||||
/*
|
||||
let minoMaterial = new THREE.MeshPhysicalMaterial({
|
||||
envMap: environnement,
|
||||
|
Loading…
x
Reference in New Issue
Block a user