Skip to content

MoritzKoehlerDesign/aframe-spawnpoint-component

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aframe-spawnpoint-component

Version License

DEMO

Spawn A-Frame entities from a point.

For A-Frame.

API

Property Description Default Value
size pool size 10
pattern random, even random
origin Origin of the spawn pattern {x: 0, y: 0, z: 0}
radius Radius around the origin 10
enableY Enable random on y-axis false
rate How often to spawn, in milliseconds. If 0, spawn all at once. 0

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.8.2/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-spawnpoint-component/dist/aframe-spawnpoint-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity spawnpoint__enemy="size: 20; radius: 100;"></a-entity>
    <a-assets>
        <a-mixin id="enemy" geometry="primitive: box;" material="color: red;"></a-mixin>
    </a-assets>
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-spawnpoint-component

Then require and use.

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

About

Spawn A-Frame entities from a point

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 75.4%
  • HTML 24.6%