lovr/README.md

122 lines
4.2 KiB
Markdown
Raw Permalink Normal View History

2019-02-08 23:19:59 +00:00
# LÖVR
2022-09-14 02:46:17 +00:00
<a href="https://lovr.org"><img align="right" src="https://lovr.org/static/img/logo.svg" width="180"/></a>
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
2022-11-15 04:37:17 +00:00
[![Build](https://github.com/bjornbytes/lovr/actions/workflows/build.yml/badge.svg?event=push)](https://github.com/bjornbytes/lovr/actions/workflows/build.yml)
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)
2022-12-31 21:52:51 +00:00
[![Matrix](https://img.shields.io/badge/chat-matrix-0ba378.svg)](https://lovr.org/matrix)
[![Discord](https://img.shields.io/badge/chat-discord-404eed.svg)](https://lovr.org/discord)
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">
2022-11-09 03:08:47 +00:00
<span><img src="http://lovr.org/static/img/screen1.jpg" width="32.5%"/></span>
<span><img src="http://lovr.org/static/img/screen2.jpg" width="32.5%"/></span>
<span><img src="http://lovr.org/static/img/screen3.jpg" width="32.5%"/></span>
2017-08-28 01:11:19 +00:00
</p>
2018-09-06 17:39:15 +00:00
Features
---
- **Cross-Platform** - Runs on Windows, macOS, Linux, and Android.
- **Cross-Device** - Supports Vive/Index, Oculus Rift/Quest, Windows MR, and has a 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.
2022-03-20 08:44:18 +00:00
- **Fast** - Writen in C11 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.
2021-01-07 21:42:07 +00:00
- **3D Rigid Body Physics** - Including 4 collider shapes, triangle mesh colliders, and 4 joint types.
2018-09-06 17:39:15 +00:00
- **Compute Shaders** - For high performance GPU tasks, like particles.
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>,
2022-11-15 04:37:17 +00:00
then write a `main.lua` script and drag it onto the executable. Here are some example projects to try:
2018-09-06 17:39:15 +00:00
#### Hello World
2016-08-01 00:47:28 +00:00
2017-02-17 02:31:13 +00:00
```lua
2022-09-02 02:10:31 +00:00
function lovr.draw(pass)
pass:text('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
2022-09-02 02:10:31 +00:00
function lovr.draw(pass)
pass:cube(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
2022-09-02 02:10:31 +00:00
function lovr.draw(pass)
2019-10-15 01:45:14 +00:00
for _, hand in ipairs(lovr.headset.getHands()) do
2022-09-02 02:10:31 +00:00
pass: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
2022-09-02 02:10:31 +00:00
function lovr.draw(pass)
pass:draw(model, x, y, z)
2017-04-21 04:11:24 +00:00
end
```
2022-09-02 02:10:31 +00:00
More examples are on the [docs page](https://lovr.org/docs/Intro/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.
2022-12-15 03:43:44 +00:00
- [**Matrix**](https://lovr.org/matrix): The LÖVR community for 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**](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)
2020-02-03 23:04:58 +00:00
- [@porglezomp](https://github.com/porglezomp)
2020-05-19 19:22:13 +00:00
- [@jmiskovic](https://github.com/jmiskovic)
2021-04-16 17:20:36 +00:00
- [@wallbraker](https://github.com/wallbraker)
2018-11-08 06:54:06 +00:00
2016-12-09 02:26:00 +00:00
License
---
MIT, see [`LICENSE`](LICENSE) for details.