|
|
이 기능은 모델에만 사용할 수 있으며 영역 대상, 이미지 대상 및 3D 이미지는 지원되지 않습니다.
|
{
"position": [
100.987,
-200.654,
300.321
],
"normal": [
0.6,
-0.8,
0.0
]
}
{
"position": [],
"normal": []
}
|
|
• userpick 이벤트는 월드 좌표에만 사용할 수 있으며 상대 좌표에는 사용할 수 없습니다.
• userpick 이벤트는 모델에 대해서만 전송됩니다.
|
$scope.$on('userpick', function (event, targetName, targetType, eventData) {
// event data will be empty for 3D images
//
if (eventData == []) {
console.error('Pick on unsupported object: No event data')
return
}
// the pick event gives us the item id, position and normal
//
let position = JSON.parse(eventData).position
// geometric information will not be available
// for unsupported objects
if (position.length != 3) {
console.error('Pick on unsupported object: No position data')
return
}
// put a "ball" at the point the user just touched
//
$scope.setWidgetProp("ball", "x", position[0]);
$scope.setWidgetProp("ball", "y", position[1]);
$scope.setWidgetProp("ball", "z", position[2]);
})