Skip to content

Commit 06e0e80

Browse files
authored
Merge pull request #7 from maxxfrazer/add-docs
Docs Deploy
2 parents 512fe6a + 2c70f06 commit 06e0e80

File tree

6 files changed

+47
-24
lines changed

6 files changed

+47
-24
lines changed

.github/workflows/build-docc.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy DocC
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
jobs:
11+
build_docs:
12+
runs-on: macos-12
13+
steps:
14+
- name: Checkout 🛎️
15+
uses: actions/checkout@v3
16+
17+
- name: Build DocC
18+
run: |
19+
swift package resolve;
20+
xcodebuild docbuild -scheme RealityUI -derivedDataPath /tmp/docbuild -destination 'generic/platform=iOS';
21+
$(xcrun --find docc) process-archive \
22+
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/RealityUI.doccarchive \
23+
--hosting-base-path RealityUI \
24+
--output-path docs;
25+
- name: Deploy to GitHub Pages
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./docs

.github/workflows/swift-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- "main"
7+
tags:
8+
- '*'
79
pull_request:
810
branches:
911
- "*"
@@ -12,7 +14,9 @@ jobs:
1214
build:
1315
runs-on: macOS-latest
1416
steps:
15-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v3
18+
- name: Swift Lint
19+
run: swiftlint --strict
1620
- name: Build Package
1721
run: |
1822
swift package generate-xcodeproj

.github/workflows/swift-lint.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.spi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- platform: ios
5+
documentation_targets: [RealityUI]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The User Interface controls in this repository so far are made to be familiar to
3232
- [Text](#text)
3333
- [More](#more)
3434
- [RealityUI Wiki](https://github.com/maxxfrazer/RealityUI/wiki)
35-
- [Documentation](https://maxxfrazer.github.io/RealityUI/)
35+
- [Documentation](https://maxxfrazer.github.io/RealityUI/documentation/realityui/)
3636
- [Example Project](https://github.com/maxxfrazer/RealityUI/tree/main/RealityUI%2BExamples)
3737

3838
## Installation
@@ -117,7 +117,7 @@ Unlock the ability to rotate a RealityKit entity with just one finger.
117117

118118
Create an object in your RealityKit scene with an action, and it will automatically be picked up whenever the user taps on it!
119119

120-
No Gif for this one, but check out [RealityUI Gestures wiki](https://github.com/maxxfrazer/RealityUI/wiki/Gestures#tap) to see how to add [HasClick](https://maxxfrazer.github.io/RealityUI/Protocols/HasClick.html) to an entity in your application.
120+
No Gif for this one, but check out [RealityUI Gestures wiki](https://github.com/maxxfrazer/RealityUI/wiki/Gestures#tap) to see how to add [HasClick](https://maxxfrazer.github.io/RealityUI/documentation/realityui/HasClick.html) to an entity in your application.
121121

122122
---
123123
## Animations
@@ -152,6 +152,6 @@ With RUIText you can easily create an Entity with the specified text placed with
152152
---
153153
## More
154154

155-
More information on everything provided in this Swift Package in the [GitHub Wiki](https://github.com/maxxfrazer/RealityUI/wiki), and also the [documentation](https://maxxfrazer.github.io/RealityUI/).
155+
More information on everything provided in this Swift Package in the [GitHub Wiki](https://github.com/maxxfrazer/RealityUI/wiki), and also the [documentation](https://maxxfrazer.github.io/RealityUI/documentation/realityui/).
156156

157157
Also see the [Example Project](https://github.com/maxxfrazer/RealityUI/tree/main/RealityUI%2BExamples) for iOS in this repository.

Sources/RealityUI/RUIButton.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ public class RUIButton: Entity, HasButton, HasModel, HasPhysics {
4444

4545
public func arTouchUpdated(_ worldCoordinate: SIMD3<Float>, hasCollided: Bool) {
4646
if hasCollided != self.isCompressed {
47-
hasCollided ? self.compressButton() : self.releaseButton()
47+
if hasCollided {
48+
self.compressButton()
49+
} else {
50+
self.releaseButton()
51+
}
4852
}
4953
}
5054

0 commit comments

Comments
 (0)