aframe-mixinsheet

Declare A-Frame mixins and components in stylesheet form.

Usage no npm install needed!

<script type="module">
  import aframeMixinsheet from 'https://cdn.skypack.dev/aframe-mixinsheet';
</script>

README

aframe-mss

Mixin Style Sheets: CSS for A-Frame.

logo

Usage

Declaratively declare mixins and components in a stylesheet form:

/* example.mss */

wideBox {
  geometry {
    primitive: box;
    width: 5;
  }
  position: 5 5 2;
}

red {
  material {
    color: #FF2222;
  }
}

Then import and use from A-Frame:

<a-scene>
  <a-assets>
    <a-style src="example.mss"></a-style>
  </a-assets>

  <a-entity mixin="red wideBox"></a-entity>
</a-scene>