automated snapshot

This commit is contained in:
sumi
2025-12-22 22:33:57 -06:00
parent aea3c71cf9
commit c29e08bb98
43 changed files with 173 additions and 155 deletions

BIN
aphrodite

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -72,7 +72,8 @@
#vendorHash = "sha256-HDfllPEKJZOtkSoasS1yDCyZrWihlkBVRstLkF8AHd0="; #vendorHash = "sha256-HDfllPEKJZOtkSoasS1yDCyZrWihlkBVRstLkF8AHd0=";
# use this every time there's vendor changeO # use this every time there's vendor changeO
vendorHash = pkgs.lib.fakeHash; #vendorHash = pkgs.lib.fakeHash;
vendorHash = "sha256-Z0zuk4F8O/5fTe7vawOTFPODp8lm00VJBd2P4n0XNU8=";
ldflags = [ ldflags = [
"-s" "-s"

3
go.mod
View File

@@ -5,6 +5,7 @@ go 1.24.0
toolchain go1.24.10 toolchain go1.24.10
require ( require (
github.com/gen2brain/raylib-go/raygui v0.0.0-20251219174542-17d5a83d1c33
github.com/gen2brain/raylib-go/raylib v0.55.1 github.com/gen2brain/raylib-go/raylib v0.55.1
github.com/go-git/go-git/v6 v6.0.0-20251212081956-e83cbb9651e8 github.com/go-git/go-git/v6 v6.0.0-20251212081956-e83cbb9651e8
github.com/ojrac/opensimplex-go v1.0.2 github.com/ojrac/opensimplex-go v1.0.2
@@ -17,7 +18,7 @@ require (
github.com/cloudflare/circl v1.6.1 // indirect github.com/cloudflare/circl v1.6.1 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.7.1 // indirect github.com/ebitengine/purego v0.8.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg/v2 v2.0.2 // indirect github.com/go-git/gcfg/v2 v2.0.2 // indirect
github.com/go-git/go-billy/v6 v6.0.0-20251126203821-7f9c95185ee0 // indirect github.com/go-git/go-billy/v6 v6.0.0-20251126203821-7f9c95185ee0 // indirect

6
go.sum
View File

@@ -15,12 +15,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/ebitengine/purego v0.7.1 h1:6/55d26lG3o9VCZX8lping+bZcmShseiqlh2bnUDiPA= github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE=
github.com/ebitengine/purego v0.7.1/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o=
github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/gen2brain/raylib-go/raygui v0.0.0-20251219174542-17d5a83d1c33 h1:0QCKLp5dkMP9f2LOz/LBeJVVSMs66661AIih7GOMHb4=
github.com/gen2brain/raylib-go/raygui v0.0.0-20251219174542-17d5a83d1c33/go.mod h1:Ji/uPEko2AUkcyPLAelEUa+E8Npc89/XY5Fo/lS/e3I=
github.com/gen2brain/raylib-go/raylib v0.55.1 h1:1rdc10WvvYjtj7qijHnV9T38/WuvlT6IIL+PaZ6cNA8= github.com/gen2brain/raylib-go/raylib v0.55.1 h1:1rdc10WvvYjtj7qijHnV9T38/WuvlT6IIL+PaZ6cNA8=
github.com/gen2brain/raylib-go/raylib v0.55.1/go.mod h1:BaY76bZk7nw1/kVOSQObPY1v1iwVE1KHAGMfvI6oK1Q= github.com/gen2brain/raylib-go/raylib v0.55.1/go.mod h1:BaY76bZk7nw1/kVOSQObPY1v1iwVE1KHAGMfvI6oK1Q=
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=

143
main.go
View File

@@ -1,14 +1,15 @@
package main package main
import ( import (
"fmt" // "fmt"
"log" "log"
"math/rand" "math/rand"
"os" "os"
"time" "time"
"github.com/gen2brain/raylib-go/raylib" gui "github.com/gen2brain/raylib-go/raygui"
"github.com/ojrac/opensimplex-go" rl "github.com/gen2brain/raylib-go/raylib"
//"github.com/ojrac/opensimplex-go"
) )
const ( const (
@@ -34,6 +35,31 @@ func main() {
rl.SetConfigFlags(rl.FlagMsaa4xHint) rl.SetConfigFlags(rl.FlagMsaa4xHint)
rl.InitWindow(targetWidth, targetHeight, "sumi sierpinski arrow") rl.InitWindow(targetWidth, targetHeight, "sumi sierpinski arrow")
// layout_name: controls initialization
var ControlScrollPaneScrollView rl.Rectangle
var ControlScrollPaneScrollOffset rl.Vector2
//var ControlScrollPaneBoundsOffset rl.Vector2
BlendModeToggleGroupActive := int32(0)
Slider003Value := float32(0.0)
RTogglePressed := false
GTogglePressed := false
BTogglePressed := false
Slider008Value := float32(0.0)
Slider009Value := float32(0.0)
Slider010Value := float32(0.0)
ATogglePressed := false
SaturationTogglePressed := false
SaturationSliderValue := float32(0.0)
KSliderValue := float32(0.0)
KTogglePressed := false
// end layout vars
rl.SetTargetFPS(60) rl.SetTargetFPS(60)
t0 := time.Now() t0 := time.Now()
@@ -96,8 +122,69 @@ func main() {
* MAIN DRAWING * MAIN DRAWING
*/ */
rl.BeginDrawing() rl.BeginDrawing()
rl.ClearBackground(rl.Blank) rl.ClearBackground(rl.GetColor(uint(gui.GetStyle(gui.DEFAULT, gui.BACKGROUND_COLOR))))
sketch.Draw(renderCtx) sketch.Draw(renderCtx)
//gui.LoadStyle("styles/dark.rgs")
gui.SetStyle(gui.DEFAULT, gui.BACKGROUND_COLOR, 0x181818FF)
gui.SetStyle(gui.DEFAULT, gui.BASE_COLOR_NORMAL, 0x2A2A2AFF)
gui.SetStyle(gui.DEFAULT, gui.BASE_COLOR_FOCUSED, 0x3A3A3AFF)
gui.SetStyle(gui.DEFAULT, gui.BASE_COLOR_PRESSED, 0x4A4A4AFF)
gui.SetStyle(gui.DEFAULT, gui.TEXT_COLOR_NORMAL, 0xE0E0E0FF)
gui.SetStyle(gui.DEFAULT, gui.TEXT_COLOR_FOCUSED, 0xFFFFFFFF)
gui.SetStyle(gui.DEFAULT, gui.BORDER_COLOR_NORMAL, 0x404040FF)
controlPanelWidth := float32(targetWidth) / 4.0
controlPanelHeight := float32(targetHeight)
// add gui layout controls
// raygui: controls drawing
gui.ScrollPanel(
rl.Rectangle{
X: 10,
Y: 10,
Width: controlPanelWidth - 20,
Height: controlPanelHeight - 20,
},
"",
rl.Rectangle{X: 10, Y: 10, Width: controlPanelWidth, Height: controlPanelHeight },
&ControlScrollPaneScrollOffset,
&ControlScrollPaneScrollView,
)
gui.GroupBox(rl.Rectangle{X: 20, Y: 20, Width: controlPanelWidth - 50, Height: 60 }, "Blending")
BlendModeToggleGroupActive = gui.ToggleGroup(rl.Rectangle{X: 30, Y: 40, Width: (controlPanelWidth - 70) / 3.0, Height: 24}, "ONE;TWO;THREE", BlendModeToggleGroupActive)
gui.Label(rl.Rectangle{X: 20, Y: 90, Width: 120, Height: 24}, "Contour Layer")
ATogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 136, Width: 16, Height: 16}, "A")
Slider003Value = gui.Slider(rl.Rectangle{X: 64, Y: 136, Width: 264, Height: 16}, "", "", Slider003Value, 0, 255)
RTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 160, Width: 16, Height: 16}, "R")
Slider008Value = gui.Slider(rl.Rectangle{X: 64, Y: 160, Width: 264, Height: 16}, "", "", Slider008Value, 0, 100)
GTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 184, Width: 16, Height: 16}, "G")
Slider009Value = gui.Slider(rl.Rectangle{X: 64, Y: 184, Width: 264, Height: 16}, "", "", Slider009Value, 0, 100)
BTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 208, Width: 16, Height: 16}, "B")
Slider010Value = gui.Slider(rl.Rectangle{X: 64, Y: 208, Width: 264, Height: 16}, "", "", Slider010Value, 0, 100)
SaturationTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 232, Width: 16, Height: 16}, "S")
gui.Slider(rl.Rectangle{X: 64, Y: 232, Width: 264, Height: 16}, "", "", SaturationSliderValue, 0, 100)
gui.Slider(rl.Rectangle{X: 64, Y: 256, Width: 264, Height: 16}, "", "", KSliderValue, 0, 100)
KTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 256, Width: 16, Height: 16}, "K")
// NOTE: LabelButton returns "pressed this frame" bool, so these are edge-triggered.
_ = RTogglePressed
_ = GTogglePressed
_ = BTogglePressed
_ = ATogglePressed
_ = SaturationTogglePressed
_ = KTogglePressed
rl.EndDrawing() rl.EndDrawing()
if rl.IsKeyDown(rl.KeySpace) { if rl.IsKeyDown(rl.KeySpace) {
@@ -149,51 +236,3 @@ func (s *FieldLayer) IsDirty() bool {
return s.dirty return s.dirty
} }
type SierpinskiArrow struct{}
func (s *SierpinskiArrow) Draw(ctx *RenderCtx) {
sierpinskiArrow(ctx, int(ctx.Ports["sierpinskiArrowDepth"]), ctx.Ports["sierpinskiArrowLength"])
}
func sierpinskiArrow(ctx *RenderCtx, order int, length float64) {
if order == 0 {
curve(ctx, order, length, ctx.Ports["sierpinskiArrowAngle"])
} else {
rl.Rotatef(float32(ctx.Ports["sierpinskiArrowAngle"]), 0, 0, 1)
curve(ctx, order, length, -ctx.Ports["sierpinskiArrowAngle"])
}
}
func curve(ctx *RenderCtx, order int, length float64, angle float64) {
if order == 0 {
len := int32(length)
rl.DrawLine(0, 0, len, 0, rl.Black)
rl.Translatef(float32(length), 0, 0)
} else {
curve(ctx, order-1, length/2, -angle)
rl.Rotatef(float32(angle), 0, 0, 1)
curve(ctx, order-1, length/2, angle)
rl.Rotatef(float32(angle), 0, 0, 1)
curve(ctx, order-1, length/2, -angle)
}
}
func main2() {
angles := make([]float32, 1000)
noise := opensimplex.NewNormalized(0)
for i := range len(angles) {
angles[i] = float32(noise.Eval2(float64(i)*0.05, 0.00))*0.1 - 0.05
}
frameNum := 0
for !rl.WindowShouldClose() {
frameNum++
// initial transform by halfway again through angle array
angleIndex := (frameNum / 10) % len(angles)
angle := angles[angleIndex]
initAngle := angles[(angleIndex+len(angles)/2)%len(angles)]
rl.Rotatef(2500*initAngle, 0, 0, 1)
rl.Translatef(100*initAngle, 100*initAngle, 0)
fmt.Printf("%.3f", angle)
rl.EndMode2D()
}
}

Binary file not shown.

View File

@@ -1,18 +0,0 @@
zlib License
Copyright (c) 2015-2024 raylib technologies (@raylibtech) / Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event
will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you
wrote the original software. If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented
as being the original software.
3. This notice may not be removed or altered from any source distribution.

View File

@@ -1,58 +0,0 @@
# `rGuiStyler`
A simple and easy-to-use [raygui](https://github.com/raysan5/raygui) styles editor.
Useful for tools style customization. The best tool companion for [rGuiLayout](https://raylibtech.itch.io/rguilayout) and [rGuiIcons](https://raylibtech.itch.io/rguiicons).
`rGuiStyler` can be used for free as a [WebAssembly online tool](https://raylibtech.itch.io/rguistyler) and it can also be downloaded as a **standalone tool** for `Windows`, `Linux` and `macOS` with some extra features.
**NOTE: Latest `rGuiStyler 6.0` release is intended to be used with [`raygui 4.5+`](https://github.com/raysan5/raygui) release.**
## Features
- **Global and control specific styles edition**
- **Style preview** in real time with individual test controls
- **Style templates** available to start customizing new styles
- Selectable controls state: **NORMAL, FOCUSED, PRESSED, DISABLED**
- Save and load as binary style file `.rgs` (with font embedded!)
- Export style as an embeddable **code file** (`.h`) (with font embedded!)
- Export style as a `.png` **controls table image** for showcase
- Embed style as png image chunk: `rGSf` (rgs file data)
- Import, configure and preview **style fonts** (`.ttf`/`.otf`)
- Load custom font charset for the style (Unicode codepoints)
- Color palette for quick color save/selection
- **+14 custom style examples** included for reference
- Command-line support for `.rgs`/`.h`/`.png` batch conversion
- **Free and open source**
## Screenshot
![rGuiStyler](screenshots/rguistyler_v600_shot01.png)
## Usage
The tool is quite intuitive, the expected steps to follow are:
1. Choose the control to edit from the Controls ListView (`DEFAULT` referes to global style for all controls)
2. Choose the property to edit from Properties ListView
3. Select a value for that property (color, number...) on Control Property Edit window
4. Font can be loaded and atlas generated automatically
NOTE: Changes are previewed in real time in the same tool!
Once the desired style has been created, press the `Export Style` button to save it as a `.rgs`**binary style file**. Style can also be exported as an embeddable `.h` **code file** or a `.png` **controls table image** (intended for preview and style showcase)
`rGuiStyler Standalone` comes with command-line support for batch conversion. For usage help:
> rguistyler.exe --help
## License
`rGuiStyler` source code is distributed as **open source**, licensed under an unmodified [zlib/libpng license](LICENSE).
`rGuiStyler` binaries are completely free for anyone willing to compile them directly from source.
`rGuiStyler Standalone` desktop tool is distributed as freeware.
In any case, consider some donation to help the author keep working on software for games development.
*Copyright (c) 2017-2025 raylib technologies ([@raylibtech](https://twitter.com/raylibtech)) / Ramon Santamaria ([@raysan5](https://twitter.com/raysan5))*

View File

@@ -1,23 +0,0 @@
## Fonts licenses
All included fonts are licensed under a permissive license, usually free to use for personal use and in most cases also for commercial use. In any case, individual licenses should be carefully reviewed and it's recommended to contact creators in case of doubts.
| Font Name | File Name | License Type | Creator | More details |
|-----------------------|----------------------|------------------------------------------|--------------------------------|-------------------------------------|
| 2A03 | `2a03.ttf` | Free for Personal & Commercial Use | memesbruh03 | https://www.dafont.com/2a03.font |
| Cartridge | `Cartridge.ttf` | [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) | jeti | https://www.dafont.com/cartridge.font |
| CozetteVector | `CozetteVector.otf` | [MIT License](https://github.com/slavfox/Cozette/blob/main/LICENSE) | [Slavfox](https://github.com/slavfox) | https://github.com/slavfox/Cozette |
| Fairfax | `Fairfax.ttf` | [SIL Open Font License 1.1](https://github.com/kreativekorp/open-relay/blob/master/Fairfax/OFL.txt) | Kreative Korp | https://github.com/kreativekorp/open-relay |
| Generic Mobile System Nuevo | `GMSN.ttf` | [Creative Commons Zero (CC0) 1.0](https://creativecommons.org/licenses/zero/1.0/) | Jayvee Enaguas (HarvettFox96) | https://www.dafont.com/generic-mobile-system.font |
| Hello World Regular | `hello-world.ttf` | SIL Open Font License | Anthony Gross | https://www.dafont.com/hello-world.font |
| Homespun TT BRK | `homespun.ttf` | Free for Personal Use | AEnigma (Brian Kent) | https://www.dafont.com/homespun-brk.font |
| Grixel Kyrou 7 Wide | `Kyrou7Wide.ttf` | [Creative Commons BY-ND 2.5](http://creativecommons.org/licenses/by-nd/2.5/) | Nikos Giannakopoulos | https://www.dafont.com/grixel-kyrou-7-wide.font
| Mecha | `Mecha.ttf` | Free for Personal Use | Captain Falcon | https://www.dafont.com/mecha-cf.font |
| OwreKynge | `OwreKynge.ttf` | [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) | jeti | https://www.dafont.com/owrekynge.font |
| Pixel Intv | `PixelIntv.otf` | Free for Personal Use | Pixel Sagas (Neale Davidson) | https://www.dafont.com/pixel-intv.font |
| Pixel Operator | `PixelOperator.ttf` | [Creative Commons Zero (CC0) 1.0](https://creativecommons.org/licenses/zero/1.0/) | Jayvee Enaguas (HarvettFox96) | https://www.dafont.com/pixel-operator.font |
| V5 Eastergothic | `v5easter.ttf` | Free, use at will | Roberto Christen | https://www.dafont.com/v5eastergothic.font |
| V5 Loxical Lixera | `v5loxical.ttf` | Free, use at will | Roberto Christen | https://www.dafont.com/v5loxica-lixera.font |
| Westington | `Westington.ttf` | Free use for anything, personal or otherwise | Hazel Abbiati | https://www.dafont.com/westington.font |
Enjoy it!

Binary file not shown.

35
sierpinski.go Normal file
View File

@@ -0,0 +1,35 @@
package main
import (
rl "github.com/gen2brain/raylib-go/raylib"
)
type SierpinskiArrow struct{}
func (s *SierpinskiArrow) Draw(ctx *RenderCtx) {
sierpinskiArrow(ctx, int(ctx.Ports["sierpinskiArrowDepth"]), ctx.Ports["sierpinskiArrowLength"])
}
func sierpinskiArrow(ctx *RenderCtx, order int, length float64) {
if order == 0 {
curve(ctx, order, length, ctx.Ports["sierpinskiArrowAngle"])
} else {
rl.Rotatef(float32(ctx.Ports["sierpinskiArrowAngle"]), 0, 0, 1)
curve(ctx, order, length, -ctx.Ports["sierpinskiArrowAngle"])
}
}
func curve(ctx *RenderCtx, order int, length float64, angle float64) {
if order == 0 {
len := int32(length)
rl.DrawLine(0, 0, len, 0, rl.Black)
rl.Translatef(float32(length), 0, 0)
} else {
curve(ctx, order-1, length/2, -angle)
rl.Rotatef(float32(angle), 0, 0, 1)
curve(ctx, order-1, length/2, angle)
rl.Rotatef(float32(angle), 0, 0, 1)
curve(ctx, order-1, length/2, -angle)
}
}

View File

@@ -45,6 +45,7 @@ func (s *Sketch) CreateLayer(name string, layer Layer) {
name: name, name: name,
texture: &texture, texture: &texture,
layer: layer, layer: layer,
config: NewLayerConfig(),
} }
s.layerToolsOrdered = append(s.layerToolsOrdered, layerTools) s.layerToolsOrdered = append(s.layerToolsOrdered, layerTools)
s.layerTools[name] = layerTools s.layerTools[name] = layerTools
@@ -194,6 +195,44 @@ type LayerTools struct {
name string name string
layer Layer layer Layer
texture *rl.RenderTexture2D texture *rl.RenderTexture2D
config LayerConfig
}
func NewLayerConfig() LayerConfig {
return LayerConfig {
visible: true,
a: 255,
rVisible: true,
r: 255,
gVisible: true,
g: 255,
bVisible: true,
b: 255,
desaturate: false,
kValue: 1.0,
}
}
type LayerConfig struct {
visible bool
a uint8
rVisible bool
r uint8
gVisible bool
g uint8
bVisible bool
b uint8
desaturate bool
saturation float32
kValue float32
} }
/** Layer **/ /** Layer **/

BIN
styles/dark.rgs Normal file

Binary file not shown.