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
Red [ | |
Purpose: "Animation system for VID" | |
Needs: 'View | |
Notes: { | |
Simplyfied Ease in/out formulas : http://gizma.com/easing/#l | |
See at the end of page source for javascripts formulas (included elastic) : http://easings.net/en | |
} | |
] |
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
Red[] | |
dst: [ | |
pen 238.172.41 | |
fill-pen 238.172.41 polygon 100x2 114x56 72x43 | |
fill-pen 188.130.45 polygon 100x2 114x56 128x38 | |
pen 212.28.24 | |
fill-pen 212.28.24 polygon 118x72 132x128 36x96 64x54 | |
fill-pen 129.31.34 polygon 118x72 132x128 169x88 135x48 |
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
Red [ | |
title: "Red basic Editor" | |
author: "Didier Cadieu" | |
version: 0.1.1 | |
date: "25-01-2017" | |
] | |
script: make string! 10000 | |
saved?: true |
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
Red [ | |
title: "Heart animation" | |
author: "Didier Cadieu" | |
notes: { | |
Traduction in Red of Terebus Volodymyr javascript demo : http://codepen.io/tvolodimir/pen/wqKuJ | |
} | |
Needs: View | |
] | |
;*** Settings |
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
Red [ | |
title: "Test of `find-window and `focus funcs" | |
author: "Didier Cadieu" | |
] | |
find-window: func [ | |
"Find a face's window face." | |
face [object!] | |
][ | |
while [face/parent] [face: face/parent] |
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
Red [ | |
title: "Compute the time taken to run a code a number of times." | |
author: "Didier Cadieu" | |
] | |
dt: func [n [integer!] code [block!] /local st] [ | |
st: now/time/precise | |
loop n code | |
print [n "loops in" st: now/time/precise - st " => one in" st / n] | |
] |
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
Red [ | |
Purpose: "Arabic <-> Roman numbers converter" | |
Author: "Didier Cadieu" | |
Date: "07-Oct-2016" | |
] | |
; Lookup tables for conversion | |
table-r2a: reverse copy table-a2r: [1000 "M" 900 "CM" 500 "D" 400 "CD" 100 "C" 90 "XC" 50 "L" 40 "XL" 10 "X" 9 "IX" 5 "V" 4 "IV" 1 "I"] | |
roman-to-arabic: func [r [string!] /local a b e] [ |
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
Red [ | |
Title: "Simple GUI livecoding demo" | |
Author: "Nenad Rakocevic / Didier Cadieu" | |
File: %livecode.red | |
Version: 1.2.1 | |
Needs: 'View | |
Usage: { | |
Type VID code in the bottom right area, you will see the resulting GUI components | |
rendered live on the left side and fully functional (events/actors/reactors working live). | |
The top right area let you define Red's values to be used in your VID code, even functions or anything. |
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
Red [ | |
Title: "Sparks demo" | |
Author: "Qingtian Xie" | |
File: %sparks.red | |
Tabs: 4 | |
Needs: View | |
] | |
system/view/auto-sync?: no |
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
Red [ | |
Title: "Red O'clock" | |
Author: "Gregg Irwin" | |
] | |
degree-to-xy: func [rad "radius" deg "degrees"] [ | |
as-pair (rad * sine deg) (rad * negate cosine deg) | |
] | |
sex-to-degree: func ["Sexagesimal to degrees" n] [n * 6] |