From 40ee7fea5ae4413ecb2d519d58619c03cc8b9457 Mon Sep 17 00:00:00 2001 From: Max Cobb Date: Wed, 12 Apr 2023 18:55:23 +0100 Subject: [PATCH] Updated DocC examples --- Package.swift | 2 +- .../FocusEntity.md | 14 ++++++++++++++ Sources/FocusEntity/FocusEntity.swift | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) rename Sources/FocusEntity/{Documentation.docc => FocusEntity.docc}/FocusEntity.md (51%) diff --git a/Package.swift b/Package.swift index 74b78ed..2dce80e 100644 --- a/Package.swift +++ b/Package.swift @@ -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 diff --git a/Sources/FocusEntity/Documentation.docc/FocusEntity.md b/Sources/FocusEntity/FocusEntity.docc/FocusEntity.md similarity index 51% rename from Sources/FocusEntity/Documentation.docc/FocusEntity.md rename to Sources/FocusEntity/FocusEntity.docc/FocusEntity.md index b289f9e..0c8dc8a 100644 --- a/Sources/FocusEntity/Documentation.docc/FocusEntity.md +++ b/Sources/FocusEntity/FocusEntity.docc/FocusEntity.md @@ -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`` diff --git a/Sources/FocusEntity/FocusEntity.swift b/Sources/FocusEntity/FocusEntity.swift index 22d29fb..6b3254c 100644 --- a/Sources/FocusEntity/FocusEntity.swift +++ b/Sources/FocusEntity/FocusEntity.swift @@ -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.