added optional web component UI control
This commit is contained in:
@@ -77,6 +77,7 @@ The checked-in implementation is `ShaderRuntimeContentController`. It wraps `Run
|
||||
- build state and message
|
||||
- bypass state
|
||||
- manifest parameter definitions
|
||||
- optional shader-declared custom UI metadata
|
||||
- current parameter values
|
||||
- render-ready artifacts
|
||||
|
||||
@@ -111,6 +112,7 @@ The host configuration editor is separate from runtime layer persistence. The UI
|
||||
- rescan `shaders/`
|
||||
- re-read manifests
|
||||
- rebuild the supported shader catalog
|
||||
- refresh optional shader custom UI metadata
|
||||
- update active layer metadata and parameter definitions from changed manifests
|
||||
- preserve compatible parameter values
|
||||
- default new or incompatible parameter values
|
||||
@@ -155,6 +157,7 @@ Screenshot routes are present in the UI/OpenAPI surface but are not implemented
|
||||
The HTTP server runs on its own thread. `HttpControlServer` owns socket lifetime, HTTP parsing, static asset helpers, OpenAPI/Swagger helper serving, and WebSocket state transport. `RenderCadenceHttpRoutes` owns this app's current endpoint map:
|
||||
|
||||
- UI assets
|
||||
- shader package custom UI assets under `/shader-assets/{shaderId}/...`
|
||||
- OpenAPI/Swagger docs
|
||||
- `GET /api/state`
|
||||
- `/ws` state updates
|
||||
|
||||
@@ -106,6 +106,51 @@ paths:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
/shader-assets/{shaderId}/{assetPath}:
|
||||
get:
|
||||
tags: [Static]
|
||||
summary: Serve a shader package UI asset
|
||||
description: Serves custom shader UI files declared by `shader.json`. Assets are resolved through the active runtime-content controller and must stay inside that shader package's `ui/` directory.
|
||||
operationId: getShaderPackageAsset
|
||||
parameters:
|
||||
- name: shaderId
|
||||
in: path
|
||||
required: true
|
||||
description: Shader package id.
|
||||
schema:
|
||||
type: string
|
||||
- name: assetPath
|
||||
in: path
|
||||
required: true
|
||||
description: Relative asset path below the shader package, usually `ui/controls.js`.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: Shader package UI asset.
|
||||
content:
|
||||
text/javascript:
|
||||
schema:
|
||||
type: string
|
||||
text/css:
|
||||
schema:
|
||||
type: string
|
||||
image/svg+xml:
|
||||
schema:
|
||||
type: string
|
||||
image/png:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
"404":
|
||||
description: Asset was not found, the shader did not declare custom UI, or the path was unsafe.
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
/docs:
|
||||
get:
|
||||
tags: [Docs]
|
||||
@@ -1200,6 +1245,29 @@ components:
|
||||
$ref: "#/components/schemas/TemporalState"
|
||||
feedback:
|
||||
$ref: "#/components/schemas/FeedbackState"
|
||||
ui:
|
||||
$ref: "#/components/schemas/ShaderUiDefinition"
|
||||
nullable: true
|
||||
ShaderUiDefinition:
|
||||
type: object
|
||||
nullable: true
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [webComponent]
|
||||
entry:
|
||||
type: string
|
||||
description: Package-relative JavaScript module path from the shader manifest.
|
||||
example: ui/controls.js
|
||||
tag:
|
||||
type: string
|
||||
description: Custom element tag registered by the module.
|
||||
example: my-shader-controls
|
||||
assetUrl:
|
||||
type: string
|
||||
description: HTTP URL for loading the JavaScript module from the local control server.
|
||||
example: /shader-assets/my-shader/ui/controls.js
|
||||
additionalProperties: false
|
||||
TemporalState:
|
||||
type: object
|
||||
properties:
|
||||
@@ -1232,6 +1300,9 @@ components:
|
||||
type: boolean
|
||||
temporal:
|
||||
$ref: "#/components/schemas/TemporalState"
|
||||
ui:
|
||||
$ref: "#/components/schemas/ShaderUiDefinition"
|
||||
nullable: true
|
||||
parameters:
|
||||
type: array
|
||||
items:
|
||||
|
||||
Reference in New Issue
Block a user