Skip to content

Instantly share code, notes, and snippets.

View elkraneo's full-sized avatar
🪐

Cristian Díaz elkraneo

🪐
View GitHub Profile
@IvanCampos
IvanCampos / AGENTS.md
Last active January 2, 2026 22:49
codex-cli files for ~/.codex

AGENTS.md — VisionOS Swift + RealityKit Agent Guide

Role & Persona

You are a senior Swift + RealityKit engineer building production‑quality visionOS apps for Apple Vision Pro. Output only what is requested in Deliverables, nothing else.

Project Context

  • Platform: visionOS 26
  • Language: Swift (SwiftUI + RealityKit)
  • Device: Apple Vision Pro on macOS (Xcode toolchain)
@Matt54
Matt54 / BurnFadeModelView.swift
Last active July 16, 2025 20:47
Burn Fade Animation for USDZ Models in RealityKit using LowLevelMesh, ShaderGraphMaterial & Metal Compute Shader
import Metal
import RealityKit
import SwiftUI
struct BurnFadeModelView: View {
@State var lowLevelMesh: LowLevelMesh?
@State var timer: Timer?
@State var isForward: Bool = true
@State var morphProgress: Float = 0.0
@State var dwellCounter: Int = 0
@Matt54
Matt54 / SpotLightsShadowGridSphereView.swift
Created July 26, 2024 11:20
RealityView with 6 shadow casting SpotLights beaming through a sphere with many holes inside of an extruded shape box
import RealityKit
import SwiftUI
struct SpotLightsShadowGridSphereView: View {
@State private var rootEntity: Entity?
@State private var timer: Timer?
@State private var rotationAngles: SIMD3<Float> = [0, 0, 0]
@State private var lastRotationUpdateTime = CACurrentMediaTime()
var body: some View {
@lukeredpath
lukeredpath / Converting a TCA App to Swift 6.md
Last active January 5, 2026 17:34
Converting a TCA app to Swift 6

I maintain the Community mobile app - a moderately large codebase that is fully modularized using Swift Package Manager and uses The Composable Architecture. I have recently completed the process of getting the project ready for Xcode 16 and Swift 6 and I wanted to outline the approach I took and some of the issues I encountered, especially regarding TCA.

The Approach

There are already [good

@ynagatomo
ynagatomo / RealityRendererTest.swift
Last active January 25, 2026 00:19 — forked from arthurschiller/RealityRendererTest.swift
RealityRenderer Test (visionOS)
//
// RealityRendererView.swift
// RealityRendererTest
//
// Created by Arthur Schiller on 11.01.24.
//
// Change Log: by Yasuhito Nagatomo
// - Added ImageBasedLighting, Mar 2, 2024
// - Added Camera a rotation animation, Mar 2, 2024
@ole
ole / swift-has-feature.sh
Last active January 25, 2026 01:23
swift-list-features: List Swift compiler upcoming and experimental feature flags. If you're using Swift 6.2 or later, `swift -print-supported-features` does something very similar, but only for the compiler version you have installed. · swift-has-feature: Check if a given compiler knows a specific feature flag, and whether it's an upcoming or ex…
#!/bin/zsh
# Test if the Swift compiler knows about a particular language feature.
#
# Usage:
#
# swift-has-feature [--swift SWIFT_PATH] [--language-version LANGUAGE_VERSION] FEATURE
#
# The feature should be an upcoming or experimental language feature,
# such as `"StrictConcurrency"` or `"ExistentialAny"`.
@drewolbrich
drewolbrich / ScaledVolumeContentView.swift
Last active April 1, 2025 23:56
An example of how to make visionOS volumes work correctly with Settings > Display > Appearance > Window Zoom
//
// ScaledVolumeContentView.swift
// VolumeScaleExample
//
// Created by Drew Olbrich on 11/6/23.
// Copyright © 2023 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
@arthurschiller
arthurschiller / RealityKit_CustomBindTargetAnimation.swift
Last active December 23, 2025 01:28
RealityKit visionOS – Animate Custom Bind Target Parameters 🏃‍♀️
import SwiftUI
import RealityKit
struct AnimationDemoView: View {
@Environment(\.realityKitScene) var scene: RealityKit.Scene?
init() {
// register System and Component – Important!
AnimationSystem.registerSystem()
AnimationComponent.registerComponent()
@drewolbrich
drewolbrich / Entity+Opacity.swift
Last active March 6, 2025 03:09
An Entity extension that supports animated changes the opacity of an entity and its descendants
//
// Entity+Opacity.swift
//
// Created by Drew Olbrich on 10/25/23.
// Copyright © 2023 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@nicolas17
nicolas17 / gist:559bec0d8e636f93f62cca844ee94ada
Last active December 16, 2025 02:38
Apple IDS payload keys
c: command
cc: commandContext
v: version
P: payload
N: bulkedPayload
fP: fanoutPayload
aP: additionalPayload
Pm: payloadMetadata
i: messageId
U: messageUUID