added optional web component UI control
All checks were successful
CI / React UI Build (push) Successful in 12s
CI / Native Windows Build And Tests (push) Successful in 2m20s
CI / Windows Release Package (push) Successful in 2m56s

This commit is contained in:
Aiden
2026-05-30 22:57:59 +10:00
parent a6d2ee385e
commit 27690c3afa
26 changed files with 804 additions and 76 deletions

View File

@@ -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: