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
viewthe HKHuman object for this event
shareImagea 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
viewthe HKHuman object for this event
shareURLa 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
viewthe HKHuman object for this event
initScenethe 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
viewthe HKHuman object for this event
modelLoadErrorthe 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
viewthe HKHuman object for this event
modelLoadedthe 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
viewthe HKHuman object for this event
annotationPickedthe 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
viewthe HKHuman object for this event
timelineUpdatedthe 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
viewthe HKHuman object for this event
animationCompletealways 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
viewthe HKHuman object for this event
objectIdthe ID of the selected object
positionthe 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
viewthe HKHuman object for this event
objectIdthe 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
viewthe HKHuman object for this event
objectIdthe 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
viewthe HKHuman object for this event
chapterIdthe 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
viewthe HKHuman object for this event
xrayEnabledBoolean 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
viewthe HKHuman object for this event
sceneRestoredalways true
-
Callback when visibility of scene objects has changed
Since
SDK 2.0Declaration
Swift
@objc optional func human(_ view: HKHuman, objectsShown: [String : Bool])Parameters
viewthe HKHuman object for this event
objectsShowna 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
viewthe HKHuman object for this event
annotationsShowna 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
viewthe HKHuman object for this event
annotationCreatedthe 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
viewthe HKHuman object for this event
annotationDestroyedthe 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
viewthe HKHuman object for this event
annotationUpdatedthe updated HKAnnotation object
-
Callback when a screenshot has been generated
Declaration
Swift
@objc optional func screenshot(image: UIImage)Parameters
imagethe 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
chapterIdthe ID of the chapter, for lookup in the chapters map
viewthe 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
objectIdthe ID of the deselected object
viewthe 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
objectIdthe ID of the selected object
viewthe 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()
View on GitHub
HKHumanDelegate Protocol Reference