diff --git a/manyfold/root/hook.d/experience_updated/300-package_experience_zip.sh b/manyfold/root/hook.d/experience_updated/300-package_experience_zip.sh
deleted file mode 100755
index bebdbe6..0000000
--- a/manyfold/root/hook.d/experience_updated/300-package_experience_zip.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-dir="$(dirname $1)"
-cd "$dir"
-echo "[package_experience.sh] zipping experience.zip"
-zip -D ".xrforge/experience.zip * | tee -a .xrforge/log.txt
diff --git a/manyfold/root/hook.d/experience_updated/300-package_godot_zip.sh b/manyfold/root/hook.d/experience_updated/300-package_godot_zip.sh
old mode 100755
new mode 100644
diff --git a/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb b/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb
index fb8b3b2..064aa2f 100755
--- a/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb
+++ b/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb
@@ -19,77 +19,89 @@ begin
# Read and parse the JSON file
data = JSON.parse( File.read( "datapackage.json" ) )
- logfile = File.join( File.dirname(filename), ".xrforge/log.txt" )
+ if data['keywords'].empty? || data['keywords'].include?('janusxr')
- XRForge.log("✅ starting build janusXR XR scene", logfile)
+ logfile = File.join( File.dirname(filename), ".xrforge/log.txt" )
- # Extract the desired field (assuming the field is named 'model_file')
- thumb_file = data['image']
+ XRForge.log("✅ starting build janusXR XR scene", logfile)
- XRForge.log("✅ thumbnail sidecar-file '#{thumb_file}' detected", logfile)
-
- # Get the base name of the thumbnail file without its extension
- base_name = File.basename(thumb_file, File.extname(thumb_file))
-
- model_file = nil # Initialize model_file to nil
-
- # Loop over the list of extensions
- XRForge::MODEL_EXT.each do |ext|
- # Construct the filename with the current extension
- filename = "#{base_name}#{ext}"
-
- # Check if the file exists
- if File.exist?(filename)
- XRForge.log("✅ 3D file '#{filename}' detected", logfile)
- model_file = "#{dir.gsub("/mnt/","")}/#{filename}" # Store the found filename
- break # Stop the loop once a file is found
+ # Extract the desired field (assuming the field is named 'model_file')
+ thumb_file = data['image']
+
+ XRForge.log("✅ thumbnail sidecar-file '#{thumb_file}' detected", logfile)
+
+ # Get the base name of the thumbnail file without its extension
+ base_name = File.basename(thumb_file, File.extname(thumb_file))
+
+ model_file = nil # Initialize model_file to nil
+
+ # Loop over the list of extensions
+ XRForge::MODEL_EXT.each do |ext|
+ # Construct the filename with the current extension
+ filename = "#{base_name}#{ext}"
+
+ # Check if the file exists
+ if File.exist?(filename)
+ XRForge.log("✅ 3D file '#{filename}' detected", logfile)
+ model_file = "#{dir.gsub("/mnt/","")}/#{filename}" # Store the found filename
+ break # Stop the loop once a file is found
+ else
+ # Log a message for the file that was not found, but don't stop
+ XRForge.log("⚠️ 3D file '#{filename}' not detected", logfile)
+ end
+ end
+
+ # Check if a model file was found after the loop
+ if model_file
+ XRForge.log("✅ Final model file: '#{model_file}'", logfile)
else
- # Log a message for the file that was not found, but don't stop
- XRForge.log("⚠️ 3D file '#{filename}' not detected", logfile)
+ XRForge.log("❌ No suitable 3D file found for XR Fragments- / JanusXR-compatible experience", logfile)
+ end
+
+ # Get the value of the environment variable FEDERATE_DRIVE_HOST
+ federate_drive_host = ENV['FEDERATE_DRIVE_HOST']
+
+ # Define the HTML content using a multi-line string (heredoc)
+ # Ruby's heredoc allows for variable interpolation (using #{})
+ jml = <<~JML
+
| + menu + | +
+ This will generate a navigator-menu into your main 3D file. + The links can be edited <%= link_to "here", edit_model_path(@model) %> + |
+
| + janusxr + | +
+ This generates an JanusXR address. + JanusXR is an Open Immersive Web-layer since 2015, which allows existing webpages to become spatial. + It is Free and Opensource, and allows you to meet others in this experience (avatars, chat and voice etc). + |
+
| + mml + | +
+ This generates an MML address. + Metaverse Markup Language (MML) is an open markup language used to define experiences. + |
+
<%= markdownify @model.notes %>
- <% end if @model.notes.present? %> - - <% if @num_files > 0 %> -| ⁂ | -<% if @model.remote? %> - <%= link_to @model.federails_actor.at_address, @model.federails_actor.profile_url, target: "new" %> - <% else %> - - <%= @model.federails_actor.short_at_address %> - <%= render Components::CopyButton.new(text: @model.federails_actor.at_address) %> - - <% end %> - - - | -||
| <%= icon "person", Creator.model_name.human %> | -<%= link_to @model.creator.name, @model.creator, itemprop: "author" %> | -||
| - - | -
- <%= link_to "JanusXR Metaverse", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/janusxr.html" %>
-
-
-
-
-
-
-
- This is the JanusXR address.
- - JanusXR is an established Metaverse since 2015. - It is Free and Opensource, and allows you to meet others in this experience (avatars, chat and voice etc). - - |
- ||
| - - | -<%= link_to "zip archive", "/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/experience.zip" %> | -||
| - - | -
- <%= link_to "build log", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/log.txt", target: "_blank" %>
-
-
-
-
-
-
-
- This is the build log of XR Forge.
- - When you add files, they are processed, validated (for XR Fragment compliance). - But also features can be toggled via tags: - -
|
- ||
| - - | -
- <%= link_to "Godot project", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/godot.zip" %>
-
-
-
-
-
-
-
- This is a Godot project which wraps your (3D file) experience.
- - Godot is a Free and Opensource Game engine. - The Godot project is basically its own XR Fragment browser (which you can extend). - WARNING: use progressive enhancement so your 3D file experience will always run in other XR Fragment viewers. - - |
-
| ⁂ | +<% if @model.remote? %> + <%= link_to @model.federails_actor.at_address, @model.federails_actor.profile_url, target: "new" %> + <% else %> + + <%= @model.federails_actor.short_at_address %> + <%= render Components::CopyButton.new(text: @model.federails_actor.at_address) %> + + <% end %> + + + | +
| <%= icon "collection", Collection.model_name.human(count: 100) %> | -<%= link_to @model.collection.name, models_path({collection: @model.collection}.merge(@filter&.to_params)) %> | -
| <%= icon "boxes", Library.model_name.human %> | -<%= link_to @model.library.name, models_path({library: @model.library}.merge(@filter&.to_params)) %> | -
| <%= icon "card-heading", t(".license") %> | -- <%= Spdx.licenses[@model.license]&.fetch("reference") ? - link_to(t_license(@model.license), Spdx.licenses[@model.license]["reference"], itemprop: "license") : - t_license(@model.license) %> - | -
| <%= icon("explicit", Model.human_attribute_name(:sensitive)) %> | -- <%= Model.human_attribute_name(:sensitive) %> - | -
| <%= icon "folder", t(".path") %> | -
- <%= content_tag(:code, class: "path") { safe_join @model.path.split("/"), safe_join([tag.wbr, "/"]) } %>
- <% unless @model.contains_other_models? %>
- <%= button_tag(t(".organize.button_text"), class: "btn btn-warning btn-sm", "data-bs-toggle": "modal", "data-bs-target": "#confirm-move") if @model.needs_organizing? && policy(@model).edit? %>
- <% end %>
- |
-
| <%= icon "tag", t(".tags") %> | -<%= render "tag_list", tags: @model.tags.order(taggings_count: :desc, name: :asc), filter: @filter %> | -
| <%= icon "people", t(".followers") %> | -<%= t("general.followers", count: @model.followers.count) %> | -
| <%= render Components::AccessIndicator.new(object: @model, text: false) %> | -<%= render Components::AccessIndicator.new(object: @model, text: true, icon: false) %> | -
- <%= t(".merge.warning") %> -
- <%= t(".merge.with") %>: - <% @model.parents.each do |parent| %> - <%= render Components::DoButton.new(icon: "union", label: parent.name, href: merge_models_path(target: parent.public_id, models: [@model.public_id]), method: :post, variant: "danger") %> - <% end %> - <% end %> - <% end %> - - <%= render partial: "problem", collection: @model.problems.visible(problem_settings) %> - - <%= card :secondary, t(".files_card.heading") do %> - Top -+ <%= t(".merge.warning") %> +
+ <%= t(".merge.with") %>: + <% @model.parents.each do |parent| %> + <%= render Components::DoButton.new(icon: "union", label: parent.name, href: merge_models_path(target: parent.public_id, models: [@model.public_id]), method: :post, variant: "danger") %> + <% end %> + <% end %> + <% end %> + + <%= render partial: "problem", collection: @model.problems.visible(problem_settings) %> + + <%= card :secondary, t(".files_card.heading") do %> + Top +