victory accuracy ring
This commit is contained in:
16
src/components/victory-accuracy-ring.js
Normal file
16
src/components/victory-accuracy-ring.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Trigger accuracy ring animation on victory screen.
|
||||
*/
|
||||
AFRAME.registerComponent('victory-accuracy-ring', {
|
||||
dependencies: ['geometry', 'material'],
|
||||
|
||||
schema: {
|
||||
accuracy: {default: 0}
|
||||
},
|
||||
|
||||
update: function () {
|
||||
this.el.getObject3D('mesh').material.uniforms.progress.value = 0;
|
||||
this.el.setAttribute('animation', 'to', this.data.accuracy);
|
||||
this.el.components['animation'].beginAnimation();
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user