Skip to content

c-frame/aframe-slice9-component

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
alphaTest 0.0
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/1.5.0/aframe.min.js"></script>
  <script src="https://cdn.jsdelivr.net/gh/c-frame/[email protected]/dist/aframe-slice9-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity slice9="width: 2; height: 1; left: 20; right: 43; top: 20; bottom: 43; src: tooltip.png" position="0 1 -2"></a-entity>
  </a-scene>
</body>

npm

Install via npm:

npm install @c-frame/aframe-slice9-component

Then require and use.

require('aframe');
require('@c-frame/aframe-slice9-component');

Packages

No packages published

Languages

  • JavaScript 68.5%
  • HTML 31.5%