lovr/README.md

120 lines
4.2 KiB
Markdown
Raw Normal View History

2019-02-08 23:20:36 +00:00
<p align="center"><a href="https://lovr.org"><img src="https://lovr.org/static/img/README.png" width="256"/></a></p>
2017-04-02 13:32:07 +00:00
2019-02-08 23:19:59 +00:00
# LÖVR
2018-09-06 17:39:15 +00:00
> **A simple Lua framework for rapidly building VR experiences.**
2018-01-02 05:32:44 +00:00
2019-02-08 23:19:59 +00:00
You can use LÖVR to easily create VR experiences without much setup or programming experience. The framework is tiny, fast, open source, and supports lots of different platforms and devices.
2018-09-30 05:28:48 +00:00
2017-07-30 00:01:15 +00:00
[![Build status](https://ci.appveyor.com/api/projects/status/alx3kdi35bmxka8c/branch/master?svg=true)](https://ci.appveyor.com/project/bjornbytes/lovr/branch/master)
2017-11-22 22:33:58 +00:00
[![Version](https://img.shields.io/github/release/bjornbytes/lovr.svg?label=version)](https://github.com/bjornbytes/lovr/releases)
2018-09-30 05:28:48 +00:00
[![Slack](https://img.shields.io/badge/chat-slack-7e4e76.svg)](https://lovr.org/slack)
2017-07-29 23:51:01 +00:00
2019-02-08 23:19:59 +00:00
[**Homepage**](https://lovr.org) | [**Documentation**](https://lovr.org/docs) | [**FAQ**](https://lovr.org/docs/FAQ)
2017-08-28 01:11:19 +00:00
2018-09-06 17:39:15 +00:00
<p align="left">
2017-08-28 01:11:19 +00:00
<span><img src="http://lovr.org/static/img/wattle.jpg" width="32%"/></span>
<span><img src="http://lovr.org/static/img/levrage.jpg" width="32%"/></span>
<span><img src="http://lovr.org/static/img/planets.jpg" width="32%"/></span>
</p>
2018-09-06 17:39:15 +00:00
Features
---
2018-11-08 20:49:45 +00:00
- **Cross-Platform** - Runs on Windows, Mac, Linux, Android, and even on the web using WebAssembly and WebVR.
2020-01-03 02:41:52 +00:00
- **Cross-Device** - Supports Vive/Index, Oculus Rift/Go/Quest, Windows MR, and includes a desktop VR simulator.
2018-09-06 17:39:15 +00:00
- **Beginner-friendly** - Simple VR scenes can be created in just a few lines of Lua.
- **Fast** - Writen in C99 and scripted with LuaJIT, includes optimized single-pass stereo rendering.
2019-02-14 00:29:14 +00:00
- **Asset Import** - Supports 3D models (glTF, OBJ), skeletal animation, HDR textures, cubemaps, fonts, etc.
2018-09-06 17:39:15 +00:00
- **Spatialized Audio** - Audio is automatically spatialized using HRTFs.
2019-02-14 00:29:14 +00:00
- **Vector Library** - Efficient first-class support for 3D vectors, quaternions, and matrices.
2018-09-06 17:39:15 +00:00
- **3D Rigid Body Physics** - Including 4 collider shapes and 4 joint types.
- **Compute Shaders** - For high performance GPU tasks, like particles.
- **Multiplayer** - Includes enet for multi-user VR experiences.
2017-05-20 15:38:01 +00:00
Getting Started
---
2017-02-17 02:31:13 +00:00
2019-02-08 23:19:59 +00:00
It's really easy to get started making things with LÖVR. Grab a copy of the executable from <https://lovr.org/download>,
2018-09-06 17:39:15 +00:00
then write a `main.lua` script and drag its parent folder onto the executable. Here are some example projects to try:
#### Hello World
2016-08-01 00:47:28 +00:00
2017-02-17 02:31:13 +00:00
```lua
function lovr.draw()
2017-08-28 01:11:19 +00:00
lovr.graphics.print('Hello World!', 0, 1.7, -3, .5)
2016-10-03 01:13:58 +00:00
end
2016-08-01 00:47:28 +00:00
```
2017-05-20 15:38:01 +00:00
#### Spinning Cube
2017-02-17 02:31:13 +00:00
```lua
function lovr.draw()
2018-01-02 05:28:53 +00:00
lovr.graphics.cube('line', 0, 1.7, -1, .5, lovr.timer.getTime())
2017-02-17 02:31:13 +00:00
end
```
2016-09-30 07:17:35 +00:00
2018-09-30 05:28:48 +00:00
#### Hand Tracking
```lua
function lovr.draw()
2019-10-15 01:45:14 +00:00
for _, hand in ipairs(lovr.headset.getHands()) do
lovr.graphics.sphere(vec3(lovr.headset.getPosition(hand)), .1)
2018-09-30 05:28:48 +00:00
end
end
```
2016-10-31 20:56:27 +00:00
#### 3D Models
```lua
function lovr.load()
2019-10-15 01:45:14 +00:00
model = lovr.graphics.newModel('model.gltf')
2016-10-31 20:56:27 +00:00
end
function lovr.draw()
2018-09-06 17:39:15 +00:00
model:draw(x, y, z)
2017-04-21 04:11:24 +00:00
end
```
2019-02-08 23:19:59 +00:00
You can try more examples in your browser on the [docs page](https://lovr.org/docs/Hello_World).
2017-08-28 01:11:19 +00:00
2018-09-30 05:28:48 +00:00
Building
---
2019-02-08 23:19:59 +00:00
You can build LÖVR from source using CMake. Here are the steps using the command line:
2018-09-30 05:28:48 +00:00
```console
mkdir build
2018-09-30 05:28:48 +00:00
cd build
cmake ..
cmake --build .
```
2019-02-08 23:19:59 +00:00
See the [Compiling Guide](https://lovr.org/docs/Compiling) for more info.
2018-09-30 05:28:48 +00:00
2018-09-06 17:39:15 +00:00
Resources
2017-08-28 01:11:19 +00:00
---
2018-09-06 17:39:15 +00:00
- [**Documentation**](https://lovr.org/docs): Guides, tutorials, examples, and API documentation.
2018-09-30 05:32:36 +00:00
- [**FAQ**](https://lovr.org/docs/FAQ): Frequently Asked Questions.
- [**Slack Group**](https://lovr.org/slack): For general LÖVR discussion and support.
2019-06-01 00:45:11 +00:00
- [**matrix.org**](https://matrix.to/#/!XVAslexgYDYQnYnZBP:matrix.org): Decentralized alternative to Slack.
2018-09-06 17:39:15 +00:00
- [**Nightly Builds**](https://lovr.org/download/nightly): Nightly builds for Windows.
- [**Compiling Guide**](https://lovr.org/docs/Compiling): Information on compiling LÖVR from source.
- [**Contributing**](https://lovr.org/docs/Contributing): Guide for helping out with development 💜
2019-02-08 23:19:59 +00:00
- [**LÖVE**](https://love2d.org): LÖVR is heavily inspired by LÖVE, a 2D game framework.
2017-05-07 06:23:50 +00:00
2018-11-08 06:54:06 +00:00
Contributors
---
- [@bjornbytes](https://github.com/bjornbytes)
- [@shakesoda](https://github.com/shakesoda)
- [@bcampbell](https://github.com/bcampbell)
- [@mcclure](https://github.com/mcclure)
2019-12-05 21:40:46 +00:00
- [@nevyn](https://github.com/nevyn)
2018-11-08 06:54:06 +00:00
2016-12-09 02:26:00 +00:00
License
---
MIT, see [`LICENSE`](LICENSE) for details.