-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a mesh example and add missing energy_bar_asset
- Loading branch information
Showing
9 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// SwiftMeshAnimation.swift | ||
// RiveExample | ||
// | ||
// Created by Zach Plata on 3/11/22. | ||
// Copyright © 2022 Rive. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import RiveRuntime | ||
|
||
struct SwiftMeshAnimation: View { | ||
let controller = RiveController(); | ||
@State var isTapped: Bool = false | ||
|
||
var body: some View { | ||
RiveViewSwift( | ||
resource: "prop_example", | ||
stateMachine: "State Machine 1", | ||
controller: controller | ||
).frame(height:200) | ||
.onTapGesture { | ||
isTapped = !isTapped | ||
try? self.controller.setBooleanState("State Machine 1", inputName: "Hover", value: isTapped) | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
RiveRuntime.xcodeproj/xcshareddata/xcschemes/RiveRuntime.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters