ui-useframe
Sync UI elements outside the Canvas with the render loop using R3F v10's external useFrame.
от verekia★ 31 звезда на GitHub
Установить ui-useframe в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
UI useFrame
Sync UI elements outside the Canvas with the render loop using R3F v10's external useFrame.
Technique
Since React Three Fiber v10, useFrame can be used outside of the Canvas component. This allows updating DOM elements in sync with the 3D scene without using Drei's Html component.
Key Concepts
useFrameworks outside<Canvas>in R3F v10+- Use refs to manipulate DOM elements directly for performance
- Throttle with
{ fps: N }option since DOM manipulation is expensive - Useful for HUDs, debug info, and UI that doesn't need to be in 3D space
Usage
const Ui = () => {
const ref = useRef<HTMLDivElement>(null)
useFrame(() => {
ref.current.innerText = `${position.x.toFixed(2)}, ${position.y.toFixed(2)}`
}, { fps: 10 })
return <div ref={ref} className="fixed top-4 right-4" />
}
// Place outside Canvas
<Canvas>
<Scene />
</Canvas>
<Ui />
This skill is part of verekia's r3f-gamedev.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ui-useframe?
Sync UI elements outside the Canvas with the render loop using R3F v10's external useFrame.
Как установить скилл ui-useframe?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ui-useframe запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…