Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/setanarut/gog/v2

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/setanarut/gog/v2

  • v2.0.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

GoDoc

GOG v2

GOG is a Go Object-oriented 2d drawing library for creative coding and generative art

curve_anim

Examples

Path follow animation

ctx := gog.NewContext(250, 100)
rect := shapes.Rect(vec.Vec2{}, 30, 10)
lemn := shapes.Lemniscate(100, 100).SetPos(ctx.Center)
lemnTotalLength := lemn.Length()
for _, length := range utils.Linspace(0, lemnTotalLength, 120) {
  ctx.Clear(color.Black)
  ctx.Stroke(lemn, gog.DefaultStrokeStyle())
  pos, ang := lemn.PointAngleAtLength(length)
  ctx.Fill(rect.SetPos(pos).Rotated(ang), color.White)
  ctx.AppendAnimationFrame()
}
ctx.SaveAPNG("path_follow.png", 2)

path_follow

See folder examples for all examples

FAQs

Package last updated on 11 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc