
Cobe.js
SkillAdds a lightweight interactive WebGL globe with the cobe library: canvas sizing for device pixel ratio, location markers, rotation in onRender, resize handling and teardown, for plain pages or React/Next.js hero sections.
name: cobejs
description: Use when adding a lightweight interactive globe with cobe (canvas setup, markers, interaction, performance, integration with React/Next.js).
cobe.js — Lightweight WebGL Globe Skill
When to use
- A “spinning globe” / location markers in hero or about pages
- You want a small, focused globe lib (not full three.js)
- Decorative + interactive (markers, rotation) with minimal setup
Key APIs/patterns
- Core:
import createGlobe from "cobe"const globe = createGlobe(canvas, { ...options, onRender(state) { ... } })
- Important options (common):
devicePixelRatio,width,heightphi,theta(rotation angles)scale,dark,diffusebaseColor,markerColor,glowColormarkers: [{ location: [lat, lon], size, color? }]
- Lifecycle:
globe.toggle()pauses RAFglobe.destroy()removes instance
Common pitfalls
- Canvas sizing mismatch
- Set CSS size AND set canvas
width/heightscaled for DPR.
- Set CSS size AND set canvas
- Not updating on resize
- Recompute width/height and recreate or update params.
- Too high DPR on mobile
- Clamp DPR to 1–2.
Quick recipe: responsive globe with markers
import createGlobe from "cobe";
const canvas = document.getElementById("cobe");
let phi = 0;
function setup() {
const rect = canvas.getBoundingClientRect();
const dpr = Math.min(window.devicePixelRatio, 2);
canvas.width = Math.round(rect.width * dpr);
canvas.height = Math.round(rect.height * dpr);
const globe = createGlobe(canvas, {
devicePixelRatio: dpr,
width: canvas.width,
height: canvas.height,
phi: 0,
theta: 0.2,
dark: 0,
diffuse: 1.2,
scale: 1,
mapSamples: 16000,
mapBrightness: 6,
baseColor: [0.2, 0.2, 0.25],
glowColor: [1, 1, 1],
markerColor: [0.8, 0.5, 1],
markers: [{ location: [1.3521, 103.8198], size: 0.08 }],
onRender: (state) => {
state.phi = phi;
phi += 0.01;
},
});
return globe;
}
let globe = setup();
window.addEventListener("resize", () => {
globe.destroy();
globe = setup();
});
What to ask the user
- Globe size and placement (hero, section, card)?
- Marker locations + colors (brand-aligned)?
- Interaction needs (drag to rotate vs. ambient spin)?
관련 리소스

Page Transition Animation
SkillImplements page and route transitions in the Next.js App Router and fixes Framer Motion exit animations that never fire on navigation, using template.tsx with a pathname-keyed AnimatePresence and FrozenRouter, or the View Transitions API via next-view-transitions.
iart-ai/web-animation-skills123
WebGL Components
SkillGuides building small always-on WebGL visuals (avatars, ambient orbs, glass and iridescent surfaces) inside product UI: one shared context, a single capped frame loop, cheap fragment shaders, context-loss handling, a mandatory non-WebGL fallback, and React SSR and Server Components pitfalls.
flornkm/skills117
WebGL Landing Steering
SkillSteers WebGL-heavy landing pages toward a chosen look by picking one of four visual lanes per page type, passing message, performance, accessibility and reliability gates, and outputting a lane, visual spec, stack, fallback and build order.
MengTo/Skills8.7k
Three.js
SkillBuilds or debugs interactive 3D web scenes with Three.js: scene, camera, renderer, lights, materials, GLTF loading and controls, plus performance basics like capping pixel ratio, handling resize, disposing WebGL resources and reduced motion.
MengTo/Skills8.7k
GSAP
SkillHelps the agent add or debug web animations with GSAP: tweens, timelines and position parameters, easing, stagger and ScrollTrigger pin and scrub, plus fixes for jank, cleanup with gsap.context() in React and refreshing after images load.
MengTo/Skills8.7k
Lottie Animation
SkillIntegrates Lottie and dotLottie animations from After Effects into web, iOS, Android and React Native: playback and segment control, scroll- or hover-driven interactivity, runtime theming and recoloring, plus an After Effects export checklist.
iart-ai/web-animation-skills121