This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
import SwiftUI | |
import RealityKit | |
#Preview { LightBeamSynthView() } | |
struct LightBeamSynthView: View { | |
@Environment(\.physicalMetrics) var physicalMetrics | |
@State var outerCylinderEntity: Entity? | |
@State var innerCylinderEntity: Entity? | |
@State var touchEntity: Entity? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MarchingCubesParams_h | |
#define MarchingCubesParams_h | |
#include <simd/simd.h> | |
struct MarchingCubesParams { | |
simd_uint3 cells; | |
simd_float3 origin; | |
simd_float3 cellSize; | |
float isoLevel; | |
simd_float3 centerA; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RealityKit | |
public struct AnimatingTorusSystem: System { | |
public init(scene: RealityKit.Scene) {} | |
public func update(context: SceneUpdateContext) { | |
let entities = context.entities(matching: Self.query, | |
updatingSystemWhen: .rendering) | |
for torus in entities.compactMap({ $0 as? LoopingTorusEntity }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MarchingCubesBlobParams_h | |
#define MarchingCubesBlobParams_h | |
#include <simd/simd.h> | |
typedef struct { | |
simd_float3 center; | |
float radius; | |
} Sphere; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MarchingCubesColorBlobParams_h | |
#define MarchingCubesColorBlobParams_h | |
#include <simd/simd.h> | |
typedef struct { | |
simd_float3 center; | |
float radius; | |
simd_float3 color; | |
float _pad; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
enum EasingCurve { | |
case linear | |
case easeIn(Float) | |
case easeOut(Float) | |
case easeInOut(Float) | |
func apply(_ t: Float) -> Float { | |
let t = max(0, min(1, t)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT ja | |
{ | |
"settings": { | |
"analysis": { | |
// 1. custom character filters... | |
"char_filter": { | |
// 1-1. icu_normalizer nfkc: This handles the variation of full-width and half-width characters | |
"ja_normalize": { | |
"type": "icu_normalizer", | |
"name": "nfkc", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################### | |
#### Query #### | |
extend type Query { | |
#### Apple Music #### | |
# Storefronts | |
appleMusicStorefronts( | |
input: AppleMusicStorefrontsInput! | |
): AppleMusicStorefrontResponse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
ZStack { | |
ScrollView { | |
VStack(alignment: .leading) { | |
ForEach(1...10, id: \.self) { index in | |
VStack(alignment: .leading) { |
NewerOlder