lovr/README.md

82 lines
2.0 KiB
Markdown
Raw Normal View History

2017-04-21 04:11:24 +00:00
<p align="center"><a href="http://lovr.org"><img src="src/data/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
LÖVR is a simple framework for creating virtual reality experiences with Lua.
2016-08-01 00:47:28 +00:00
2017-07-29 23:51:01 +00:00
[![Build status](https://ci.appveyor.com/api/projects/status/alx3kdi35bmxka8c?svg=true)](https://ci.appveyor.com/project/bjornbytes/lovr)
2017-05-20 15:38:01 +00:00
Features
2016-08-01 00:47:28 +00:00
---
2017-05-20 15:38:01 +00:00
- Automatically detects and renders to connected VR headsets (works without a headset too!)
2017-05-20 15:45:02 +00:00
- Simple 3D graphics API supporting primitives, 3D models, fonts, shaders, skyboxes, framebuffers, etc.
2017-05-20 15:38:01 +00:00
- Export projects to standalone executables, or export to the web using WebVR.
2017-05-20 15:44:06 +00:00
- Spatialized audio
- 3D physics
2016-08-01 00:47:28 +00:00
2017-05-20 15:38:01 +00:00
Getting Started
---
2017-02-17 02:31:13 +00:00
2017-05-20 15:38:01 +00:00
You can download precompiled binaries from the [website](http://lovr.org). There, you
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-02-17 08:48:43 +00:00
lovr.graphics.print('Hello World!', 0, 1, -1)
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()
lovr.graphics.cube('line', 0, 1, 0, .5, lovr.timer.getTime())
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
```
2017-05-07 06:23:50 +00:00
For more examples, see <http://lovr.org/examples>.
2016-12-09 02:35:12 +00:00
Documentation
---
2016-09-18 01:18:16 +00:00
2017-05-07 06:23:50 +00:00
See <http://lovr.org/docs> for guides and API reference. The documentation is open source
2016-12-09 02:36:34 +00:00
and can be found [here](https://github.com/bjornbytes/lovr-docs).
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
[`COMPILING.md`](COMPILING.md).
2017-05-07 06:23:50 +00:00
2016-12-09 02:26:00 +00:00
License
---
MIT, see [`LICENSE`](LICENSE) for details.