From e2fb5c268a6e7f11cdf84601d0367a8bf913fb59 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Sat, 26 Sep 2026 23:08:09 -0700 Subject: [PATCH] oskiewar web: the scene has a depth buffer The web shell never offered `triangle3d`, so the game's faces lost their z and Canvas2D painted them in submission order: figures interpenetrated, the park deck painted over the road, and every depth lane the game sets (HUD, inset, wheel bias) meant nothing on the web. The page now runs the WebGL 2 scene (`scene3d-webgl.mjs`, benched 09-14, unused until now) as its `triangle3d` provider, with the console's frame order: the 2D canvas is the CPU layer underneath (wipe, box, line, block text), the depth-tested scene sits over it, and text draws on a third canvas above the scene the way D2D text follows the GPU pass. `?renderer=canvas` keeps the old path. The scene module gains an allocation-free twelve-argument `triangle3d` with the shared (z + 1.5) / 3 depth map and a buffer that doubles instead of dropping faces. Flat shading is the reference look, so the scene path draws flat; the photo materials stay with the Canvas2D path. Every fixed module list learns the two scene modules: the social burner's server, the marketing shell, the blackbox runner, the preview deploy and the iOS offline bundle. Social preview reburned; suite 167/198 (one fixed, none new). --- .../Oskiewar.xcodeproj/project.pbxproj | 8 ++ apple/oskiewar/Sources/OskiewarApp.swift | 2 + apple/oskiewar/project.yml | 4 + xbox/live/mac-test.html | 96 +++++++++++++++--- xbox/live/marketing/deploy-preview.sh | 2 + xbox/live/marketing/shell.mjs | 2 +- xbox/live/render-social-preview.mjs | 3 +- xbox/live/scene3d-webgl.mjs | 55 ++++++++++ xbox/live/social/manifest.json | 2 +- xbox/live/social/oskiewar-title.jpg | Bin 78677 -> 82926 bytes xbox/live/social/oskiewar-title.mp4 | Bin 129678 -> 131586 bytes xbox/live/tests/blackbox-rounds.mjs | 2 + 12 files changed, 161 insertions(+), 15 deletions(-) diff --git a/apple/oskiewar/Oskiewar.xcodeproj/project.pbxproj b/apple/oskiewar/Oskiewar.xcodeproj/project.pbxproj index 3a3a887b58..e131f6fc66 100644 --- a/apple/oskiewar/Oskiewar.xcodeproj/project.pbxproj +++ b/apple/oskiewar/Oskiewar.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 1B43BAF5E41E93E3D9208197 /* product-analytics.mjs in Resources */ = {isa = PBXBuildFile; fileRef = A5CDAFE515D4323680797051 /* product-analytics.mjs */; }; + 1BB115B2B2EC50D3FFBD88D4 /* scene3d-webgl.mjs in Resources */ = {isa = PBXBuildFile; fileRef = BF7515E8A95A1944C5424BD3 /* scene3d-webgl.mjs */; }; 21F3367D32F88CB3B2A52859 /* oskiewar-sfx.mjs in Resources */ = {isa = PBXBuildFile; fileRef = 2E725A92F239CBD5114A9A1E /* oskiewar-sfx.mjs */; }; 359F92BBF72AEE001B8BFD71 /* oskiewar-analytics.mjs in Resources */ = {isa = PBXBuildFile; fileRef = A0AEFE9FB2DD8B296D83443D /* oskiewar-analytics.mjs */; }; 399B26763D555AAAF98440DF /* oskiewar-voice.mjs in Resources */ = {isa = PBXBuildFile; fileRef = CEF913B052D36BC3CE48BB1B /* oskiewar-voice.mjs */; }; @@ -21,6 +22,7 @@ B93964796DBF64A171DD9439 /* GlyphAtlas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59BD48D8076F347B7FF9A774 /* GlyphAtlas.swift */; }; C0C46FBB6805F1A1E055FED7 /* OskiewarApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43902C050551AD2D6DA0EF9 /* OskiewarApp.swift */; }; DE990881EAE44FB2BE4592FF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FCECE2875B24DB7356CB0FDC /* Assets.xcassets */; }; + E6E3C4089B219BD45E7FEEAC /* scene3d.mjs in Resources */ = {isa = PBXBuildFile; fileRef = 9A29BD224EA84CBE2FBDBA8D /* scene3d.mjs */; }; F10250364FF369A809057B31 /* frame-driver.mjs in Resources */ = {isa = PBXBuildFile; fileRef = 4C7C4D62E6C706C3AB30BB3B /* frame-driver.mjs */; }; FE65C7B80AB35953E40AA8A7 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 474C7E2A33BAAEDAEED939DF /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ @@ -34,10 +36,12 @@ 59BD48D8076F347B7FF9A774 /* GlyphAtlas.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlyphAtlas.swift; sourceTree = ""; }; 812FA65365747604E58B98E7 /* MetalSceneView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetalSceneView.swift; sourceTree = ""; }; 8265144AA3E23B010A51E65A /* mac-test.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "mac-test.html"; sourceTree = ""; }; + 9A29BD224EA84CBE2FBDBA8D /* scene3d.mjs */ = {isa = PBXFileReference; path = scene3d.mjs; sourceTree = ""; }; A0AEFE9FB2DD8B296D83443D /* oskiewar-analytics.mjs */ = {isa = PBXFileReference; path = "oskiewar-analytics.mjs"; sourceTree = ""; }; A50E50A82D3F715FB8B31490 /* qr.mjs */ = {isa = PBXFileReference; path = qr.mjs; sourceTree = ""; }; A5CDAFE515D4323680797051 /* product-analytics.mjs */ = {isa = PBXFileReference; path = "product-analytics.mjs"; sourceTree = ""; }; AB2FCD0A93F17F907A54302C /* oskiewar.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = oskiewar.js; sourceTree = ""; }; + BF7515E8A95A1944C5424BD3 /* scene3d-webgl.mjs */ = {isa = PBXFileReference; path = "scene3d-webgl.mjs"; sourceTree = ""; }; C43902C050551AD2D6DA0EF9 /* OskiewarApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OskiewarApp.swift; sourceTree = ""; }; CEF913B052D36BC3CE48BB1B /* oskiewar-voice.mjs */ = {isa = PBXFileReference; path = "oskiewar-voice.mjs"; sourceTree = ""; }; D5D135855C9371BD15F15377 /* round-room.mjs */ = {isa = PBXFileReference; path = "round-room.mjs"; sourceTree = ""; }; @@ -108,6 +112,8 @@ CEF913B052D36BC3CE48BB1B /* oskiewar-voice.mjs */, AB2FCD0A93F17F907A54302C /* oskiewar.js */, D5D135855C9371BD15F15377 /* round-room.mjs */, + BF7515E8A95A1944C5424BD3 /* scene3d-webgl.mjs */, + 9A29BD224EA84CBE2FBDBA8D /* scene3d.mjs */, ); name = live; path = ../../xbox/live; @@ -194,6 +200,8 @@ 1B43BAF5E41E93E3D9208197 /* product-analytics.mjs in Resources */, 98991A7AC85B7CAE426E8D15 /* qr.mjs in Resources */, 5893AAD738853ADCCD1C6259 /* round-room.mjs in Resources */, + 1BB115B2B2EC50D3FFBD88D4 /* scene3d-webgl.mjs in Resources */, + E6E3C4089B219BD45E7FEEAC /* scene3d.mjs in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/apple/oskiewar/Sources/OskiewarApp.swift b/apple/oskiewar/Sources/OskiewarApp.swift index b2f960b5e7..9808788b7f 100644 --- a/apple/oskiewar/Sources/OskiewarApp.swift +++ b/apple/oskiewar/Sources/OskiewarApp.swift @@ -134,6 +134,8 @@ final class BundleSchemeHandler: NSObject, WKURLSchemeHandler { "/oskiewar-voice.mjs": ("oskiewar-voice", "mjs"), "/oskiewar-midi.mjs": ("oskiewar-midi", "mjs"), "/frame-driver.mjs": ("frame-driver", "mjs"), + "/scene3d-webgl.mjs": ("scene3d-webgl", "mjs"), + "/scene3d.mjs": ("scene3d", "mjs"), "/round-room.mjs": ("round-room", "mjs"), "/aesthetic.computer/dep/@akamfoad/qr/qr.mjs": ("qr", "mjs"), "/aesthetic.computer/lib/product-analytics.mjs": ("product-analytics", "mjs"), diff --git a/apple/oskiewar/project.yml b/apple/oskiewar/project.yml index 0a9e4cd384..450a8a58fa 100644 --- a/apple/oskiewar/project.yml +++ b/apple/oskiewar/project.yml @@ -25,6 +25,10 @@ targets: buildPhase: resources - path: ../../xbox/live/frame-driver.mjs buildPhase: resources + - path: ../../xbox/live/scene3d-webgl.mjs + buildPhase: resources + - path: ../../xbox/live/scene3d.mjs + buildPhase: resources - path: ../../xbox/live/round-room.mjs buildPhase: resources - path: ../../system/public/aesthetic.computer/dep/@akamfoad/qr/qr.mjs diff --git a/xbox/live/mac-test.html b/xbox/live/mac-test.html index 9876354493..c830b6d307 100644 --- a/xbox/live/mac-test.html +++ b/xbox/live/mac-test.html @@ -37,6 +37,8 @@ + + @@ -90,6 +92,14 @@ canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; min-width: 0; min-height: 0; display: block; cursor: inherit; } @supports (height: 100dvh) { canvas { height: 100dvh; } } + /* Three strata, the console's frame order: the 2D canvas is the CPU + layer (wipe, box, line, block text) under everything, the WebGL canvas + is the depth-tested scene, and text sits over the scene the way D2D + text does after the GPU pass. Input stays on the bottom canvas. */ + #screen { z-index: 0; } + #scene, #text { pointer-events: none; } + #scene { z-index: 1; } + #text { z-index: 2; } button, input, label { cursor: inherit; } button:hover, input:hover, label:hover { cursor: url("/aesthetic.computer/cursors/active.svg") 12 12, pointer; } @@ -201,6 +211,8 @@ + + @@ -226,6 +238,39 @@