Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions scripts/system/create/audioFeedback/audioFeedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,31 @@
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
"use strict";

audioFeedback = (function() {
var that = {};
const that = {};

var confirmationSound = SoundCache.getSound(Script.resolvePath("./sounds/confirmation.mp3"));
var rejectionSound = SoundCache.getSound(Script.resolvePath("./sounds/rejection.mp3"));
var actionSound = SoundCache.getSound(Script.resolvePath("./sounds/action.mp3"));
const confirmationSound = SoundCache.getSound(Script.resolvePath("./sounds/confirmation.mp3"));
const rejectionSound = SoundCache.getSound(Script.resolvePath("./sounds/rejection.mp3"));
const actionSound = SoundCache.getSound(Script.resolvePath("./sounds/action.mp3"));

that.confirmation = function() { //Play a confirmation sound
var injector = Audio.playSound(confirmationSound, {
Audio.playSound(confirmationSound, {
"volume": 0.3,
"localOnly": true
});
}

that.rejection = function() { //Play a rejection sound
var injector = Audio.playSound(rejectionSound, {
Audio.playSound(rejectionSound, {
"volume": 0.3,
"localOnly": true
});
}

that.action = function() { //Play an action sound
var injector = Audio.playSound(actionSound, {
Audio.playSound(actionSound, {
"volume": 0.3,
"localOnly": true
});
Expand Down
782 changes: 391 additions & 391 deletions scripts/system/create/edit.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions scripts/system/create/editModes/editModes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
"use strict";

EditTools = function(options) {
var that = {};
const EditTools = function(options) {
const that = {};

var createAppMode = "object";
var voxelEditMode = "single";
var voxelSphereSize = 0.3;
var voxelEditDynamics = "click";
var voxelRemove = false;
var voxelPointerMode = "laser";
var voxelBrushLength = 0.5;
var listeners = [];
let createAppMode = "object";
let voxelEditMode = "single";
let voxelSphereSize = 0.3;
let voxelEditDynamics = "click";
let voxelRemove = false;
let voxelPointerMode = "laser";
let voxelBrushLength = 0.5;
const listeners = [];

var createToolsWindow = options.createToolsWindow;
const createToolsWindow = options.createToolsWindow;

that.emitUpdate = function() {
var dataString = JSON.stringify({
const dataString = JSON.stringify({
createAppMode : createAppMode,
voxelEditMode : voxelEditMode,
voxelSphereSize : voxelSphereSize,
Expand Down Expand Up @@ -146,7 +147,7 @@ EditTools = function(options) {
}
}

var webEventReceived = function(data) {
const webEventReceived = function(data) {
try {
data = JSON.parse(data);
} catch (e) {
Expand All @@ -164,8 +165,7 @@ EditTools = function(options) {
}
};

var webView = null;
webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
const webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");

webView.webEventReceived.connect(webEventReceived);
createToolsWindow.webEventReceived.addListener(webEventReceived);
Expand Down
Loading