Skip to content

Commit 672d1ce

Browse files
committed
web build v2.2;
hud-menu on web page; puzzles.xml workspace; Rect item; free "G" variable for "golden coin"; OpenSans font;
1 parent 18deaba commit 672d1ce

20 files changed

Lines changed: 868 additions & 51 deletions

!run_pygbag.bat

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22
@rem https://pygame-web.github.io/wiki/publishing/itch.io/
33

44

5-
6-
set DEST=visual-lambda-2.1
5+
set DEST=visual-lambda-2.2
76
@rem It will be also the name of .apk file
87

98

109
rd /Q /S %DEST%
1110
mkdir %DEST%
1211

1312

14-
xcopy *.py %DEST%\
15-
xcopy config.cfg %DEST%\
16-
xcopy library.txt %DEST%\
17-
xcopy toolbar_icons.png %DEST%\
18-
xcopy workspaces\default_workspace.xml %DEST%\workspaces\
19-
xcopy workspaces\clear.xml %DEST%\workspaces\
20-
xcopy workspaces\library_demo.xml %DEST%\workspaces\
21-
xcopy workspaces\predecessors.xml %DEST%\workspaces\
13+
xcopy *.py %DEST%\
14+
xcopy config.cfg %DEST%\
15+
xcopy library.txt %DEST%\
16+
xcopy res\* %DEST%\res\
17+
xcopy workspaces\default_workspace.xml %DEST%\workspaces\
18+
xcopy workspaces\clear.xml %DEST%\workspaces\
19+
xcopy workspaces\library_demo.xml %DEST%\workspaces\
20+
xcopy workspaces\predecessors.xml %DEST%\workspaces\
21+
xcopy workspaces\puzzles.xml %DEST%\workspaces\
22+
23+
24+
python -m pygbag --app_name VisualLambda --package bntr.visuallambda --title "Visual Lambda" --template pygbag_0.9.3_index_html.tmpl --icon docs/favicon.png --archive %DEST%
2225

2326

24-
python -m pygbag --app_name VisualLambda --package bntr.visuallambda --title "Visual Lambda" --template pygbag_0.9.3_index_html.tmpl --icon favicon.png --archive %DEST%
27+
@rem Prepare for https://bntre.github.io/visual-lambda/
28+
xcopy %DEST%\build\web\index.html docs\ /Y
29+
xcopy %DEST%\build\web\%DEST%.tar.gz docs\ /Y

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The project started as a master's thesis (2008); see the thesis for details:
1717
This might be useful for students, educators and researchers who want
1818
an intuitive, interactive way to explore λ‑calculus and reduction strategies.
1919

20-
![Screenshot](https://raw.githubusercontent.com/bntre/visual-lambda/master/screenshot.png)
20+
![Screenshot](https://raw.githubusercontent.com/bntre/visual-lambda/master/res/screenshot.png)
2121

2222
## Bubble Notation
2323

@@ -75,3 +75,8 @@ Possible directions:
7575

7676
- Make terms feel more "springy" and react to dragging with natural, physics-like motion.
7777
- Revisit the lazy-evaluation visualization to make it clearer and more robust.
78+
79+
## License
80+
81+
- Project license: GNU Lesser General Public License v3.0.
82+
- This project uses Open Sans, licensed under SIL Open Font License 1.1.

color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def color( self, var ):
127127
if 0 == var: # Free Variable
128128
return 0xFF,0xFF,0xFF
129129

130-
elif None == var: # Constant
130+
elif None == var: #!!! Special Constant (Gold coin)
131131
return 0xFF,0xFF,0x7F
132132

133133
elif var in self.vars:

config.cfg

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ eatingsec=2.0
77
# Bold circle of lambda bubbles
88
bold_lambda=1
99

10-
# Main window size
11-
#windowsize=800x600
10+
# Default window size
1211
windowsize=1280x960
1312

14-
# Menu font size
15-
#fontsize=11
16-
#fontsize=15
17-
fontsize=13
13+
# Font size
14+
fontsize=15
1815

1916
# Library file
2017
library=library.txt
@@ -23,3 +20,4 @@ library=library.txt
2320
workspace=library_demo.xml
2421
#workspace=clear.xml
2522
#workspace=predecessors.xml
23+
#workspace=puzzles.xml

config.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
#-----------------------------------------------
77
# Platform
88

9-
IS_WEB_PLATFORM = sys.platform == 'emscripten'
10-
#IS_WEB_PLATFORM = True # to test web mode locally
9+
#!!! Testing web mode locally
10+
# Use http://127.0.0.1:8000/
11+
# To debug: uncomment debug_hidden = false in *html.tmpl
12+
13+
FORCE_WEB_PLATFORM = 0
14+
15+
IS_WEB_PLATFORM = FORCE_WEB_PLATFORM or sys.platform == 'emscripten'
1116

1217
ALLOW_SYSTEM_CONSOLE = not IS_WEB_PLATFORM
1318

File renamed without changes.

0 commit comments

Comments
 (0)