Skip to content

Instantly share code, notes, and snippets.

View elkraneo's full-sized avatar
🌍

Cristian Díaz elkraneo

🌍
View GitHub Profile
@ynagatomo
ynagatomo / RealityRendererTest.swift
Last active March 2, 2024 07:32 — 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 April 15, 2024 12:02
List Swift compiler upcoming and experimental feature flags. (Note: the second script below, swift-list-features.sh, is probably the more useful one of the two. Unfortunately, I can't reorder them.)
#!/bin/zsh
# Test if the Swift compiler knows about a particular language feature.
#
# Usage:
#
# swift-has-feature [--swift SWIFT_PATH] FEATURE
#
# The exit code signals success (= the compiler knows this feature) or failure.
#
@drewolbrich
drewolbrich / ScaledVolumeContentView.swift
Last active March 20, 2024 22:22
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
@drewolbrich
drewolbrich / Entity+Opacity.swift
Last active April 5, 2024 13:58
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 13, 2023 11:08
Apple IDS payload keys
c: command
cc: commandContext
v: version
P: payload
N: bulkedPayload
fP: fanoutPayload
aP: additionalPayload
Pm: payloadMetadata
i: messageId
U: messageUUID
@keturn
keturn / SDXL_Prompt_Styles.txt
Last active March 9, 2024 23:33
SDXL styles - Credit for the prompts goes to MechanicalReproductions & sedetweiler.com - https://discord.com/channels/1002292111942635562/1089974139927920741/1130958251962417304
Style: Enhance
Positive: breathtaking {prompt} . award-winning, professional, highly detailed
Negative: ugly, deformed, noisy, blurry, distorted, grainy
Style: Anime
Positive: anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed
Negative: photo, deformed, black and white, realism, disfigured, low contrast
Style: Photographic
Positive: cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed
@arthurschiller
arthurschiller / rk_wireframeMaterial.metal
Created March 8, 2023 20:51
RealityKit Wireframe Shader (Custom Material)
#include <metal_stdlib>
#include <RealityKit/RealityKit.h>
// Godot Source Credits: https://godotshaders.com/shader/wireframe-shader-godot-4-0/
// https://catlikecoding.com/unity/tutorials/advanced-rendering/flat-and-wireframe-shading/
using namespace metal;
constant half3 albedo = half3(1.0);
constant half3 wireColor = half3(255. / 255, 213. / 255, 6. / 255);
import Foundation
public enum Platform {
case iOS
case iOSOnMac
case mac
}
public func execute(if condition: Bool, _ action: () -> Void) {
if condition {
@mi5ty
mi5ty / tananodes_cheatsheet.md
Last active December 31, 2023 01:02
Tana Cheat Sheet

%%tana%%

  • Cheat Sheet
    • ✨ Tana Expressions
      • Title #tana-expression
        • Description:: A title expression composes values from the node into a title.
        • Attributes:: Search for Tana "Title" Attributes
      • Search #tana-expression
        • Description:: The search expression consists of a flat list of match-clauses that must be true for a node to match the search.
        • Attributes:: Search for Search Attributes + Search for Search Field Values
  • 🧩 Tana Attributes
@ynagatomo
ynagatomo / RealityDump.swift
Last active February 20, 2024 15:15
A simple dump function to show the RealityKit Entity, ModelEntity, and AnchorEntity object.
// RealityDump.swift
// Created by Yasuhito NAGATOMO on 2022/02/22.
import Foundation
import RealityKit
#if DEBUG
// swiftlint:disable line_length
private let keywords = [ // (string, indentLevel [1...])