diff --git a/CEON/gotgPortalAssets/breach.mp3 b/CEON/gotgPortalAssets/breach.mp3 new file mode 100644 index 00000000..df8b9ea5 Binary files /dev/null and b/CEON/gotgPortalAssets/breach.mp3 differ diff --git a/CEON/gotgPortalAssets/portalMaterialFX.js b/CEON/gotgPortalAssets/portalMaterialFX.js index 046706f5..e6528341 100644 --- a/CEON/gotgPortalAssets/portalMaterialFX.js +++ b/CEON/gotgPortalAssets/portalMaterialFX.js @@ -53,13 +53,8 @@ hue = hue - 1; } var lightMatColor = hslToRgb(hue, 1, 0.61); - bloomFactor = bloomFactor + ((Math.random() * 4) - 2); - if (bloomFactor < 1) { - bloomFactor = 1; - } - if (bloomFactor > 6) { - bloomFactor = 6; - } + bloomFactor = Math.random() * 6) + 1; + var materialContent = { "materialVersion": 1, "materials": [ diff --git a/CEON/gotgPortalAssets/soundFX.js b/CEON/gotgPortalAssets/soundFX.js new file mode 100644 index 00000000..75f151d6 --- /dev/null +++ b/CEON/gotgPortalAssets/soundFX.js @@ -0,0 +1,36 @@ +// +// soundFX.js +// +// Created by Alezia Kurdis,November 10th, 2023. +// Copyright 2023, Overte e.V. +// +// Space portal opening bearch sound. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +(function(){ + + var ROOT = Script.resolvePath('').split("soundFX.js")[0]; + var BREACH_SOUND = ROOT + "breach.mp3"; + var breachSound; + + this.preload = function(entityID) { + breachSound = SoundCache.getSound(BREACH_SOUND); + } + + this.enterEntity = function(entityID) { + var injector = Audio.playSound(breachSound, { + "position": MyAvatar.position, + "loop": false, + "localOnly": true, + "volume": 1 + }); + }; + + this.leaveEntity = function(entityID) { + //do nothing. + }; + + +})