The inspection page as a React component: one canvas showing a subject through one request, and the panels that edit that request.
The request is the component's only state that changes the picture. Every panel dispatches an edit to reduceAutoMovieInspectorState, the canvas is a plain three.js scene from @automovie/render mounted by mountAutoMovieInspectorScene in an effect, and every change of the request reaches onRequestChange as address text, so the page keeps its address equal to the request. The playhead is an AutoMovieInspectorPlayhead outside React that the render loop advances, so a playing frame re-renders only the time readout, and starting or stopping also the play button.
The canvas has the transport directly under it. Beside it, or under the transport when the inspector is narrower than 900 pixels, a column holds one collapsible section per panel, each heading saying what is active: View and Shade start open, Marks, Selection and Request start closed, so a first look shows the picture and how it is drawn, and Diagnostics opens once the mount reports a confirmed error. Diagnostics keeps the newest incidents the mount reports, which the console also receives, and moves the picture to a chosen witness through an ordinary request edit; hiding its witnesses hides the cubes and the status line, not the checks. While focus is inside the inspector, the playback keys of handleAutoMovieInspectorKey drive the playhead, except a key held with Ctrl, Meta or Alt and a key that goes to a control answering it itself.
The mount effect depends on the chosen subject object only, which selectAutoMovieDrawSubject picks by the request's subject key, so each subject must keep its identity across renders; the request reaches a mounted scene through its apply, and a request the scene refuses is set back to the one it still draws, with the reason shown. Under StrictMode the mount effect runs, cleans up and runs again on the same canvas, which the mount supports with one renderer alive at the end.
createRoot(element).render( <AutoMovieInspector subjects={subjects} initialText={location.search} onRequestChange={createAutoMovieInspectorAddressWriter({ location, history })} />, );
The inspection page as a React component: one canvas showing a subject through one request, and the panels that edit that request.
The request is the component's only state that changes the picture. Every panel dispatches an edit to
reduceAutoMovieInspectorState, the canvas is a plain three.js scene from@automovie/rendermounted bymountAutoMovieInspectorScenein an effect, and every change of the request reachesonRequestChangeas address text, so the page keeps its address equal to the request. The playhead is anAutoMovieInspectorPlayheadoutside React that the render loop advances, so a playing frame re-renders only the time readout, and starting or stopping also the play button.The canvas has the transport directly under it. Beside it, or under the transport when the inspector is narrower than 900 pixels, a column holds one collapsible section per panel, each heading saying what is active: View and Shade start open, Marks, Selection and Request start closed, so a first look shows the picture and how it is drawn, and Diagnostics opens once the mount reports a confirmed error. Diagnostics keeps the newest incidents the mount reports, which the console also receives, and moves the picture to a chosen witness through an ordinary request edit; hiding its witnesses hides the cubes and the status line, not the checks. While focus is inside the inspector, the playback keys of
handleAutoMovieInspectorKeydrive the playhead, except a key held with Ctrl, Meta or Alt and a key that goes to a control answering it itself.The mount effect depends on the chosen subject object only, which selectAutoMovieDrawSubject picks by the request's subject key, so each subject must keep its identity across renders; the request reaches a mounted scene through its
apply, and a request the scene refuses is set back to the one it still draws, with the reason shown. Under StrictMode the mount effect runs, cleans up and runs again on the same canvas, which the mount supports with one renderer alive at the end.