2024-11-19 16:17:06 +01:00
|
|
|
#!/bin/sh
|
|
|
|
test -n "$1" || { echo "usage: a-gltf-model <gltf-file>"; exit; }
|
|
|
|
|
2025-01-06 15:57:57 +01:00
|
|
|
file="$1"
|
|
|
|
echo "$file" | grep -q http || {
|
|
|
|
file="$(readlink -f "$1")"
|
|
|
|
file="${file#/}" # strip leading slash if present
|
|
|
|
file="file://xrsh/$file"
|
|
|
|
}
|
2024-11-19 16:17:06 +01:00
|
|
|
|
2025-01-06 15:57:57 +01:00
|
|
|
echo "<a-gltf-model src='$file'></a-gltf-model>" >> /root/index.html
|