diff --git a/README.md b/README.md
index 9ce2518..15a1d07 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# XRForge
+XRForge is a pre-configured [Manyfold](https://manyfold.app) container (reproducably via [nix](https://nixos.org) dockertools).
+It also contains some extra's, to better fit an XR audience & enable community libraries.
+
> Self-sovereign **XR Experiences** for teams & organisations, powered by FOSS ♥
diff --git a/manyfold/cli/manyfold.sh b/manyfold/cli/manyfold.sh
index 8ab16e2..c66421a 100755
--- a/manyfold/cli/manyfold.sh
+++ b/manyfold/cli/manyfold.sh
@@ -9,13 +9,13 @@ test -n "$GODOT_VERSION" || export GODOT_VERSION=4.4.1-stable
test -n "$IMPORT_INSTANCES" || export IMPORT_INSTANCES=1
test -n "$SERVER_CORS" || export SERVER_CORS=http://localhost:5577
test -n "$SERVER_JANUS" || export SERVER_JANUS=http://localhost:5566
-test -n "$HTTPS_ONLY" || unsafe=1 && export HTTPS_ONLY=disabled
+test -n "$HTTPS_ONLY" || unsafe=1
test -n "$SECRET_KEY_BASE" || unsafe=1 && export SECRET_KEY_BASE=j1gf2cj3gfcjhf2j34298kjk2j3h4k
test -n "$SUDO_RUN_UNSAFELY" || unsafe=1 && export SUDO_RUN_UNSAFELY=enabled
test -n "$DATABASE_ADAPTER" || export DATABASE_ADAPTER=sqlite3
test -n "$MULTIUSER" || export MULTIUSER=enabled
test -n "$FEDERATE_SERVERS" || export FEDERATE_SERVERS='"*"'
-test -n "$PUBLIC_HOSTNAME" || export PUBLIC_HOSTNAME=localhost
+test -n "$PUBLIC_HOSTNAME" #|| export PUBLIC_HOSTNAME=localhost
test -n "$CADDY" && {
export HTTPS_ONLY=enabled
@@ -179,9 +179,11 @@ set_upload_path(){
}
mount_dir(){
+ mkdir /usr/src/app/public/lib
find /mnt -type d -mindepth 1 -maxdepth 1 | grep -vE '(janusweb|view)' | while read dir; do
echocolor "[$APPNAME]" "mounting $dir as library"
add_lib_to_db "$dir"
+ ln -s "$dir" /usr/src/app/public/lib/.
done
}
@@ -243,7 +245,8 @@ set_homepage(){
rename_app(){
echocolor "[$APPNAME]" "renaming manyfold to $APPNAME"
sed -i 's/title: Manyfold/title: '$APPNAME'/g' /usr/src/app/config/locales/*.yml
- sed -i 's|powered_by_html:.*|powered_by_html: Radically opensource-powered by Manyfold, XR Fragments, JanusWeb and NIX|g' /usr/src/app/config/locales/*.yml
+ sed -i 's|powered_by_html:.*|powered_by_html: \|\n Opensource-powered by Manyfold, XR Fragments, XR Hypermedia Federation, JanusWeb, NIX and NLnet|g' /usr/src/app/config/locales/*.yml
+ sed -i 's| by_html:.*| by_html: \|\n XRForge is a radically openource platform. A sysadmin can selfhost this platform right now!
This opensource platform allows organisations to run on intranets or federate with others.|g' /usr/src/app/config/locales/*.yml
echocolor "[$APPNAME]" "renaming 'model' to 'experience'"
for dir in /usr/src/app/config/locales/*.yml /usr/src/app/config/locales/*/*.yml; do
sed -i 's|Models|Experiences|g' "$dir"
@@ -253,6 +256,9 @@ rename_app(){
done
sed -i 's|File(s) uploaded succesfully|File(s) uploaded succesfully. The experience is now being (re)generated, please be patient and check back later|g' /usr/src/app/config/locales/models/en.yml
sed -i 's|File(s) uploaded succesfully|File(s) uploaded succesfully. The experience is now being (re)generated, please be patient and check back later|g' /usr/src/app/config/locales/model_files/en.yml
+
+ # link instead of duplicate models/collections immersive overviews
+ ln -s /usr/src/app/app/views/models/_janusroom.html.erb /usr/src/app/app/views/collections/.
}
federate_servers(){
@@ -387,6 +393,6 @@ usage(){
exit 0
}
-test "$unsafe" = 1 && echocolor "[WARNING]" "default env-vars SECRET_KEY_BASE or SUDO_RUN_UNSAFELY are used. Please check: https://codeberg.org/coderofsalvation/xrforge/src/branch/master/manyfold" && echo
+test "$unsafe" = 1 && echocolor "[WARNING]" "default env-vars SECRET_KEY_BASE or SUDO_RUN_UNSAFELY are used. Please check: https://codeberg.org/coderofsalvation/xrforge/src/branch/master/manyfold" 1>&2 && echo
test -n "$1" && "$@"
test -n "$1" || usage
diff --git a/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb b/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb
index 484da0d..4d46477 100755
--- a/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb
+++ b/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb
@@ -49,13 +49,14 @@ begin
# Iterate through the images array
gltf['images'].each_with_index do |img, i|
- # move file to modeldirectory (but dont overwrite if user overwrite it)
+ # use matching texture in original modeldirectory (if generated via extract-textures shellscript)
imgExts = ["jpg","png"]
imgExts.each do |imgExt|
new_filename = "#{dir}/#{filenameWithoutExt}_img#{i}.#{imgExt}"
if File.exist?(new_filename)
XRForge.log("🤔 detected #{File.basename(new_filename)}",logfile)
XRForge.log("✅ importing #{File.basename(new_filename)} -> #{resource['path']}",logfile)
+ # here we update the glTF JSON with the matching texture
img['uri'] = new_filename # NOTE: editing uri will cause assimp to drop image['name'] when exporting :/
update = true
end
@@ -64,6 +65,7 @@ begin
if update
File.write( gltf_path, JSON.pretty_generate(gltf) )
XRForge.log("✅ writing #{resource['path']}",logfile)
+ # convert scratch-model (with updated textures) to actual model
system("assimp export #{gltf_path} #{resource['path']} --embed-textures")
end
end
diff --git a/manyfold/root/hook.d/experience_updated/300-package_lovr_zip.sh b/manyfold/root/hook.d/experience_updated/300-package_lovr_zip.sh
index ef6ab3c..672ce75 100755
--- a/manyfold/root/hook.d/experience_updated/300-package_lovr_zip.sh
+++ b/manyfold/root/hook.d/experience_updated/300-package_lovr_zip.sh
@@ -6,5 +6,7 @@ echo "[package_lovr_zip.sh] zipping lovr.zip"
# overwrite empty lovr template project-zip with given URL
test -n "$LOVR_TEMPLATE_ZIP" && timeout 50 wget "$LOVR_TEMPLATE_ZIP" -O ~/templates/template_lovr.zip
+ln -s $(echo *.glb *.obj *.dae | awk '{print $1}') scene.glb
cp ~/templates/template_lovr.zip .xrforge/lovr.zip
-zip .xrforge/lovr.zip $(find . -maxdepth 1 -type f)
+zip .xrforge/lovr.zip $(find -L . -maxdepth 1 -type f)
+test -f scene.glb && rm scene.glb
diff --git a/manyfold/root/hook.d/experience_updated/300-package_mml.rb b/manyfold/root/hook.d/experience_updated/300-package_mml.rb
index c4bb36a..abf34b7 100755
--- a/manyfold/root/hook.d/experience_updated/300-package_mml.rb
+++ b/manyfold/root/hook.d/experience_updated/300-package_mml.rb
@@ -43,7 +43,7 @@ begin
# https://viewer.mml.io/main/v1/?url=https%3A%2F%2Ffoo.org%2Fbar.mml
mml = <<~MML
-