lovr/README.md

104 lines
3.0 KiB
Markdown
Raw Normal View History

2017-12-10 20:29:29 +00:00
<p align="center"><a href="http://lovr.org"><img src="src/resources/logo.png" width="160"></a></p>
2017-04-02 13:32:07 +00:00
<h1 align="center">LÖVR</h1>
2016-07-10 23:25:40 +00:00
2017-12-10 04:19:57 +00:00
LÖVR is a simple framework for creating virtual reality experiences with Lua, based on [LÖVE](http://love2d.org).
2016-08-01 00:47:28 +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)
2017-07-29 23:51:01 +00:00
2017-05-20 15:38:01 +00:00
Features
2016-08-01 00:47:28 +00:00
---
2018-01-02 05:28:53 +00:00
- Easily create VR using simple Lua scripts
2017-05-20 15:38:01 +00:00
- Automatically detects and renders to connected VR headsets (works without a headset too!)
2018-01-02 05:28:53 +00:00
- 3D graphics API supporting primitives, fonts, shaders, skyboxes, framebuffers, etc.
- Import 3D models from obj, fbx, collada, or glTF files, including materials and animations.
2017-08-06 19:55:51 +00:00
- Create projects for Windows, macOS, Linux, or WebVR
2017-05-20 15:44:06 +00:00
- Spatialized audio
- 3D physics
2016-08-01 00:47:28 +00:00
2017-08-28 01:11:19 +00:00
Screenshots
---
<p align="center">
<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>
2017-05-20 15:38:01 +00:00
Getting Started
---
2017-02-17 02:31:13 +00:00
2018-01-02 05:28:53 +00:00
You can download precompiled binaries from the [website](https://lovr.org). There, you
2017-05-20 15:38:01 +00:00
can also find documentation and a set of tutorials and examples. Here is the hello world example
for LÖVR:
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:44:06 +00:00
To run it, first create a folder for your project and put the code in a file called `main.lua`.
Then, just drop the `project` folder onto `lovr.exe` (or run `lovr.exe path/to/project` on the
command line). Put on your headset and you should see the text at the front of your play area!
2017-02-17 02:31:13 +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
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()
model:draw()
end
```
2017-04-21 04:11:24 +00:00
#### Audio
```lua
function lovr.load()
local sound = lovr.audio.newSource('darudeSandstorm.ogg')
sound:play()
end
```
2016-12-09 02:35:12 +00:00
Documentation
---
2016-09-18 01:18:16 +00:00
2018-01-02 05:28:53 +00:00
Documentation and examples are available on the website [here](https://lovr.org/docs). The website is also [open source](https://github.com/bjornbytes/lovr-docs) if you want to add or edit documentation.
2017-08-28 01:11:19 +00:00
Community
---
> If you wanna be my LÖVR, you gotta get with my friends
> *- Spice Girls*
Feel free to join the [LÖVR Slack](https://join.slack.com/ifyouwannabemylovr/shared_invite/MTc5ODk2MjE0NDM3LTE0OTQxMTIyMDEtMzdhOGVlODFhYg) for questions, info, and other discussion.
2016-09-30 07:17:35 +00:00
2016-08-10 06:42:30 +00:00
Compiling
2016-08-01 00:47:28 +00:00
---
2017-05-20 15:44:06 +00:00
To compile from source to create a custom build or contribute to LÖVR, see
2017-08-28 01:11:19 +00:00
[`COMPILING`](COMPILING.md).
Contributing
---
Contributions are welcome! See [`CONTRIBUTING`](CONTRIBUTING.md) for more information.
2017-05-07 06:23:50 +00:00
2016-12-09 02:26:00 +00:00
License
---
MIT, see [`LICENSE`](LICENSE) for details.