diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp index de54d6e..07e97ca 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp @@ -82,17 +82,6 @@ bool TryParseLayerIdNumber(const std::string& layerId, uint64_t& number) return true; } -std::vector JsonArrayToNumbers(const JsonValue& value) -{ - std::vector numbers; - for (const JsonValue& item : value.asArray()) - { - if (item.isNumber()) - numbers.push_back(item.asNumber()); - } - return numbers; -} - bool LooksLikePackagedRuntimeRoot(const std::filesystem::path& candidate) { return std::filesystem::exists(candidate / "config" / "runtime-host.json") && @@ -1688,12 +1677,6 @@ bool RuntimeHost::ScanShaderPackages(std::string& error) return true; } -bool RuntimeHost::ParseShaderManifest(const std::filesystem::path& manifestPath, ShaderPackage& shaderPackage, std::string& error) const -{ - ShaderPackageRegistry registry(mConfig.maxTemporalHistoryFrames); - return registry.ParseManifest(manifestPath, shaderPackage, error); -} - bool RuntimeHost::NormalizeAndValidateValue(const ShaderParameterDefinition& definition, const JsonValue& value, ShaderParameterValue& normalizedValue, std::string& error) const { return NormalizeAndValidateParameterValue(definition, value, normalizedValue, error); diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h index cbcd158..cc4731d 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h @@ -116,7 +116,6 @@ private: bool LoadPersistentState(std::string& error); bool SavePersistentState(std::string& error) const; bool ScanShaderPackages(std::string& error); - bool ParseShaderManifest(const std::filesystem::path& manifestPath, ShaderPackage& shaderPackage, std::string& error) const; bool NormalizeAndValidateValue(const ShaderParameterDefinition& definition, const JsonValue& value, ShaderParameterValue& normalizedValue, std::string& error) const; ShaderParameterValue DefaultValueForDefinition(const ShaderParameterDefinition& definition) const; void EnsureLayerDefaultsLocked(LayerPersistentState& layerState, const ShaderPackage& shaderPackage) const; diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.cpp b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.cpp index 785ad42..a2fdbaf 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.cpp @@ -661,3 +661,14 @@ std::string SerializeJson(const JsonValue& value, bool pretty) SerializeJsonImpl(value, output, pretty, 0); return output.str(); } + +std::vector JsonArrayToNumbers(const JsonValue& value) +{ + std::vector numbers; + for (const JsonValue& item : value.asArray()) + { + if (item.isNumber()) + numbers.push_back(item.asNumber()); + } + return numbers; +} diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.h b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.h index 47e601e..52879d9 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.h +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeJson.h @@ -62,3 +62,4 @@ private: bool ParseJson(const std::string& text, JsonValue& value, std::string& error); std::string SerializeJson(const JsonValue& value, bool pretty = false); +std::vector JsonArrayToNumbers(const JsonValue& value); diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeParameterUtils.cpp b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeParameterUtils.cpp index dc2ecf4..9e670fe 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeParameterUtils.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeParameterUtils.cpp @@ -26,17 +26,6 @@ bool IsFiniteNumber(double value) return std::isfinite(value) != 0; } -std::vector JsonArrayToNumbers(const JsonValue& value) -{ - std::vector numbers; - for (const JsonValue& item : value.asArray()) - { - if (item.isNumber()) - numbers.push_back(item.asNumber()); - } - return numbers; -} - std::string NormalizeTextValue(const std::string& text, unsigned maxLength) { std::string normalized; diff --git a/apps/LoopThroughWithOpenGLCompositing/shader/ShaderPackageRegistry.cpp b/apps/LoopThroughWithOpenGLCompositing/shader/ShaderPackageRegistry.cpp index b43b34a..7eb7270 100644 --- a/apps/LoopThroughWithOpenGLCompositing/shader/ShaderPackageRegistry.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/shader/ShaderPackageRegistry.cpp @@ -29,17 +29,6 @@ bool IsFiniteNumber(double value) return std::isfinite(value) != 0; } -std::vector JsonArrayToNumbers(const JsonValue& value) -{ - std::vector numbers; - for (const JsonValue& item : value.asArray()) - { - if (item.isNumber()) - numbers.push_back(item.asNumber()); - } - return numbers; -} - bool ParseShaderParameterType(const std::string& typeName, ShaderParameterType& type) { if (typeName == "float") diff --git a/ui/src/components/ParameterValueDisplay.jsx b/ui/src/components/ParameterValueDisplay.jsx deleted file mode 100644 index f3a1ba4..0000000 --- a/ui/src/components/ParameterValueDisplay.jsx +++ /dev/null @@ -1,28 +0,0 @@ -function formatNumber(value, digits = 3) { - return Number(value ?? 0).toFixed(digits); -} - -export function formatParameterValue(parameterType, value) { - if (parameterType === "float") { - return formatNumber(value); - } - if (parameterType === "vec2" || parameterType === "color") { - return (value ?? []).map((item) => formatNumber(item)).join(", "); - } - if (parameterType === "bool") { - return value ? "Enabled" : "Disabled"; - } - if (parameterType === "trigger") { - return `Triggered ${Number(value ?? 0)} time${Number(value ?? 0) === 1 ? "" : "s"}`; - } - return `${value ?? ""}`; -} - -export function ParameterValueDisplay({ parameterType, value, pending }) { - const valueText = formatParameterValue(parameterType, value); - return ( -
- {pending ? `Applied: ${valueText}` : valueText} -
- ); -} diff --git a/ui/src/styles.css b/ui/src/styles.css index 859e8a1..9057d1d 100644 --- a/ui/src/styles.css +++ b/ui/src/styles.css @@ -700,7 +700,6 @@ pre { .shader-picker__selected, .shader-picker__meta, .shader-picker__empty, -.parameter__value, .parameter__osc, .parameter__reset { color: var(--app-muted); @@ -952,10 +951,6 @@ pre { flex: 0 0 auto; } -.parameter__value--pending { - color: var(--app-warning); -} - .parameter__control { position: relative; min-width: 0; @@ -1115,14 +1110,6 @@ pre { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.65), 0 1px 4px rgba(0, 0, 0, 0.45); } -.parameter__value-slider strong { - text-align: right; - min-height: 1rem; - color: var(--app-text); - font-size: 0.74rem; - line-height: 1; -} - .parameter__trigger { min-width: 7rem; }