Upgrade to @solidtv/renderer 1.9 - #58
Merged
Merged
Conversation
Renderer 1.8 was a breaking release: render-to-texture, the per-node boundsMargin prop, the inBounds/outOfBounds events and container autosize were all removed, and 1.9 dropped the __calculateFps__ build gate. Move the framework onto 1.9 and bring the docs in line. Code: - Drop `rtt` from ElementNode's prop list, its color default, and the DOM renderer's props, accessors and texture-type switch. RTT has no replacement, so FadeInOut (which flattened its subtree before fading out) and Marquee (which drew its scrolling copies through a texture) now render directly. Both are visible behavior changes. - Remove the per-node `boundsMargin` prop from the DOM renderer and make `normalizeBoundsMargin` return a scalar, mirroring the WebGL renderer's largest-edge coercion and warning for the dropped tuple form. - Replace the `inBounds`/`outOfBounds` node events with `inViewport`/`outOfViewport`, typed as `NodeViewportPayload`, and emit them from the DOM renderer with the same semantics as CoreNode. - Guard the DOM renderer's image path on `typeof src === 'string'` now that the renderer accepts `Blob | ImageData` sources it cannot paint. - Remove the createTag primitive and its docs. It existed only to build RTT textures and cannot work on 1.9. `autosize` needed no change: solid only ever used it on the texture-load path, which is the mode that survived. Also fixes Config.rendererOptions, which was a union of the WebGL and DOM settings types and so hid every member the two did not share. It is now an intersection, which drops the `'inspector' in ...` narrowing dance and lets callers read `devicePhysicalPixelRatio` directly. Docs: new upgrade guide, rewritten build-flag article (five surviving flags, not seven), and corrected defaults throughout — boundsMargin 0 -> 200, numImageWorkers 2 -> 1, quadBufferSize 1310720 -> 1048576, targetFPS now capped at 60. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the framework from
@solidtv/renderer1.6.3 to 1.9.0 and brings the docs in line.Renderer 1.8 was a breaking release — render-to-texture, the per-node
boundsMarginprop, theinBounds/outOfBoundsevents and containerautosizewere all removed — and 1.9 dropped the__calculateFps__build gate.Breaking changes for apps
rttprop,RenderTexture,TextureType.renderToTextureElementNode, the DOM renderer, and both primitives that used it. No replacement exists.boundsMargin0to200.boundsMargintuple formnormalizeBoundsMarginreturns a scalar, mirroring the WebGL renderer's largest-edge coercion and warning.inBounds/outOfBoundseventsinViewport/outOfViewport, typed asNodeViewportPayload.renderOnlyInViewporttruebehavior is unconditional.autosize<text>.The
createTagprimitive is removed. It existed only to build RTT textures and cannot work on 1.9.Two visible behavior changes
RTT has no replacement in 1.9, so removal was the only option, but both of these are user-visible and worth a look during review:
FadeInOutsetrtt = truebefore its fade-out. Alpha now composites per node, so overlapping children can show seams through the fade.Marqueedrew its two scrolling text copies through a texture; they render directly now.autosizeneeded no code change — solid only ever used it on the texture-load path (_layoutOnLoad), which is exactly the mode that survived.Also included
Config.rendererOptionswas typed as a union of the WebGL and DOM settings types, so every member the two did not share was invisible — callers had to write'x' in options ? options.x : undefined. It is now an intersection: the four overlapping members have identical types and all members are optional, so it is strictly more permissive than the union and no existing assignment breaks. This also collapses the'inspector' in Config.rendererOptionsguard inelementNode.ts.Docs
solidtv_renderer.mdrewritten: five surviving build flags rather than seven, the "undefined ≠ default" tree-shaking point, and a removed-flags table. Note__dirtyQuadBuffer__also went away, in 1.8.3.boundsMargin0→200,numImageWorkers2→1 (and clamped),quadBufferSize1310720→1048576, plus newtargetFPS(defaults to 60) andtextLayoutCacheSizeentries.events.md,styling.md,images.md,basics.mdandfpscounter.mdupdated for the event rename, therttremoval, texture-onlyautosize, and the reworkedfpsUpdatepayload.Verification
npm run tsc,npm test(174/174),npm run lint(0 errors) andnpm run buildall pass.Left alone
Grid.tsxpassesstrictBounds={false}, which is dead — that prop is absent from 1.6.3 too, so it predates this upgrade.srcto acceptBlob | ImageData. That is a new capability rather than a migration, so it is not plumbed through; the DOM renderer's image path is guarded ontypeof src === 'string'.🤖 Generated with Claude Code