diff --git a/extra/cfdg/models/spirales/spirales.factor b/extra/cfdg/models/spirales/spirales.factor new file mode 100644 index 0000000000..60e4384fe0 --- /dev/null +++ b/extra/cfdg/models/spirales/spirales.factor @@ -0,0 +1,41 @@ + +USING: namespaces sequences math random-weighted cfdg ; + +IN: cfdg.models.spirales + +DEFER: line + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: block ( -- ) + [ + [ circle ] do + [ 0.3 s 60 flip line ] do + ] + recursive ; + +: a1 ( -- ) + [ + [ 0.95 s 2 x 12 r 0.5 b 10 hue 1.5 sat a1 ] do + [ block ] do + ] + recursive ; + +: line ( -- ) + -0.3 a + [ 0 rotate a1 ] do + [ 120 rotate a1 ] do + [ 240 rotate a1 ] do ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: run ( -- ) + [ -1 b ] >background + { -20 40 -20 40 } viewport set + [ line ] >start-shape + 0.03 >threshold + cfdg-window ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +MAIN: run \ No newline at end of file diff --git a/extra/cfdg/models/spirales/tags.txt b/extra/cfdg/models/spirales/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/cfdg/models/spirales/tags.txt @@ -0,0 +1 @@ +demos diff --git a/extra/html/streams/streams-tests.factor b/extra/html/streams/streams-tests.factor index 14f1621346..948c998e13 100644 --- a/extra/html/streams/streams-tests.factor +++ b/extra/html/streams/streams-tests.factor @@ -1,6 +1,8 @@ + USING: html.streams html.streams.private -io io.streams.string io.styles kernel -namespaces tools.test xml.writer sbufs sequences inspector ; + io io.streams.string io.styles kernel + namespaces tools.test xml.writer sbufs sequences inspector colors ; + IN: html.streams.tests : make-html-string @@ -52,7 +54,7 @@ M: funky browser-link-href [ [ "car" - H{ { foreground { 1 0 1 1 } } } + H{ { foreground T{ rgba f 1 0 1 1 } } } format ] make-html-string ] unit-test @@ -60,7 +62,7 @@ M: funky browser-link-href [ "