-
Main Article (Author: Greg Turk)
-
Clarifications (Author: Andrew Kingdom)
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 { RectangleButton } from 'SpectaclesUIKit.lspkg/Scripts/Components/Button/RectangleButton'; | |
| import { SnapCloudRequirements } from './SnapCloudRequirements'; | |
| /** | |
| * VideoStreamingController - Live video streaming to Supabase Realtime for real-time viewing | |
| * Based on Remote ARsistance pattern - streams frames for live viewing, no storage | |
| * | |
| * KEY DIFFERENCE from VideoCaptureUploader: | |
| * - This STREAMS for live viewing (no file storage) | |
| * - VideoCaptureUploader UPLOADS for video composition (stores files) |
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 | |
| import ModelIO | |
| import simd | |
| nonisolated func loadMeshWithModelIO(from url: URL) throws -> TriangleMesh { | |
| let asset = MDLAsset(url: url) | |
| guard asset.count > 0 else { | |
| throw NSError(domain: "ModelIO", code: 1, userInfo: [NSLocalizedDescriptionKey: "No objects found in file"]) | |
| } |
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 | |
| struct BranchSegment { | |
| var startPosition: SIMD3<Float> | |
| var endPosition: SIMD3<Float> | |
| var radius: Float | |
| init(startPosition: SIMD3<Float>, endPosition: SIMD3<Float>, radius: Float) { | |
| self.startPosition = startPosition | |
| self.endPosition = endPosition |
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 MorphingSpherePlaneParams_h | |
| #define MorphingSpherePlaneParams_h | |
| struct MorphingSpherePlaneParams { | |
| int latitudeBands; | |
| int longitudeBands; | |
| float radius; | |
| float morphAmount; | |
| }; |
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 { | |
| withAlpha, | |
| withoutAlpha, | |
| } from "SpectaclesInteractionKit.lspkg/Utils/color"; | |
| /** | |
| * Enhanced 3D Line component with smooth spline interpolation | |
| * Creates a 3D tube by extruding a circular cross-section along a path defined by scene objects. | |
| */ | |
| @component |
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 { | |
| withAlpha, | |
| withoutAlpha, | |
| } from "SpectaclesInteractionKit.lspkg/Utils/color"; | |
| import InteractorLineRenderer, { | |
| VisualStyle, | |
| } from "SpectaclesInteractionKit.lspkg/Components/Interaction/InteractorLineVisual/InteractorLineRenderer"; | |
| /** | |
| * This class provides visual representation for a spline curve through a series of control points. |
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 required modules | |
| const WorldQueryModule = require("LensStudio:WorldQueryModule"); | |
| const EPSILON = 0.01; | |
| /** | |
| * DirectionalWorldQuery | |
| * | |
| * A utility that performs world queries in a direction defined by two scene objects. | |
| * It can then project rays from a third object in that same direction. |
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 Event from "SpectaclesInteractionKit/Utils/Event"; | |
| const HOST = "wss://[APP_NAME].herokuapp.com"; | |
| export class WebSocketConnection { | |
| private remoteServiceModule: RemoteServiceModule = require("LensStudio:RemoteServiceModule"); | |
| private webSocket: WebSocket; | |
| private onMessageEvent = new Event<WebSocketMessageEvent>(); | |
| public readonly onMessage = this.onMessageEvent.publicApi(); |
Coalton: Why is the interop not easier, and why might it be necessary for Coalton to be an entire language in itself?
If you came here searching for the context in which some reddit comments were written, you might want to check out this previous version of the article.
Several blog posts have been written about Coalton, about how it can be useful and what it brings to the table. However, to me, it hasn’t been clear why Coalton is the way to solve the problems that it does solve. Isn’t a simpler solution possible without making a full embedded language, and giving users the cognitive overhead of thinking about interop between normal lisp and coalton?
I have been thinking about this for a while as one of my pasttimes, and below I’ll summarize the better reasons why coalton might be the way it is. Perhaps, I couldn’t se
NewerOlder