import{__awaiter as t,__generator as r}from"tslib";import n from"../core/Instance";import{TIMESPAN_SOON as i}from"../core/Constant";import{Cartesian3 as e,Matrix4 as o}from"@msign/angularis";var s=function(){function s(t){this.t=t,this.i=t.o}return s.prototype.s=function(e,o,s,u){return void 0===u&&(u=i),t(this,void 0,void 0,(function(){var t,i,c,a,f;return r(this,(function(r){switch(r.label){case 0:return t=this.i,i=t.position,c=t.direction,a=t.u,[4,n.h()];case 1:return f=r.m(),[4,Promise.all([f.v(i,e,u),o&&f.v(c,o,u),s&&f.v(a,s,u)])];case 2:return r.m(),[2]}}))}))},s.prototype.p=function(t,r){var n=o.l(t);return o.M(n,r,new e)},s.prototype.g=function(){return t(this,void 0,void 0,(function(){var t,i,e,o,s,u;return r(this,(function(r){switch(r.label){case 0:return t=this.i,i=t.position,e=i.clone(),[],[4,n.h()];case 1:o=r.m(),s=0,r.label=2;case 2:return s<5?((u=e.clone()).x+=Math.random()>.5?.2:-.2,u.y+=Math.random()>.5?.2:-.2,u.z+=Math.random()>.5?.2:-.2,[4,o.v(i,u,100)]):[3,5];case 3:r.m(),r.label=4;case 4:return s++,[3,2];case 5:return[4,o.v(i,e,100)];case 6:return r.m(),[2]}}))}))},s}();export default s;