Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

babylonjsbabylonjs 搜索

Agent Skill

babylonjs 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

588

周安装

25

GitHub Stars

7

下载量

206
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:babylonjs(babylonjs 搜索)
来源仓库:https://github.com/curiosity-ai-bv/babylonjs-skill
仓库路径:skills/babylonjs
安装命令:
npx skills add https://github.com/curiosity-ai-bv/babylonjs-skill --skill babylonjs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/curiosity-ai-bv/babylonjs-skill --skill babylonjs

简介

babylonjs 提供 Babylon.js 8 版本的快速参考,涵盖 WebGL2/WebGPU 支持的 3D 引擎核心概念。

  • 适用于在 Codex、Claude、Cursor、Gemini CLI 中开发浏览器端 3D 应用时的技术查阅。
  • 包括坐标系、NPM 包结构、树摇优化导入路径、材质与加载器模块说明。
  • 安装方式:npx skills add https://github.com/curiosity-ai-bv/babylonjs-skill --skill babylonjs。
  • 使用前需确认权限范围、维护状态,并注意是否会触发联网、命令执行或文件读写操作。

SKILL.md

Babylon.js 8

Quick Reference

Babylon.js is a powerful open-source 3D engine for the web. Version 8 supports WebGL2 and WebGPU.

Coordinate system: Left-handed (X=right, Y=up, Z=forward). Rotations in radians.

NPM packages:

  • @babylonjs/core - Engine, scene, meshes, materials, cameras, lights
  • @babylonjs/gui - 2D/3D GUI controls
  • @babylonjs/loaders - glTF, OBJ, STL loaders
  • @babylonjs/materials - Extra material types
  • @babylonjs/inspector - Debug inspector

Tree-shaking: Import from deep paths for minimal bundles:

import { Scene } from "@babylonjs/core/scene";
import { Vector3 } from "@babylonjs/core/Maths/math.vector";
import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
import { Mesh } from "@babylonjs/core/Meshes/mesh";
import { PBRMaterial } from "@babylonjs/core/Materials/PBR/pbrMaterial";
import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera";

Side-effect imports (enable features without referencing exports):

import "@babylonjs/core/Meshes/thinInstanceMesh";
import "@babylonjs/core/Rendering/edgesRenderer";
import "@babylonjs/core/Collisions/collisionCoordinator";
import "@babylonjs/loaders/glTF/2.0/glTFLoader";

Minimal Scene Setup

import { Engine } from "@babylonjs/core/Engines/engine";
import { Scene } from "@babylonjs/core/scene";
import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera";
import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight";
import { Vector3 } from "@babylonjs/core/Maths/math.vector";
import { CreateSphere } from "@babylonjs/core/Meshes/Builders/sphereBuilder";
import { CreateGround } from "@babylonjs/core/Meshes/Builders/groundBuilder";

const engine = new Engine(canvas, true);
const scene = new Scene(engine);
const camera = new ArcRotateCamera("cam", 0, Math.PI/4, 10, Vector3.Zero(), scene);
camera.attachControl(canvas, true);
const light = new HemisphericLight("light", new Vector3(0, 1, 0), scene);
const sphere = CreateSphere("sphere", { diameter: 2 }, scene);
const ground = CreateGround("ground", { width: 6, height: 6 }, scene);
sphere.position.y = 1;

engine.runRenderLoop(() => scene.render());
window.addEventListener("resize", () => engine.resize());

Key Patterns

PBR Material (most common for realistic rendering)

const pbr = new PBRMaterial("pbr", scene);
pbr.albedoColor = new Color3(1.0, 0.766, 0.336);
pbr.metallic = 0.3;
pbr.roughness = 0.7;
// Optional: connect to environment for reflections
pbr.reflectionTexture = scene.environmentTexture;
mesh.material = pbr;

Thin Instances (high-performance batching)

import "@babylonjs/core/Meshes/thinInstanceMesh";
const buffer = new Float32Array(16 * count);
for (let i = 0; i < count; i++) {
  Matrix.Translation(x, y, z).copyToArray(buffer, i * 16);
}
mesh.thinInstanceSetBuffer("matrix", buffer, 16, false);
mesh.thinInstanceBufferUpdated("matrix");

Asset Loading (glTF)

import "@babylonjs/loaders/glTF/2.0/glTFLoader";
const container = await BABYLON.LoadAssetContainerAsync("model.glb", scene);
container.addAllToScene();

Observable Pattern (Babylon's event system)

scene.onBeforeRenderObservable.add(() => { /* per frame */ });
const observer = scene.onPointerObservable.add((info) => { /* pointer events */ });
scene.onPointerObservable.remove(observer); // unsubscribe

Reference Files

Read these files for detailed API patterns on specific topics:

  • core-concepts.md - Engine/Scene setup, cameras, lights, shadows, observables, coordinate system
  • meshes.md - Mesh builders, transforms, TransformNode, instances, thin instances, clones, merging, picking
  • materials.md - PBR, Standard, textures, environment/HDR, Node Material, Shader Material
  • gui.md - AdvancedDynamicTexture, all control types, containers, layout, events
  • animation-loading.md - Animation API, groups, easing, skeletal animation, asset loading, AssetContainer
  • performance.md - Scene/mesh/material optimization, instancing strategy comparison, monitoring, memory management

On-Demand Documentation

For topics not covered in the reference files, fetch from the live docs:

  • Doc site: https://doc.babylonjs.com
  • GitHub raw markdown: https://raw.githubusercontent.com/BabylonJS/Documentation/master/content/{path}.md
  • doc-urls.md - Complete URL map for all doc sections

To fetch a specific topic, read the URL map to find the path, then use WebFetch on the doc site URL or fetch raw markdown from GitHub.

Topics covered only in live docs (not in reference files)

  • Physics V2 (Havok): /features/featuresDeepDive/physics
  • WebXR/VR/AR: /features/featuresDeepDive/webXR
  • Post-processing pipelines: /features/featuresDeepDive/postProcesses
  • Solid Particle System: /features/featuresDeepDive/particles/solid_particle_system
  • Crowd navigation: /features/featuresDeepDive/crowdNavigation
  • Node Geometry (procedural): /features/featuresDeepDive/mesh/nodeGeometry
  • Frame Graph: /features/featuresDeepDive/frameGraph
  • Flow Graph: /features/featuresDeepDive/flowGraph
  • Smart Filters: /features/featuresDeepDive/smartFilters
  • Gaussian Splatting: /features/featuresDeepDive/importers (splat/ply formats)

Common Gotchas

  1. Quaternion vs Euler: Setting mesh.rotationQuaternion disables mesh.rotation. To switch back: mesh.rotationQuaternion = null.
  2. Side-effect imports: Features like thin instances, edge rendering, loaders, and collisions require importing their module even if you don't use the export directly.
  3. Dispose everything: Babylon.js doesn't garbage-collect GPU resources. Always call .dispose() on meshes, materials, textures when done.
  4. Material sharing: Modifying a shared material affects all meshes using it. Clone or create new materials for independent changes.
  5. TransformNode vs Mesh: Use TransformNode for grouping/hierarchy. Empty Mesh objects waste CPU on frustum evaluation.
  6. Left-handed coordinates: glTF is right-handed; Babylon auto-converts on import. Manual coordinate math may need adjustment.
  7. Alpha sorting: Transparent meshes require proper render ordering. Use mesh.alphaIndex or rendering groups.
  8. Thin instance limitations: All-or-nothing visibility, single bounding box, no per-instance material. Use regular instances when individual control is needed.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.92%
按下载量换算76

Claude

30.49%
按下载量换算63

Cursor

16.8%
按下载量换算35

Gemini CLI

9.06%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills