Bump to v2.1.11#44
Conversation
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
CHANGELOG.mdpackage.jsonsrc/shared/constants.tssrc/shared/sdk-bundle.tsvendor/unicornstudio/unicornStudio.umd.js



Fixes
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
Bug Fixes