Skip to content

Instantly share code, notes, and snippets.

View UXVirtual's full-sized avatar

Michael UXVirtual

View GitHub Profile
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb http://packages.openmediavault.org/public arrakis main
# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis main
## Uncomment the following line to add software from the proposed repository.
# deb http://packages.openmediavault.org/public arrakis-proposed main
# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb http://packages.openmediavault.org/public arrakis partner
# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis partner
<a-entity light="type:directional; castShadow:true;" position="1 1 1"></a-entity>
<a-gltf-model src="tree.gltf" shadow="receive: false"></a-gltf-model>
var el = sceneEl.components.pool__enemy.requestEntity();
sceneEl.components.pool__enemy.returnEntity(el);
<a-scene pool__enemy="mixin: enemy; size : 10"></a-scene>
@UXVirtual
UXVirtual / pbrdemo-aframe.html
Last active November 15, 2017 02:37
A-Frame PBR Demo
<a-scene main pbr-skybox="path: assets/img/environment/Bridge2/; entities: #model; setSkybox: false">
<a-assets>
<a-asset-item id="helmet-model" src="assets/gltf/damaged-helmet/DamagedHelmet.gltf"></a-asset-item>
</a-assets>
<a-entity id="model" gltf-model="#helmet-model" rotation="0 180 0"></a-entity>
<a-entity cubemap="folder: assets/img/environment/skybox/"></a-entity>
<a-camera id="camera" camera mouse-cursor position="-0.116 -0.242 2.782" rotation="4.958 -2.586 0" orbit-controls="target: #model; minDistance:2; maxDistance:4;"></a-camera>
</a-scene>
@UXVirtual
UXVirtual / pbrglossy-babylon.js
Last active November 15, 2017 02:13
Babylon.js PBR Demo
var CreatePBRGlossyScene = function (engine) {
var scene = new BABYLON.Scene(engine);
scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
scene.imageProcessingConfiguration.contrast = 1.6;
scene.imageProcessingConfiguration.exposure = 0.6;
scene.imageProcessingConfiguration.toneMappingEnabled = true;
engine.setHardwareScalingLevel(0.5);
var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
@UXVirtual
UXVirtual / hello-world.html
Created November 14, 2017 04:28
A-Frame Hello World
<script src="https://aframe.io/releases/0.7.1/aframe.min.js"></script>
<a-scene>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
<a-box position="-1 0.5 -3" rotation="0 45 0" width="1" height="1" depth="1" color="#4CC3D9"></a-box>
<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>