@thi.ng/arcball
v1.2.0
Published
3D arcball controller for intuitive click & drag gesture-based camera view rotations. Quaternion-based.
Maintainers
Readme
[!NOTE]
This is one of 216 standalone projects. LLM-free, human-made and cared for software, maintained as part of the @thi.ng/umbrella ecosystem and anti-framework.
🚀 Please help me to work full-time on these projects by sponsoring me. Thank you! ❤️
About
3D arcball controller for intuitive click & drag gesture-based camera view rotations. Quaternion-based..
Ported from: https://github.com/thi-ng/geom/blob/feature/no-org/src/thi/ng/geom/gl/arcball.cljc
Which itself is based on:
"ARCBALL: A User Interface for Specifying Three-Dimensional Orientation Using a Mouse" by Ken Shoemake https://www.talisman.org/~erlkonig/misc/shoemake92-arcball.pdf
Status
STABLE - used in production
Search or submit any issues for this package
Installation
yarn add @thi.ng/arcballESM import:
import * as arc from "@thi.ng/arcball";Browser ESM import:
<script type="module" src="https://esm.run/@thi.ng/arcball"></script>For Node.js REPL:
const arc = await import("@thi.ng/arcball");Package sizes (brotli'd, pre-treeshake): ESM: 812 bytes
Dependencies
Note: @thi.ng/api is in most cases a type-only import (not used at runtime)
The thi.ng/rstream-gestures dependency is only needed when using
defArcballController().
Usage examples
Two projects in this repo's /examples directory are using this package:
| Screenshot | Description | Live demo | Source | |:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------|:----------------------------------------------------|:-----------------------------------------------------------------------------------------| | | 3D arcball controller to rotate the camera view of a colored cube | Demo | Source | | | Basic 3D OBJ model loading & interactive arcball camera control | Demo | Source |
API
TODO
Authors
If this project contributes to an academic publication, please cite it as:
@misc{thing-arcball,
title = "@thi.ng/arcball",
author = "Karsten Schmidt",
note = "https://thi.ng/arcball",
year = 2025
}License
© 2025 - 2026 Karsten Schmidt // Apache License 2.0
