diff --git a/common.go b/common.go index 3dff505..8f68b16 100644 --- a/common.go +++ b/common.go @@ -11,7 +11,7 @@ import ( "time" ) -const version = "0.98.364-experimental1" +const version = "0.98.365-experimental1" const appDisplayName = "Projection Mapper - Built by Instinct" diff --git a/render.go b/render.go index 273096b..b6e72f0 100644 --- a/render.go +++ b/render.go @@ -2124,6 +2124,9 @@ if xmasComposition{if xmasSelected359(as.ID){key:=fmt.Sprintf("%s/%g",as.ID,spee continue } } + // Themes retain authored ring holes even when the legacy plan mask + // contains only the outer polygon. Other effects are unchanged. + if as.ID == "phys:theme" && len(pl.s.Rings)>0 && !roomThemeContains358(*pl.s,sx,sy){continue} c, physAlpha = phys.sample(sx, sy) case as.Type == "media" && img != nil && as.Fit == "studio-photo": sx, sy, valid := pl.photoAt(pm, pn) diff --git a/theme_animation365.go b/theme_animation365.go new file mode 100644 index 0000000..c01c4ee --- /dev/null +++ b/theme_animation365.go @@ -0,0 +1,292 @@ +package main + +import "math" + +// Explicit animated artwork, not inferred room geometry. Positions are in the +// existing shared photo-coordinate field; the final renderer retains its masks. +func (s *themeRoomSim) motifs365() { + w, h := float64(s.sw), float64(s.sh) + t := s.t + if w < 1 || h < 1 { + return + } + th := Themes20List[s.sel%len(Themes20List)] + a, b := themeHexRGB(th.Palette[0]), themeHexRGB(th.Palette[len(th.Palette)-1]) + line := func(x, y, xx, yy, width float64, c [3]float32) { + s.line(x*w, y*h, xx*w, yy*h, math.Max(.7, width*h), c[0], c[1], c[2]) + } + dot := func(x, y, r float64, c [3]float32) { s.blob(x*w, y*h, math.Max(.8, r*h), c[0], c[1], c[2]) } + ring := func(x, y, rx, ry, phase, span float64, c [3]float32) { + for k := 0; k < 48; k++ { + q := phase + span*float64(k)/48 + qq := phase + span*float64(k+1)/48 + line(x+rx*math.Cos(q), y+ry*math.Sin(q), x+rx*math.Cos(qq), y+ry*math.Sin(qq), .004, c) + } + } + star := func(x, y, r float64, c [3]float32) { + line(x-r, y, x+r, y, .003, c) + line(x, y-r*w/h, x, y+r*w/h, .003, c) + } + fract := func(x float64) float64 { return x - math.Floor(x) } + switch s.sel { + case 0: // outlined city signs and visible falling rain + for k := 0; k < 7; k++ { + x := .05 + float64(k)*.135 + y := .14 + float64(k%3)*.12 + line(x, y, x+.1, y, .006, a) + line(x+.1, y, x+.1, y+.14, .006, a) + line(x+.1, y+.14, x, y+.14, .006, a) + line(x, y+.14, x, y, .006, a) + for j := 0; j < 3; j++ { + q := fract(t*.25 + float64(j)*.33) + line(x+.012, y+.03+float64(j)*.035, x+.025+.06*q, y+.03+float64(j)*.035, .004, b) + } + } + for k := 0; k < 30; k++ { + x := fract(float64(k) * .618) + y := fract(float64(k)*.371 + t*.25) + line(x, y, x-.008, y+.06, .002, b) + } + case 1: // branch canopy and individually moving fireflies + for k := 0; k < 5; k++ { + x := float64(k) / 4 + for j := 0; j < 5; j++ { + q := float64(j) + xx := x + (q-2)*.055 + line(x, -.04, xx, .12+math.Abs(q-2)*.025, .006, a) + line(xx, .12, xx+.05*math.Sin(t*.6+q), .22, .004, a) + } + } + for k := 0; k < 35; k++ { + q := float64(k) + dot(fract(q*.618+.04*math.Sin(t*.6+q)), .2+.7*fract(q*.317+.06*math.Cos(t*.4+q)), .007, b) + } + case 2: // candle stands and dancing flames + for k := 0; k < 8; k++ { + x := .07 + float64(k)*.12 + y := .62 + .1*math.Sin(float64(k)) + line(x, y, x, y+.2, .012, b) + line(x-.025, y+.2, x+.025, y+.2, .006, b) + dot(x+.004*math.Sin(t*7+float64(k)), y-.025, .018, a) + line(x, y-.01, x+.009*math.Sin(t*9), y-.085, .008, a) + } + case 3, 15: // fish silhouettes and bubbles, independent of Fish Tank art + for k := 0; k < 10; k++ { + q := float64(k) + x := fract(q*.231 + t*(.025+.003*q)) + y := .14 + .72*fract(q*.618) + .025*math.Sin(t*1.5+q) + ring(x, y, .025, .018, 0, 2*math.Pi, a) + line(x-.024, y, x-.043, y-.024, .005, b) + line(x-.043, y-.024, x-.043, y+.024, .005, b) + line(x-.043, y+.024, x-.024, y, .005, b) + dot(x+.012, y-.004, .003, b) + } + for k := 0; k < 18; k++ { + q := float64(k) + ring(fract(q*.618), 1-fract(q*.271+t*.09), .005, .009, 0, 2*math.Pi, b) + } + if s.sel == 15 { + for k := 0; k < 5; k++ { + x := .08 + float64(k)*.21 + line(x, .97, x, .7, .01, b) + line(x, .76, x-.025, .7, .006, b) + line(x, .76, x+.025, .7, .006, b) + } + } + case 4: // portal chevrons revolve and stream inward + for k := 0; k < 5; k++ { + r := .08 + .06*fract(float64(k)/5-t*.13) + ring(.5, .48, r, r*1.6, t*.4, 2*math.Pi, a) + } + for k := 0; k < 12; k++ { + q := float64(k)*math.Pi/6 + t*.3 + x, y := .5+.27*math.Cos(q), .48+.38*math.Sin(q) + line(x, y, x+.025*math.Cos(q+.7), y+.04*math.Sin(q+.7), .006, b) + } + case 5: // localized rising fire tongues and falling snow + for k := 0; k < 12; k++ { + q := float64(k) + x := .35 + q*.027 + top := .88 - (.1 + .12*(.5+.5*math.Sin(t*3+q))) + line(x, .94, x+.01*math.Sin(t*4+q), top, .017, a) + } + for k := 0; k < 30; k++ { + q := float64(k) + star(fract(q*.618+.015*math.Sin(t+q)), fract(q*.27+t*.08), .004, b) + } + case 6: // discrete carved glyph rows, traveling torchlight + for row := 0; row < 4; row++ { + for k := 0; k < 13; k++ { + x, y := .04+float64(k)*.073, .16+float64(row)*.19 + line(x, y, x, y+.09, .004, a) + line(x-.01, y+.025, x+.025, y+.025, .004, a) + if (k+row)%2 == 0 { + ring(x+.015, y+.015, .016, .025, 0, 2*math.Pi, b) + } else { + line(x, y+.07, x+.026, y+.04, .004, b) + } + } + } + dot(fract(t*.065), .84, .065, b) + case 7: // interlocking rotating toothed gears + for k := 0; k < 6; k++ { + q := float64(k) + x, y := .17+float64(k%3)*.32, .3+float64(k/3)*.4 + dir := 1. + if k%2 == 0 { + dir = -1 + } + ring(x, y, .09, .14, 0, 2*math.Pi, a) + ring(x, y, .022, .035, 0, 2*math.Pi, b) + for j := 0; j < 12; j++ { + v := float64(j)*math.Pi/6 + t*.4*dir + q + line(x+.085*math.Cos(v), y+.132*math.Sin(v), x+.11*math.Cos(v), y+.17*math.Sin(v), .013, a) + } + for j := 0; j < 4; j++ { + v := float64(j)*math.Pi/2 + t*.4*dir + q + line(x, y, x+.08*math.Cos(v), y+.125*math.Sin(v), .006, b) + } + } + case 8: // crisp outrun grid with traveling horizon bars + for k := -6; k <= 6; k++ { + line(.5, .5, .5+float64(k)*.18, 1, .004, a) + } + for k := 0; k < 10; k++ { + y := .5 + .5*math.Pow(fract(float64(k)/10+t*.1), 2) + line(0, y, 1, y, .004, b) + } + case 9: // branching thermal fissures with rising sparks + for k := 0; k < 7; k++ { + x := .08 + float64(k)*.15 + for j := 0; j < 7; j++ { + y := float64(j) / 7 + xx := x + .035*math.Sin(float64(j*3+k)+t*.4) + line(x, y, xx, y+1./7, .006, a) + if j%2 == 0 { + line(xx, y+.08, xx+.05, y+.13, .004, b) + } + x = xx + } + } + for k := 0; k < 20; k++ { + q := float64(k) + dot(fract(q*.618), 1-fract(q*.337+t*.16), .004, b) + } + case 10: // layered moving aurora curtains with star points + for k := 0; k < 65; k++ { + x := float64(k) / 64 + yy := .3 + .1*math.Sin(x*7+t*.5) + line(x, yy, x, yy+.16+.07*math.Sin(x*11-t), .007, a) + } + for k := 0; k < 24; k++ { + q := float64(k) + star(fract(q*.618), fract(q*.317)*.9, .003, b) + } + case 11: // five-petal falling blossoms and pond rings + for k := 0; k < 15; k++ { + q := float64(k) + x, y := fract(q*.618+t*.018), fract(q*.371+t*.065) + for j := 0; j < 5; j++ { + v := float64(j)*2*math.Pi/5 + t*.5 + dot(x+.012*math.Cos(v), y+.019*math.Sin(v), .008, a) + } + dot(x, y, .004, b) + } + for k := 0; k < 4; k++ { + r := fract(t*.1 + float64(k)/4) + ring(.5, .8, r*.23, r*.065, 0, 2*math.Pi, b) + } + case 12: // branching organic tendrils with growing bulbs + for k := 0; k < 7; k++ { + x := float64(k) / 6 + for j := 0; j < 22; j++ { + v := float64(j) / 22 + xx := x + .07*math.Sin(v*9+t*.7+float64(k)) + yy := 1 - v*.85 + line(xx, yy, x+.07*math.Sin((v+1./22)*9+t*.7+float64(k)), yy-.85/22, .006, a) + if j%5 == 0 { + line(xx, yy, xx+.035, yy-.04, .004, b) + dot(xx+.035, yy-.04, .008, b) + } + } + } + case 13: // rotating hazard fan and visible striped warning frame + for k := 0; k < 20; k++ { + x := float64(k) / 20 + line(x, .06, x+.025, .1, .012, a) + line(x, .9, x+.025, .94, .012, a) + } + for k := 0; k < 3; k++ { + q := float64(k)*2*math.Pi/3 + t*.7 + ring(.5, .46, .15, .24, q, .7, a) + line(.5, .46, .5+.15*math.Cos(q), .46+.24*math.Sin(q), .008, b) + } + case 14: // skyline, lit windows and slanted rain + for k := 0; k < 12; k++ { + q := float64(k) + x := q / 12 + top := .45 + .17*math.Sin(q*3) + line(x, 1, x, top, .006, a) + line(x, top, x+.07, top, .006, a) + line(x+.07, top, x+.07, 1, .006, a) + for j := 0; j < 4; j++ { + dot(x+.025, top+.04+float64(j)*.07, .005, b) + } + } + for k := 0; k < 35; k++ { + q := float64(k) + x, y := fract(q*.618), fract(q*.377+t*.3) + line(x, y, x-.014, y+.08, .002, b) + } + case 16: // orbiting planets and rotating astrolabe spokes + for k := 0; k < 4; k++ { + r := .08 + .055*float64(k) + ring(.5, .48, r, r*1.5, 0, 2*math.Pi, a) + q := t*(.18+.08*float64(k)) + float64(k) + dot(.5+r*math.Cos(q), .48+r*1.5*math.Sin(q), .016, b) + } + for k := 0; k < 12; k++ { + q := float64(k)*math.Pi/6 + t*.12 + line(.5+.22*math.Cos(q), .48+.33*math.Sin(q), .5+.25*math.Cos(q), .48+.375*math.Sin(q), .004, b) + } + case 17: // discrete falling code, positive wrap avoids blown-out negative exp + for k := 0; k < 24; k++ { + q := float64(k) + for j := 0; j < 10; j++ { + x := .03 + q*.041 + y := fract(float64(j)/10 + t*(.09+.02*fract(q*.37)) + q*.31) + c := a + if j == 0 { + c = b + } + bits := k*17 + j*13 + for row := 0; row < 5; row++ { + for col := 0; col < 3; col++ { + if (bits+row*7+col*3)%5 < 2 { + line(x+float64(col)*.004, y+float64(row)*.007, x+.002+float64(col)*.004, y+float64(row)*.007, .002, c) + } + } + } + } + } + case 18: // rotating pentagram and rune circle + ring(.5, .52, .23, .35, 0, 2*math.Pi, a) + for k := 0; k < 5; k++ { + q := float64(k)*2*math.Pi/5 + t*.2 + qq := q + 4*math.Pi/5 + line(.5+.2*math.Cos(q), .52+.3*math.Sin(q), .5+.2*math.Cos(qq), .52+.3*math.Sin(qq), .006, b) + } + for k := 0; k < 18; k++ { + q := float64(k)*2*math.Pi/18 - t*.12 + star(.5+.26*math.Cos(q), .52+.4*math.Sin(q), .006, a) + } + case 19: // solar corona arcs visibly erupt and retreat + ring(.5, .48, .15, .24, 0, 2*math.Pi, a) + for k := 0; k < 18; k++ { + q := float64(k)*2*math.Pi/18 + t*.08 + r := .17 + .045*(.5+.5*math.Sin(t*1.4+float64(k))) + line(.5+.15*math.Cos(q), .48+.24*math.Sin(q), .5+r*math.Cos(q+.07), .48+r*1.6*math.Sin(q+.07), .012, b) + dot(.5+r*math.Cos(q+.07), .48+r*1.6*math.Sin(q+.07), .008, a) + } + } +} diff --git a/theme_animation365_test.go b/theme_animation365_test.go new file mode 100644 index 0000000..4ef5271 --- /dev/null +++ b/theme_animation365_test.go @@ -0,0 +1,234 @@ +package main + +import ( + "encoding/json" + "fmt" + "image" + "image/color" + "image/png" + "math" + "os" + "path/filepath" + "reflect" + "testing" + "time" +) + +func Test365ThemeActualGallery(t *testing.T) { + dir := os.Getenv("PM365_PIXELS") + if dir == "" { + t.Skip("diagnostic pixels not requested") + } + os.MkdirAll(dir, 0755) + sheet := image.NewRGBA(image.Rect(0, 0, 960, 200*len(Themes20List))) + for index, th := range Themes20List { + p := roomTestProject(320, 200) + p.Surfaces = []Surface{{ID: "wall", Cls: "wall", Poly: [][2]float64{{.03, .03}, {.97, .03}, {.97, .96}, {.03, .96}}, Quad: [][2]float64{{.03, .03}, {.97, .03}, {.97, .96}, {.03, .96}}}, {ID: "couch", Cls: "couch", Poly: [][2]float64{{.23, .61}, {.78, .61}, {.78, .91}, {.23, .91}}, Quad: [][2]float64{{.23, .61}, {.78, .61}, {.78, .91}, {.23, .91}}}} + sc, _ := ApplyTheme20ToProject(p, th) + r := newRenderer(p, "") + r.directorIsolatedHub = &physHub{owner: r, eng: map[string]*physEngine{}} + var frames [][]byte + for step := 0; step <= 90; step++ { + f := newFrame(320, 200) + r.RenderScene(&sc, float64(step)/30, f, 1, time.Unix(100, 0).Add(time.Duration(step)*time.Second/30)) + if step%45 != 0 { + continue + } + tile := step / 45 + frames = append(frames, append([]byte(nil), f.Pix...)) + for y := 0; y < 200; y++ { + for x := 0; x < 320; x++ { + o := (y*320 + x) * 4 + sheet.SetRGBA(x+tile*320, y+index*200, color.RGBA{f.Pix[o+2], f.Pix[o+1], f.Pix[o], 255}) + } + } + } + delta := 0 + for i := range frames[0] { + if frames[0][i] != frames[1][i] { + delta++ + } + } + t.Log(index, th.ID, "changed bytes", delta) + for _, e := range r.directorIsolatedHub.eng { + physStopSim(e.sim) + } + r.closeVideoResources() + } + f, err := os.Create(filepath.Join(dir, "candidate20.png")) + if err != nil { + t.Fatal(err) + } + defer f.Close() + if err = png.Encode(f, sheet); err != nil { + t.Fatal(err) + } +} + +func Test365MotifsFiniteDistinctMovingAndNeutral(t *testing.T) { + kind, ok := physKindOf("phys:theme") + if !ok { + t.Fatal("theme dispatcher") + } + seen := map[string]int{} + for sel := range Themes20List { + g := physBuildGrid(nil, [4]float64{0, 0, 1, 1}, 16./9, 160, false, nil, "", nil) + e := newPhysEngine(kind, physCfg{seed: 42, hx: []float64{float64(sel)}}, g) + s := e.sim.(*themeRoomSim) + var frames [][]float32 + for _, tm := range []float64{0, 1.5, 3} { + s.clearHDR() + s.t = tm + s.motifs365() + energy := 0. + for _, v := range s.hdr { + if math.IsNaN(float64(v)) || math.IsInf(float64(v), 0) || v < 0 { + t.Fatal("invalid motif", sel, v) + } + energy += float64(v) + } + if energy < 1 { + t.Fatal("empty motif", sel) + } + frames = append(frames, append([]float32(nil), s.hdr...)) + } + if reflect.DeepEqual(frames[0], frames[1]) || reflect.DeepEqual(frames[1], frames[2]) { + t.Fatal("static artwork", sel) + } + raw := fmt.Sprint(frames[1]) + if prev, ok := seen[raw]; ok { + t.Fatal("duplicate", prev, sel) + } + seen[raw] = sel + s.live = hxLiveQ{} + s.step(e, .1) + if s.pulse != 0 || s.in.Level != 0 || s.in.Beat { + t.Fatal("invented input", sel) + } + s.live = hxLiveQ{active: true, level: .8, bass: .6, beat: true} + s.step(e, .1) + if s.pulse <= 0 || !s.in.Beat { + t.Fatal("input lost") + } + e.exportMode = true + s.live = hxLiveQ{} + s.step(e, .1) + if s.in.Level != 0 || s.in.Beat { + t.Fatal("export input") + } + physStopSim(e.sim) + } +} + +func Test365ActualRendererConcaveHoleMotionAndImmutability(t *testing.T) { + outer := [][2]float64{{.05, .05}, {.95, .05}, {.95, .95}, {.56, .95}, {.56, .6}, {.05, .6}} + hole := [][2]float64{{.35, .22}, {.5, .22}, {.5, .38}, {.35, .38}} + for sel, th := range Themes20List { + p := roomTestProject(160, 100) + sf := Surface{ID: "wall", Cls: "wall", Poly: outer, Quad: polyBox(outer), Rings: []MaskRing{{Outer: outer, Holes: [][][2]float64{hole}}}} + p.Surfaces = []Surface{sf} + before, _ := json.Marshal(p.Surfaces) + sc, _ := ApplyTheme20ToProject(p, th) + r := newRenderer(p, "") + r.directorIsolatedHub = &physHub{owner: r, eng: map[string]*physEngine{}} + var first []byte + changed := 0 + for step := 0; step <= 90; step++ { + f := newFrame(160, 100) + r.RenderScene(&sc, float64(step)/30, f, 1, time.Unix(100, 0).Add(time.Duration(step)*time.Second/30)) + if step == 0 { + first = append([]byte(nil), f.Pix...) + } + if step != 90 { + continue + } + lit := 0 + for y := 0; y < 100; y++ { + for x := 0; x < 160; x++ { + o := (y*160 + x) * 4 + u, v := (float64(x)+.5)/160, (float64(y)+.5)/100 + on := f.Pix[o]|f.Pix[o+1]|f.Pix[o+2] != 0 + if on { + lit++ + if !pointInPolyXY(u, v, outer) || pointInPolyXY(u, v, hole) { + t.Fatalf("mask leak %d %d,%d", sel, x, y) + } + } + if first[o] != f.Pix[o] || first[o+1] != f.Pix[o+1] || first[o+2] != f.Pix[o+2] { + changed++ + } + } + } + if lit < 30 || changed < 30 { + t.Fatal("blank/static renderer", sel, lit, changed) + } + } + after, _ := json.Marshal(p.Surfaces) + if string(before) != string(after) { + t.Fatal("outlines mutated") + } + for _, e := range r.directorIsolatedHub.eng { + physStopSim(e.sim) + } + r.closeVideoResources() + } +} + +func Test365MotifCostAndMatrixTailBounded(t *testing.T) { + kind, _ := physKindOf("phys:theme") + g := physBuildGrid(nil, [4]float64{0, 0, 1, 1}, 16./9, physSimW, false, nil, "", nil) + for _, sel := range []int{0, 7, 17} { + e := newPhysEngine(kind, physCfg{seed: 42, hx: []float64{float64(sel)}}, g) + s := e.sim.(*themeRoomSim) + start := time.Now() + for k := 0; k < 12; k++ { + s.t = 100000 + float64(k)*.1 + s.shade(e) + } + t.Logf("theme%d %dx%d shader average %s", sel, s.sw, s.sh, time.Since(start)/12) + for _, v := range e.back { + if math.IsNaN(float64(v)) || math.IsInf(float64(v), 0) || v < 0 || v > 1.01 { + t.Fatal("invalid final field", sel, v) + } + } + physStopSim(e.sim) + } +} + +func Test365AnimationClockSpeedAndSuppliedInput(t *testing.T) { + kind, _ := physKindOf("phys:theme") + g := physBuildGrid(nil, [4]float64{0, 0, 1, 1}, 16./9, 160, false, nil, "", nil) + for _, sel := range []int{0, 7, 17} { + makeE := func() *physEngine { return newPhysEngine(kind, physCfg{seed: 42, hx: []float64{float64(sel)}}, g) } + a, b := makeE(), makeE() + a.exportMode, b.exportMode = true, true + a.advance(0, 1) + b.advance(0, 2) + for k := 1; k <= 100; k++ { + a.advance(float64(k)*.01, 1) + b.advance(float64(k)*.01, 2) + } + sa, sb := a.sim.(*themeRoomSim), b.sim.(*themeRoomSim) + if math.Abs(sb.t-2*sa.t) > .04 { + t.Fatal("speed clock", sel, sa.t, sb.t) + } + a.render() + before := append([]float32(nil), a.field...) + sa.live = hxLiveQ{active: true, level: .8, bass: .6, beat: true} + a.exportMode = false + a.sim.step(a, .1) + a.dirty = true + a.render() + if reflect.DeepEqual(before, a.field) { + t.Fatal("supplied audio ignored") + } + for _, e := range []*physEngine{a, b} { + physStopSim(e.sim) + } + } + for i, th := range Themes20List { + if i >= len(themeMotion365) || themeMotionSummary365(th.ID) == "Animated theme artwork." { + t.Fatal("missing honest artwork summary") + } + } +} diff --git a/theme_motion365.go b/theme_motion365.go new file mode 100644 index 0000000..5b4cf88 --- /dev/null +++ b/theme_motion365.go @@ -0,0 +1,34 @@ +package main + +// Describes the artwork actually drawn, not unimplemented room or asset claims. +var themeMotion365 = [...]string{ + "Outlined neon signs and falling rain over a moving grid.", + "A branch canopy with individually drifting firefly lights.", + "Candle stands with moving flames above a dark mist layer.", + "Swimming line-art fish, rising bubbles and moving caustics.", + "Inward-moving portal rings and revolving outer chevrons.", + "Rising fire tongues and falling snowflake lights.", + "Carved-style glyph rows and a traveling torchlight glow.", + "Six rotating toothed gears with moving spokes.", + "A neon perspective grid with traveling horizon bars.", + "Branching thermal fissures with rising ember sparks.", + "Layered moving aurora curtains and star points.", + "Falling five-petal blossoms above expanding pond rings.", + "Swaying branching tendrils with glowing tips.", + "A rotating hazard fan inside a striped warning frame.", + "A line-art skyline with lit windows and slanted rain.", + "Swimming line-art fish, bubbles and trident-style pillars.", + "Orbiting planets, astrolabe rings and rotating spokes.", + "Discrete code-like glyph columns falling at different speeds.", + "A rotating five-point star inside a moving rune circle.", + "Solar corona arcs that extend and retreat around a ring.", +} + +func themeMotionSummary365(id string) string { + for i, th := range Themes20List { + if th.ID == id && i < len(themeMotion365) { + return themeMotion365[i] + } + } + return "Animated theme artwork." +} diff --git a/themes_20_ui_win.go b/themes_20_ui_win.go index 1f7e3cb..e069a9c 100644 --- a/themes_20_ui_win.go +++ b/themes_20_ui_win.go @@ -51,24 +51,24 @@ func (a *app) themesLayout(add func(widget) int, rx, rw, y, bh, pad int) { row := func(s string, h int) { height:=fxTextHeight(s,U.fSmall,rw-2*sc(16),h) - add(widget{kind: kLabel, text: s, l: rx + sc(16), t: y, r: rx + rw - sc(16), b: y + height, small: true, on: false}) + add(widget{kind: kLabel, text: s, l: rx + sc(16), t: y, r: rx + rw - sc(16), b: y + height, small: true, on: false, wrap: true}) y += height + pad } pw := rw - 2*sc(16) ph := sc(160) - add(widget{kind: kThumb, id: idThemeCanvas, l: rx + sc(16), t: y, r: rx + rw - sc(16), b: y + ph, img: a.themePreviewFrame(pw, ph), text: fmt.Sprintf("Current outline illustration: %s [%s]", th.Name, th.Category), enabled: false}) + add(widget{kind: kThumb, id: idThemeCanvas, l: rx + sc(16), t: y, r: rx + rw - sc(16), b: y + ph, img: a.themePreviewFrame(pw, ph), text: fmt.Sprintf("Current outline sample: %s [%s]", th.Name, th.Category), enabled: false}) y += ph + pad - row("Selected theme on current outlines in photo coordinates, not calibrated projector output or measured depth.",36) + row("2D animated artwork on your current outlines in photo coordinates. Preview is not calibrated output or measured 3D.",36) y = a.fxStdHeaderLayout(add, rx, rw, y, pad, fxStdHeaderOpts{ Title: "Auto Themes", Subtitle: fmt.Sprintf("Category: %s | Mood: %s | Palette: %s, %s", th.Category, th.Mood, th.Palette[0], th.Palette[1]), - Sensing: "3D Depth + ObjectIQ Surfaces + Room-Wide Scene", + Sensing: "Shared outline-coordinate animation; supplied audio reacts when active", Selected: th.Name, Index: (idx % len(Themes20List)) + 1, Total: len(Themes20List), - Description: th.Description, + Description: themeMotionSummary365(th.ID), }) // Navigation buttons @@ -78,7 +78,7 @@ func (a *app) themesLayout(add func(widget) int, rx, rw, y, bh, pad int) { y += bh + pad // Primary apply button - add(widget{kind: kBtn, id: idThemeApply, text: fmt.Sprintf("Apply %q to Room", th.Name), l: rx + sc(16), t: y, r: rx + rw - sc(16), b: y + sc(48), style: stPrimary, enabled: true}) + add(widget{kind: kBtn, id: idThemeApply, text: "Apply selected theme to room", l: rx + sc(16), t: y, r: rx + rw - sc(16), b: y + sc(48), style: stPrimary, enabled: true}) y += sc(48) + pad // Preview and Stop buttons diff --git a/themes_room_sim.go b/themes_room_sim.go index 90acc83..841f9ae 100644 --- a/themes_room_sim.go +++ b/themes_room_sim.go @@ -261,7 +261,8 @@ func (s *themeRoomSim) shade(e *physEngine) { case 17: // Quantum Matrix Void: phosphor green falling digital code columns col := math.Floor(pu * 42.0) spd := 1.1 + math.Mod(col*0.37, 1.4) - drop := math.Mod(pv*1.3-t*spd*0.45+math.Mod(col*0.71, 1.0), 1.0) + drop := pv*1.3-t*spd*0.45+math.Mod(col*0.71, 1.0) + drop -= math.Floor(drop) glyph := float32(fxFastExpNeg(drop*6.5)) * float32(0.5+0.5*math.Sin(pv*95.0+col*5.0)) * (0.7 + 0.45*pulse) r += c1[0] * glyph * 0.30 g += c1[1] * glyph * 1.05 @@ -339,8 +340,12 @@ func (s *themeRoomSim) shade(e *physEngine) { } } - // 5. Opus-benchmark HDR + bloom + ACES tone mapping - s.finish(e, 1.0, 0.32, 0.0) + // Keep the existing atmospheric layer subordinate to explicit animated + // artwork. The old albedo/palette wash hid motion over mapped objects. + for i := range s.hdr { s.hdr[i] *= .16 } + s.motifs365() + // Lower bloom retains narrow glyphs, teeth and rain instead of soft wash. + s.finish(e, .85, .13, 0.0) } func init() {