mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
living room lights emit texture toggling correctly
This commit is contained in:
parent
4eb31c9459
commit
bdfaadc892
2 changed files with 11 additions and 4 deletions
|
@ -28,12 +28,14 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
modelEmitOn: function(glowDisc) {
|
modelEmitOn: function(glowDisc) {
|
||||||
|
print("EBL TURN ON EMIT TEXTURE");
|
||||||
Entities.editEntity(glowDisc, {
|
Entities.editEntity(glowDisc, {
|
||||||
textures: 'emissive:' + EMISSIVE_TEXTURE_URL + ',\ndiffuse:"' + DIFFUSE_TEXTURE_URL + '"'
|
textures: 'emissive:' + EMISSIVE_TEXTURE_URL + ',\ndiffuse:"' + DIFFUSE_TEXTURE_URL + '"'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
modelEmitOff: function(glowDisc) {
|
modelEmitOff: function(glowDisc) {
|
||||||
|
print("EBL TURN OFF EMIT TEXTURE");
|
||||||
Entities.editEntity(glowDisc, {
|
Entities.editEntity(glowDisc, {
|
||||||
textures: 'emissive:"",\ndiffuse:"' + DIFFUSE_TEXTURE_URL + '"'
|
textures: 'emissive:"",\ndiffuse:"' + DIFFUSE_TEXTURE_URL + '"'
|
||||||
})
|
})
|
||||||
|
@ -96,6 +98,7 @@
|
||||||
found.push(result);
|
found.push(result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// Only one light for now
|
||||||
return found;
|
return found;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -28,14 +28,16 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
modelEmitOn: function(glowDisc) {
|
modelEmitOn: function(glowDisc) {
|
||||||
|
print("EBL TURN ON EMIT TEXTURE");
|
||||||
Entities.editEntity(glowDisc, {
|
Entities.editEntity(glowDisc, {
|
||||||
textures: 'emissive:' + EMISSIVE_TEXTURE_URL + ',\ndiffuse:"' + DIFFUSE_TEXTURE_URL + '"'
|
textures: 'Metal-brushed-light.jpg:"https://s3-us-west-1.amazonaws.com/hifi-content/alan/dev/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/Metal-brushed-light.jpg",\nTex.CeilingLight.Emit:"https://s3-us-west-1.amazonaws.com/hifi-content/alan/dev/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/CielingLight-On-Diffuse.jpg",\nTexCeilingLight.Diffuse:"https://s3-us-west-1.amazonaws.com/hifi-content/alan/dev/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/CielingLight-Base.jpg"'
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
modelEmitOff: function(glowDisc) {
|
modelEmitOff: function(glowDisc) {
|
||||||
|
print("EBL TURN OFF EMIT TEXTURE");
|
||||||
Entities.editEntity(glowDisc, {
|
Entities.editEntity(glowDisc, {
|
||||||
textures: 'emissive:"",\ndiffuse:"' + DIFFUSE_TEXTURE_URL + '"'
|
textures: 'Metal-brushed-light.jpg:"https://s3-us-west-1.amazonaws.com/hifi-content/alan/dev/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/Metal-brushed-light.jpg",\nTex.CeilingLight.Emit:"",\nTexCeilingLight.Diffuse:"https://s3-us-west-1.amazonaws.com/hifi-content/alan/dev/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/CielingLight-Base.jpg"'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -101,7 +103,9 @@
|
||||||
|
|
||||||
toggleLights: function() {
|
toggleLights: function() {
|
||||||
|
|
||||||
_this._switch = getEntityCustomData('home-switch', _this.entityID, {state: 'off'});
|
_this._switch = getEntityCustomData('home-switch', _this.entityID, {
|
||||||
|
state: 'off'
|
||||||
|
});
|
||||||
|
|
||||||
var glowLights = this.findGlowLights();
|
var glowLights = this.findGlowLights();
|
||||||
var masterLights = this.findMasterLights();
|
var masterLights = this.findMasterLights();
|
||||||
|
|
Loading…
Reference in a new issue