Crates.io | lnkit |
lib.rs | lnkit |
version | 0.2.1 |
source | src |
created_at | 2021-04-24 15:58:04.07907 |
updated_at | 2021-04-26 19:14:37.361098 |
description | Multiplayer game library |
homepage | |
repository | https://gitlab.com/rasmusmerzin/lnkit |
max_upload_size | |
id | 389007 |
size | 73,852 |
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
.
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
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