GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pmndrs/klipp: 📹 A camera toolkit for the web, inspired by Unity Cinemachine.

BranchesTags
Open more actions menu

Latest commit

 

History

500 Commits
500 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
benches
benches
 
 
docs
docs
 
 
scripts
scripts
 
 
site
site
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.oxlintrc.json
.oxlintrc.json
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
AGENTS.md
AGENTS.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.lib.json
tsconfig.lib.json
 
 
tsconfig.node.json
tsconfig.node.json
 
 
vite.config.ts
vite.config.ts
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

Klipp 📹

Version Examples Docs license

A camera toolkit for the web, inspired by Unity Cinemachine. Describe the shots you want, and Klipp picks the right one and blends between them.

The core runs anywhere, with no renderer or framework attached. Integrations are thin layers on top: three.js and React Three Fiber today, with more to come, like TresJS.

npm install @pmndrs/klipp

⚠️ Early-stage, experimental - the API may change.

Core

import { Klipp, FollowBody, HardLookAtAim, VirtualCamera, targetPose } from '@pmndrs/klipp';

const klipp = new Klipp();
const player = targetPose.create(); // keep player.position up to date

const follow = new VirtualCamera('follow', { priority: 10 });
klipp.add(follow);
follow.body = new FollowBody(player, { offset: [0, 3, 8], damping: 0.5 });
follow.aim = new HardLookAtAim(player);

// every frame
klipp.update(dt);
engineCamera.setPosition(klipp.shot.position);
engineCamera.setRotation(klipp.shot.quaternion);

React Three Fiber

import { Klipp, VirtualCamera, Body, Aim } from '@pmndrs/klipp/react';

<Klipp>
  <VirtualCamera name="follow" priority={10}>
    <Body.Follow target={playerRef} offset={[0, 3, 8]} damping={0.5} />
    <Aim.HardLookAt target={playerRef} />
  </VirtualCamera>

  <VirtualCamera name="cutscene" priority={20} active={isCutscene}>
    <Body.HardLockToTarget target={[10, 2, 0]} />
    <Aim.HardLookAt target={playerRef} />
  </VirtualCamera>
</Klipp>;

What's inside

  • Virtual cameras with priorities, and blending between them.
  • KlippControls: orbit, pan and zoom with the mouse or touch, in perspective and orthographic views.
  • Groups: play shots in a sequence, or mix several cameras by weight.
  • Body and Aim: follow, frame or look at targets, or let the user orbit and look around.
  • Extension: lens, group framing, camera offset, follow zoom, confiner and recomposer.
  • Noise and Impulse: camera shake.
  • Perspective and orthographic cameras.
  • Debugging: framing zones and camera frustums.

Packages

Entry point For
@pmndrs/klipp The core, built on math.
@pmndrs/klipp/three three.js classes, ending in Three.
@pmndrs/klipp/react React Three Fiber components.
@pmndrs/klipp/dom Mouse, touch and wheel input and debug overlays.

Links

  • Documentation
  • Examples

About

📹 A camera toolkit for the web, inspired by Unity Cinemachine.

pmndrs.github.io/klipp

Topics

camerareactreact-three-fiberthreejs

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

75 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.