fernandojsg / aframe-slice9-component

A-Frame slice9 component

Home Page:https://fernandojsg.github.io/aframe-slice9-component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aframe-slice9-component

A 9-Slice component for A-Frame.

slice9

API

Property Description Default Value
width 1
height 1
left 0
right 0
bottom 0
top 0
side front
padding 0.1
color #fff
opacity 1.0
transparent true
debug false
map ''

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.4.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-slice9-component/dist/aframe-slice9-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity slice9="foo: bar"></a-entity>
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-slice9-component

Then require and use.

require('aframe');
require('aframe-slice9-component');

About

A-Frame slice9 component

https://fernandojsg.github.io/aframe-slice9-component

License:MIT License


Languages

Language:JavaScript 77.4%Language:HTML 22.6%