Paste: Rawr Test

Author: CapitalEx
Mode: factor
Date: Wed, 26 Apr 2023 03:39:11
Plain Text |
: orbit ( pos -- pos' )
    now duration>seconds 2 * 
        [ sin ] [ cos ] bi 2array 50 v*n v+ ;

: spin ( rotation -- rotation' )
    1/60 360 * + ;

: <orbit-node> ( -- node )
    { 0 0 } <translate> 
        [
            [ drop { 200 200 } orbit ] change-position drop
        ] >>action ;

: <spin-node> ( -- node )
    0 <rotate>
        [ 
            [ spin ] change-angle drop
        ] >>action ;

MAIN-WINDOW: rawr-test { { title "Rawr Test" } }
    <node> {
        [ 2 <scale> <orbit-node> add ]
        [ { 200 200 } <translate>  <spin-node> add ]
    } add "Hello, World!" <text> add <rawr-gadget> >>gadgets ;

New Annotation

Summary:
Author:
Mode:
Body: