Add FxNode render graph playground
Add persistent render graph loadouts, grouped node authoring, code-appending apply behavior, explicit playground lighting, and resilient worker startup. Amp-Thread-ID: https://ampcode.com/threads/T-01a033d4-0e44-708e-af0e-6166283416ff Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
+16
-5
@@ -163,11 +163,16 @@ func (app *application) savePlayground(response http.ResponseWriter, request *ht
|
||||
http.Error(response, "method not allowed", http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
request.Body = http.MaxBytesReader(response, request.Body, maximumCodeBytes+4096)
|
||||
request.Body = http.MaxBytesReader(
|
||||
response,
|
||||
request.Body,
|
||||
maximumCodeBytes+maximumLoadoutsBytes+4096,
|
||||
)
|
||||
var input struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Code string `json:"code"`
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Code string `json:"code"`
|
||||
Loadouts json.RawMessage `json:"loadouts"`
|
||||
}
|
||||
decoder := json.NewDecoder(request.Body)
|
||||
decoder.DisallowUnknownFields()
|
||||
@@ -175,7 +180,13 @@ func (app *application) savePlayground(response http.ResponseWriter, request *ht
|
||||
writeJSONError(response, "The save request is not valid.", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
result, err := app.store.save(request.Context(), input.ID, strings.TrimSpace(input.Title), input.Code)
|
||||
result, err := app.store.save(
|
||||
request.Context(),
|
||||
input.ID,
|
||||
strings.TrimSpace(input.Title),
|
||||
input.Code,
|
||||
string(input.Loadouts),
|
||||
)
|
||||
if err != nil {
|
||||
writeJSONError(response, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user