HanSolo / SteelSeries-Canvas

The HTML5 Canvas port of the SteelSeries component library. Mainly contains gauges.
120 stars 76 forks source link

Question About Steel Canvas #33

Closed MaxESP closed 3 years ago

MaxESP commented 3 years ago

Dear Sir,

I am a beginer android developper and i have devellope some apk for my personnal use . I have a question about your very good Canvas library is it free of use for publish an apk on my console google play.

best regards

M khales naim

HanSolo commented 3 years ago

Yep it's free to use...enjoy

MaxESP commented 3 years ago

Thank you very much HanSolo I appreciate

MaxESP commented 3 years ago

hello sir ,

Thanks again for your canvas i have a question about speed up your canvas lib . i explain i have set horizon by serial i working but i want the canvas to be faster to respond better to the data coming

parser.on('data', function(data) {

 var newValue = data;

  var str = newValue;

var fields = str.split(/:/); var rolls = fields[0]; var pitchs = fields[1]; // var temps = fields[2]; // var boussoles = fields[3];

 roll     = parseInt(rolls);
 pitch    = parseInt(pitchs);
 // temp     = parseInt(temps);
 // boussole = parseInt(boussoles);

io.emit('roll', roll);
io.emit('pitch', pitch);
// io.emit('temp', temp);
// io.emit('boussole', boussole);

}); server.listen(3000); // Listen

mcrossley commented 3 years ago

The Horizon gauge has a fixed animation duration of 1 second. At present you would have to manually change the steelseries.js file to alter this.

For roll it is at line 8658... tweenRoll = new Tween({}, '', Tween.regularEaseInOut, roll, newRoll, 1);

Change the "1" (second) to whatever you want, same for the pitch at line 8717... tweenPitch = new Tween({}, '', Tween.regularEaseInOut, pitch, newPitch, 1);