Lens.Central handles communication with this devices Lens Central server.
Static Properties
-
Lens.Central.user ARCore/central.js, line 168
-
Returns the current user record. A reactive data source.
-
Lens.Central.userId ARCore/central.js, line 174
-
Returns the current user ID. A reactive data source.
Static Methods
-
Lens.Central.connect(url) ARCore/central.js, line 119
-
Connects to a new Lens Central server (disconnecting from the previous one, if there is one). You don't typically need to call this; Lens will automatically connect to the Lens Central server set in the configuration variable
lens.central_url
Argument Type Description url
String The URL of the server, e.g. "localhost:3434" or "central.mycompany.com"
-
Lens.Central.connection() ARCore/central.js, line 231
-
Returns the connection to the Lens Central server. See Meteor's documentation on DDP.connect for documentation on connection options.
-
Lens.Central.db() → {Lens.DB} ARCore/central.js, line 220
-
Returns a database connected to the Central server.
-
Lens.Central.logEvent(event, opts) ARCore/central.js, line 195
-
Logs an event to the Lens Central server.
Argument Type Attributes Description event
String Name of the event.
opts
Object <optional>
Properties
Argument Type Attributes Description data
Any <optional>
Arbitrary data to associate with the event. Must be JSON-serializable.
group
String <optional>
Which group this event belongs to.
-
Lens.Central.login(opts, callback) ARCore/central.js, line 140
-
Logs the user into the Lens Central server.
Argument Type Attributes Description opts
Object <optional>
Properties
Argument Type Attributes Description username
String <optional>
The user's username. Defaults to "guest".
password
String <optional>
The user's password. Defaults to the empty string.
callback
function <optional>
Function to call when the log in is done.
-
Lens.Central.logout(callback) ARCore/central.js, line 159
-
Logs the user out of the Lens Central server.
Argument Type Attributes Description callback
function <optional>
Function to call when the log out is done.
-
Lens.Central.StateTracker(group) ARCore/central.js, line 183
-
Returns a
StateTracker
. Users can have multiple states at the same time by creating multiple StateTrackers.Argument Type Description group
String Which group the states will belong to.