I am new to programming with Leap motion and I have a specific question about my code:
Leap.loop(function(obj) {
var hands = obj.hands.map(function(d) {
return {
id: d.id,
length: d.length,
palmPositionX: d.palmPosition[0],
palmPositionY: d.palmPosition[1],
palmPositionZ: d.palmPosition[2]
}
});
console.log(hands.length); //Output is correct
console log(hands.id); //Why is this undefined?
//handParcoords.data(hands).render(); //This line successfully renders a chart using all parameters
});
Could someone please help me understand why the length property works, but id, palmPositionX, and palmPositionY do not?