Sample Projects and Use Cases > Use Case: 3D-Guided Service Instructions > 3D-Guided Service Instructions 201: Use JavaScript to Highlight Parts and Create Ionic Popups > Appendix 2: 3D Object-Related Vuforia Studio Events
  
Appendix 2: 3D Object-Related Vuforia Studio Events
Event Name
(evt.name)
Description
Arguments and Usage Notes
Example
modelLoaded
Triggered when a model is loaded (can be multiple times if an experience includes multiple models) as well as when a model's Resource property is updated.
arg1 is the model name (for example, model-1).
$scope.$on('modelLoaded', function(evt, arg) { $scope.view.wdg['label-1']['text'] = $scope.view.wdg['label-1']['text'] + " evt: " + evt.name + " arg: " + arg ;});
userpick
Triggered by users clicking on 3D objects in the experience (for example, model items, models, and 3D labels).
Arguments returned include: event (name), target (model-1, modelItem-1, or 3DImage-1, etc.), parent (null), edata (JSON object containing occurrence property value for model items as defined in the PVZ. For example, /0/0/18)
$scope.$on('userpick', function(event,target,parent,edata){ if (edata) { console.log('my console of userpick evt: '+ event.name + " target: " + target + " and parent:" + parent + " edata.occurence: " + JSON.parse(edata).occurrence); } });
click
Similar to userpick.
Event includes the widget’s Studio ID in tergetScope._widgetId. No args data returned.
$scope.$on('click', function(evt, arg) { $scope.view.wdg['debug-label']['text'] = " evt: " + evt.name + " event targetScope Widget ID: " + evt.targetScope._widgetId;});
trackingacquired
Triggered when a ThingMark, Spatial, or Model Target is acquired by Vuforia View.
arg1 for ThingMarks is the ThingMark ID (for example, 555:10), no arguments for other target types
$scope.$on('trackingacquired', function(evt, arg) { $scope.view.wdg['label-1']['text'] = "evt: " + evt.name + " arg: " + arg ;});
trackinglost
Triggered when a ThingMark, Spatial, or Model Target is lost Vuforia View.
See trackingacquired.
Same as trackingacquired except with event name of trackinglost.