MCPcopy Index your code
hub / github.com/three-rs/three

github.com/three-rs/three @v0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4 ↗ · + Follow
460 symbols 984 edges 54 files 219 documented · 48% 162 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

three-rs

Build Status Docs Crates.io Gitter

Totally not inspired Rust 3D library! Ok, maybe, just a tiny bit... by Three.JS.

If you a looking for something simple to prototype 3D graphics with, you found it.

Screenshots

Aviator CarObj glTF-skinning

Motivation and Goals

Three-rs is focused at the ergonomics first and foremost. Being able to prototype quickly and code intuitively is more important than capturing all the 3D features. We already have a solid foundation with gfx-rs, so let's make some use of it by providing a nice higher-level abstraction.

We do leave the room for optimization opportunity here. Given the low-level declarative style of the API, the implementation can do a lot of tricks to ensure decent performance by default: - use of efficient low-level native graphics APIs - reordering the calls into passes, minimizing state changes - automatic instancing

Interestingly, you can observe an new trend in rust-gamedev community to mimic existing libraries: Amethyst was created to be Rust version of Autodesk Stingray engine (formely Bitsquid), ggez is a re-interpretation of Love2D engine, and now three-rs attempting to capture Three.JS usability. This is not to say that we failed to find our own path, I just see the current step inevitable.

License

Licensed under either of the following terms at your choice: * Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) * MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

Object (Interface)
Marks data structures that are able to added to the scene graph. [7 implementers]
src/object.rs
Hit (Interface)
Trait for [`Buttons`](enum.Button.html). [5 implementers]
src/input/mod.rs
Light (Interface)
Marks light sources and implements their common methods. [4 implementers]
src/light.rs
DowncastObject (Interface)
Marks an object type that can be downcast from a [`Base`]. See [`SyncGuard::downcast`] for information on how this trai [2 …
src/object.rs
HitCount (Interface)
Trait for [`Buttons`](enum.Button.html) and [`axis::Key`](struct.Key.html). [2 implementers]
src/input/mod.rs
Delta (Interface)
Trait for [`axis::Key`](struct.Key.html) and [`axis::Raw`](struct.Raw.html). [2 implementers]
src/input/mod.rs

Core symbols most depended-on inside this repo

add
called by 57
src/scene.rs
as_ref
called by 38
src/light.rs
send
called by 31
src/object.rs
update
called by 25
examples/aviator/plane.rs
set_position
called by 22
src/controls/first_person.rs
index
called by 20
src/hub.rs
mesh
called by 19
src/factory/mod.rs
hit
called by 17
src/input/mod.rs

Shape

Method 294
Class 96
Function 37
Enum 27
Interface 6

Languages

Rust100%

Modules by API surface

src/factory/mod.rs48 symbols
src/input/mod.rs33 symbols
src/controls/first_person.rs29 symbols
src/hub.rs28 symbols
src/render/mod.rs25 symbols
src/animation.rs25 symbols
src/object.rs23 symbols
src/text.rs21 symbols
src/light.rs19 symbols
src/audio.rs19 symbols
src/window.rs17 symbols
src/scene.rs17 symbols

For agents

$ claude mcp add three \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact