Skip to content

fix(globe): update cobe API usage#963

Closed
Archkon wants to merge 3 commits into
magicuidesign:mainfrom
Archkon:main
Closed

fix(globe): update cobe API usage#963
Archkon wants to merge 3 commits into
magicuidesign:mainfrom
Archkon:main

Conversation

@Archkon

@Archkon Archkon commented May 7, 2026

Copy link
Copy Markdown

Description

Updates the Globe component to use the latest COBE rendering API.
Replaces the deprecated onRender callback flow with an explicit animation loop that calls globe.update().

Changes

  • Removed the legacy onRender option from the default COBE config.
  • Added a requestAnimationFrame render loop that updates phi, width, and height through globe.update().
  • Cancels the animation frame during cleanup before destroying the globe instance.

Motivation

COBE v2 exposes update() / destroy() as the primary lifecycle API, while the previous onRender callback usage is outdated. This
keeps the Globe component compatible with the latest COBE API and avoids relying on deprecated configuration behavior.

Breaking Changes

None.

Screenshots

Device / Browser / Viewport:

Before After

@vercel

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

@Archkon is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@Yeom-JinHo Yeom-JinHo self-requested a review May 8, 2026 16:35
@Yeom-JinHo

Copy link
Copy Markdown
Member

@Archkon
Thanks for the PR! Closing this one for now.

cobe v2.0 was just released (2026-03-18) and is too fresh to bump a major version in a registry component that ships to all consumers. The current cobe@^0.6.4 still works fine with onRender. Happy to revisit once v2 has settled. Thanks!

@Yeom-JinHo Yeom-JinHo closed this May 9, 2026
@Archkon

Archkon commented May 9, 2026

Copy link
Copy Markdown
Author

I don't understand that if someone just use "npx shadcn@latest add @magicui/globe" command according to the website installation guide and that doesn't work at all due to dependent package version.

@Yeom-JinHo

Yeom-JinHo commented May 9, 2026

Copy link
Copy Markdown
Member

@Archkon
You were right — install was broken because the registry didn't pin a version. Shipped a pin to cobe@^0.6.4 in #965 . Will revisit the v2 migration later. Thanks for catching this!

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.

2 participants