Added semi-accessible method to dynamically change skybox colour

master
Robin Hawkes 2016-03-01 18:27:51 +00:00
rodzic c9bb6c877b
commit 1aec7e683d
4 zmienionych plików z 24 dodań i 9 usunięć

12
dist/vizicities.js vendored
Wyświetl plik

@ -7997,6 +7997,8 @@ return /******/ (function(modules) { // webpackBootstrap
});
this._mesh = new _three2['default'].Mesh(new _three2['default'].BoxGeometry(190000, 190000, 190000), skyboxMat);
this._updateSkybox = true;
}
}, {
key: '_updateUniforms',
@ -8024,8 +8026,8 @@ return /******/ (function(modules) { // webpackBootstrap
}, {
key: '_update',
value: function _update(delta) {
if (!this._done) {
this._done = true;
if (this._updateSkybox) {
this._updateSkybox = false;
} else {
return;
}
@ -8054,6 +8056,12 @@ return /******/ (function(modules) { // webpackBootstrap
value: function getRenderTarget() {
return this._cubeCamera.renderTarget;
}
}, {
key: 'setInclination',
value: function setInclination(inclination) {
this._settings.inclination = inclination;
this._updateSkybox = true;
}
// Destroy the skybox and remove it from memory
}, {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -88,6 +88,8 @@ class Skybox {
});
this._mesh = new THREE.Mesh(new THREE.BoxGeometry(190000, 190000, 190000), skyboxMat);
this._updateSkybox = true;
}
_updateUniforms() {
@ -113,8 +115,8 @@ class Skybox {
}
_update(delta) {
if (!this._done) {
this._done = true;
if (this._updateSkybox) {
this._updateSkybox = false;
} else {
return;
}
@ -143,6 +145,11 @@ class Skybox {
return this._cubeCamera.renderTarget;
}
setInclination(inclination) {
this._settings.inclination = inclination;
this._updateSkybox = true;
}
// Destroy the skybox and remove it from memory
destroy() {
this._world.off('preUpdate', this._throttledWorldUpdate);