• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

A categorical programming language


Commit MetaInfo

修订版f34cbf0d722080b6c33a2f84644bd3a10a43e2e0 (tree)
时间2022-06-26 12:00:46
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Add another demo.

更改概述

差异

--- a/cammy-rpy/animate.py
+++ b/cammy-rpy/animate.py
@@ -13,9 +13,10 @@ from cammylib.parser import parse
1313
1414
1515 def resize(displayWidth, displayHeight):
16- bufferWidth = displayWidth * 2
16+ factor = 3
17+ bufferWidth = displayWidth * factor
1718 # Include a factor of 3/5 since monospaced fonts are extra-tall.
18- bufferHeight = displayHeight * 2 * 5 // 3
19+ bufferHeight = displayHeight * factor * 5 // 3
1920 print "Canvas is %d x %d" % (displayWidth, displayHeight)
2021 print "Buffer is %d x %d" % (bufferWidth, bufferHeight)
2122 return displayWidth, displayHeight, bufferWidth, bufferHeight
--- /dev/null
+++ b/hive/demo/anim/deco-circles.cammy
@@ -0,0 +1 @@
1+(comp (comp (max-headroom-camera stay-zoomed-out) repeating-circles) either-cyan-or-black)
--- a/hive/demo/anim/max-headroom.cammy
+++ b/hive/demo/anim/max-headroom.cammy
@@ -1,7 +1,3 @@
11 (comp
2- (comp
3- zoom-out
4- (comp
5- (pair/mapsnd (f/divpair id (fun/const f-pi)))
6- v2/rotate-by))
2+ (max-headroom-camera zoom-out)
73 (v3/triple (fun/const f-zero) (comp fst f-sin) (fun/const f-zero)))
--- /dev/null
+++ b/hive/demo/deco-circles.cammy
@@ -0,0 +1 @@
1+(comp repeating-circles either-cyan-or-black)
\ No newline at end of file
--- /dev/null
+++ b/hive/either-cyan-or-black.cammy
@@ -0,0 +1 @@
1+(pick-const v3/rgb/cyan v3/rgb/black)
\ No newline at end of file
--- /dev/null
+++ b/hive/max-headroom-camera.cammy
@@ -0,0 +1,5 @@
1+(comp
2+ @0
3+ (comp
4+ (pair/mapsnd (f/divpair id (fun/const f-pi)))
5+ v2/rotate-by))
--- /dev/null
+++ b/hive/pick-const.cammy
@@ -0,0 +1 @@
1+(comp either (case @0 @1))
\ No newline at end of file
--- /dev/null
+++ b/hive/repeating-circles.cammy
@@ -0,0 +1 @@
1+(comp (v2/map f/fract) (f/ltpair v2/complex/norm (fun/const f/half)))
\ No newline at end of file
--- /dev/null
+++ b/hive/stay-zoomed-out.cammy
@@ -0,0 +1 @@
1+(pair/mapfst (comp (pair id (fun/const f/2)) v2/scale-by))
--- /dev/null
+++ b/hive/v3/rgb/cyan.cammy
@@ -0,0 +1 @@
1+(v3/triple f-zero f-one f-one)
\ No newline at end of file