3 unstable releases
0.2.1 | Apr 26, 2021 |
---|---|
0.2.0 | Apr 25, 2021 |
0.1.0 | Apr 24, 2021 |
#289 in WebSocket
25KB
658 lines
Lnkit
Lnkit is a small "glue" library for making multiplayer 3D games.
It ties together
rapier
& three.js
with
WebSockets using tungstenite
.
The idea is that rapier3d
physics engine runs on the server and data is sent
to clients using WebSockets. On the client side WebSocket messages are
manifested into three.js
objects.
Lnkit currently consists of two packages: server written in Rust & client written in Typescript.
The API of this library is currently a little inconvenient but will improve in
v0.3
orv0.4
.
Installation
To include the server package add the following to Cargo.toml
dependencies section.
[dependencies]
...
lnkit = "0.2.1"
Or just add with
cargo add lnkit
(cargo-edit
)
To include the client package add the following to package.json
dependencies section.
"dependencies": {
...
"three": "0.x",
"lnkit": "0.2"
}
Or just add with
yarn add three lnkit
ornpm install three lnkit
Examples
Available examples are in the
examples
directory.
To run examples clone this repository and run the server with
cargo run --example <example_name
&
client with yarn parcel examples/<example_name>/index.html
Dependencies
~17–29MB
~476K SLoC