Darren F
Darren F

Reputation: 11

A-Frame animating with components

I am learning A-Frame and have come up with an issue I am trying solve. The issue is animating a radius for a sphere to create a pulsating effect ie the sphere grows and shrinks. I have created an AFRAME Component and in the animation path i have put in the code is animation = "property: geometry.primitive.sphere.radius; from: 0.1; to: 0.9" But I get an error in the console Error: Unknown geometry schema 0.1 so I think the "0.1" is relating to the radius value. I also tried another way by creating a THREE.SphereBufferGeometry but i cannot figure out the components path to put into the animation property. Can anyone advise me the best way to animate the radius of a sphere i would greatly appreciate it. Thanks Darren

Upvotes: 0

Views: 145

Answers (1)

Stéphane Albanese
Stéphane Albanese

Reputation: 560

What do you mean by "I have created an AFRAME Component" ?

To know which property to animate, you can check here on the documentation to what each property is linked. For "radius" is associated with "geometry.radius".

I made a glitch that shows what you want to achieve, is it what you are looking for?

Upvotes: 1

Related Questions