Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nightswatchgames/rubiks-cube
Rubik's cube made with bevy engine.
https://github.com/nightswatchgames/rubiks-cube
bevy game rubiks-cube rust
Last synced: about 1 month ago
JSON representation
Rubik's cube made with bevy engine.
- Host: GitHub
- URL: https://github.com/nightswatchgames/rubiks-cube
- Owner: NightsWatchGames
- License: mit
- Created: 2022-12-05T14:47:35.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-14T03:22:07.000Z (4 months ago)
- Last Synced: 2024-08-14T04:41:45.531Z (4 months ago)
- Topics: bevy, game, rubiks-cube, rust
- Language: Rust
- Homepage: https://nightswatchgames.github.io/games/rubiks-cube/
- Size: 390 KB
- Stars: 39
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[English](https://github.com/NightsWatchGames/rubiks-cube/blob/master/README_EN.md)
# Rubik's Cube 魔方
- [x] 3阶魔方
- [x] 随机打乱魔方
- [x] 重置魔方
- [x] 鼠标拖拽魔方旋转
- [x] 游戏UI
- [x] 相机视角控制(缩放、移动)
- [x] WASM支持在线游玩:[点这里](https://nightswatchgames.github.io/games/rubiks-cube/)(电脑版Chrome/Firefox/Edge打开)
## 运行
1. 本地运行
```
cargo run
```
2. WASM运行
```
rustup target install wasm32-unknown-unknown
cargo install wasm-server-runner
cargo run --target wasm32-unknown-unknown
```
```
cargo install wasm-bindgen-cli
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/rubiks-cube.wasm
```## 游戏展示
视频演示:[B站](https://www.bilibili.com/video/BV1He4y1L7mS)![playing cube](https://raw.githubusercontent.com/NightsWatchGames/rubiks-cube/master/screenshots/playing_cube.jpg)
## 参考资料
- [Rubik's Cube - Wikipedia](https://en.wikipedia.org/wiki/Rubik%27s_Cube)
- [Online Rubik's Cube example1](https://rubikscu.be/)
- [Online Rubik's Cube example2](https://cube-solver.com/)