diff --git a/lib/Character.js b/lib/Character.js index 4218f8e..ba47450 100644 --- a/lib/Character.js +++ b/lib/Character.js @@ -897,7 +897,7 @@ class Character { // set bounding box from mesh baby this.bbox.setFromObject(this.mesh) // push out the eedges a little so collision works better - this.bbox.expandByScalar(0.002) + this.bbox.expandByScalar(0.0022) if(this.customBboxScale){ // alter by custom scale diff --git a/lib/DeskLamp.js b/lib/DeskLamp.js index 13810cc..d20a9e4 100644 --- a/lib/DeskLamp.js +++ b/lib/DeskLamp.js @@ -9,14 +9,16 @@ class DeskLamp extends Character { let bbox = new THREE.Box3(new THREE.Vector3(), new THREE.Vector3()) - super(null, bbox, [255,255,255], null, null, null, place.models["/models/desklamp.glb"] ) + // hopefully make it so the box is a little less insane when grab + let customBboxScale = new THREE.Vector3(0.8,0.8,0.8) + super(null, bbox, [255,255,255], null, null, null, place.models["/models/desklamp.glb"], customBboxScale ) // the actual light 222200 this.desklight = new THREE.SpotLight("#555533", 0.0012) this.desklight.castShadow = true this.desklight.shadow.mapSize.width = 1024*4 this.desklight.shadow.mapSize.height = 1024*4 - this.desklight.position.set(-0.85,1.262,-0.18) + this.desklight.position.set(-0.78,1.262,-0.22) // this.desklight.position.set(-0.85,1.262,-0.78) this.desklight.lookAt(-1,-5,0) this.desklight.shadow.camera.near = 0.5; // default @@ -33,8 +35,8 @@ class DeskLamp extends Character { this.move(this.desklight.position.x,this.desklight.position.y,this.desklight.position.z) this.mesh.scale.set(0.1,0.1,0.1) - this.flatRoty = Math.PI*-1.495 - this.roty = Math.PI*-1.495 + this.flatRoty = Math.PI*-1.295 + this.roty = Math.PI*-1.295 this.mesh.rotation.y = this.roty place.characters[this.mesh.id] = this @@ -60,4 +62,4 @@ class DeskLamp extends Character { } } -export { DeskLamp } \ No newline at end of file +export { DeskLamp } diff --git a/lib/MusicPlayer.js b/lib/MusicPlayer.js index e50f74a..bd06736 100644 --- a/lib/MusicPlayer.js +++ b/lib/MusicPlayer.js @@ -103,6 +103,10 @@ class MusicPlayer extends Character { this.loadAlbum(this.album.trackUrls) } + this.volume = 0.5 + this.volumeTimer = new Timer() + this.volumeTimer.start() + // juz do buttons let stopgeo = new THREE.BoxGeometry( 0.03, 0.02, 0.04 ) let stopmat = new THREE.MeshStandardMaterial( { bumpMap: stopButtonBump, color: "#ff00ff", bumpScale: 0.008 }) @@ -466,7 +470,7 @@ class MusicPlayer extends Character { url = urls[i] // wait to actually load cause its too much up front - sound = new Sound("track"+i, urls[i], 0.5, false, false, false) + sound = new Sound("track"+i, urls[i], this.volume, false, false, false) sound.mesh.position.set(this.mesh.position.x,this.mesh.position.y,this.mesh.position.z) this.tracks.push( sound ) } @@ -503,15 +507,19 @@ class MusicPlayer extends Character { changeVolume(inc){ if( this.playing && this.tracks.length>1 && this.tracks[this.currentTrack].loaded ){ - // inc player volume - this.volume = util.incInRange(this.volume, inc, 0, 10) - - // set vol for all tracks so it stays consistent after track change - for(var i=0; i 800){ + this.volumeTimer.reset() + + // inc player volume + this.volume = util.incInRange(this.volume, inc, 0, 10) + // set vol for all tracks so it stays consistent after track change + for(var i=0; i { + // shoot it in a random direction + for(var i=0; i { textureLoader.load('/textures/buttonGrainB.png', (bump) => { @@ -59,7 +58,6 @@ class Remote extends Character { let upoffset = new THREE.Vector3(0.0125,0.01,-0.03) let upClick = () => { console.log( 'hey upper' ) - place.spotlight.intensity = util.incInRange(place.spotlight.intensity, 0.001, 0, 0.048) } @@ -87,7 +85,7 @@ class Remote extends Character { this.components.push( this.downButton ) // vol up button - let upVoloffset = new THREE.Vector3(0.0125,0.01,0.03) + let upVoloffset = new THREE.Vector3(-0.0125,0.01,0.03) let upVolClick = () => { console.log( 'upvol fucker' ) place.musicPlayer.changeVolume(-0.1) @@ -100,7 +98,7 @@ class Remote extends Character { this.components.push( this.upVolButton ) // vol down button - let downVoloffset = new THREE.Vector3(-0.0125,0.01,0.03) + let downVoloffset = new THREE.Vector3(0.0125,0.01,0.03) let downVolClick = () => { console.log( 'downvol fucker' ) place.musicPlayer.changeVolume(0.1) @@ -112,18 +110,15 @@ class Remote extends Character { scene.add(this.downVolButton.mesh) this.components.push( this.downVolButton ) - + this.move(position.x,position.y,position.z) }) }) - - - this.move(position.x,position.y,position.z) - // dont rotate and flatten, makes this veeeery difficult this.rotatable = false this.lightness = 0.003 } } - export { Remote } \ No newline at end of file + export { Remote } + \ No newline at end of file diff --git a/sounds/freerelax-rain-clipped-short.mp3 b/sounds/freerelax-rain-clipped-short.mp3 new file mode 100644 index 0000000..c834972 Binary files /dev/null and b/sounds/freerelax-rain-clipped-short.mp3 differ diff --git a/sounds/freerelax-rain-clipped.mp3 b/sounds/freerelax-rain-clipped.mp3 deleted file mode 100644 index 3b62fce..0000000 Binary files a/sounds/freerelax-rain-clipped.mp3 and /dev/null differ diff --git a/sounds/gpStreamClip-short.mp3 b/sounds/gpStreamClip-short.mp3 new file mode 100644 index 0000000..4d1f594 Binary files /dev/null and b/sounds/gpStreamClip-short.mp3 differ diff --git a/sounds/gpStreamClip.mp3 b/sounds/gpStreamClip.mp3 deleted file mode 100644 index 11db5c6..0000000 Binary files a/sounds/gpStreamClip.mp3 and /dev/null differ diff --git a/textures/forest-small.png b/textures/forest-small.png new file mode 100644 index 0000000..72e12cd Binary files /dev/null and b/textures/forest-small.png differ diff --git a/textures/forest.png b/textures/forest.png deleted file mode 100644 index 733ab2f..0000000 Binary files a/textures/forest.png and /dev/null differ diff --git a/textures/forestB.png b/textures/forestB.png deleted file mode 100644 index d410ec1..0000000 Binary files a/textures/forestB.png and /dev/null differ