You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
33 lines
1.3 KiB
#!/bin/bash
|
|
SRC=aframe-local.min.js
|
|
wget https://aframe.io/releases/1.4.0/aframe.min.js -O $SRC
|
|
sed -i "s|https://cdn.aframe.io/fonts|local-fonts|" $SRC
|
|
mkdir local-fonts
|
|
wget https://cdn.aframe.io/fonts/Roboto-msdf.png
|
|
wget https://cdn.aframe.io/fonts/Roboto-msdf.json
|
|
mv Roboto-msdf.png local-fonts/
|
|
mv Roboto-msdf.json local-fonts/
|
|
mkdir local-models
|
|
wget https://cdn.aframe.io/controllers/oculus-hands/v4/left.glb
|
|
wget https://cdn.aframe.io/controllers/oculus-hands/v4/right.glb
|
|
mv left.glb right.glb local-models/
|
|
sed -i "s|https://cdn.aframe.io/controllers/oculus-hands/v4|local-models|g" $SRC
|
|
cat > local-aframe-test.html << EOF
|
|
<html>
|
|
<head>
|
|
<script src="$SRC"></script>
|
|
</head>
|
|
<body>
|
|
<a-scene>
|
|
<a-entity position="0.5 1.6 -1" text="value: Hello local World;"></a-entity>
|
|
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
|
|
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
|
|
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
|
|
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
|
|
<a-sky color="#ECECEC"></a-sky>
|
|
</a-scene>
|
|
</body>
|
|
</html>
|
|
EOF
|
|
# to test : python3 -m http.server
|
|
# to clean up : rm -rf local-fonts local-models local-aframe-test.html $SRC
|
|
|