Skip to content

Commit 1b9bcbe

Browse files
committed
- Misc
1 parent daac689 commit 1b9bcbe

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ debug: post reload
3232
release: post minify reload
3333

3434
install-deps:
35-
$(JSINSTALL) containers semigroups vector-space
35+
$(JSINSTALL) containers semigroups colour vector-space
3636

3737
jspp:
3838
$(JSPP) $(FLAGS) src-js/animator.js src-js/animator.jspp;

animator.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: Hans Hoglund
77
synopsis: Interactive 2-D animation for the Web
88

99
library
10-
build-depends: base, containers, semigroups, vector-space
10+
build-depends: base, containers, semigroups, colour, vector-space
1111
hs-source-dirs: src
1212
exposed-modules:
1313
Foreign.JavaScript

main.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ testProcessing = do
198198
handler p = do
199199
printRepr $! p
200200
p `background` red
201-
p `size` 400 400
201+
-- p `size` 400 400
202202
(toObject p %. "println") (str "This is Processing!") :: IO ()
203203
return ()
204204

src/Web/Graphics/Processing.hs

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ instance JsRef Processing
3838

3939

4040

41+
size :: Processing -> Double -> Double -> IO ()
42+
size p x y = (toObject p %.. "size") x y
43+
4144
background :: Processing -> Color -> IO ()
4245
background p c = (toObject p %.... "background") r g b a
4346
where (r,g,b,a) = convertColor c

0 commit comments

Comments
 (0)