bjorn 4 سال پیش
والد
کامیت
5b8fd66435
4فایلهای تغییر یافته به همراه14 افزوده شده و 13 حذف شده
  1. 1 1
      api/lovr/headset/getMirrorTexture.lua
  2. 12 7
      guides/Compiling.md
  3. 1 3
      guides/Distribution.md
  4. 0 2
      guides/Libraries.md

+ 1 - 1
api/lovr/headset/getMirrorTexture.lua

@@ -5,7 +5,7 @@ return {
     Returns a Texture that contains whatever is currently rendered to the headset.
 
     Sometimes this can be `nil` if the current headset driver doesn't have a mirror texture, which
-    can happen if the driver renders directly to the display.  Currently the `desktop`, `webvr`, and
+    can happen if the driver renders directly to the display.  Currently the `desktop`, `webxr`, and
     `vrapi` drivers do not have a mirror texture.
 
     It also isn't guaranteed that the same Texture will be returned by subsequent calls to this

+ 12 - 7
guides/Compiling.md

@@ -111,7 +111,7 @@ the command:
 $ LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1' ~/.steam/steam/ubuntu12_32/steam-runtime/run.sh lovr
 ```
 
-WebVR
+WebXR
 ---
 
 First, [install the Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html).
@@ -141,16 +141,21 @@ from here is to use `emrun`:
 $ emrun --browser firefox lovr.html
 ```
 
-To package a game, run:
+To add a project, create a .zip of its contents and serve it alongside the HTML and JS files.  The
+following JS can be added to the page to download the zip file, add it to the emscripten virtual
+filesystem, and add it as a command line argument:
 
 ```
-$ python "$EMSCRIPTEN/tools/file_packager.py" game.data --no-heap-copy --preload /path/to/game@/ --js-output=game.js
+var filename = 'game.zip';
+var url = '/game.zip';
+Module.arguments.push(filename);
+Module.preRun.push(function() {
+  Module.FS_createPreloadedFile('/', filename, url, true, false);
+});
 ```
 
-Which will output `game.js` and `game.data`.  You can then include the `game.js` script on the HTML
-page (before the lovr.js script tag) to run the project.
-
-For an improved WebVR workflow with live-reloading, check out [`lovr-webvr-server`](https://github.com/bjornbytes/lovr-webvr-server/blob/master/views/index.ejs).
+See `lovr.html` (or `src/resources/lovr.html`) for a full example page, including a button that
+can be used to enter/exit immersive mode.
 
 Android
 ---

+ 1 - 3
guides/Distribution.md

@@ -65,6 +65,4 @@ This will output two files: `game.js` and `game.data` (note that the `@/` suffix
 `game.js` file downloads the `game.data` contents and mounts it into the Emscripten filesystem,
 which LÖVR will then run at startup.
 
-For full instructions on creating a web-enabled build of LÖVR, see the [Compiling guide](Compiling#webvr).
-You can also use [lovr-webvr-server](https://github.com/bjornbytes/lovr-webvr-server) to develop a
-WebVR project locally with live-reloading support.
+For full instructions on creating a web-enabled build of LÖVR, see the [Compiling guide](Compiling#webxr).

+ 0 - 2
guides/Libraries.md

@@ -37,8 +37,6 @@ List of Libraries
   tools for LÖVR.
 - [lovr-pointer](https://github.com/bjornbytes/lovr-pointer) - A general pointer system that can be
   used to select objects or create teleporters.
-- [lovr-webvr-server](https://github.com/bjornbytes/lovr-webvr-server) - A local development server for
-  testing WebVR projects.
 - [lovr-window](https://github.com/Papaew/lovr-window) - A window module for LÖVR.
 - [lume](https://github.com/rxi/lume) - Lua utility functions geared towards game development.
 - [maf](https://github.com/bjornbytes/maf) - A 3D math library with vectors and quaternions.