mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:00:13 +02:00
set defaults
This commit is contained in:
parent
da57e29096
commit
b59b8db5c9
1 changed files with 18 additions and 18 deletions
|
@ -120,6 +120,17 @@ var PER_ROW_OFFSET = {
|
||||||
y: -0.2,
|
y: -0.2,
|
||||||
z: 0
|
z: 0
|
||||||
};
|
};
|
||||||
|
var sliders = [];
|
||||||
|
var slidersRef = {
|
||||||
|
'color_red': null,
|
||||||
|
'color_green': null,
|
||||||
|
'color_blue': null,
|
||||||
|
intensity: null,
|
||||||
|
cutoff: null,
|
||||||
|
exponent: null
|
||||||
|
};
|
||||||
|
var light = null;
|
||||||
|
|
||||||
|
|
||||||
function entitySlider(light, color, sliderType, row) {
|
function entitySlider(light, color, sliderType, row) {
|
||||||
this.light = light;
|
this.light = light;
|
||||||
|
@ -351,17 +362,6 @@ entitySlider.prototype = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var sliders = [];
|
|
||||||
var slidersRef = {
|
|
||||||
'color_red': null,
|
|
||||||
'color_green': null,
|
|
||||||
'color_blue': null,
|
|
||||||
intensity: null,
|
|
||||||
cutoff: null,
|
|
||||||
exponent: null
|
|
||||||
}
|
|
||||||
var light = null;
|
|
||||||
|
|
||||||
function makeSliders(light) {
|
function makeSliders(light) {
|
||||||
var panel;
|
var panel;
|
||||||
if (USE_PARENTED_PANEL === true) {
|
if (USE_PARENTED_PANEL === true) {
|
||||||
|
@ -403,8 +403,6 @@ function makeSliders(light) {
|
||||||
sliders.push(slidersRef.exponent);
|
sliders.push(slidersRef.exponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
createCloseButton(slidersRef.exponent.endOfAxis);
|
createCloseButton(slidersRef.exponent.endOfAxis);
|
||||||
|
|
||||||
subscribeToSliderMessages();
|
subscribeToSliderMessages();
|
||||||
|
@ -413,12 +411,13 @@ function makeSliders(light) {
|
||||||
parentEntitiesToPanel(panel);
|
parentEntitiesToPanel(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SLIDERS_SHOULD_STAY_WITH_AVATAR) {
|
if (SLIDERS_SHOULD_STAY_WITH_AVATAR === true) {
|
||||||
parentPanelToAvatar(panel)
|
parentPanelToAvatar(panel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function parentPanelToAvatar(panel) {
|
function parentPanelToAvatar(panel) {
|
||||||
|
//this is going to need some more work re: the sliders actually being grabbable. probably something to do with updating axis movement
|
||||||
Entities.editEntity(panel, {
|
Entities.editEntity(panel, {
|
||||||
parentID: MyAvatar.sessionUUID,
|
parentID: MyAvatar.sessionUUID,
|
||||||
//actually figure out which one to parent it to -- probably a spine or something.
|
//actually figure out which one to parent it to -- probably a spine or something.
|
||||||
|
@ -427,7 +426,8 @@ function parentPanelToAvatar(panel) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parentEntitiesToPanel(panel) {
|
function parentEntitiesToPanel(panel) {
|
||||||
slidersRef.forEach(function(slider) {
|
|
||||||
|
sliders.forEach(function(slider) {
|
||||||
Entities.editEntity(slider.axis, {
|
Entities.editEntity(slider.axis, {
|
||||||
parentID: panel
|
parentID: panel
|
||||||
})
|
})
|
||||||
|
@ -437,14 +437,14 @@ function parentEntitiesToPanel(panel) {
|
||||||
})
|
})
|
||||||
|
|
||||||
closeButtons.forEach(function(button) {
|
closeButtons.forEach(function(button) {
|
||||||
Entities.editEntity(slider.sliderIndicator, {
|
Entities.editEntity(button, {
|
||||||
parentID: panel
|
parentID: panel
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function createPanelEntity(position) {
|
function createPanelEntity(position) {
|
||||||
|
print('CREATING PANEL at ' + JSON.stringify(position));
|
||||||
var panelProperties = {
|
var panelProperties = {
|
||||||
name: 'Hifi-Slider-Panel',
|
name: 'Hifi-Slider-Panel',
|
||||||
type: 'Box',
|
type: 'Box',
|
||||||
|
|
Loading…
Reference in a new issue