Interface ARSKViewDelegate

    • Method Detail

      • viewDidAddNodeForAnchor

        default void viewDidAddNodeForAnchor​(ARSKView view,
                                             SKNode node,
                                             ARAnchor anchor)
        Called when a new node has been mapped to the given anchor.
        Parameters:
        view - The view that will render the scene.
        node - The node that maps to the anchor.
        anchor - The added anchor.
      • viewDidRemoveNodeForAnchor

        default void viewDidRemoveNodeForAnchor​(ARSKView view,
                                                SKNode node,
                                                ARAnchor anchor)
        Called when a mapped node has been removed from the scene graph for the given anchor.
        Parameters:
        view - The view that will render the scene.
        node - The node that was removed.
        anchor - The anchor that was removed.
      • viewDidUpdateNodeForAnchor

        default void viewDidUpdateNodeForAnchor​(ARSKView view,
                                                SKNode node,
                                                ARAnchor anchor)
        Called when a node has been updated with data from the given anchor.
        Parameters:
        view - The view that will render the scene.
        node - The node that was updated.
        anchor - The anchor that was updated.
      • viewNodeForAnchor

        default SKNode viewNodeForAnchor​(ARSKView view,
                                         ARAnchor anchor)
        Implement this to provide a custom node for the given anchor. This node will automatically be added to the scene graph. If this method is not implemented, a node will be automatically created. If nil is returned the anchor will be ignored.
        Parameters:
        view - The view that will render the scene.
        anchor - The added anchor.
        Returns:
        Node that will be mapped to the anchor or nil.
      • viewWillUpdateNodeForAnchor

        default void viewWillUpdateNodeForAnchor​(ARSKView view,
                                                 SKNode node,
                                                 ARAnchor anchor)
        Called when a node will be updated with data from the given anchor.
        Parameters:
        view - The view that will render the scene.
        node - The node that will be updated.
        anchor - The anchor that was updated.