added optional web component UI control
This commit is contained in:
@@ -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