In your material I tend to get the impression that your JavaScript is fine with ‘number’ for all data-types while dividing. So why does this fail then?
EventReceiver.attributes.add('perfHast_tester',{ type: 'number', default: 0});
EventReceiver.attributes.add('perfHT_count',{ type: 'number', default: 0});
EventReceiver.attributes.add('perf_AnimRes',{ type: 'number', default: 0});
EventReceiver.prototype.update = function(dt) {
//perfHast_tester
console.log('dt: '+dt + 'htcnt'+this.perfHT_count);
if(this.perfHT_count<100){ this.perfHT_count++;
this.perfHast_tester+=dt;
}
if(this.perfHT_count===99){console.log('perf_teshst: '+this.perfHast_tester+ ' animCurrTime: ' +this.entity.animation.currentTime);
this.perfHast_tester/=99; this.perf_AnimRes/=0.0166; console.log('perf_AnimRes1111: '+this.perf_AnimRes);
}
};
the output for ‘this.perf_AnimRes’ always give me ‘0’ no matter the debugging