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.
local-metaverse-tooling/get_local_troika

29 lines
960 B

#!/bin/bash
SRC=aframe-troika-text-local.min.js
# to test : python3 -m http.server
# to clean up : rm -rf local-troika-fonts local-troika-test.html $SRC
wget https://unpkg.com/aframe-troika-text/dist/aframe-troika-text.min.js -O $SRC
sed -i "s|https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff|local-troika-fonts/roboto.woff|" $SRC
mkdir local-troika-fonts
wget https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff -O roboto.woff
mv roboto.woff local-troika-fonts/
cat > local-troika-test.html << EOF
<head>
<title>My A-Frame Scene</title>
<script src="aframe-local.min.js"></script>
<script src="$SRC"></script>
</head>
<body>
<a-scene>
<!-- As a component: -->
<a-entity position="0 1.6 -1" troika-text="value: Hello world!"></a-entity>
<!-- As a primitive: -->
<a-troika-text position="0 1.8 -1" value="Hello world!"></a-troika-text>
<a-sky color="darkblue"></a-sky>
</a-scene>
</body>
EOF