I'm in the process of extracting a specific value from a Meteor collection document to incorporate it into a three.js setting. My goal is to generate a three.js object that makes use of information stored in the database, which remains constant at this point.
My current setup involves a three.js scene within Template.home.rendered. I've established a "Part" collection and granted access to all data on both the client and server sides. Within this collection, there exists a single data fixture (document) created using
Part.insert({ name: "myPart", val: 75 });
.
The objective is to retrieve the value stored in the "val" field as a variable in the three.js scene with a statement like
var size = Part.findOne(Part.val);
. Unfortunately, this variable yields an undefined result. The data has been successfully stored in the database and browser cache. What could be causing this issue?