added autoenv scenes

This commit is contained in:
Leon van Kammen 2025-03-28 11:20:04 +01:00
parent a029032b2b
commit 9cded01543
7 changed files with 31 additions and 0 deletions
buildroot-v86/board/v86/rootfs_overlay/root
dist

View File

@ -0,0 +1,2 @@
echo "loading AFRAME glTF scene"
cp index.html /root/index.html

View File

@ -0,0 +1,3 @@
<a-gltf-model src="https://coderofsalvation.github.io/xrsh-media/assets/background.glb" gltf-model=""></a-gltf-model>
<a-text value="this is scene1" color="gray" position="-0.5 1.5 -2.5"></a-text>

View File

@ -0,0 +1,3 @@
echo "loading THREE.js scene"
echo "" > /root/index.html # empty scene
cp index.js /root/index.js

View File

@ -0,0 +1,14 @@
const ascene = AFRAME.scenes[0]
const scene = ascene.object3D
const object = new THREE.Mesh(
new THREE.BoxGeometry(1, 1, 1),
new THREE.MeshBasicMaterial({ color: 0xff0000 })
);
object.position.set(0.3, 1.4, -0.4)
object.scale.set(0.2,0.2,0.2)
// instead of animate() we use onAfterRender
// (or monkeypatch AFRAME.scenes[0].renderer.render() for full-control)
object.onAfterRender = () => object.rotation.x += 0.01
scene.add(object);

View File

@ -0,0 +1,2 @@
echo "loading AFRAME demo scene"
cp index.html /root/index.html

View File

@ -0,0 +1,7 @@
#!/bin/html
<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.05 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-text value="this is scene3" position="-0.5 1.5 -2.5"></a-text>

BIN
dist/v86-linux.iso vendored

Binary file not shown.