Skip to content

Instantly share code, notes, and snippets.

View AchrafKassioui's full-sized avatar

Achraf Kassioui AchrafKassioui

View GitHub Profile
@overlair
overlair / Coordinate-Conversion.swift
Last active October 31, 2023 00:49
SpriteKit-Coordinate-Conversion
import SpriteKit
import SwiftUI
import Combine
enum ControlUpdate {
case tap(UITapGestureRecognizer) // print SpriteKit coordinate
case doubleTap // reset camera
case pan(UIPanGestureRecognizer) // move camera
@arthurschiller
arthurschiller / RealityRendererTest.swift
Last active January 21, 2026 22:32
RealityRenderer Test (visionOS)
//
// RealityRendererView.swift
// RealityRendererTest
//
// Created by Arthur Schiller on 11.01.24.
//
import SwiftUI
import Metal
import MetalKit
@emin-grbo
emin-grbo / decodeOrReport.swift
Created February 13, 2024 10:39
DecodeOrReport
// Used to detect specific issue with JSON decoding
func decodeOrReport(data: Data) {
do {
let _ = try JSONDecoder().decode(WidgetResponse.self, from: data)
print("\n\n👍ALL GOOD\n\n")
} catch DecodingError.keyNotFound( let key, let context) {
print("\n\n⛔️FAILED TO DECODE\n\n")
print("could not find key \(key) in JSON: \(context.debugDescription)")
} catch DecodingError.valueNotFound( let type, let context) {
print("\n\n⛔️FAILED TO DECODE\n\n")
@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
@rsms
rsms / macos-distribution.md
Last active January 7, 2026 17:16
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@arthurschiller
arthurschiller / realitview_scene+subscriptions.swift
Created August 4, 2024 11:23
RealityView Example for accessing scene and subscribing to events
import SwiftUI
import RealityKit
import Combine
struct ContentView: View {
@Environment(\.realityKitScene) var scene: RealityKit.Scene?
@State private var didAddEntitySubscription: Cancellable?