Skip to content

Commit

Permalink
Merge pull request #198 from oakmound/feature/v4-drivers
Browse files Browse the repository at this point in the history
shiny: overhaul api for v4
  • Loading branch information
200sc committed Apr 9, 2022
2 parents 38f3cc4 + eeb19dc commit 625f93f
Show file tree
Hide file tree
Showing 92 changed files with 1,006 additions and 3,691 deletions.
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

0 comments on commit 625f93f

Please sign in to comment.