Skip to content

Commit

Permalink
🐛 Fix elgato light
Browse files Browse the repository at this point in the history
  • Loading branch information
brunosimon committed Sep 3, 2021
1 parent fb85f8b commit a563b56
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/Experience/ElgatoLight.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import * as THREE from 'three'

import Experience from './Experience.js'

export default class ElgatoLight
{
constructor()
{
this.experience = new Experience()
this.resources = this.experience.resources
this.scene = this.experience.scene

this.setModel()
}

setModel()
{
this.model = {}

this.model.mesh = this.resources.items.elgatoLightModel.scene.children[0]
this.scene.add(this.model.mesh)

this.model.mesh.material = new THREE.MeshBasicMaterial({
color: 0xffffff
})
}
}
7 changes: 7 additions & 0 deletions src/Experience/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import GoogleLeds from './GoogleLeds.js'
import LoupedeckButtons from './LoupedeckButtons.js'
import CoffeeSteam from './CoffeeSteam.js'
import TopChair from './TopChair.js'
import ElgatoLight from './ElgatoLight.js'
import BouncingLogo from './BouncingLogo.js'

export default class World
Expand All @@ -25,6 +26,7 @@ export default class World
this.setLoupedeckButtons()
this.setCoffeeSteam()
this.setTopChair()
this.setElgatoLight()
this.setBouncingLogo()
}
})
Expand Down Expand Up @@ -82,6 +84,11 @@ export default class World
this.topChair = new TopChair()
}

setElgatoLight()
{
this.elgatoLight = new ElgatoLight()
}

setBouncingLogo()
{
this.bouncingLogo = new BouncingLogo()
Expand Down
2 changes: 2 additions & 0 deletions src/Experience/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default [

{ name: 'coffeeSteamModel', source: '/assets/coffeeSteamModel.glb', type: 'model' },

{ name: 'elgatoLightModel', source: '/assets/elgatoLightModel.glb', type: 'model' },

{ name: 'threejsJourneyLogoTexture', source: '/assets/threejsJourneyLogo.png', type: 'texture' },

{ name: 'bakedTexture', source: '/assets/baked.jpg', type: 'texture' },
Expand Down
Binary file added static/assets/elgatoLightModel.glb
Binary file not shown.

0 comments on commit a563b56

Please sign in to comment.