New Camera app whose shots show up in Photos, and the splash_live example (streamed live coding of Splash UI and shaders). Translator: speech and photos run where the models run (hub or on-device), microphone opened only on record. Amp: cubic volume, meters after volume, visualizer on the phone, output open only while playing. Code: run errors marked in the editor, start_app/list_apps through the WM. Route works offline from its cache. apps/video plays through the platform's player. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
18 lines
703 B
Text
18 lines
703 B
Text
// A scene, drawn by one Splash pixel function on the GPU
|
|
RoundedView{width: Fill height: 1000 show_bg: true
|
|
draw_bg +: {
|
|
pixel: fn() {
|
|
let t = self.draw_pass.time
|
|
let p = self.pos
|
|
let sky = mix(#x0b1030, #x3a1458, p.y)
|
|
let mut col = sky.xyz
|
|
let uv = (p - vec2(0.5, 0.5)) * vec2(self.rect_size.x / self.rect_size.y, 1.0)
|
|
let d = length(uv)
|
|
let sun = 1.0 - smoothstep(0.2, 0.205, d)
|
|
let glow = 0.02 / (d * d + 0.02)
|
|
col = mix(col, mix(#xffd27a, #xf0508a, p.y * 1.6 - 0.3).xyz, sun)
|
|
col = col + #xf0a27a.xyz * glow * 0.3
|
|
return vec4(col, 1.0)
|
|
}
|
|
}
|
|
}
|