Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shiny: overhaul api for v4 #198

Merged
merged 32 commits into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
751ef09
shiny/driver: move driver level window manipulation to concrete types
200sc Mar 26, 2022
cd17a15
Merge branch 'release/v4.0.0' into feature/v4-drivers
200sc Apr 3, 2022
8ed39ef
event: return directional channels from handler methods
200sc Apr 3, 2022
a4a90d7
Merge branch 'release/v4.0.0' into feature/v4-drivers
200sc Apr 3, 2022
2f6b4c2
shiny/driver/mtldriver: match new window interface
200sc Apr 3, 2022
f4d1e79
shiny/driver/internal/win32: add build tags to cursor file
200sc Apr 3, 2022
e08046a
examples/screenopts: add title and notification buttons
200sc Apr 3, 2022
14d444c
event: correct dlog version
200sc Apr 3, 2022
43ea47c
shiny/driver: replace Tray methods with SetIcon
200sc Apr 4, 2022
9929aeb
shiny/driver/x11driver: add SetTitle
200sc Apr 4, 2022
a345bdd
shiny/driver/x11driver: add SetIcon
200sc Apr 4, 2022
2fd1ed1
shiny/driver/x11driver: add SetTopMost
200sc Apr 4, 2022
b16533d
shiny/driver/x11driver: add HideCursor
200sc Apr 4, 2022
e0e1717
shiny/driver/x11driver: fix for new window interface
200sc Apr 4, 2022
cffab97
shiny/driver/internal/win32: fix integer casting on window create
200sc Apr 4, 2022
547f1b3
shiny/driver/mtldriver: fill in implementation for SetIcon
200sc Apr 4, 2022
2422ab3
oak: bump dependencies
200sc Apr 4, 2022
e4255e3
examples/piano: fix synth switching
200sc Apr 4, 2022
f5dcd0b
examples: go mod tidy
200sc Apr 4, 2022
b471cdb
window: split window into App and Window to explicitly delineate sing…
200sc Apr 4, 2022
a2fc858
oak: add nooswindow build tags for app / window separation
200sc Apr 4, 2022
5259a84
shiny/screen: drop most draw methods from window
200sc Apr 4, 2022
a4bafb1
shiny/screen: drop PublishResult
200sc Apr 4, 2022
0c97c2d
shake: Move shake out of X state. It is not tightly coupled to any ot…
Implausiblyfun Apr 9, 2022
2776f05
examples\collision-demo: Add temp sub demo for shaking.
Implausiblyfun Apr 9, 2022
54192ee
shake: Move shake out of X state. It is not tightly coupled to any ot…
Implausiblyfun Apr 9, 2022
7059925
examples/text-demos: Folderize the 2 text demos
Implausiblyfun Apr 9, 2022
b646f08
examples: Add READMEs where there were already images
Implausiblyfun Apr 9, 2022
1261fd3
go mod tidy
200sc Apr 9, 2022
2844e45
oak: support nested examples in test_examples.sh
200sc Apr 9, 2022
df732e5
Merge pull request #202 from oakmound/feature/v4-shaker+examples
200sc Apr 9, 2022
eeb19dc
window: move viewport manipulation methods to App
200sc Apr 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions default.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,54 +67,12 @@ func SetScreen(x, y int) {
defaultWindow.SetScreen(x, y)
}

// MoveWindow calls MoveWindow on the default window.
func MoveWindow(x, y, w, h int) error {
initDefaultWindow()
return defaultWindow.MoveWindow(x, y, w, h)
}

// UpdateViewSize calls UpdateViewSize on the default window.
func UpdateViewSize(w, h int) error {
initDefaultWindow()
return defaultWindow.UpdateViewSize(w, h)
}

// SetFullScreen calls SetFullScreen on the default window.
func SetFullScreen(fs bool) error {
initDefaultWindow()
return defaultWindow.SetFullScreen(fs)
}

// SetBorderless calls SetBorderless on the default window.
func SetBorderless(bs bool) error {
initDefaultWindow()
return defaultWindow.SetBorderless(bs)
}

// SetTopMost calls SetTopMost on the default window.
func SetTopMost(on bool) error {
initDefaultWindow()
return defaultWindow.SetTopMost(on)
}

// SetTitle calls SetTitle on the default window.
func SetTitle(title string) error {
initDefaultWindow()
return defaultWindow.SetTitle(title)
}

// SetTrayIcon calls SetTrayIcon on the default window.
func SetTrayIcon(icon string) error {
initDefaultWindow()
return defaultWindow.SetTrayIcon(icon)
}

// ShowNotification calls ShowNotification on the default window.
func ShowNotification(title, msg string, icon bool) error {
initDefaultWindow()
return defaultWindow.ShowNotification(title, msg, icon)
}

// ScreenShot calls ScreenShot on the default window.
func ScreenShot() *image.RGBA {
initDefaultWindow()
Expand Down Expand Up @@ -156,15 +114,3 @@ func Height() int {
initDefaultWindow()
return defaultWindow.Height()
}

// HideCursor calls HideCursor on the default window.
func HideCursor() error {
initDefaultWindow()
return defaultWindow.HideCursor()
}

// GetCursorPosition calls GetCursorPosition on the default window.
func GetCursorPosition() (x, y float64, err error) {
initDefaultWindow()
return defaultWindow.GetCursorPosition()
}
59 changes: 59 additions & 0 deletions default_desktop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//go:build (windows || linux || osx) && !js && !android && !nooswindow
// +build windows linux osx
// +build !js
// +build !android
// +build !nooswindow

package oak

import (
"image"
)

// MoveWindow calls MoveWindow on the default window.
func MoveWindow(x, y, w, h int) error {
initDefaultWindow()
return defaultWindow.MoveWindow(x, y, w, h)
}

// SetFullScreen calls SetFullScreen on the default window.
func SetFullScreen(fs bool) error {
initDefaultWindow()
return defaultWindow.SetFullScreen(fs)
}

// SetBorderless calls SetBorderless on the default window.
func SetBorderless(bs bool) error {
initDefaultWindow()
return defaultWindow.SetBorderless(bs)
}

// SetTopMost calls SetTopMost on the default window.
func SetTopMost(on bool) error {
initDefaultWindow()
return defaultWindow.SetTopMost(on)
}

// SetTitle calls SetTitle on the default window.
func SetTitle(title string) error {
initDefaultWindow()
return defaultWindow.SetTitle(title)
}

// SetIcon calls SetIcon on the default window.
func SetIcon(icon image.Image) error {
initDefaultWindow()
return defaultWindow.SetIcon(icon)
}

// HideCursor calls HideCursor on the default window.
func HideCursor() error {
initDefaultWindow()
return defaultWindow.HideCursor()
}

// GetCursorPosition calls GetCursorPosition on the default window.
func GetCursorPosition() (x, y float64) {
initDefaultWindow()
return defaultWindow.GetCursorPosition()
}
4 changes: 2 additions & 2 deletions drawLoop.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ func (w *Window) drawLoop() {
func (w *Window) publish() {
w.prePublish(w, w.windowTextures[w.bufferIdx])
w.windowTextures[w.bufferIdx].Upload(zeroPoint, w.winBuffers[w.bufferIdx], w.winBuffers[w.bufferIdx].Bounds())
w.windowControl.Scale(w.windowRect, w.windowTextures[w.bufferIdx], w.windowTextures[w.bufferIdx].Bounds(), draw.Src)
w.windowControl.Publish()
w.Window.Scale(w.windowRect, w.windowTextures[w.bufferIdx], w.windowTextures[w.bufferIdx].Bounds(), draw.Src)
w.Window.Publish()
// every frame, swap buffers. This enables drivers which might hold on to the rgba buffers we publish as if they
// were immutable.
w.bufferIdx = (w.bufferIdx + 1) % bufferCount
Expand Down
15 changes: 11 additions & 4 deletions event/bind.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package event

import "sync/atomic"
import (
"sync/atomic"

"github.com/oakmound/oak/v3/dlog"
)

// Q: Why do Bind / Unbind / etc not immediately take effect?
// A: For concurrent safety, most operations on a bus lock the bus. Triggers acquire a read lock on the bus,
Expand Down Expand Up @@ -33,7 +37,7 @@ type Binding struct {

// Unbind unbinds the callback associated with this binding from it's own event handler. If this binding
// does not belong to its handler or has already been unbound, this will do nothing.
func (b Binding) Unbind() chan struct{} {
func (b Binding) Unbind() <-chan struct{} {
return b.Handler.Unbind(b)
}

Expand Down Expand Up @@ -89,7 +93,7 @@ func (bus *Bus) PersistentBind(eventID UnsafeEventID, callerID CallerID, fn Unsa

// Unbind unregisters a binding from a bus concurrently. Once complete, triggers that would
// have previously caused the Bindable callback to execute will no longer do so.
func (bus *Bus) Unbind(loc Binding) chan struct{} {
func (bus *Bus) Unbind(loc Binding) <-chan struct{} {
ch := make(chan struct{})
go func() {
bus.mutex.Lock()
Expand All @@ -113,6 +117,9 @@ type Bindable[C any, Payload any] func(C, Payload) Response
// will be called with the provided caller as its first argument, and will also be called when the provided event is specifically
// triggered on the caller's ID.
func Bind[C Caller, Payload any](h Handler, ev EventID[Payload], caller C, fn Bindable[C, Payload]) Binding {
if caller.CID() == 0 {
dlog.Error("Bind called with CallerID 0; is this entity registered and set?")
}
return h.UnsafeBind(ev.UnsafeEventID, caller.CID(), func(cid CallerID, h Handler, payload interface{}) Response {
typedPayload := payload.(Payload)
ent := h.GetCallerMap().GetEntity(cid)
Expand All @@ -136,7 +143,7 @@ func GlobalBind[Payload any](h Handler, ev EventID[Payload], fn GlobalBindable[P
type UnsafeBindable func(CallerID, Handler, interface{}) Response

// UnbindAllFrom unbinds all bindings currently bound to the provided caller via ID.
func (bus *Bus) UnbindAllFrom(c CallerID) chan struct{} {
func (bus *Bus) UnbindAllFrom(c CallerID) <-chan struct{} {
ch := make(chan struct{})
go func() {
bus.mutex.Lock()
Expand Down
8 changes: 4 additions & 4 deletions event/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ var (
// by alternative event handlers.
type Handler interface {
Reset()
TriggerForCaller(cid CallerID, event UnsafeEventID, data interface{}) chan struct{}
Trigger(event UnsafeEventID, data interface{}) chan struct{}
TriggerForCaller(cid CallerID, event UnsafeEventID, data interface{}) <-chan struct{}
Trigger(event UnsafeEventID, data interface{}) <-chan struct{}
UnsafeBind(UnsafeEventID, CallerID, UnsafeBindable) Binding
Unbind(Binding) chan struct{}
UnbindAllFrom(CallerID) chan struct{}
Unbind(Binding) <-chan struct{}
UnbindAllFrom(CallerID) <-chan struct{}
SetCallerMap(*CallerMap)
GetCallerMap() *CallerMap
}
8 changes: 4 additions & 4 deletions event/trigger.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package event

// TriggerForCaller acts like Trigger, but will only trigger for the given caller.
func (bus *Bus) TriggerForCaller(callerID CallerID, eventID UnsafeEventID, data interface{}) chan struct{} {
func (bus *Bus) TriggerForCaller(callerID CallerID, eventID UnsafeEventID, data interface{}) <-chan struct{} {
if callerID == Global {
return bus.Trigger(eventID, data)
}
Expand All @@ -21,7 +21,7 @@ func (bus *Bus) TriggerForCaller(callerID CallerID, eventID UnsafeEventID, data

// Trigger will scan through the event bus and call all bindables found attached
// to the given event, with the passed in data.
func (bus *Bus) Trigger(eventID UnsafeEventID, data interface{}) chan struct{} {
func (bus *Bus) Trigger(eventID UnsafeEventID, data interface{}) <-chan struct{} {
ch := make(chan struct{})
go func() {
bus.mutex.RLock()
Expand All @@ -35,11 +35,11 @@ func (bus *Bus) Trigger(eventID UnsafeEventID, data interface{}) chan struct{} {
}

// TriggerOn calls Trigger with a strongly typed event.
func TriggerOn[T any](b Handler, ev EventID[T], data T) chan struct{} {
func TriggerOn[T any](b Handler, ev EventID[T], data T) <-chan struct{} {
return b.Trigger(ev.UnsafeEventID, data)
}

// TriggerForCallerOn calls TriggerForCaller with a strongly typed event.
func TriggerForCallerOn[T any](b Handler, cid CallerID, ev EventID[T], data T) chan struct{} {
func TriggerForCallerOn[T any](b Handler, cid CallerID, ev EventID[T], data T) <-chan struct{} {
return b.TriggerForCaller(cid, ev.UnsafeEventID, data)
}
5 changes: 5 additions & 0 deletions examples/bezier/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Bezier Rendering
Use a mouse or debug commands to create points.
The points will be used to draw bézier curve.

![text](./example.PNG)
4 changes: 4 additions & 0 deletions examples/blank/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Blank Scene
Starts a pprof server and sets up a blank scene.
Useful for benchmarking and as a minimal base to copy from.
For less minimalist copying point see [the basic game template](https://github.com/oakmound/game-template).
20 changes: 19 additions & 1 deletion examples/clipboard/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,25 @@ go 1.18
require (
github.com/atotto/clipboard v0.1.4
github.com/oakmound/oak/v3 v3.0.0-alpha.1
golang.org/x/mobile v0.0.0-20220112015953-858099ff7816
)

require (
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037 // indirect
github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc // indirect
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 // indirect
github.com/disintegration/gift v1.2.1 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220320163800-277f93cfa958 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/hajimehoshi/go-mp3 v0.3.2 // indirect
github.com/oakmound/alsa v0.0.2 // indirect
github.com/oakmound/libudev v0.2.1 // indirect
github.com/oakmound/w32 v2.1.0+incompatible // indirect
github.com/oov/directsound-go v0.0.0-20141101201356-e53e59c700bf // indirect
golang.org/x/exp/shiny v0.0.0-20220407100705-7b9b53b0aca4 // indirect
golang.org/x/image v0.0.0-20220321031419-a8550c1d254a // indirect
golang.org/x/mobile v0.0.0-20220325161704-447654d348e3 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect
)

replace github.com/oakmound/oak/v3 => ../..
30 changes: 14 additions & 16 deletions examples/clipboard/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 h1:O/r2Sj+8QcMF
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/disintegration/gift v1.2.0 h1:VMQeei2F+ZtsHjMgP6Sdt1kFjRhs2lGz8ljEOPeIR50=
github.com/disintegration/gift v1.2.0/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI=
github.com/eaburns/bit v0.0.0-20131029213740-7bd5cd37375d/go.mod h1:CHkHWWZ4kbGY6jEy1+qlitDaCtRgNvCOQdakj/1Yl/Q=
github.com/eaburns/flac v0.0.0-20171003200620-9a6fb92396d1/go.mod h1:frG94byMNy+1CgGrQ25dZ+17tf98EN+OYBQL4Zh612M=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb h1:T6gaWBvRzJjuOrdCtg8fXXjKai2xSDqWTcKFUPuw8Tw=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/disintegration/gift v1.2.1 h1:Y005a1X4Z7Uc+0gLpSAsKhWi4qLtsdEcMIbbdvdZ6pc=
github.com/disintegration/gift v1.2.1/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220320163800-277f93cfa958 h1:TL70PMkdPCt9cRhKTqsm+giRpgrd0IGEj763nNr2VFY=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220320163800-277f93cfa958/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/hajimehoshi/go-mp3 v0.3.1 h1:pn/SKU1+/rfK8KaZXdGEC2G/KCB2aLRjbTCrwKcokao=
github.com/hajimehoshi/go-mp3 v0.3.1/go.mod h1:qMJj/CSDxx6CGHiZeCgbiq2DSUkbK0UbtXShQcnfyMM=
github.com/hajimehoshi/go-mp3 v0.3.2 h1:xSYNE2F3lxtOu9BRjCWHHceg7S91IHfXfXp5+LYQI7s=
github.com/hajimehoshi/go-mp3 v0.3.2/go.mod h1:qMJj/CSDxx6CGHiZeCgbiq2DSUkbK0UbtXShQcnfyMM=
github.com/hajimehoshi/oto v0.6.1/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2hrh6raOI=
github.com/jfreymuth/pulse v0.1.0 h1:KN38/9hoF9PJvP5DpEVhMRKNuwnJUonc8c9ARorRXUA=
github.com/jfreymuth/pulse v0.1.0/go.mod h1:cpYspI6YljhkUf1WLXLLDmeaaPFc3CnGLjDZf9dZ4no=
github.com/oakmound/alsa v0.0.2 h1:JbOUckkJqVvhABth7qy2JgAjqsWuBPggyoYOk1L6eK0=
github.com/oakmound/alsa v0.0.2/go.mod h1:wx+ehwqFnNL7foTwxxu2bKQlaUmD2oXd4ka1UBSgWAo=
github.com/oakmound/libudev v0.2.1 h1:gaXuw7Pbt3RSRxbUakAjl0dSW6Wo3TZWpwS5aMq8+EA=
Expand All @@ -33,16 +30,17 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 h1:estk1glOnSVeJ9tdEZZc5mAMDZk5lNJNyJ6DvrBkTEU=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
golang.org/x/exp/shiny v0.0.0-20220407100705-7b9b53b0aca4 h1:ywNGLBFk8tKaiu+GYZeoXWzrFoJ/a1LHYKy1lb3R9cM=
golang.org/x/exp/shiny v0.0.0-20220407100705-7b9b53b0aca4/go.mod h1:VjAR7z0ngyATZTELrBSkxOOHhhlnVUxDye4mcjx5h/8=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20201208152932-35266b937fa6 h1:nfeHNc1nAqecKCy2FCy4HY+soOOe5sDLJ/gZLbx6GYI=
golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20220321031419-a8550c1d254a h1:LnH9RNcpPv5Kzi15lXg42lYMPUf0x8CuPv1YnvBWZAg=
golang.org/x/image v0.0.0-20220321031419-a8550c1d254a/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mobile v0.0.0-20220112015953-858099ff7816 h1:jhDgkcu3yQ4tasBZ+1YwDmK7eFmuVf1w1k+NGGGxfmE=
golang.org/x/mobile v0.0.0-20220112015953-858099ff7816/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=
golang.org/x/mobile v0.0.0-20220325161704-447654d348e3 h1:ZDL7hDvJEQEcHVkoZawKmRUgbqn1pOIzb8EinBh5csU=
golang.org/x/mobile v0.0.0-20220325161704-447654d348e3/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
Expand All @@ -59,8 +57,8 @@ golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220111092808-5a964db01320 h1:0jf+tOCoZ3LyutmCOWpVni1chK4VfFLhRsDK7MhqGRY=
golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb h1:PVGECzEo9Y3uOidtkHGdd347NjLtITfJFO9BxFpmRoo=
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
5 changes: 5 additions & 0 deletions examples/collision-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Collision Demo

Controllable box that colors itself based on what zones it collides with.

![text](./example.PNG)
9 changes: 9 additions & 0 deletions examples/collision-demo/shake-extension-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Shaker Demo

Extension of the collision demo to illustrate the default shaker.
In addition to changing color 3 of the sectors will show a different shaking paradigm.



This demo probably wont stay as is for long as it is a thin wrapper on collision-demo.

Loading