Skip to content

Instantly share code, notes, and snippets.

@eurobob
eurobob / thirty-days-of-metal.md
Created December 27, 2024 03:03 — forked from ole/thirty-days-of-metal.md
Warren Moore – Thirty Days of Metal
var body: some View {
RealityView { content in
// Create the sphere entity
guard let gooey = try? await Entity(named: "Gooey", in: realityKitContentBundle) else {
fatalError("Cannot load model")
}
if let sphere = gooey.findEntity(named: "Sphere") {
if let modelComponent = sphere.components[ModelComponent.self] {
let materials = modelComponent.materials
@eurobob
eurobob / GooeySphereTest.swift
Created December 2, 2024 13:47
Basic reality kit volume with draggable sphere
//
// ContentView.swift
// SphereTest
//
//
import SwiftUI
import RealityKit
struct ContentView: View {
@eurobob
eurobob / morsecode.js
Last active June 5, 2020 15:38
Morse code binary tree
/**
* Simple morse code translation up to 3 levels deep with uncertainty allowance
*
* @example
* // returns [ 'K', 'O' ]
* node morsecode.js '-?-'
*
* @param {String} input Morse code string containing '-', '.' and '?' characters
* @returns {String[]} Array of possible value outcomes
*