diff --git a/examples/edit.js b/examples/edit.js index 41f25cb2e5..6c24d00449 100644 --- a/examples/edit.js +++ b/examples/edit.js @@ -1659,29 +1659,6 @@ PropertiesTool = function(opts) { }); } } - } else if (data.action == "centerAtmosphereToZone") { - if (selectionManager.hasSelection()) { - selectionManager.saveProperties(); - for (var i = 0; i < selectionManager.selections.length; i++) { - var properties = selectionManager.savedProperties[selectionManager.selections[i]]; - if (properties.type == "Zone") { - var centerOfZone = properties.boundingBox.center; - var atmosphereCenter = { - x: centerOfZone.x, - y: centerOfZone.y - properties.atmosphere.innerRadius, - z: centerOfZone.z - }; - - Entities.editEntity(selectionManager.selections[i], { - atmosphere: { - center: atmosphereCenter - }, - }); - } - } - pushCommandForSelections(); - selectionManager._update(); - } } } }); diff --git a/examples/example/entities/changingAtmosphereExample.js b/examples/example/entities/changingAtmosphereExample.js deleted file mode 100644 index 02103fc0fb..0000000000 --- a/examples/example/entities/changingAtmosphereExample.js +++ /dev/null @@ -1,71 +0,0 @@ -// -// changingAtmosphereExample.js -// examples -// -// Created by Brad Hefta-Gaub on 4/16/15. -// Copyright 2015 High Fidelity, Inc. -// -// This is an example script that demonstrates creating a zone using the atmosphere features that changes scatter properties -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/"; - -var count = 0; -var stopAfter = 10000; - -var zoneEntityA = Entities.addEntity({ - type: "Zone", - position: { x: 1000, y: 1000, z: 1000}, - dimensions: { x: 2000, y: 2000, z: 2000 }, - keyLightColor: { red: 255, green: 0, blue: 0 }, - stageSunModelEnabled: false, - shapeType: "sphere", - backgroundMode: "atmosphere", - atmosphere: { - center: { x: 1000, y: 0, z: 1000}, - innerRadius: 1000.0, - outerRadius: 1025.0, - rayleighScattering: 0.0025, // Meaningful values 0 to ~0.01 - mieScattering: 0.0010, // Meaningful values 0 to ~0.01 - - // First two, Meaningful values 0 to 1 each, blue, purple; third meaningful 0.3 to 1 - affects shape - scatteringWavelengths: { x: 0.650, y: 0.570, z: 0.475 }, - hasStars: true - }, - stage: { - latitude: 37.777, - longitude: 122.407, - altitude: 0.03, - day: 183, - hour: 5, - sunModelEnabled: true - } -}); - - -// register the call back so it fires before each data send -Script.update.connect(function(deltaTime) { - // stop it... - if (count >= stopAfter) { - print("calling Script.stop()"); - Script.stop(); - } - count++; - var rayleighScattering = (count / 100000) % 0.01; - var mieScattering = (count / 100000) % 0.01; - var waveX = (count / 2000) % 1; - var waveZ = ((count / 2000) % 0.7) + 0.3; - - Entities.editEntity(zoneEntityA, { - atmosphere: { - rayleighScattering: rayleighScattering, - mieScattering: mieScattering, - scatteringWavelengths: { x: waveX, y: waveX, z: waveZ } - }, - - }); -}); - diff --git a/examples/example/entities/zoneAtmosphereExample.js b/examples/example/entities/zoneAtmosphereExample.js deleted file mode 100644 index dfebf09f2a..0000000000 --- a/examples/example/entities/zoneAtmosphereExample.js +++ /dev/null @@ -1,65 +0,0 @@ -// -// zoneAtmosphereExample.js -// examples -// -// Created by Brad Hefta-Gaub on 4/16/15. -// Copyright 2015 High Fidelity, Inc. -// -// This is an example script that demonstrates creating a zone using the atmosphere features -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/"; - -var count = 0; -var stopAfter = 10000; - -var zoneEntityA = Entities.addEntity({ - type: "Zone", - position: { x: 1000, y: 1000, z: 1000}, - dimensions: { x: 2000, y: 2000, z: 2000 }, - keyLightColor: { red: 255, green: 0, blue: 0 }, - stageSunModelEnabled: false, - shapeType: "sphere", - backgroundMode: "atmosphere", - atmosphere: { - center: { x: 1000, y: 0, z: 1000}, - innerRadius: 1000.0, - outerRadius: 1025.0, - rayleighScattering: 0.0025, - mieScattering: 0.0010, - scatteringWavelengths: { x: 0.650, y: 0.570, z: 0.475 }, - hasStars: false - }, - stage: { - latitude: 37.777, - longitude: 122.407, - altitude: 0.03, - day: 60, - hour: 0, - sunModelEnabled: true - } -}); - - -// register the call back so it fires before each data send -Script.update.connect(function(deltaTime) { - // stop it... - if (count >= stopAfter) { - print("calling Script.stop()"); - Script.stop(); - } - count++; - var newHour = (count / 10) % 24; - var newIntensity = ((count / 10) % 24) / 24; - print("newHour:" + newHour); - print("newIntensity:" + newIntensity); - - Entities.editEntity(zoneEntityA, { - stageHour: newHour, - keyLightIntensity: newIntensity - }); -}); - diff --git a/examples/html/entityProperties.html b/examples/html/entityProperties.html index 9ced830e0c..898f2bea6d 100644 --- a/examples/html/entityProperties.html +++ b/examples/html/entityProperties.html @@ -360,20 +360,6 @@ var elZoneSkyboxColorBlue = document.getElementById("property-zone-skybox-color-blue"); var elZoneSkyboxURL = document.getElementById("property-zone-skybox-url"); - var elZoneAtmosphereCenterX = document.getElementById("property-zone-atmosphere-center-x"); - var elZoneAtmosphereCenterY = document.getElementById("property-zone-atmosphere-center-y"); - var elZoneAtmosphereCenterZ = document.getElementById("property-zone-atmosphere-center-z"); - var elCenterAtmosphereToZone = document.getElementById("center-atmosphere-in-zone"); - - var elZoneAtmosphereInnerRadius = document.getElementById("property-zone-atmosphere-inner-radius"); - var elZoneAtmosphereOuterRadius = document.getElementById("property-zone-atmosphere-outer-radius"); - var elZoneAtmosphereMieScattering = document.getElementById("property-zone-atmosphere-mie-scattering"); - var elZoneAtmosphereRayleighScattering = document.getElementById("property-zone-atmosphere-rayleigh-scattering"); - var elZoneAtmosphereScatteringWavelengthsX = document.getElementById("property-zone-atmosphere-scattering-wavelengths-x"); - var elZoneAtmosphereScatteringWavelengthsY = document.getElementById("property-zone-atmosphere-scattering-wavelengths-y"); - var elZoneAtmosphereScatteringWavelengthsZ = document.getElementById("property-zone-atmosphere-scattering-wavelengths-z"); - var elZoneAtmosphereHasStars = document.getElementById("property-zone-atmosphere-has-stars"); - var elPolyVoxSections = document.querySelectorAll(".poly-vox-section"); allSections.push(elPolyVoxSections); var elVoxelVolumeSizeX = document.getElementById("property-voxel-volume-size-x"); @@ -606,20 +592,7 @@ elZoneSkyboxColorBlue.value = properties.skybox.color.blue; elZoneSkyboxURL.value = properties.skybox.url; - elZoneAtmosphereCenterX.value = properties.atmosphere.center.x; - elZoneAtmosphereCenterY.value = properties.atmosphere.center.y; - elZoneAtmosphereCenterZ.value = properties.atmosphere.center.z; - elZoneAtmosphereInnerRadius.value = properties.atmosphere.innerRadius; - elZoneAtmosphereOuterRadius.value = properties.atmosphere.outerRadius; - elZoneAtmosphereMieScattering.value = properties.atmosphere.mieScattering; - elZoneAtmosphereRayleighScattering.value = properties.atmosphere.rayleighScattering; - elZoneAtmosphereScatteringWavelengthsX.value = properties.atmosphere.scatteringWavelengths.x; - elZoneAtmosphereScatteringWavelengthsY.value = properties.atmosphere.scatteringWavelengths.y; - elZoneAtmosphereScatteringWavelengthsZ.value = properties.atmosphere.scatteringWavelengths.z; - elZoneAtmosphereHasStars.checked = properties.atmosphere.hasStars; - showElements(document.getElementsByClassName('skybox-section'), elZoneBackgroundMode.value == 'skybox'); - showElements(document.getElementsByClassName('atmosphere-section'), elZoneBackgroundMode.value == 'atmosphere'); } else if (properties.type == "ParticleEffect") { for (var i = 0; i < elParticleSections.length; i++) { elParticleSections[i].style.display = 'block'; @@ -874,25 +847,6 @@ elZoneSkyboxURL.addEventListener('change', createEmitGroupTextPropertyUpdateFunction('skybox','url')); - var zoneAtmosphereCenterChangeFunction = createEmitGroupVec3PropertyUpdateFunction( - 'atmosphere','center', elZoneAtmosphereCenterX, elZoneAtmosphereCenterY, elZoneAtmosphereCenterZ); - elZoneAtmosphereCenterX.addEventListener('change', zoneAtmosphereCenterChangeFunction); - elZoneAtmosphereCenterY.addEventListener('change', zoneAtmosphereCenterChangeFunction); - elZoneAtmosphereCenterZ.addEventListener('change', zoneAtmosphereCenterChangeFunction); - - - elZoneAtmosphereInnerRadius.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('atmosphere','innerRadius')); - elZoneAtmosphereOuterRadius.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('atmosphere','outerRadius')); - elZoneAtmosphereMieScattering.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('atmosphere','mieScattering')); - elZoneAtmosphereRayleighScattering.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('atmosphere','rayleighScattering')); - var zoneAtmosphereScatterWavelengthsChangeFunction = createEmitGroupVec3PropertyUpdateFunction( - 'atmosphere','scatteringWavelengths', elZoneAtmosphereScatteringWavelengthsX, - elZoneAtmosphereScatteringWavelengthsY, elZoneAtmosphereScatteringWavelengthsZ); - elZoneAtmosphereScatteringWavelengthsX.addEventListener('change', zoneAtmosphereScatterWavelengthsChangeFunction); - elZoneAtmosphereScatteringWavelengthsY.addEventListener('change', zoneAtmosphereScatterWavelengthsChangeFunction); - elZoneAtmosphereScatteringWavelengthsZ.addEventListener('change', zoneAtmosphereScatterWavelengthsChangeFunction); - elZoneAtmosphereHasStars.addEventListener('change', createEmitGroupCheckedPropertyUpdateFunction('atmosphere','hasStars')); - var voxelVolumeSizeChangeFunction = createEmitVec3PropertyUpdateFunction( 'voxelVolumeSize', elVoxelVolumeSizeX, elVoxelVolumeSizeY, elVoxelVolumeSizeZ); elVoxelVolumeSizeX.addEventListener('change', voxelVolumeSizeChangeFunction); @@ -934,12 +888,6 @@ action: "reloadScript" })); }); - elCenterAtmosphereToZone.addEventListener("click", function() { - EventBridge.emitWebEvent(JSON.stringify({ - type: "action", - action: "centerAtmosphereToZone", - })); - }); elPreviewCameraButton.addEventListener("click", function() { EventBridge.emitWebEvent(JSON.stringify({ type: "action", @@ -1601,7 +1549,6 @@ @@ -1626,61 +1573,6 @@ - - -