updated docs + added MPL license

This commit is contained in:
Leon van Kammen 2023-05-23 11:30:39 +02:00
parent 9a0546e38d
commit 58aa7ef857
13 changed files with 44 additions and 13 deletions

View File

@ -3,19 +3,25 @@
[![Actions Status](https://github.com/coderofsalvation/xrfragment/workflows/test/badge.svg)](https://github.com/coderofsalvation/xrfragment/actions)
# usage
# Documentation
https://coderofsalvation.github.io/xrfragment
# available implementations
* [lua (handwritten)](dist/xrfragment.lua) [(+example)](src/xrfragment/Parser.lua)
* [haXe](src/xrfragment)
* [javascript](dist/xrfragment.js) [(+example)](test/test.js)
* [python](dist/xrfragment.py) [(+example)](test/test.py)
* [lua](dist/xrfragment.lua) [(+example)](test/test.lua)
* [javascript](dist/xrfragment.js) [(+example)](test/test.js)
* [python](dist/xrfragment.py) [(+example)](test/test.py)
* [lua](dist/xrfragment.lua) [(+example)](test/test.lua)
See documentation for more info
# development
Pre-build libraries can be found in [/dist folder](dist)<br>
If you really want to build from source:
```
$ ./make install
$ ./make && ./make runtest
$ ./make build && ./make runtest
```

3
dist/license.js vendored Normal file
View File

@ -0,0 +1,3 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET

View File

@ -1,3 +1,5 @@
/* SPDX-License-Identifier: MPL-2.0 *
* Copyright (c) 2023 Leon van Kammen/NLNET */
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};

View File

@ -1,3 +1,5 @@
/* SPDX-License-Identifier: MPL-2.0 *
* Copyright (c) 2023 Leon van Kammen/NLNET */
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};

View File

@ -1,3 +1,5 @@
/* SPDX-License-Identifier: MPL-2.0 *
* Copyright (c) 2023 Leon van Kammen/NLNET */
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};

File diff suppressed because one or more lines are too long

12
make
View File

@ -50,15 +50,17 @@ build(){
build_js(){
# add js module
cp dist/xrfragment.js dist/xrfragment.module.js
echo "export default xrfragment;" >> dist/xrfragment.module.js
cat dist/license.js dist/xrfragment.js > dist/xrfragment.module.js
echo "export default xrfragment;" >> dist/xrfragment.module.js
# add THREE module
cat dist/xrfragment.js \
cat dist/license.js \
dist/xrfragment.js \
src/3rd/three/*.js \
src/3rd/three/xrf/*.js > dist/xrfragment.three.js
src/3rd/three/xrf/*.js > dist/xrfragment.three.js
echo "export default xrfragment;" >> dist/xrfragment.three.js
# add AFRAME
cat dist/xrfragment.js \
cat dist/license.js \
dist/xrfragment.js \
src/3rd/three/*.js \
src/3rd/three/xrf/*.js \
src/3rd/aframe/*.js > dist/xrfragment.aframe.js

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
package xrfragment;
import xrfragment.XRF;

View File

@ -1,3 +1,6 @@
-- SPDX-License-Identifier: MPL-2.0
-- Copyright (c) 2023 Leon van Kammen/NLNET
XF = {}
function split (inputstr, sep)

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
package xrfragment;
//return untyped __js__("window.location.search");

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
package xrfragment;
import xrfragment.Parser;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
package xrfragment;
@:expose // <- makes the class reachable from plain JavaScript

View File

@ -1,3 +1,6 @@
-- SPDX-License-Identifier: MPL-2.0
-- Copyright (c) 2023 Leon van Kammen/NLNET
local XRF = {}
XRF.ASSET = 1