@hraness/slopcamera 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{SLOPCAMERA_CAPABILITY_MANIFEST_LIMITS,SLOPCAMERA_PORTABLE_CAPABILITY_VERSION,SLOPCAMERA_VERSION,STUDIO_LIMITS,SlopcameraCapabilityCommandSchema,SlopcameraCapabilityEffectSchema,SlopcameraCapabilityManifestSchema,SlopcameraCapabilityModuleDeclarationSchema,SlopcameraCapabilityModuleSchema,SlopcameraCapabilityOperationSchema,SlopcameraCapabilityPreparationSchema,SlopcameraCapabilityProfileSchema,SlopcameraCapabilityQualificationSchema,SlopcameraCapabilityResourceSchema,SlopcameraCapabilityResumeSchema,SlopcameraCapabilityToolSchema,SlopcameraCapabilityWorkflowSchema,SlopcameraMcpToolRuntime,SlopcameraSceneVariantsSchema,StudioCapabilityNameSchema,StudioDigestSchema,StudioEngineOptionsSchema,StudioEngineSchema,StudioExecutionProfileSchema,StudioJobSchema,StudioOutputArtifactSchema,StudioOutputFormatSchema,StudioOutputInterpretationSchema,StudioOutputRoleSchema,StudioOutputSpecSchema,StudioPathSchema,StudioPlanSchema,StudioReceiptSchema,StudioRenderSchema,StudioRuntimeIdentitySchema,StudioSourceBundleSchema,StudioSourceSpaceSchema,WorkspaceBoundary,WorkspaceBoundaryError,artifactSummary,checkDiagramFile,compileSlopcameraCapabilityManifest,createPortableSlopcameraCapabilityManifest,defineSlopcameraCapabilityModule,diagramApi,inspectStudioBundle,inspectStudioPlan,mcpMaximumRenderedPixels,mcpMaximumScale,mcpSourceByteLimit,parseSlopcameraCapabilityManifest,parseSlopcameraSceneVariants,parseStudioJob,parseStudioPlan,parseStudioReceipt,parseStudioRuntimeIdentity,parseStudioSourceBundle,planSlopcameraSceneGallery,planStudioJob,readDiagramFile,renderDiagramFile,runMcpServer,slopcameraApi,slopcameraMcpProtocolVersion,slopcameraMcpServerName,slopcameraMcpTools,slopcameraPortableCapabilityManifest,slopcameraSceneGalleryLimits,studioJobSha256,studioOutputPath,studioRuntimeSha256,studioSourceBundleSha256,summarizeSceneVariantPatch,validateStudioReceipt}from"./index-f0ptv8dm.js";import{bundledSkillPath,installSkill}from"./index-grk47tgs.js";import"./index-cgpkyjqa.js";import"./index-3cxf2c58.js";import{SlopcameraWorkflowError,defineSlopcameraWorkflow,runSlopcameraWorkflow}from"./index-296qhpf2.js";import{DiagramValidationError,SlopcameraOperationError,StackLayoutError,builtInIcons,composeSlopcameraImageGallery,critiqueIconRaster,executeSlopcameraOperation,executeSlopcameraOperationWithLease,extractIconLineArt,galleryCandidateId,galleryPromptFor,generateSlopcameraIcon,generateSlopcameraImageGallery,iconPromptFor,iconVisualGateProblems,isSlopcameraOperationCode,lintDiagram,parseDiagramSource,parseDiagramSpec,parseSlopcameraGalleryVary,parseSlopcameraOperationInput,planSlopcameraGallery,renderPng,renderSvg,resolveDiagramSource,resolveEdge,resolveStackLayout,searchSlopcameraOperations,serializeTldr,slopcameraGalleryAxes,slopcameraGalleryKinds,slopcameraGalleryLimits,slopcameraIconCritiqueDefaultModel,slopcameraIconCritiqueTimeoutMs,slopcameraIconDefaultInk,slopcameraIconDefaultRounds,slopcameraIconMaximumRounds,slopcameraIconPanel,slopcameraIconSubjectMaximumBytes,slopcameraOperationCodes,slopcameraOperationHostResourceClaims,slopcameraOperationRegistry,stackLayoutDefaults,withSlopcameraOperationHostAdmission}from"./index-0bbesn4m.js";import{VTRACER_VERSION,VectorizeError,vectorizeDefaultLimits,vectorizeHardLimits,vectorizeImage,vectorizeProfileNames,vtracerReleases}from"./index-qry58nj2.js";import{SlopcameraCloudError,createFixedGatewayFetch,generateSlopcameraImage,generateSlopcameraImageFile,resolveSlopcameraGatewayCredential,slopcameraGatewayApiBaseUrl,slopcameraGatewayCredentialStatus,slopcameraImageModels,slopcameraMaximumPromptBytes,slopcameraMaximumRawImageBytes,slopcameraResponseMediaTypes}from"./index-77fjfg9f.js";import{HOST_RESOURCE_MAX_WAIT_MILLISECONDS,HostResourceError,createDefaultHostResourceCoordinator,createHostResourceCoordinator,createProcessLocalHostResourceCoordinator,defaultSlopcameraHostResourceProfile,defaultSlopcameraHostResourceStateRoot,normalizeHostResourceClaims,normalizeHostResourceProfile,slopcameraHostResourceNames}from"./index-b3geqczn.js";import"./index-80a36bc0.js";export{withSlopcameraOperationHostAdmission,vtracerReleases,vectorizeProfileNames,vectorizeImage,vectorizeHardLimits,vectorizeDefaultLimits,validateStudioReceipt,summarizeSceneVariantPatch,studioSourceBundleSha256,studioRuntimeSha256,studioOutputPath,studioJobSha256,stackLayoutDefaults,slopcameraSceneGalleryLimits,slopcameraResponseMediaTypes,slopcameraPortableCapabilityManifest,slopcameraOperationRegistry,slopcameraOperationHostResourceClaims,slopcameraOperationCodes,slopcameraMcpTools,slopcameraMcpServerName,slopcameraMcpProtocolVersion,slopcameraMaximumRawImageBytes,slopcameraMaximumPromptBytes,slopcameraImageModels,slopcameraIconSubjectMaximumBytes,slopcameraIconPanel,slopcameraIconMaximumRounds,slopcameraIconDefaultRounds,slopcameraIconDefaultInk,slopcameraIconCritiqueTimeoutMs,slopcameraIconCritiqueDefaultModel,slopcameraHostResourceNames,slopcameraGatewayCredentialStatus,slopcameraGatewayApiBaseUrl,slopcameraGalleryLimits,slopcameraGalleryKinds,slopcameraGalleryAxes,slopcameraApi,serializeTldr,searchSlopcameraOperations,runSlopcameraWorkflow,runMcpServer,resolveStackLayout,resolveSlopcameraGatewayCredential,resolveEdge,resolveDiagramSource,renderSvg,renderPng,renderDiagramFile,readDiagramFile,planStudioJob,planSlopcameraSceneGallery,planSlopcameraGallery,parseStudioSourceBundle,parseStudioRuntimeIdentity,parseStudioReceipt,parseStudioPlan,parseStudioJob,parseSlopcameraSceneVariants,parseSlopcameraOperationInput,parseSlopcameraGalleryVary,parseSlopcameraCapabilityManifest,parseDiagramSpec,parseDiagramSource,normalizeHostResourceProfile,normalizeHostResourceClaims,mcpSourceByteLimit,mcpMaximumScale,mcpMaximumRenderedPixels,lintDiagram,isSlopcameraOperationCode,installSkill,inspectStudioPlan,inspectStudioBundle,iconVisualGateProblems,iconPromptFor,generateSlopcameraImageGallery,generateSlopcameraImageFile,generateSlopcameraImage,generateSlopcameraIcon,galleryPromptFor,galleryCandidateId,extractIconLineArt,executeSlopcameraOperationWithLease,executeSlopcameraOperation,diagramApi,defineSlopcameraWorkflow,defineSlopcameraCapabilityModule,defaultSlopcameraHostResourceStateRoot,defaultSlopcameraHostResourceProfile,critiqueIconRaster,createProcessLocalHostResourceCoordinator,createPortableSlopcameraCapabilityManifest,createHostResourceCoordinator,createFixedGatewayFetch,createDefaultHostResourceCoordinator,composeSlopcameraImageGallery,compileSlopcameraCapabilityManifest,checkDiagramFile,bundledSkillPath,builtInIcons,artifactSummary,WorkspaceBoundaryError,WorkspaceBoundary,VectorizeError,VTRACER_VERSION,StudioSourceSpaceSchema,StudioSourceBundleSchema,StudioRuntimeIdentitySchema,StudioRenderSchema,StudioReceiptSchema,StudioPlanSchema,StudioPathSchema,StudioOutputSpecSchema,StudioOutputRoleSchema,StudioOutputInterpretationSchema,StudioOutputFormatSchema,StudioOutputArtifactSchema,StudioJobSchema,StudioExecutionProfileSchema,StudioEngineSchema,StudioEngineOptionsSchema,StudioDigestSchema,StudioCapabilityNameSchema,StackLayoutError,SlopcameraWorkflowError,SlopcameraSceneVariantsSchema,SlopcameraOperationError,SlopcameraMcpToolRuntime,SlopcameraCloudError,SlopcameraCapabilityWorkflowSchema,SlopcameraCapabilityToolSchema,SlopcameraCapabilityResumeSchema,SlopcameraCapabilityResourceSchema,SlopcameraCapabilityQualificationSchema,SlopcameraCapabilityProfileSchema,SlopcameraCapabilityPreparationSchema,SlopcameraCapabilityOperationSchema,SlopcameraCapabilityModuleSchema,SlopcameraCapabilityModuleDeclarationSchema,SlopcameraCapabilityManifestSchema,SlopcameraCapabilityEffectSchema,SlopcameraCapabilityCommandSchema,STUDIO_LIMITS,SLOPCAMERA_VERSION,SLOPCAMERA_PORTABLE_CAPABILITY_VERSION,SLOPCAMERA_CAPABILITY_MANIFEST_LIMITS,HostResourceError,HOST_RESOURCE_MAX_WAIT_MILLISECONDS,DiagramValidationError};
2
+ import{SLOPCAMERA_CAPABILITY_MANIFEST_LIMITS,SLOPCAMERA_PORTABLE_CAPABILITY_VERSION,SLOPCAMERA_VERSION,STUDIO_LIMITS,SlopcameraCapabilityCommandSchema,SlopcameraCapabilityEffectSchema,SlopcameraCapabilityManifestSchema,SlopcameraCapabilityModuleDeclarationSchema,SlopcameraCapabilityModuleSchema,SlopcameraCapabilityOperationSchema,SlopcameraCapabilityPreparationSchema,SlopcameraCapabilityProfileSchema,SlopcameraCapabilityQualificationSchema,SlopcameraCapabilityResourceSchema,SlopcameraCapabilityResumeSchema,SlopcameraCapabilityToolSchema,SlopcameraCapabilityWorkflowSchema,SlopcameraMcpToolRuntime,SlopcameraSceneVariantsSchema,StudioCapabilityNameSchema,StudioDigestSchema,StudioEngineOptionsSchema,StudioEngineSchema,StudioExecutionProfileSchema,StudioJobSchema,StudioOutputArtifactSchema,StudioOutputFormatSchema,StudioOutputInterpretationSchema,StudioOutputRoleSchema,StudioOutputSpecSchema,StudioPathSchema,StudioPlanSchema,StudioReceiptSchema,StudioRenderSchema,StudioRuntimeIdentitySchema,StudioSourceBundleSchema,StudioSourceSpaceSchema,WorkspaceBoundary,WorkspaceBoundaryError,artifactSummary,checkDiagramFile,compileSlopcameraCapabilityManifest,createPortableSlopcameraCapabilityManifest,defineSlopcameraCapabilityModule,diagramApi,inspectStudioBundle,inspectStudioPlan,mcpMaximumRenderedPixels,mcpMaximumScale,mcpSourceByteLimit,parseSlopcameraCapabilityManifest,parseSlopcameraSceneVariants,parseStudioJob,parseStudioPlan,parseStudioReceipt,parseStudioRuntimeIdentity,parseStudioSourceBundle,planSlopcameraSceneGallery,planStudioJob,readDiagramFile,renderDiagramFile,runMcpServer,slopcameraApi,slopcameraMcpProtocolVersion,slopcameraMcpServerName,slopcameraMcpTools,slopcameraPortableCapabilityManifest,slopcameraSceneGalleryLimits,studioJobSha256,studioOutputPath,studioRuntimeSha256,studioSourceBundleSha256,summarizeSceneVariantPatch,validateStudioReceipt}from"./index-gs48afpt.js";import{bundledSkillPath,installSkill}from"./index-grk47tgs.js";import"./index-zhg36tf9.js";import"./index-3cxf2c58.js";import{SlopcameraWorkflowError,defineSlopcameraWorkflow,runSlopcameraWorkflow}from"./index-296qhpf2.js";import{DiagramValidationError,SlopcameraOperationError,StackLayoutError,builtInIcons,composeSlopcameraImageGallery,critiqueIconRaster,executeSlopcameraOperation,executeSlopcameraOperationWithLease,extractIconLineArt,galleryCandidateId,galleryPromptFor,generateSlopcameraIcon,generateSlopcameraImageGallery,iconPromptFor,iconVisualGateProblems,isSlopcameraOperationCode,lintDiagram,parseDiagramSource,parseDiagramSpec,parseSlopcameraGalleryVary,parseSlopcameraOperationInput,planSlopcameraGallery,renderPng,renderSvg,resolveDiagramSource,resolveEdge,resolveStackLayout,searchSlopcameraOperations,serializeTldr,slopcameraGalleryAxes,slopcameraGalleryKinds,slopcameraGalleryLimits,slopcameraIconCritiqueDefaultModel,slopcameraIconCritiqueTimeoutMs,slopcameraIconDefaultInk,slopcameraIconDefaultRounds,slopcameraIconMaximumRounds,slopcameraIconPanel,slopcameraIconSubjectMaximumBytes,slopcameraOperationCodes,slopcameraOperationHostResourceClaims,slopcameraOperationRegistry,stackLayoutDefaults,withSlopcameraOperationHostAdmission}from"./index-0bbesn4m.js";import{VTRACER_VERSION,VectorizeError,vectorizeDefaultLimits,vectorizeHardLimits,vectorizeImage,vectorizeProfileNames,vtracerReleases}from"./index-qry58nj2.js";import{SlopcameraCloudError,createFixedGatewayFetch,generateSlopcameraImage,generateSlopcameraImageFile,resolveSlopcameraGatewayCredential,slopcameraGatewayApiBaseUrl,slopcameraGatewayCredentialStatus,slopcameraImageModels,slopcameraMaximumPromptBytes,slopcameraMaximumRawImageBytes,slopcameraResponseMediaTypes}from"./index-77fjfg9f.js";import{HOST_RESOURCE_MAX_WAIT_MILLISECONDS,HostResourceError,createDefaultHostResourceCoordinator,createHostResourceCoordinator,createProcessLocalHostResourceCoordinator,defaultSlopcameraHostResourceProfile,defaultSlopcameraHostResourceStateRoot,normalizeHostResourceClaims,normalizeHostResourceProfile,slopcameraHostResourceNames}from"./index-b3geqczn.js";import"./index-80a36bc0.js";export{withSlopcameraOperationHostAdmission,vtracerReleases,vectorizeProfileNames,vectorizeImage,vectorizeHardLimits,vectorizeDefaultLimits,validateStudioReceipt,summarizeSceneVariantPatch,studioSourceBundleSha256,studioRuntimeSha256,studioOutputPath,studioJobSha256,stackLayoutDefaults,slopcameraSceneGalleryLimits,slopcameraResponseMediaTypes,slopcameraPortableCapabilityManifest,slopcameraOperationRegistry,slopcameraOperationHostResourceClaims,slopcameraOperationCodes,slopcameraMcpTools,slopcameraMcpServerName,slopcameraMcpProtocolVersion,slopcameraMaximumRawImageBytes,slopcameraMaximumPromptBytes,slopcameraImageModels,slopcameraIconSubjectMaximumBytes,slopcameraIconPanel,slopcameraIconMaximumRounds,slopcameraIconDefaultRounds,slopcameraIconDefaultInk,slopcameraIconCritiqueTimeoutMs,slopcameraIconCritiqueDefaultModel,slopcameraHostResourceNames,slopcameraGatewayCredentialStatus,slopcameraGatewayApiBaseUrl,slopcameraGalleryLimits,slopcameraGalleryKinds,slopcameraGalleryAxes,slopcameraApi,serializeTldr,searchSlopcameraOperations,runSlopcameraWorkflow,runMcpServer,resolveStackLayout,resolveSlopcameraGatewayCredential,resolveEdge,resolveDiagramSource,renderSvg,renderPng,renderDiagramFile,readDiagramFile,planStudioJob,planSlopcameraSceneGallery,planSlopcameraGallery,parseStudioSourceBundle,parseStudioRuntimeIdentity,parseStudioReceipt,parseStudioPlan,parseStudioJob,parseSlopcameraSceneVariants,parseSlopcameraOperationInput,parseSlopcameraGalleryVary,parseSlopcameraCapabilityManifest,parseDiagramSpec,parseDiagramSource,normalizeHostResourceProfile,normalizeHostResourceClaims,mcpSourceByteLimit,mcpMaximumScale,mcpMaximumRenderedPixels,lintDiagram,isSlopcameraOperationCode,installSkill,inspectStudioPlan,inspectStudioBundle,iconVisualGateProblems,iconPromptFor,generateSlopcameraImageGallery,generateSlopcameraImageFile,generateSlopcameraImage,generateSlopcameraIcon,galleryPromptFor,galleryCandidateId,extractIconLineArt,executeSlopcameraOperationWithLease,executeSlopcameraOperation,diagramApi,defineSlopcameraWorkflow,defineSlopcameraCapabilityModule,defaultSlopcameraHostResourceStateRoot,defaultSlopcameraHostResourceProfile,critiqueIconRaster,createProcessLocalHostResourceCoordinator,createPortableSlopcameraCapabilityManifest,createHostResourceCoordinator,createFixedGatewayFetch,createDefaultHostResourceCoordinator,composeSlopcameraImageGallery,compileSlopcameraCapabilityManifest,checkDiagramFile,bundledSkillPath,builtInIcons,artifactSummary,WorkspaceBoundaryError,WorkspaceBoundary,VectorizeError,VTRACER_VERSION,StudioSourceSpaceSchema,StudioSourceBundleSchema,StudioRuntimeIdentitySchema,StudioRenderSchema,StudioReceiptSchema,StudioPlanSchema,StudioPathSchema,StudioOutputSpecSchema,StudioOutputRoleSchema,StudioOutputInterpretationSchema,StudioOutputFormatSchema,StudioOutputArtifactSchema,StudioJobSchema,StudioExecutionProfileSchema,StudioEngineSchema,StudioEngineOptionsSchema,StudioDigestSchema,StudioCapabilityNameSchema,StackLayoutError,SlopcameraWorkflowError,SlopcameraSceneVariantsSchema,SlopcameraOperationError,SlopcameraMcpToolRuntime,SlopcameraCloudError,SlopcameraCapabilityWorkflowSchema,SlopcameraCapabilityToolSchema,SlopcameraCapabilityResumeSchema,SlopcameraCapabilityResourceSchema,SlopcameraCapabilityQualificationSchema,SlopcameraCapabilityProfileSchema,SlopcameraCapabilityPreparationSchema,SlopcameraCapabilityOperationSchema,SlopcameraCapabilityModuleSchema,SlopcameraCapabilityModuleDeclarationSchema,SlopcameraCapabilityManifestSchema,SlopcameraCapabilityEffectSchema,SlopcameraCapabilityCommandSchema,STUDIO_LIMITS,SLOPCAMERA_VERSION,SLOPCAMERA_PORTABLE_CAPABILITY_VERSION,SLOPCAMERA_CAPABILITY_MANIFEST_LIMITS,HostResourceError,HOST_RESOURCE_MAX_WAIT_MILLISECONDS,DiagramValidationError};
package/docs/studio.md CHANGED
@@ -22,6 +22,10 @@ The scaffold creates `scene.py`, any explicit helpers, `source.json` and `job.js
22
22
 
23
23
  The default Blender product job requests Cycles GPU rendering. An unavailable GPU fails clearly. Select `device: "cpu"` in a new job when CPU rendering is intended; no fallback is implicit. Initial Metal shader compilation can make the first render substantially slower than later frames.
24
24
 
25
+ `studio probe` discovers devices without rendering a frame. A successful probe
26
+ does not qualify shader compilation or the scene's render. Use a bounded render
27
+ with the selected engine and device before committing to a long job.
28
+
25
29
  Other starters:
26
30
 
27
31
  ```sh
@@ -210,6 +214,14 @@ slopcamera studio reconcile <studio-id> --json
210
214
 
211
215
  Inspection rechecks source and physical output hashes. Reconciliation can restore a missing receipt only when a closed successful process completion and an unchanged output-validation checkpoint exist. Earlier interrupted execution remains ambiguous and is never automatically resubmitted. Choose a new job ID for an explicitly revised attempt after custody is settled.
212
216
 
217
+ For an unexpected Blender exit, correlate that attempt's retained logs with the
218
+ operating system's crash report before changing settings. A macOS report in
219
+ `MetalKernelPipeline::compile` while the main thread waits in
220
+ `BlenderSession::render` identifies a render failure; it does not prove an
221
+ out-of-memory condition or a specific shader-cache defect. A bounded CPU or EEVEE
222
+ comparison needs a new, explicitly configured job after custody is settled. Its
223
+ success does not qualify Cycles/Metal, and its frames need separate visual review.
224
+
213
225
  The supervisor bounds combined logs, the job deadline and termination/pipe-drain grace. It monitors output and scratch budgets, retains failure evidence and tracks native process groups. Live scans tolerate bounded disappearance of temporary cache entries; final output, source and scratch scans remain strict. Budget-monitor and validation failures retain a safe failed host stage separately from authored-process logs, without storing foreign exception text. A machine-wide durable activity marker survives CLI death; unresolved custody blocks later native dispatch. Detached sessions from authored source are unsupported. Do not delete an unresolved marker to bypass admission; inspect and resolve the actual process ownership first.
214
226
 
215
227
  The native profile is trusted current-user execution without an OS sandbox. Private roots, clean environment variables, hashes and process supervision provide operational control and provenance. They do not confine arbitrary Python, installed plugins or native libraries. Keep unreviewed downloaded source inert until execution is explicitly authorized.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hraness/slopcamera",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "A local visual studio for coding agents: author scenes, combine generated and recorded media, and export images, diagrams, animation, and video from retained sources.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,6 +30,7 @@ Slopcamera installs from its verified release archive or from source. Historical
30
30
  | Editable Three/Spark scene, saved world, named-part edits or shared camera | [Directed scenes](references/directed-scenes.md) |
31
31
  | Semantic direction, galleries, bounded effects, temporal audit or the cinematic-world recipe pack | [Directed scenes](references/directed-scenes.md#direct-cinematic-worlds) |
32
32
  | Author a scene from code, generate procedural entities, or audit framing | [Scene building](references/scene-building.md) |
33
+ | Refine an existing scene, organic interactions, contact, staging, or final movie quality | [Scene refinement](references/scene-building.md#refine-an-existing-scene) |
33
34
  | Parametric architecture, furniture, dimensions, repeated structures or editable design variants | [Parametric design](references/parametric-design.md) |
34
35
  | Blender, rigs, bakes, CAD, shared native assets or production frames | [Native studio](references/native-studio.md) |
35
36
  | Manim lesson, narrated explanation or mathematical animation | [Educational video](references/educational-video.md) |
@@ -2,6 +2,9 @@
2
2
 
3
3
  Use `slopcamera scene --help` to check that the installed CLI includes the directed-scene foundation. The initial renderer uses Three.js and supports explicit scene JSON, semantic edits, calibrated cameras, native media surfaces, contact sheets, and transparent video.
4
4
 
5
+ Use [scene refinement](scene-building.md#refine-an-existing-scene) for a shot-by-shot craft pass, subtle
6
+ behavior design, actual-rig contact checks, and final encoded-frame review.
7
+
5
8
  To author a scene from code — builder helpers, procedural generator modules, glTF admission, or geometric audit — read [scene building](scene-building.md) first. Start interactive work with `slopcamera scene init scene.json --json`, then `slopcamera scene inspect scene.json --json`. Retain the original source. Use its stable entity IDs and exact `sceneSha256` in typed patches; save each edit with `--output` to a new file. Inspect `editableControls` before changing generated parts or imported materials. Do not replace named scene parts with opaque regenerated source merely to change one color or camera.
6
9
 
7
10
  Use `slopcamera scene plan scene.json --request request.json --json` before rendering. A frame request is:
@@ -49,6 +52,29 @@ Four standard-library organisms are available for composition: locomotion FSM (`
49
52
 
50
53
  The authoring loop: (1) assemble a behavior doc from stdlib organisms with scene-bound args, (2) check it with `scene behavior check`, (3) bake it with `scene behavior bake`, (4) audit the trace with `scene behavior audit`, (5) plan gallery variants and review. Identical behavior doc + seed + scene produce byte-identical bakes. The `seed` interface input auto-binds from `behavior.seed` for gallery diversity. A channel map (`--channel-map`) binds emitted channels to clip runs, attach/release pairs, or trajectory waypoints for performance directives. Behaviors never execute source, contact providers, or access the filesystem; organisms are data.
51
54
 
55
+ For SDK authoring, normalize the scene with `parseSpatialScene` and bind the
56
+ behavior using `spatialSceneSha256`. These public helpers validate references and
57
+ normalize entity order so saved SDK scenes and the CLI share the same identity.
58
+ Check, bake, and gallery use that canonical identity. A behavior bound to a raw,
59
+ noncanonical scene hash remains stale: explicitly rebind it to the inspected
60
+ scene and bake again, preserving the earlier documents and receipts.
61
+
62
+ The CLI check and bake still wait for host CPU and local-I/O admission. A concurrent
63
+ render can reserve the CPU pool. A timeout with no output does not establish that
64
+ the behavior program failed; preserve the attempt's outcome and distinguish
65
+ resource waiting from a returned validation error before retrying.
66
+
67
+ When compiling mapped directives with `compileSpatialPerformance`, use the
68
+ exported `SPATIAL_PERFORMANCE_COMPILER_ID` for the plan's `compilerVersion`.
69
+ Compiler `slopcamera.spatial-performance-compiler@v3` resolves prop ownership in
70
+ time order. A later attach can take ownership after a release. At the same
71
+ timestamp, releases precede attaches, so an immediate handoff keeps the new
72
+ attachment; among simultaneous attaches, the last authored attach wins. When the
73
+ latest attachment's interval ends, an older overlapping attachment does not
74
+ resume. Retained `@v2` plans require an explicit version update and a new compile
75
+ and audit. Preserve old takes and receipts as evidence rather than relabeling
76
+ them with the new compiler identity.
77
+
52
78
  The `cinematic-world` built-in workflow composes exactly these operations for one admitted scene. Its input is an inert `slopcamera.spatial-recipe-pack` — one scene digest, one direction document, bounded gallery axes, up to 4 named preview render requests, optional declared effects, and optional temporal-audit inputs — wrapped with the scene document and its repository path. Plan it with `slopcamera workflows plan cinematic-world --input input.json --json`; run it with `workflows run`. The workflow never selects or promotes a candidate: registration uses `scene project add-candidate <project-id> --input <request.json>`, and selection uses `scene project select-candidate <project-id> --input <request.json>`, both after review. A recipe pack is data — it cannot register executors, source paths beyond the declared render source, permissions, secrets, or URLs.
53
79
 
54
80
  ## Direct short generated clips
@@ -14,7 +14,7 @@ command -v slopcamera
14
14
 
15
15
  A restricted shell can omit package-manager paths. Check known host installation paths before declaring a tool unavailable. If Bun is genuinely absent, follow its official [installation guide](https://bun.sh/docs/installation) within the user’s authorized setup scope. Do not switch package managers or pipe an unreviewed installer into a shell.
16
16
 
17
- Slopcamera installs from its verified release archive: `bun add --global https://github.com/hraness/slopcamera/releases/download/v3.2.8/hraness-slopcamera-3.2.8.tgz`, then `slopcamera doctor --json`. Building from source is the contributor path. Historical Atet archives do not install the renamed CLI; never substitute `slopcamera` into an old archive URL.
17
+ Slopcamera installs from its verified release archive: `bun add --global https://github.com/hraness/slopcamera/releases/download/v3.3.1/hraness-slopcamera-3.3.1.tgz`, then `slopcamera doctor --json`. Building from source is the contributor path. Historical Atet archives do not install the renamed CLI; never substitute `slopcamera` into an old archive URL.
18
18
 
19
19
  Use an existing compatible source build when available. Otherwise follow the [complete source-install guide](https://github.com/hraness/slopcamera/blob/main/docs/how-to/use-current-source.md): clone into a new directory, record its exact commit, install locked dependencies without lifecycle scripts, build the SDK and source CLI, then define the shell command against that checkout. A clone or skill installation alone does not install the executable. Do not alter an existing active checkout to satisfy this path.
20
20
 
@@ -5,6 +5,10 @@ including dancing characters, changing landscapes, and musical light accents.
5
5
  The export retains the source and creates an ordinary editable project with
6
6
  separate scene video and original music.
7
7
 
8
+ For an existing composition, use [scene refinement](scene-building.md#refine-an-existing-scene) to review
9
+ each shot, author subtle interactions, check contact, and inspect the encoded
10
+ delivery. Keep the scene's deliberate style and original media intact.
11
+
8
12
  ## Confirm the input and local capability
9
13
 
10
14
  Use the user's selected track and supplied tempo. Establish an explicit duration,
@@ -20,6 +20,25 @@ A failed or interrupted job is never automatically rerun. `studio inspect` reche
20
20
 
21
21
  See the shipped `docs/studio.md` and checked `examples/studio/` for source conventions, color/alpha rules, native caveats and the local `.studio.run()` workflow operation. Source/runtime identities are observed provenance, not a complete hash of every plugin, font, library or ambient read.
22
22
 
23
+ ### Diagnose a Blender render crash
24
+
25
+ `studio probe` discovers devices and checks runtime capabilities; it does not
26
+ render a frame or prove that Cycles shader compilation succeeds. Qualify the
27
+ selected engine and device with a bounded render before a long job.
28
+
29
+ When Blender quits unexpectedly, inspect the exact studio attempt and its retained
30
+ logs, then correlate the process and time with the operating system's crash
31
+ report. On macOS, a `MetalKernelPipeline::compile` stack and a main thread waiting
32
+ in `BlenderSession::render` identify failure during rendering. They do not establish
33
+ an out-of-memory condition, a harmless shutdown, or a particular cache defect.
34
+ A successful Chrome/Three.js render supplies no evidence about Blender's recovery.
35
+
36
+ After custody is settled, test a revised engine or device in a new, explicitly
37
+ configured job if needed. CPU or EEVEE success can narrow the failing path but
38
+ does not fix or qualify Cycles/Metal. Keep the original failure and inspect the
39
+ new frames before adopting that configuration. Do not clear shared caches, alter
40
+ another task's render, or repeatedly launch the failing job as a generic recovery.
41
+
23
42
  ## Share a native output without re-executing it
24
43
 
25
44
  `studio asset <studio-id> --output-id <id> --asset-id <id> --representation native|encoded-video [--frame <index>] --json` rechecks one successful output and returns its spatial asset, binding and receipt. It never rerenders or silently transcodes. Preserve all three together. A frame selection uses the native job’s explicit frame index; an encoded-video selection requires a previously retained unambiguous encode. Unsupported GLB materials, skins or morphs fail before rendering. Keep the original native rig and export a deliberate compatible static derivative.
@@ -1,6 +1,6 @@
1
1
  # Build a revisable parametric design
2
2
 
3
- Use current source and `slopcamera scene design` for dimensions, repeated architectural parts, furniture, pavilions and façades that must regenerate from retained rules. This is a local mesh-design workflow; Rhino, Grasshopper and native engine execution are separate tools.
3
+ Use Slopcamera v3.3.1 or newer and `slopcamera scene design` for dimensions, repeated architectural parts, furniture, pavilions and façades that must regenerate from retained rules. This is a local mesh-design workflow; Rhino, Grasshopper and native engine execution are separate tools.
4
4
 
5
5
  1. Discover original studies with `slopcamera scene design catalog --json`. Start with `scene design init <new-directory> --template crescent-pavilion|spiral-stair|ribbed-tower|modular-bookshelf`.
6
6
  2. Read the emitted `design.json` and inspect it with `scene design inspect`. Describe the user's intended shape in named parameters, derived scalar values, constraints and semantic geometry stages. Keep references to engineering knowledge separate from visual references. Do not infer structural validation from appearance.
@@ -1,4 +1,7 @@
1
- # Build scenes from code
1
+ # Build and refine authored scenes
2
+
3
+ For an existing composition, go to [Refine an existing scene](#refine-an-existing-scene)
4
+ for staging, interaction, contact, and final delivery review.
2
5
 
3
6
  Prefer helpers over hand-written scene JSON. The `@hraness/slopcamera/code` export ships pure builders in `spatial-scene/build` that return validated v1 scene data; feed their output into entities, transforms, and animation channels, then parse the whole scene before writing it. Helpers never read files, execute source, or touch a renderer, and every result already satisfies the contract schemas. Use [directed scenes](directed-scenes.md) for rendering, patching, and project commands.
4
7
 
@@ -30,3 +33,140 @@ Prefer helpers over hand-written scene JSON. The `@hraness/slopcamera/code` expo
30
33
  ## Admit a local glTF asset
31
34
 
32
35
  `slopcamera scene asset admit model.glb --source-root <dir> --output manifest.json --json` validates a local GLB 2.0 against the closed profile, stores it content-addressed, derives model-space and scene-space bounds into a sibling facts manifest, and emits the mesh entity plus ready `add-asset`/`add-entity` patch operations. The source path must stay inside `--source-root`; unsupported GLB features reject rather than degrade. Apply the returned operations through `scene patch`, then feed the admission document itself to `scene audit --asset-bounds`.
36
+
37
+ ## Refine an existing scene
38
+
39
+ Use this pass when an existing HTML, Three.js, or native scene needs better
40
+ staging, character interaction, materials, and motion. Start with its retained
41
+ source and a playable baseline. Finish with reviewed frames from the new encoded
42
+ movie, the source that produced it, and specific remaining limitations.
43
+
44
+ ### Establish the version and shot list
45
+
46
+ Check `slopcamera --version` and the relevant command help against the executable
47
+ you will use. A source checkout, installed CLI, and installed skill can differ.
48
+ Inspect the matching package or release before concluding that a feature is
49
+ missing. Native ALGAL behavior authoring uses `scene behavior check|bake|audit`;
50
+ read [directed scenes](directed-scenes.md#author-character-behaviors) for its
51
+ contracts.
52
+
53
+ Record each shot's time range, intended action, camera, principal objects, and
54
+ visible defects. Preserve deliberate stylistic choices and identity constraints.
55
+ Capture comparable baseline and revised frames at the same scene times. When
56
+ adding a shot, update duration, cuts, captions, end fades, frame count, and review
57
+ sample lists together.
58
+
59
+ Assign independent scene or object groups to separate workers when useful. Keep
60
+ one owner for shared rigs, camera conventions, render settings, generated source,
61
+ and the final browser session. Join the changes before the aggregate review.
62
+
63
+ ### Repair what the camera reveals
64
+
65
+ Review the whole shot before adding detail. Use this order to make each pass
66
+ address the remaining visible problem:
67
+
68
+ | Area | Review and repair |
69
+ | --- | --- |
70
+ | Staging | Make the principal action readable at delivery size. Check silhouettes, feet, faces, sight lines, and foreground occlusion throughout the camera move. Extend sets far enough to cover every intended view. |
71
+ | Contact | Check soles against the floor, fingers against handles, carried objects against hands, and tools against their target surfaces. An object origin is rarely its contact point. |
72
+ | Construction | Give prominent objects plausible thickness, supports, seams, and connections. Inspect stairs, railings, glazing, roofs, furniture, and machine housings for floating or intersecting parts. |
73
+ | Materials | Distinguish metal, glass, painted surfaces, fabric, and foliage through their response to light. Keep roughness and small variations consistent with scale; uniform gloss and repeated bright windows can flatten a scene. |
74
+ | Lighting | Establish a readable key light, restrained fill, and motivated practical lights. Check contact shadows, highlight clipping, bloom, depth-of-field focus, and dark detail in the encoded result. |
75
+ | Motion | Give actions a cause, preparation, contact, follow-through, and rest. Review full motion when a pose depends on a preceding event. |
76
+
77
+ Fix a contact or camera defect before covering it with bloom, grain, motion, or
78
+ extra props. Concentrate detail where the camera can resolve it. Numerical
79
+ geometry checks can catch penetration; they cannot establish that a face is
80
+ visible, a gesture reads well, or a material looks convincing.
81
+
82
+ ### Make behavior serve an observable action
83
+
84
+ Choose a few useful reactions: a commuter notices a sign, a listener looks toward
85
+ the speaker, or two characters pass an object. Define the event sequence before
86
+ varying timing. A handoff might use notice, pause, reach, contact, shared grip,
87
+ release, and acknowledgment. Assign explicit prop ownership intervals and
88
+ document which actor controls the shared phase.
89
+
90
+ Use the native ALGAL interaction organism for phase sequencing, then bind its
91
+ emitted channels to clips, attach/release events, or trajectory waypoints through
92
+ a channel map. Retain the behavior document, scene binding, channel map, bake,
93
+ and audit. Repeat the bake with identical inputs to check determinism. Change
94
+ the seed deliberately when reviewing variants. Inspect advisory findings in the
95
+ context of the channel's meaning; repeated event payloads can be intentional.
96
+
97
+ The behavior trace establishes event timing. Its mapped performance still needs
98
+ the right rig, clip sources, transforms, and contact solution. Measure gaze toward
99
+ the actual target in the character's coordinate frame. Preserve a resting arm
100
+ when only the other arm participates. Use small delays and bounded pose changes
101
+ to separate reactions without giving every object continuous motion.
102
+
103
+ Direct within the visible asset's limits. A mathematically exact gaze can turn a
104
+ photographic face map into an unreadable profile. Review face visibility during
105
+ the gesture and use a restrained glance or nod when that better communicates the
106
+ intended acknowledgment.
107
+
108
+ When adapting a procedural rig, document any proxy skeleton and the conversion
109
+ between local and world transforms. Test the visible rig separately. An audit of
110
+ a proxy does not establish the visible character's foot placement, grip, or
111
+ whole-body physical validity.
112
+
113
+ ### Verify contact and time before the full render
114
+
115
+ Evaluate each frame from its absolute timestamp. Reset transforms and state that
116
+ can otherwise survive a seek. Keep behavior baking outside the frame callback;
117
+ sample the retained result during playback. Test a timestamp, a later timestamp,
118
+ and the original timestamp again, including ownership and pose endpoints.
119
+
120
+ For each important contact, declare the measured surfaces or anchors and a
121
+ tolerance in scene units. Sample the actual loaded rig through the interaction,
122
+ including frames immediately before and after attach, release, impact, and
123
+ planting events. Check finite transforms, grip error, floor clearance, ownership,
124
+ and prop orientation. For moving crowds or vehicles, check geometry extents and
125
+ intermediate times as well as center distances. Report sampling density and
126
+ tolerances; sampled clearance is not continuous collision proof.
127
+
128
+ Require finite measurements and actual samples for every required contact state.
129
+ Missing contact data must fail validation rather than default to zero error.
130
+ Ensure each reported contact and replay check contributes to the final pass/fail
131
+ result.
132
+
133
+ Render a short preview containing the entire difficult action. For an HTML scene,
134
+ author a bounded preview request and map its local clock to the intended source
135
+ time in the authored scene; preserve the full-scene request. For a directed scene,
136
+ use the supported explicit render range. Do not assume a project-specific capture
137
+ flag is a Slopcamera CLI option.
138
+
139
+ Review every shot at its start, middle, and end, then inspect event boundaries,
140
+ cuts, and changed camera coverage. A contact sheet reveals composition and
141
+ continuity; a motion preview reveals timing, sliding, snapping, and occlusion.
142
+ Use both when the change affects interaction. Record defects by shot, object,
143
+ time, and visible consequence so another pass can reproduce them.
144
+
145
+ ### Verify the encoded movie
146
+
147
+ Run the supported [HTML music-video](music-video.md), [directed-scene](directed-scenes.md),
148
+ or [native studio](native-studio.md) render workflow from the converged source.
149
+ Retain its source and runtime receipts. A completed frame loop does not establish
150
+ successful encoding or browser cleanup; resolve any reported lifecycle failure
151
+ before calling the render successful.
152
+
153
+ Probe the delivery for dimensions, rational frame rate, decoded frame count,
154
+ duration, color metadata, and expected audio streams. Derive expected frames from
155
+ the selected workflow's timing rules. Decode review frames from this movie,
156
+ including cuts, the final frame, and the contact phases. If an authored event
157
+ falls between frame times, record the selected frame index and its actual time.
158
+ Review color against the source frames; metadata alone does not prove the correct
159
+ RGB-to-YUV conversion. Distinguish intentional fades from missing or black frames.
160
+
161
+ Keep the previous delivery and hash both files when verifying replacement. A
162
+ different hash proves different bytes, so also compare the intended visible
163
+ changes. Deliver the new movie with a compact scene review, retained evidence,
164
+ and the limitations that remain visible. Avoid a quality or physics claim that
165
+ the review did not establish.
166
+
167
+ For a custom capture optimization, compare decoded pixels against the supported
168
+ capture path at representative lit frames, including transparent edges and
169
+ post-processing. An opening black frame is insufficient evidence. Keep the
170
+ ordinary capture path when equality is required and the comparison differs.
171
+ Never bypass browser signature checks, disable its sandbox, or signal unrelated
172
+ processes to make a render finish.
package/src/mcp/tools.ts CHANGED
@@ -45,6 +45,7 @@ import {
45
45
  import {
46
46
  spatialBehaviorFnSignatures,
47
47
  } from "../spatial-scene/behavior-fns.js"
48
+ import { SpatialBehaviorBakeSchema } from "../spatial-scene/behavior-trace.js"
48
49
  import {
49
50
  SPATIAL_SCENE_LIMITS,
50
51
  type SpatialSceneV1,
@@ -2410,7 +2411,11 @@ export class SlopcameraMcpToolRuntime {
2410
2411
  options: ParsedSceneBehaviorAuditArguments,
2411
2412
  ): Promise<McpToolResult> {
2412
2413
  const bake = await loadJson(this.boundary, options.bake, "Behavior bake source")
2413
- const report = auditSpatialBehaviorTrace(bake.value)
2414
+ const document = parseSpatialValue(SpatialBehaviorBakeSchema, bake.value, "behavior bake")
2415
+ const report = auditSpatialBehaviorTrace({
2416
+ behaviorSha256: document.behaviorSha256, emittedSha256: document.receipt.emittedSha256,
2417
+ emitted: document.emitted, rangeUs: document.rangeUs,
2418
+ })
2414
2419
  const findings = boundedSlice(report.findings, mcpMaximumReturnedFindings)
2415
2420
  const summary = {
2416
2421
  findingCount: report.findings.length,
@@ -27,8 +27,7 @@ import {
27
27
  type SpatialBehaviorChannelMap,
28
28
  type SpatialBehaviorEmitted,
29
29
  } from "./behavior-trace.js"
30
- import { SpatialSceneV1Schema } from "./contracts.js"
31
- import { parseSpatialValue, spatialValueSha256, SpatialSceneError } from "./identity.js"
30
+ import { parseSpatialScene, parseSpatialValue, spatialValueSha256, SpatialSceneError } from "./identity.js"
32
31
 
33
32
  /**
34
33
  * Deterministic behavior bake: an admitted `slopcamera.spatial-behavior`
@@ -105,7 +104,7 @@ const entryRunArgs = (behavior: SpatialBehavior, manifest: OrganismManifest): Re
105
104
  export async function bakeSpatialBehavior(input: unknown): Promise<SpatialBehaviorBakeResult> {
106
105
  const options = parseSpatialValue(bakeOptionsSchema, input, "behavior bake")
107
106
  const behavior = parseSpatialBehavior(options.behavior)
108
- const scene = parseSpatialValue(SpatialSceneV1Schema, options.scene, "scene")
107
+ const scene = parseSpatialScene(options.scene)
109
108
  const sceneSha256 = spatialValueSha256(scene)
110
109
  const signatures = spatialBehaviorFnSignatures()
111
110
  const check = checkSpatialBehavior({ behavior, scene }, signatures)
@@ -13,9 +13,8 @@ import {
13
13
  } from "./behavior-trace.js"
14
14
  import {
15
15
  SpatialDigestSchema,
16
- SpatialSceneV1Schema,
17
16
  } from "./contracts.js"
18
- import { parseSpatialValue, spatialValueSha256 } from "./identity.js"
17
+ import { parseSpatialScene, parseSpatialValue, spatialValueSha256 } from "./identity.js"
19
18
 
20
19
  /**
21
20
  * Seeded behavior galleries: one admitted behavior document baked under
@@ -69,7 +68,7 @@ const candidateId = (parameter: string, behaviorSha256: string): string =>
69
68
  export async function planSpatialBehaviorGallery(input: unknown): Promise<SpatialBehaviorGalleryPlan> {
70
69
  const options = parseSpatialValue(galleryOptionsSchema, input, "behavior gallery")
71
70
  const behavior = parseSpatialBehavior(options.behavior)
72
- const scene = parseSpatialValue(SpatialSceneV1Schema, options.scene, "scene")
71
+ const scene = parseSpatialScene(options.scene)
73
72
  const channelMap = options.channelMap === undefined ? undefined : parseSpatialBehaviorChannelMap(options.channelMap)
74
73
 
75
74
  const seen = new Set<string>()
@@ -4,11 +4,10 @@ import { boundedCanonicalJsonSha256 } from "../code/canonical-json.js"
4
4
  import { deepFreezeJson } from "../code/json-snapshot.js"
5
5
  import {
6
6
  SpatialDigestSchema,
7
- SpatialSceneV1Schema,
8
7
  SpatialTimeUsSchema,
9
8
  type SpatialSceneV1,
10
9
  } from "./contracts.js"
11
- import { parseSpatialValue, spatialValueSha256 } from "./identity.js"
10
+ import { parseSpatialScene, parseSpatialValue, spatialValueSha256 } from "./identity.js"
12
11
 
13
12
  /**
14
13
  * Behavior documents bind an ALGAL organism closure to one scene entity.
@@ -392,7 +391,7 @@ export function checkSpatialBehavior(
392
391
  ): SpatialBehaviorCheckReport {
393
392
  const options = parseSpatialValue(checkOptionsSchema, input, "behavior check")
394
393
  const behavior = parseSpatialBehavior(options.behavior)
395
- const scene = parseSpatialValue(SpatialSceneV1Schema, options.scene, "scene")
394
+ const scene = parseSpatialScene(options.scene)
396
395
  const sceneSha256 = spatialValueSha256(scene)
397
396
  const findings: SpatialBehaviorCheckFinding[] = []
398
397
  const finding = (code: SpatialBehaviorFindingCode, severity: "error" | "warning", detail: string, referenceId?: string): void => {
@@ -76,7 +76,7 @@ export const SPATIAL_PERFORMANCE_BODY_MASKS = Object.freeze({
76
76
 
77
77
  export type SpatialPerformanceBodyMaskName = keyof typeof SPATIAL_PERFORMANCE_BODY_MASKS
78
78
 
79
- export const SPATIAL_PERFORMANCE_COMPILER_ID = "slopcamera.spatial-performance-compiler@v2"
79
+ export const SPATIAL_PERFORMANCE_COMPILER_ID = "slopcamera.spatial-performance-compiler@v3"
80
80
 
81
81
  const humanoidBoneName = z.enum(HUMANOID_BONE_NAMES)
82
82
  const unit = z.number().finite().min(0).max(1)
@@ -1150,15 +1150,15 @@ export function compileSpatialPerformance(planInput: unknown, sourcesInput: unkn
1150
1150
  const order = mappedBoneOrder(sources.mapping)
1151
1151
 
1152
1152
  const morphDirectives = plan.directives.filter((d) => d.kind === "morph") as Extract<SpatialPerformancePlan["directives"][number], { kind: "morph" }>[]
1153
- const attachDirectives = plan.directives.filter((d) => d.kind === "attach") as Extract<SpatialPerformancePlan["directives"][number], { kind: "attach" }>[]
1154
- const releaseDirectives = plan.directives.filter((d) => d.kind === "release") as Extract<SpatialPerformancePlan["directives"][number], { kind: "release" }>[]
1153
+ const attachmentDirectives = plan.directives.filter((d) => d.kind === "attach" || d.kind === "release")
1154
+ .sort((a, b) => a.startUs - b.startUs || Number(a.kind === "attach") - Number(b.kind === "attach"))
1155
1155
  const springDirectives = plan.directives.filter((d) => d.kind === "spring") as Extract<SpatialPerformancePlan["directives"][number], { kind: "spring" }>[]
1156
1156
  const lookAtDirectives = plan.directives.filter((d) => d.kind === "look-at") as Extract<SpatialPerformancePlan["directives"][number], { kind: "look-at" }>[]
1157
1157
  const twoBoneDirectives = plan.directives.filter((d) => d.kind === "two-bone-ik") as Extract<SpatialPerformancePlan["directives"][number], { kind: "two-bone-ik" }>[]
1158
1158
  const footPlantDirectives = plan.directives.filter((d) => d.kind === "foot-plant") as Extract<SpatialPerformancePlan["directives"][number], { kind: "foot-plant" }>[]
1159
1159
  const rootTrajectory = plan.directives.find((d) => d.kind === "root-trajectory") as Extract<SpatialPerformancePlan["directives"][number], { kind: "root-trajectory" }> | undefined
1160
1160
 
1161
- const propIds = new Set<string>([...Object.keys(sources.props), ...attachDirectives.map((d) => d.propId), ...releaseDirectives.map((d) => d.propId)])
1161
+ const propIds = new Set<string>([...Object.keys(sources.props), ...attachmentDirectives.map((d) => d.propId)])
1162
1162
 
1163
1163
  type MutableSample = {
1164
1164
  timeUs: number
@@ -1307,22 +1307,22 @@ export function compileSpatialPerformance(planInput: unknown, sourcesInput: unkn
1307
1307
  let attached = false
1308
1308
  let parentBone: string | undefined
1309
1309
  let localOffset: { position: [number, number, number]; rotation: [number, number, number, number]; scale: [number, number, number] } | undefined
1310
- for (const directive of attachDirectives) {
1311
- if (directive.propId === propId && timeUs >= directive.startUs && timeUs < directive.endUs) {
1312
- attached = true
1313
- parentBone = directive.bone
1314
- localOffset = {
1315
- position: [directive.localOffset.position[0], directive.localOffset.position[1], directive.localOffset.position[2]],
1316
- rotation: [directive.localOffset.rotation[0], directive.localOffset.rotation[1], directive.localOffset.rotation[2], directive.localOffset.rotation[3]],
1317
- scale: [directive.localOffset.scale[0], directive.localOffset.scale[1], directive.localOffset.scale[2]],
1318
- }
1319
- }
1310
+ // Ownership follows the latest event, including expired attaches so an
1311
+ // older interval cannot resume. At one instant, release closes the old
1312
+ // binding before attach opens the new one. Stable sorting preserves
1313
+ // authored precedence among simultaneous attaches.
1314
+ let latest: (typeof attachmentDirectives)[number] | undefined
1315
+ for (const directive of attachmentDirectives) {
1316
+ if (directive.startUs > timeUs) break
1317
+ if (directive.propId === propId) latest = directive
1320
1318
  }
1321
- for (const directive of releaseDirectives) {
1322
- if (directive.propId === propId && timeUs >= directive.startUs) {
1323
- attached = false
1324
- parentBone = undefined
1325
- localOffset = undefined
1319
+ if (latest?.kind === "attach" && timeUs < latest.endUs) {
1320
+ attached = true
1321
+ parentBone = latest.bone
1322
+ localOffset = {
1323
+ position: [latest.localOffset.position[0], latest.localOffset.position[1], latest.localOffset.position[2]],
1324
+ rotation: [latest.localOffset.rotation[0], latest.localOffset.rotation[1], latest.localOffset.rotation[2], latest.localOffset.rotation[3]],
1325
+ scale: [latest.localOffset.scale[0], latest.localOffset.scale[1], latest.localOffset.scale[2]],
1326
1326
  }
1327
1327
  }
1328
1328
  let worldPosition: [number, number, number] = [0, 0, 0]
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SLOPCAMERA_VERSION = "3.3.1" as const
1
+ export const SLOPCAMERA_VERSION = "3.3.2" as const