This file contains hidden or 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
| /* | |
| { | |
| "id": "cylinder-spray", | |
| "label": "Cylinder Spray", | |
| "icon": "❍", | |
| "author": "Hiroyuki Sato" | |
| } | |
| */ | |
| // @baku89: Added metadata so that the app can load. |
This file contains hidden or 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
| private onDragstartScale({ | |
| current, | |
| preventDefault, | |
| originalEvent | |
| }: { | |
| current: vec2 | |
| preventDefault: () => void | |
| originalEvent: MouseEvent | |
| }) { | |
| if ( |
This file contains hidden or 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
| import hou | |
| import glob, os, re | |
| import shutil | |
| from stat import ST_MTIME | |
| from datetime import datetime | |
| def main(): | |
| # Get a filename of the most recent opened file | |
| userPrefDir = hou.getenv('HOUDINI_USER_PREF_DIR') | |
| historyPath = os.path.join(userPrefDir, 'file.history') |
This file contains hidden or 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
| (defn! round-rect (x y w h r) | |
| (let | |
| (R (if | |
| (or (> r (/ w 2)) (> r (/ h 2))) | |
| (min (/ w 2) (/ h 2)) | |
| r)) | |
| (list | |
| "path" | |
| `("M" ~(+ x R) ~y) | |
| `("L" ~(+ x w (- R)) ~y) |
This file contains hidden or 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
| (defn! pencil (state input) (do | |
| (if (nil? (first state)) | |
| (def! state '((quote path) false false false))) | |
| (let | |
| ( | |
| ; State | |
| item (last (first state)) | |
| px (nth state 1) |
This file contains hidden or 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
| (defn! distance (x1 y1 x2 y2) | |
| (sqrt (+ (pow (- x2 x1) 2) (pow (- y2 y1) 2)))) | |
| (defn! pencil (state input) (do | |
| (if (nil? (first state)) | |
| (def! state '((merge-path nil) 0 0 false))) | |
| (let | |
| ( |
This file contains hidden or 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
| (load-file "lib/tools.lisp") | |
| (defn /2 (x) (/ x 2)) | |
| (g | |
| (artboard "main" (0 0 400 400) | |
| (background "skyblue") | |
| (fill "red" (circle 0 0 $width)) | |
| (fill "blue" (rect 50 50 200 200)) | |
| (fill "green" (rect 224 312 200 200)) |
This file contains hidden or 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
| Hello World |
This file contains hidden or 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
| Hello World |
This file contains hidden or 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
| Hello World |