Communitygithub.com

evalix098/tiktoklive

官方的 Three.js API 與 TSL(Three.js 著色語言)參考資料,用於 LLM 程式碼生成。在編寫或除錯 three.js、WebGL、WebGPU、自訂材質、著色器、GLTF 或超出基本遊戲迴圈/控制項的先進 three API 時載入。

tiktoklive 是什麼?

此技能提供官方的 Three.js LLM 文件包,讓 AI 代理能夠生成正確且現代的 Three.js 程式碼,避免使用過時的 CDN 或 r128 等舊版 API。它特別設計用於 TanStack Start + React 工作空間,而非純 HTML 頁面,因此建議透過 npm 安裝 three 套件,並使用 `@react-three/fiber` 和 `drei` 進行遊戲或 UI 整合。技能會根據使用情境智慧選擇載入不同的參考文件:對於遊戲或互動式 3D 產品,優先載入 `building-games`;對於 R3F、drei 或 rapier 的整合,則載入 `3d-libs.md`;而對於深入的 Three.js API、TSL、WebGPU、材質、載入器和後處理,則載入 `references/llms-full.txt` 這個完整的官方文件 dump。此技能支援所有基於 Three.js 的開發平台,例如 Claude Code、Cursor 等 AI 程式碼生成工具,確保生成程式碼的正確性與現代化。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/evalix098/tiktoklive/tree/HEAD/.grok/skills/threejs

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Three.js(官方 LLM 參考資料)

此技能包含了官方的 Three.js LLM 文件包,讓代理能夠生成正確的現代 Three.js 程式碼,而不會憑空創造過時的 CDN 或 r128 API。

技術棧調整(此應用建構器)

你處於一個 TanStack Start + React 的工作空間,而非純 HTML 頁面:

官方文件模式應替換為
<script type="importmap"> + CDN threenpm install three(如有需要可加 @types/three);從 "three" / "three/addons/…" 匯入
純 HTML Canvas 引導偏好使用 @react-three/fiber + drei 來進行遊戲/UI 整合(building-games + 3d-libs.md)
獨立的 WebGLRenderer 示範對於獨立的 Canvas 模組沒問題;仍然透過 npm 安裝 three,以便 Vercel 建置時可使用
總是使用「最新」CDN 版本透過 package.json 鎖定版本,使開發與部署版本一致

three 並未預先安裝 — 請使用 npm 安裝它,並將其保留在 package.json 中。

何時載入什麼

  1. 遊戲 / 互動式 3D 產品 → 從 building-games 開始(迴圈、控制項、方向、攝影機、首次執行、方向盤)。
  2. R3F / drei / rapier 的整合 → 查看 building-games/references/3d-libs.md。
  3. 深入的 Three API、TSL、WebGPU、材質、載入器、後處理 → 載入
    references/llms-full.txt(此技能的完整官方文件 dump)。

對於簡單的 2D Canvas 遊戲(例如打磚塊、俄羅斯方塊等),請不要載入 llms-full.txt。

完整參考資料

按需讀取:

references/llms-full.txt

來源:https://threejs.org/docs/llms-full.txt(為離線沙盒使用而保留的副本)。

內容包含:現代匯入方式、WebGLRenderer 與 WebGPURenderer 的比較、TSL 完整參考資料、NodeMaterial、載入器、後處理、計算以及 API 表格。

此產品的快速預設值

  • 偏好使用 WebGLRenderer(或 R3F 預設值),除非使用者需要 TSL/WebGPU 計算。
  • 限制像素比(renderer.setPixelRatio(Math.min(devicePixelRatio, 2)) 或 R3F 的 dpr={[1,2]})。
  • 在拆卸時釋放幾何體/材質/紋理(Three.js 不會自動回收 GPU 資源)。
  • 對於遊戲:仍然遵循 building-games 的控制項與方向自我測試。

完成檢查

  • three(以及如果有使用的 R3F 技術棧)已列於 package.json 中,且匯入可以正確解析。
  • 沒有使用 r128 / cdnjs script-tag 模式。
  • 如果使用了 TSL/WebGPU:材質與匯入方式需與 llms-full 相符(節點材質、await renderer.init())。

Individual skills in this repo

This repo contains 17 individual skills — each has its own dedicated page.

evalix098/tiktoklive

Add user accounts and sign-in to this TanStack Start app. Use when the app needs authentication, sign-in, user accounts, protected routes, or per-user data. Triggers on "auth", "login", "log in", "sign in", "sign up", "account", "users", "authentication", "protected", "who is logged in", "current user", "per-user".

evalix098/tiktoklive

Build browser games and interactive/canvas/3D experiences in this TanStack Start + React app. Use for any game, simulation, or WebGL/Canvas experience — 2D or 3D, single-player. Covers the game loop & timing, 3D orientation/camera conventions, collision, performance, assets, audio, save, game feel, and per-genre playbooks. For WASD / vehicle / flight **input signs and inverted A/D**, open the **`controls`** skill — do not rely on this file or racing-kart alone. Triggers on "game", "minecraft", "fps", "platformer", "racing", "tetris", "snake", "shooter", "3d", "three.js", "canvas", "voxel", "physics".

evalix098/tiktoklive

Player-facing input signs for browser games: WASD, vehicles, flight, FPS mouse-look, and the #1 failure mode (inverted A/D). Mandatory control self-tests and a tiny test interface so you can verify A turns left before shipping. Load for ANY game with movement, steering, flying, driving, tanks, boats, mechs, drones, planes, karts, third-person follow cams — not only racing. Triggers on "controls", "WASD", "inverted", "steer", "flight", "airplane", "kart", "vehicle", "yaw", "roll", "pitch", "mouse look", "A/D".

evalix098/tiktoklive

Design and build polished, non-generic UI for this TanStack Start + React + Tailwind v4 + shadcn/Radix app. Use whenever you create or restyle any interface surface — pages, landing pages, dashboards, forms, modals, nav, and game overlays (start screens, HUD, menus). Covers design tokens, layout, typography, color, spacing, motion, and the anti-"AI-slop" rules that keep output from looking generic. Triggers on "design", "UI", "make it look good", "polish", "landing page", "theme", "style", "redesign", "ugly", "clean up".

evalix098/tiktoklive

Deep guide for game ANIMATION assets: motion cycles, action keyframes, effect sequences, and animation sprite sheets — built around a video-first pipeline. In this app-builder sandbox, execute via the video2dsprite / generate2dsprite skills (magenta + scripts), not ad-hoc ffmpeg. Use whenever generating anything that moves: walk/run cycles, attacks, idles, FX, flags, fire, animation sheets. Complements game-asset-core.

evalix098/tiktoklive

Core discipline for ANY game-asset generation with Imagine tools: the engine-ready defaults users don't state, spec checklists, style anchoring, read-back verification, honest defect flagging. Use whenever generating any game art (sprites, sheets, animations, tiles, UI, FX) — then ALSO load the matching specialist skill: game-animation-frames for anything that moves, game-tilesets for tiles/terrain, game-character-consistency for recurring characters, game-ui-icons for UI and icons.

evalix098/tiktoklive

Deep guide for CHARACTER IDENTITY across images: turnarounds (front/side/ back), state and damage variants, palette swaps, equipment changes, and same-character-in-context sets. Use whenever generating character turnarounds, character sheets, variants of an existing sprite, or any same-subject multi-image set. Complements game-asset-core.

evalix098/tiktoklive

Deep guide for game TILE assets: seamless tileable textures, terrain transition tilesets, autotiles, and ground/platform tiles. Use whenever generating tileable textures, tilesets, terrain transitions, or seamless patterns. Complements game-asset-core.

evalix098/tiktoklive

Deep guide for game UI assets: buttons with interaction states, panels, bars, wordmark logos, and icon sets. Use whenever generating game UI elements, HUD assets, inventory icons, icon sets, buttons, or title logos. Complements game-asset-core.

evalix098/tiktoklive

Generate production-oriented 2D game maps with `imagine_text_to_image`: RPG/top-down maps, side-scroller parallax stages, tilemaps, layered raster maps, prop packs, collision zones, and walkable areas. Use when building browser games that need real map art (not pure code-drawn tiles), layered props, or map collision metadata. Triggers on "map", "level", "stage", "tilemap", "overworld", "dungeon", "side scroller background", "prop pack", "2D map".

evalix098/tiktoklive

Generate and postprocess 2D game sprites and animation sheets: pixel-art characters, NPCs, creatures, spells, projectiles, impacts, props, summons, and transparent PNG/GIF exports. Use when building browser games that need real sprite sheets (not code-drawn placeholders), matching a map art style, or producing magenta-background sheets for chroma-key cleanup. Triggers on "sprite", "sprite sheet", "animation sheet", "pixel art character", "walk cycle", "attack animation", "projectile sprite", "2D game asset".

evalix098/tiktoklive

How to use the Imagine tools in Grok Build: imagine_text_to_image, imagine_image_to_image, imagine_reference_to_image, imagine_text_to_video, imagine_image_to_video, imagine_reference_to_video, and render_file for chat previews. When to build a visual with code instead of generating it, prompt-craft, reference-first handling of real people, factual grounding, and asset-consistency. Load this whenever generating or editing an image or video is on the table. Tool-usage-driven, not triggered by a user merely mentioning images.

evalix098/tiktoklive

Peer-to-peer realtime multiplayer over WebRTC data channels: every user of the deployed app connects directly to every other user (full mesh), the server only brokers the handshake at /api/rtc. Lowest possible latency, zero per-message server cost. Use for 2-8 player co-op/casual realtime: shared cursors, drawing, party games, casual action. Triggers: p2p, peer to peer, webrtc, low latency multiplayer, direct connection.

evalix098/tiktoklive

Use Neon Postgres (the database) in this TanStack Start app. Use when the app needs to store or query data, persist state, or keep per-user data. Triggers on "database", "Postgres", "Neon", "save data", "store data", "persist", "tables", "SQL", "query", "migrations".

evalix098/tiktoklive

Share-link previews and app identity for apps on *.grok.me: the injector-owned og:image card, the SVG favicon, and PWA icons for installable apps. Use when scaffolding, renaming, or restyling the app — and for share / unfurl / OG / Twitter card questions. A custom 1200×630 card from the app's own art is the default — games of every kind (DOM board/word games included), whimsical apps, creative tools, and brand-forward pages; only plain utilities keep the placeholder. Always run the brand-asset pass as a `task` subagent and never wait for it. Triggers on "share", "rename", "app name", "OG", "Open Graph", "twitter card", "unfurl", "og:image", "og:type", "x:game:image", "x-banner", "link preview", "social card", "thumbnail", "preview image", "favicon", "app icon", "PWA", "manifest", "installable", "home screen", "SEO", "meta description".

evalix098/tiktoklive

Grok Build only. Turn a 2D character still into denser animation sprites via imagine_text_to_image base → imagine_image_to_video (6s/10s run-in-place) → ffmpeg frames → magenta chroma-key → dense sampled strips/grids/GIFs. Use when the user wants video-to-sprite, smoother run/walk cycles, or denser intermediate poses. Prefer generate2dsprite for crisp production pixel sheets. Triggers on "video to sprite", "imagine_image_to_video sprite", "dense walk cycle", "smooth run animation from video".

evalix098/tiktoklive

Call the xAI API (Grok) from this app's server code using the injected XAI_API_KEY: chat/LLM features, image and video generation (Imagine), and voice (text-to-speech). Use when the app needs any "AI" / "assistant" / "chatbot" / "Grok" functionality, runtime image/video generation, or speech. Triggers on "AI", "LLM", "chatbot", "assistant", "Grok", "xAI", "generate text", "summarize", "generate image", "AI video", "voice", "text to speech", "TTS", "OpenAI" (use xAI instead).

相關技能