Looking to synchronize the position of a KineticJS object with Meteor.
The issue seems to be with:
Players.update({name: "Rect"}, {xpos: this.attrs.x})
The Meteor documentation states:
// Find the document with id "123", and completely replace it.
Users.update({_id: "123"}, {name: "Alice", friends: ["Bob"]});
I attempted to verify if the data was updating using:
console.log(Players.findOne({name: "Rect"}).xpos);
Check out the GitHub repository here:
https://github.com/randompast/randomtests/tree/master/meteorCanvasTest