Skip to content

Commit

Permalink
Updated DocC examples
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxfrazer committed Apr 12, 2023
1 parent ced786a commit 40ee7fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ FocusEntity lets you see exactly where the centre of the view will sit in the AR
```swift
let focusSquare = FocusEntity(on: <#ARView#>, focus: .classic)
```

## Topics

### FocusEntity

- ``FocusEntity/FocusEntity``
- ``FocusEntityComponent``
- ``HasFocusEntity``

### Events

Use the ``FocusEntityDelegate`` to catch events such as changing the plane anchor or otherwise a change of state.

- ``FocusEntityDelegate``
4 changes: 4 additions & 0 deletions Sources/FocusEntity/FocusEntity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ public extension HasFocusEntity {

public protocol FocusEntityDelegate: AnyObject {
/// Called when the FocusEntity is now in world space
/// *Deprecated*: use ``focusEntity(_:trackingUpdated:oldState:)-4wx6e`` instead.
@available(*, deprecated, message: "use focusEntity(_:trackingUpdated:oldState:) instead")
func toTrackingState()

/// Called when the FocusEntity is tracking the camera
/// *Deprecated*: use ``focusEntity(_:trackingUpdated:oldState:)-4wx6e`` instead.
@available(*, deprecated, message: "use focusEntity(_:trackingUpdated:oldState:) instead")
func toInitializingState()

/// When the tracking state of the FocusEntity updates. This will be called every update frame.
Expand Down

0 comments on commit 40ee7fe

Please sign in to comment.