-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logging functions for debugging. Resolves #315.
- Loading branch information
1 parent
84cd0f7
commit 4e00a6a
Showing
3 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(ns quil.snippets.debugging | ||
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]]) | ||
[quil.core :as q :include-macros true] | ||
quil.snippets.all-snippets-internal) | ||
#?(:cljs | ||
(:use-macros [quil.snippets.macro :only [defsnippet]]))) | ||
|
||
(defsnippet print-first-n | ||
"print-first-n" | ||
{:skip-image-diff? true} | ||
|
||
(q/background 255) | ||
|
||
(comment "will print 'foo' the first 5 iterations") | ||
(q/print-first-n 5 "foo")) | ||
|
||
(defsnippet print-every-n-millisec | ||
"print-every-n-millisec" | ||
{:skip-image-diff? true} | ||
|
||
(q/background 255) | ||
|
||
(comment "will print 'foo' every 1000 milliseconds") | ||
(q/print-every-n-millisec 1000 "foo")) |