HKHumanDelegate
@objc
public protocol HKHumanDelegate
The optional delegate callback functions
-
Callback when the draw tool download button is pressed
Declaration
Swift
@objc optional func human(_ view: HKHuman, shareImage: UIImage)
Parameters
view
the HKHuman object for this event
shareImage
a png to share with the native UI
Since
SDK 2.1.0 -
Callback when a URL is shared from the viewer
Declaration
Swift
@objc optional func human(_ view: HKHuman, shareURL: String)
Parameters
view
the HKHuman object for this event
shareURL
a url to share with the native UI
Since
SDK 2.1.0 -
Callback when the scene metadata is accessible
Declaration
Swift
@objc optional func human(_ view: HKHuman, initScene: String)
Parameters
view
the HKHuman object for this event
initScene
the title of the loaded scene
Since
SDK 2.0 -
Callback when a loading error has occurred
Declaration
Swift
@objc optional func human(_ view: HKHuman, modelLoadError: String)
Parameters
view
the HKHuman object for this event
modelLoadError
the title of the loaded scene
Since
SDK 2.0.5 -
Callback when the scene has completed loading
Declaration
Swift
@objc optional func human(_ view: HKHuman, modelLoaded: String)
Parameters
view
the HKHuman object for this event
modelLoaded
the title of the loaded scene
Since
SDK 2.0.1 -
Callback when a scene annotation is picked by the user
Declaration
Swift
@objc optional func human(_ view: HKHuman, annotationPicked: String)
Parameters
view
the HKHuman object for this event
annotationPicked
the ID of the picked annotation
Since
SDK 2.0.1 -
Callback when the current animation has updated
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, timelineUpdated: HKTimeline)
Parameters
view
the HKHuman object for this event
timelineUpdated
the updated timeline object
-
Callback when the current animation is finished playing
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, animationComplete: Bool)
Parameters
view
the HKHuman object for this event
animationComplete
always true
-
Callback when an object has been picked by the user
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, objectPicked: String, position: [Double])
Parameters
view
the HKHuman object for this event
objectId
the ID of the selected object
position
the world position (x,y,z) of the selected object
-
Callback when an object has been selected
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, objectSelected: String)
Parameters
view
the HKHuman object for this event
objectId
the ID of the selected object
-
Callback when an object has been deselected
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, objectDeselected: String)
Parameters
view
the HKHuman object for this event
objectId
the ID of the selected object
-
Callback when a chapter has been loaded
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, chapterTransition: String)
Parameters
view
the HKHuman object for this event
chapterId
the ID of the chapter, for lookup in the chapters map
-
Callback when a xray mode is enabled or disabled
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, xrayEnabled: Bool)
Parameters
view
the HKHuman object for this event
xrayEnabled
Boolean indicating true for xray enabled or false for xray disabled
-
Callback when a call to scene.restore() has completed successfully
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, sceneRestored: Bool)
Parameters
view
the HKHuman object for this event
sceneRestored
always true
-
Callback when visibility of scene objects has changed
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, objectsShown: [String : Bool])
Parameters
view
the HKHuman object for this event
objectsShown
a dictionary of object IDs and a boolean to indicate if the object is shown (true) or hidden (false)
-
Callback when visibility of scene annotations has changed
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, annotationsShown: Bool)
Parameters
view
the HKHuman object for this event
annotationsShown
a boolean to indicate if the annotations are shown (true) or hidden (false)
-
Callback when an annotation has been created
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, annotationCreated: String)
Parameters
view
the HKHuman object for this event
annotationCreated
the ID of the annotation
-
Callback when an annotation has been destroyed
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, annotationDestroyed: String)
Parameters
view
the HKHuman object for this event
annotationDestroyed
the ID of the annotation
-
Callback when an annotation has moved on the screen
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, annotationUpdated: HKAnnotation)
Parameters
view
the HKHuman object for this event
annotationUpdated
the updated HKAnnotation object
-
Callback when a screenshot has been generated
Declaration
Swift
@objc optional func screenshot(image: UIImage)
Parameters
image
the UIImage screenshot
-
Callback when the scene metadata is accessible
Deprecated in SDK 2.0
Declaration
Swift
@available(*, deprecated, message: "Please use human(_:initScene:﹚") @objc optional func onInitMessage()
-
Callback when a chapter has been loaded Deprecated in SDK 2.0
Declaration
Swift
@available(*, deprecated, message: "Please use human(_:chapterTransition:﹚") @objc optional func onChapterTransition(chapterId: String, view: HKHuman)
Parameters
chapterId
the ID of the chapter, for lookup in the chapters map
view
the HKHuman object in which the transition occurred
-
Callback when an object has been deselected Deprecated in SDK 2.0
Declaration
Swift
@available(*, deprecated, message: "Please use human(_:objectDeselected:﹚") @objc optional func onObjectDeselected(objectId: String, view: HKHuman)
Parameters
objectId
the ID of the deselected object
view
the HKHuman object in which the object was selected
-
Callback when an object has been selected Deprecated in SDK 2.0
Declaration
Swift
@available(*, deprecated, message: "Please use human(_:objectSelected:﹚") @objc optional func onObjectSelected(objectId: String, view: HKHuman)
Parameters
objectId
the ID of the selected object
view
the HKHuman object in which the object was selected
-
Callback when the current animation is finished playing Deprecated in SDK 2.0
Declaration
Swift
@available(*, deprecated, message: "Please use human(_:animationComplete:﹚") @objc optional func onAnimationComplete()