lovr/README.md

110 lines
3.6 KiB
Markdown
Raw Normal View History

2018-09-06 17:39:15 +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
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
2018-09-30 05:28:48 +00:00
Inspired by [LÖVE](https://love2d.org), a 2D game framework.
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
2018-09-30 05:32:36 +00:00
[**Website**](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
---
- **Cross-Platform** - Runs on Windows, Mac, Linux, and even on the web using WebAssembly and WebVR.
2018-09-06 17:47:20 +00:00
- **Cross-Device** - Support for many HMDs including HTC Vive, Oculus Touch, and Windows MR headsets. There's also a keyboard/mouse VR simulator so you can prototype without hardware.
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.
- **Asset Import** - Supports 3D models (glTF, FBX, OBJ), skeletal animation, HDR textures, cubemaps, fonts, etc.
- **Spatialized Audio** - Audio is automatically spatialized using HRTFs.
- **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.
- **Umlauts** - !!!
2017-05-20 15:38:01 +00:00
Getting Started
---
2017-02-17 02:31:13 +00:00
2018-09-06 17:39:15 +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>,
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()
controllers = lovr.headset.getControllers()
for _, controller in ipairs(controllers) do
x, y, z = controller:getPosition()
lovr.graphics.sphere(x, y, z, .1)
end
end
```
2016-10-31 20:56:27 +00:00
#### 3D Models
```lua
function lovr.load()
2017-02-17 02:31:13 +00:00
model = lovr.graphics.newModel('teapot.fbx', 'teapot.png')
2016-10-31 20:56:27 +00:00
end
function lovr.draw()
2018-09-06 17:39:15 +00:00
local x, y, z = 0, 0, 0
model:draw(x, y, z)
2017-04-21 04:11:24 +00:00
end
```
2018-09-06 17:47:20 +00:00
You can also find lots of other WebVR examples 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
---
2018-09-30 05:33:42 +00:00
Here's how to compile LÖVR using CMake:
2018-09-30 05:28:48 +00:00
```console
cd build
cmake ..
cmake --build .
```
For more help, see the [Compiling Guide](https://lovr.org/docs/Compiling).
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.
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**](CONTRIBUTING.md): Guide for helping out with development :heart:
2017-05-07 06:23:50 +00:00
2016-12-09 02:26:00 +00:00
License
---
MIT, see [`LICENSE`](LICENSE) for details.