Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Prevent getWorldPosition error in promo shader#2857

Merged
HarshMN2345 merged 1 commit intomain from
fix-threlte-viewport-crash
Feb 17, 2026
Merged

fix: Prevent getWorldPosition error in promo shader #2857
HarshMN2345 merged 1 commit intomain from
fix-threlte-viewport-crash

Conversation

@HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Feb 15, 2026
edited by coderabbitai bot
Loading

What does this PR do?

before:
image
after:
image

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • Refactor
    • Updated shader component's internal sizing mechanism for improved framework compatibility.

Copy link

appwrite bot commented Feb 15, 2026
edited
Loading

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Git integration provides automatic deployments with optional PR comments

Copy link
Contributor

coderabbitai bot commented Feb 15, 2026
edited
Loading

No actionable comments were generated in the recent review. 🎉


Walkthrough

This pull request refactors src/lib/components/promos/shader.svelte to replace the viewport object with a size object sourced from useThrelte(). All references to viewport dimensions ($viewport.width and $viewport.height) are updated to use the corresponding size properties ($size.width and $size.height) with default fallbacks of 1. Shader initialization, aspect ratio calculation, viewport size assignment, and mesh scaling are adjusted to use the new size data source.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: Prevent getWorldPosition error in promo shader' directly addresses the main issue described in the PR objectives - a runtime error about getWorldPosition being undefined in the promo shader component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-threlte-viewport-crash

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

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

@HarshMN2345 HarshMN2345 merged commit 16f9572 into main Feb 17, 2026
4 of 5 checks passed
@HarshMN2345 HarshMN2345 deleted the fix-threlte-viewport-crash branch February 17, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Meldiron Meldiron Meldiron approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Comments

AltStyle によって変換されたページ (->オリジナル) /