majidmanzarpour GitHub avatar

threejs-procedural-spider

majidmanzarpour

一个自稳定的程序化蜘蛛,使用闭式逆运动学在任何地形上行走,无需动画片段、骨架或物理引擎。

Stars

67

7 天增长

暂无数据

Fork 数

17

开放 Issue

0

开源协议

MIT

最近更新

2026-06-26

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它展示了完全解析的、无物理的程序化动画方法——每条腿用一个公式求解,地形是一个函数,身体实时适应斜坡、墙壁和悬垂,全部代码仅约1200行。

适合谁使用

  • 对程序化动画感兴趣的游戏开发者
  • 机器人学和逆向运动学研究者
  • Three.js和WebGL开发者
  • 教授计算机图形学或运动学的教育工作者

典型使用场景

  • 学习和实验闭式逆向运动学
  • 为游戏或模拟原型化程序化运动
  • 调整步态参数和地形适应的沙盒
  • 用于计算创造力的技术演示或作品集

项目优势

  • 解析IK提供每帧精确的脚部位置,无需迭代
  • 地形作为高度场,支持在墙壁和悬垂上稳健攀爬
  • 依赖少、代码库小(仅Three.js,约1200行)
  • 实时调谐面板允许所有运动参数即时调整

使用前须知

  • 地形局限于闭式高度场,不支持任意网格
  • 扩展或修改核心算法需要数学理解
  • 无物理引擎,缺乏动态碰撞或基于动量的交互
  • 主要是沙盒,不是完整的游戏或生产级运动系统

README 快速开始

🕷️ Procedural Spider

Play the live demo · by @majidmanzarpour

A self-stabilizing procedural spider you can walk over any terrain. Eight legs solved with closed-form inverse kinematics, a gait that improvises its own footfalls, and a body that leans into slopes, walls, and overhangs — with no animation clips, no skeleton rig, and no physics engine. Just math, every frame. Built with Three.js.

Drag the sliders, drive it around, watch the legs find their own footing. It's strangely calming.


✨ Features

  • Analytic IK legs — each leg is solved with a two-bone closed-form solver (hip → knee → foot). No baked animation, no IK iterations to converge: one formula, exact, every frame.
  • Improvised gait — feet are planted in the world, not on the body. When the body outruns a foot, that leg lifts, arcs to a fresh foothold, and plants. Step timing is an alternating-gait state machine, so the walk re-times itself naturally as you speed up, slow down, or turn.
  • Terrain that's a function, not a mesh — the ground is a closed-form height field, so the spider can sample the exact height and normal at any point. That's what makes foot placement and body alignment rock-solid.
  • Climbs walls & overhangs — the body's up-vector blends toward the surface normal under it, so the spider tilts onto inclines and clings to steep faces instead of clipping or sliding.
  • A body that bends — two segments (cephalothorax + abdomen) joined at a flexible pedicel, so the abdomen folds at the waist: it hangs down on a wall, droops over a crest, and sags under its own weight. The spider flexes like a real spider, not a rigid blob. (Toggle: BODY FLEX.)
  • Knee-swivel collision avoidance — each leg searches a fan of knee orientations and picks the one that keeps the limb out of the ground and obstacles (tunable live).
  • Live tuning panel — speed, ride height, step height, gait rate, turn rate, stride, and the knee-swivel search, all adjustable while it walks.
  • Tiny & dependency-light — ~1,200 lines across 8 modules, with three as the only runtime dependency. Runs at hundreds of FPS.
  • Desktop & touch — WASD + mouse, or an on-screen joystick on phones/tablets.

🎮 Controls

| Action | Desktop | To

项目描述

Procedural spider that walks, climbs walls, and leaps onto any terrain. Analytic IK legs, a flexible articulated body, wall-latching. Three.js, no rig or animation clips.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

react
精选
react GitHub avatar

react

React is a JavaScript library for building user interfaces with declarative, component-based, and cross-platform design.

Web 开发前端框架
246,741
tandpfun
精选
tandpfun GitHub avatar

wardrobe

A GPT‑image powered app that extracts individual garment cutouts from photos, organizes them into a digital wardrobe, and generates modeled outfit previews.

JavaScript
1,570
mshumer
精选
mshumer GitHub avatar

Claude-of-Duty

A browser-based first-person shooter built entirely with procedural generation and orchestrated AI agents, featuring 55k lines of Three.js/WebGL2 code and no art assets.

AI 与机器学习AI 智能体
1,234