Skip to content

Bump to v2.1.11#44

Closed
GeorgeHastings wants to merge 1 commit intomainfrom
2.1.11
Closed

Bump to v2.1.11#44
GeorgeHastings wants to merge 1 commit intomainfrom
2.1.11

Conversation

@GeorgeHastings
Copy link
Copy Markdown
Collaborator

@GeorgeHastings GeorgeHastings commented Apr 29, 2026

Fixes

  • text rotation when animated rotation is 0
  • uCustomTexture using the GPU texture from the render target,
  • framebuffer blit when WebGL blit isn't available.

Improves frame pacing (precise ms intervals, immediate first frame, drift correction).
Aligns FlattenedGroup texture locals with flattening; shader effects can use type: 'video' in data.textures for video samplers.

Summary by CodeRabbit

  • Chores

    • Updated package and bundled SDK version to 2.1.11.
  • Bug Fixes

    • Improved video texture handling and rendering stability.
    • Enhanced text rendering performance.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

This pull request increments the package version from 2.1.9 to 2.1.11, updating version references across the changelog, package manifest, and constants file. Additionally, the Unicorn Studio UMD bundle implementation is refined with improvements to frame timing, texture caching, video texture preloading, and render target handling.

Changes

Cohort / File(s) Summary
Version Metadata
CHANGELOG.md, package.json, src/shared/constants.ts
Updated version from 2.1.9 to 2.1.11 across documentation, package manifest, and exported constant; CDN URL interpolation updated accordingly.
Vendor Bundle Implementation
vendor/unicornstudio/unicornStudio.umd.js
Enhanced frame-timing behavior with fractional frame durations, extended dynamic-layer detection for video textures, improved flattened-layer state initialization with texture caches, refined text rotation fallback handling, added video texture preloading/setup in effects media handling, refactored child effect plane texture assignment logic, and strengthened blit render target guards against missing WebGL context.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • bump to 1.4.31 #15: Performs version bump of UNICORN_STUDIO_VERSION constant and package.json version.
  • bump to 2.0.0 #22: Updates both package.json version and src/shared/constants.ts UNICORN_STUDIO_VERSION with CDN URL changes.
  • bump v2.1.1 #33: Modifies package.json version and UNICORN_STUDIO_VERSION constant for bundled SDK version synchronization.

Suggested labels

version-upgrade

Suggested reviewers

  • diegopeixoto

Poem

🐰 A version hops forward, from nine to eleven,
Frame timings now smooth as a bunny-filled heaven,
Textures and caches prepared for their dance,
The bundle now ready for its grand new advance! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Bump to v2.1.11' accurately reflects the main change: a version bump from 2.1.9 to 2.1.11 across package.json, CHANGELOG.md, and constants, which is the primary structural change in this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2.1.11

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vendor/unicornstudio/unicornStudio.umd.js`:
- Around line 4254-4258: The HTML text renderer still reads e.rotation directly
(causing htmlOnly text to miss the animated/state-backed zero fallback); locate
the HTML renderer code that uses e.rotation (the same area that se.render()
reads local.stateEffectProps.rotation ?? this.rotation) and change it to use the
same resolution logic — i.e., use (this.local?.stateEffectProps?.rotation ??
this.rotation) || 0 (or the equivalent in that scope) instead of e.rotation so
htmlOnly text respects animated/state-backed rotation values.
- Around line 2467-2474: The property check in the .some callback uses
e.hasOwnProperty(t) which can fail for null-prototype objects or when
hasOwnProperty is shadowed; update the check in the .some callback that computes
r (array of ["trackMouse", "axisTilt", ...]) to use a prototype-safe test such
as Object.prototype.hasOwnProperty.call(e, t) or Object.hasOwn(e, t) instead of
e.hasOwnProperty(t) so dynamic-layer detection won't short-circuit when scene
data (e) is a null-prototype or has a shadowed method.
- Around line 5472-5489: The callback passed to e.loadVideo currently configures
e.videos.at(-1), which is racy; change the callback to accept the loaded video
(e.g. (loadedVideo) => {...}) and configure that loadedVideo instance (set
loadedVideo.loop, loadedVideo.playbackRate, call loadedVideo.play(), and set
e.userData.textureLoaded = true) using the same fallbacks (s.loop ?? t.loop ??
true and s.playbackRate || t.playbackRate || 1); update the e.loadVideo
invocation in the preloadVideo flow (and any matching loadVideo callback
signatures) to use the passed-in video parameter instead of e.videos.at(-1).
- Around line 6035-6063: blitRenderTarget currently bails out if
curtain.gl.blitFramebuffer is not available; add a WebGL1 fallback that copies
pixels from source render target to destination texture so uPreviousFrameTexture
is updated: after calling ensureRenderTargetInitialized(e, n, l) and
ensureRenderTargetInitialized(t, n, l) and validating e._frameBuffer and
t._frameBuffer, detect absence of r.blitFramebuffer and implement a path that
binds the source framebuffer (r.bindFramebuffer(r.FRAMEBUFFER, e._frameBuffer)),
binds the destination texture (t._texture or t._colorTexture) to TEXTURE_2D,
then use r.copyTexSubImage2D (or copyTexImage2D on first-time) to copy the
rectangle (0,0,n,l) into the destination texture, and finally unbind
framebuffer/texture; keep existing WebGL2 blitFramebuffer behavior for when
r.blitFramebuffer exists and ensure all binds/unbinds mirror current logic in
blitRenderTarget and ensureRenderTargetInitialized.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f618cf5f-b9c2-437e-a46e-8409cccee57f

📥 Commits

Reviewing files that changed from the base of the PR and between 09fc501 and 7f9dd73.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • CHANGELOG.md
  • package.json
  • src/shared/constants.ts
  • src/shared/sdk-bundle.ts
  • vendor/unicornstudio/unicornStudio.umd.js

Comment thread vendor/unicornstudio/unicornStudio.umd.js
Comment thread vendor/unicornstudio/unicornStudio.umd.js
Comment thread vendor/unicornstudio/unicornStudio.umd.js
Comment thread vendor/unicornstudio/unicornStudio.umd.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant