
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
popmotion-aframe-role
Advanced tools
Popmotion Actor role to enable A-Frame animation, physics and input tracking.
<a-cube width="3" color="red"></a-cube>
import ui from 'popmotion';
import aframeRole from 'popmotion-aframe-role';
const cube = new ui.Actor({
element: document.querySelector('a-cube'),
as: aframeRole
});
cube is now a standard Popmotion Actor, except with an applied A-Frame Role.
This allows you to run a standard Tween, Simulate or Track action:
const moveBackAndForth = new ui.Tween({
values: {
x: 5
},
duration: 600,
ease: 'easeInOut',
yoyo: true
});
cube.start(moveBackAndForth);
As A-Frame elements are DOM elements, you can use ui.select to create multiple Actors at once. For instance:
ui.select('a-cube', {
as: aframeRole
});
Will return an Iterator of Actor elements (see full documentation). You must remember to set as on Actor initialisation.
All numerical properties can be set with Popmotion.
position properties can be set with x, y, and z.scale and rotation properties can be set eg scaleX and rotateY.radius-bottom becomes radiusBottom.If you're creating a lot of A-Frame Actors and don't want to set as each time, you could make something like this:
import { Actor } from 'popmotion';
import aframeRole from 'popmotion-aframe-role';
class AFrameActor extends Actor {
constructor(props, ...args) {
props.as = aframeRole;
super(props, ...args);
}
}
const cube = new AFrameActor(document.querySelector('a-cube'));
FAQs
A-Frame plugin for Popmotion animation, tracking and physics
We found that popmotion-aframe-role 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
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.