|
@@ -646,16 +646,16 @@ export class ColorPicker extends Control {
|
|
if (newValue != "") {
|
|
if (newValue != "") {
|
|
newValue = parseInt(newValue).toString();
|
|
newValue = parseInt(newValue).toString();
|
|
field.text = newValue;
|
|
field.text = newValue;
|
|
- var newSwatchRGB: Color3 = BABYLON.Color3.FromHexString(newSwatch.background);
|
|
|
|
|
|
+ var newSwatchRGB: Color3 = Color3.FromHexString(newSwatch.background);
|
|
if (activeField == field.name) {
|
|
if (activeField == field.name) {
|
|
if (channel == "r") {
|
|
if (channel == "r") {
|
|
- updateValues(new BABYLON.Color3((parseInt(newValue)) / 255, newSwatchRGB.g, newSwatchRGB.b), field.name);
|
|
|
|
|
|
+ updateValues(new Color3((parseInt(newValue)) / 255, newSwatchRGB.g, newSwatchRGB.b), field.name);
|
|
}
|
|
}
|
|
else if (channel == "g") {
|
|
else if (channel == "g") {
|
|
- updateValues(new BABYLON.Color3(newSwatchRGB.r, (parseInt(newValue)) / 255, newSwatchRGB.b), field.name);
|
|
|
|
|
|
+ updateValues(new Color3(newSwatchRGB.r, (parseInt(newValue)) / 255, newSwatchRGB.b), field.name);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- updateValues(new BABYLON.Color3(newSwatchRGB.r, newSwatchRGB.g, (parseInt(newValue)) / 255), field.name);
|
|
|
|
|
|
+ updateValues(new Color3(newSwatchRGB.r, newSwatchRGB.g, (parseInt(newValue)) / 255), field.name);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -692,16 +692,16 @@ export class ColorPicker extends Control {
|
|
else {
|
|
else {
|
|
newValue = "0.0";
|
|
newValue = "0.0";
|
|
}
|
|
}
|
|
- var newSwatchRGB = BABYLON.Color3.FromHexString(newSwatch.background);
|
|
|
|
|
|
+ var newSwatchRGB = Color3.FromHexString(newSwatch.background);
|
|
if (activeField == field.name) {
|
|
if (activeField == field.name) {
|
|
if (channel == "r") {
|
|
if (channel == "r") {
|
|
- updateValues(new BABYLON.Color3(parseFloat(newValue), newSwatchRGB.g, newSwatchRGB.b), field.name);
|
|
|
|
|
|
+ updateValues(new Color3(parseFloat(newValue), newSwatchRGB.g, newSwatchRGB.b), field.name);
|
|
}
|
|
}
|
|
else if (channel == "g") {
|
|
else if (channel == "g") {
|
|
- updateValues(new BABYLON.Color3(newSwatchRGB.r, parseFloat(newValue), newSwatchRGB.b), field.name);
|
|
|
|
|
|
+ updateValues(new Color3(newSwatchRGB.r, parseFloat(newValue), newSwatchRGB.b), field.name);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- updateValues(new BABYLON.Color3(newSwatchRGB.r, newSwatchRGB.g, parseFloat(newValue)), field.name);
|
|
|
|
|
|
+ updateValues(new Color3(newSwatchRGB.r, newSwatchRGB.g, parseFloat(newValue)), field.name);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -760,7 +760,7 @@ export class ColorPicker extends Control {
|
|
swatch.onPointerClickObservable.add(() => {
|
|
swatch.onPointerClickObservable.add(() => {
|
|
if (!editSwatchMode) {
|
|
if (!editSwatchMode) {
|
|
if (options.savedColors) {
|
|
if (options.savedColors) {
|
|
- updateValues(BABYLON.Color3.FromHexString(options.savedColors[metadata]), swatch.name!);
|
|
|
|
|
|
+ updateValues(Color3.FromHexString(options.savedColors[metadata]), swatch.name!);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|