Great series of short articles introducing Apple's Metal framework.
- 2022-04-01: Day 1: Devices
- 2022-04-02: Day 2: Buffers
- 2022-04-03: Day 3: Commands
- 2022-04-04: Day 4: MTKView
- 2022-04-05: Day 5: Shaders
- 2022-04-06: Day 6: Pipelines
| import RealityKit | |
| import SwiftUI | |
| struct BubbleRealityView: View { | |
| @State private var currentEntity: Entity? | |
| @State private var morphFactor: Float = 0.0 | |
| @State private var frameDuration: TimeInterval = 0.0 | |
| @State private var lastUpdateTime = CACurrentMediaTime() | |
| static let animationFrameDuration: TimeInterval = 1.0 / 120.0 |
Great series of short articles introducing Apple's Metal framework.
| [ | |
| // Move out of common paired characters () and [] with `Tab` | |
| { | |
| "keys": ["tab"], | |
| "command": "move", | |
| "args": {"by": "characters", "forward": true}, | |
| "context": [ | |
| // Check if next char matches (followed by anything) | |
| { "key": "following_text", "operator": "regex_match", "operand": "(:?`|\\)|\\]|\\}).*", "match_all": true }, | |
| // ...and that there is a paid character before it on the same |