Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
aframe-simple-shooter
Advanced tools
Simple Shooter Kit for A-Frame.
This is a set of components and systems (under a single file) to provide a way of building simple shooting experiences, where a "shooter" shoots "bullets" that can hit "targets".
So you just define which entities are bullets, targets and shooters, and manage the logic among them using events:
Shooter:
shot
on a shooter to make it shootchangebullet
on a shooter to change active bulletTarget:
hit
on a target to know when it was hit by a bulletdie
on a target to know when its life was finishedProperty | Description | Default Value |
---|---|---|
bullets | array of bullets (their names) that this shooter can use | ['normal'] |
useBullet | current bullet used | 'normal' |
cycle | when changing to next or prev bullet type, cycle to the first or last (resp.) type when reaching the last/first (resp.) | false |
Property | Description | Default Value |
---|---|---|
name | Name of this bullet type | 'normal' |
life | Life that gets from targets when hit | 1.0 |
speed | In m/s aprox. | 1.0 |
maxTime | When this time (in seconds) is elapsed, the bullet dissapears. | 1.0 |
cacheSize | How many copies of this bullet can be on screen at the same time | 10 |
Property | Description | Default Value |
---|---|---|
static | This object moves or changes shape. If static==false, bounding box is recalculated continuously | true |
life | Internal life of target. Each time a bullet hits it, this life is reduced by bullet's life, and when it gets <= 0 the event 'die' is emmited to the target | 0 |
active | Whether this target is included in collision tests. | true |
Install and use by directly including the browser files:
<head>
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>
<script src="aframe-shooter-component.min.js"></script>
</head>
<body>
<a-scene>
<a-entity bullet geometry="primitive: sphere"></a-entity>
<a-entity target geometry="primitive: box"></a-entity>
<a-entity shooter id="gun" geometry="primitive: box></a-entity>
</a-scene>
<script>
document.body.addEventListener('mousedown', function(){
document.getElementById('gun').emit('shoot');
});
</script>
</body>
Install via npm:
npm install aframe-simple-shooter
Then require and use.
require('aframe');
require('aframe-simple-shooter');
FAQs
Simple Shooter Kit for A-Frame.
We found that aframe-simple-shooter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.