+ The original roofpig demos are at jsfiddle.net
+ They are no longer operational, because they tried to load the roofpig_and_three.js over http.
+ Therefore, I downloaded the demo file so I can run them offline.
+
+ The demo files refer to the roofpig JS file at the root of this repo.
+ The script has non-ANSI characters, and most browsers will not like it.
+ To browse the demo locally, you may need to manually add BOM at the start of the file.
+ A bom.txt is included under /lib for you.
+
+
+ Also, I added an extra demo file for the changes I made to the repo.
+
diff --git a/lib/bom.txt b/lib/bom.txt
new file mode 100644
index 0000000..5f28270
--- /dev/null
+++ b/lib/bom.txt
@@ -0,0 +1 @@
+
\ No newline at end of file
From 34b6ebc8adb07b1a0275de013669d263ff7b3b39 Mon Sep 17 00:00:00 2001
From: alexfung <1.alexfung@gmail.com>
Date: Thu, 6 Feb 2020 15:56:19 +0800
Subject: [PATCH 2/4] feat demo for alexfung branches. At this commit, the demo
file shows that the existing roofpig.js displays wrong colors at the START
position when M/E/S slice moves or x//y/z rotations are involved.
---
demo/alexfung.html | 40 ++++++++++++++++++++++++++++++++++++++++
demo/readme.html | 1 +
2 files changed, 41 insertions(+)
create mode 100644 demo/alexfung.html
diff --git a/demo/alexfung.html b/demo/alexfung.html
new file mode 100644
index 0000000..624b5e2
--- /dev/null
+++ b/demo/alexfung.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
alexfung commits demo
+
+ This demo page shows the effects of the commits on the alexfung branch,
+ which is a fork of the 1.4 master.
+
+ The demo files refer to the roofpig JS file at the root of this repo.
+ That file is not exactly the same as the output of the build process.
+ The roofpig JS file contains non-ANSI characters and may confuse browsers.
+ I have added BOM to the roofpig JS file at the root of this repo to make sure browsers know it is a UTF-8 file.
+
+
Color Fix
+
+ In 1.4 (and 1.5P) color is not assigned correctly if alg= includes any M/E/S slice movement or x/y/z rotation.
+ Fixed in the color fix commit.
+
From 80c441ba9ed7f1c163ce2c3070035e591c6320bb Mon Sep 17 00:00:00 2001
From: alexfung <1.alexfung@gmail.com>
Date: Thu, 6 Feb 2020 16:22:34 +0800
Subject: [PATCH 3/4] tidy minor changes to lay the foundation for my remaining
PRs
---
demo/alexfung.html | 32 +++++++++++++++-----------------
src/Dom.coffee | 5 ++++-
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/demo/alexfung.html b/demo/alexfung.html
index 624b5e2..9d84f1d 100644
--- a/demo/alexfung.html
+++ b/demo/alexfung.html
@@ -1,21 +1,21 @@
-
-
-
+ li {margin-bottom: 0.5rem; margin-left: 2rem; list-style-type: disc}
+
alexfung commits demo
@@ -27,14 +27,12 @@
alexfung commits demo
The roofpig JS file contains non-ANSI characters and may confuse browsers.
I have added BOM to the roofpig JS file at the root of this repo to make sure browsers know it is a UTF-8 file.
+
Color Fix
In 1.4 (and 1.5P) color is not assigned correctly if alg= includes any M/E/S slice movement or x/y/z rotation.
Fixed in the color fix commit.
-
Normal: U on top
-
color fix for M
-
color fix for X
diff --git a/src/Dom.coffee b/src/Dom.coffee
index 9c78f46..af7d49c 100644
--- a/src/Dom.coffee
+++ b/src/Dom.coffee
@@ -90,7 +90,10 @@ class Dom
@buttons = [@reset, @prev, @next, @pause, @play]
- LUCIDA_WIDTHS = {M:108, '+':100, '>':100, '<':100, w:98, D:94, U:87, 2:80, R:80, x:78, Z:77, B:73, z:73, F:68, E:68, S:68, L:67, y:65, '²':53, ' ':40, "'":29}
+ # LUCIDA_WIDTHS = {M:108, '+':100, '>':100, '<':100, w:98, D:94, U:87, 2:80, R:80, x:78, Z:77, B:73, z:73, F:68, E:68, S:68, L:67, y:65, '²':53, ' ':40, "'":29}
+ LUCIDA_WIDTHS = {M:108, '+':100, '>':100, '<':100, w:98, D:94, U:87, 2:80, R:80, x:78, Z:77, B:73, z:73, F:68, E:68, S:68, L:67, y:65, '²':53, ' ':40, "'":29
+ }
+
init_alg_text: (text) ->
if @alg_text
width = 0
From 10f07aa45d90c5018f11b39bdcf6dbb46801f923 Mon Sep 17 00:00:00 2001
From: alexfung <1.alexfung@gmail.com>
Date: Thu, 6 Feb 2020 17:54:52 +0800
Subject: [PATCH 4/4] feat suppress CSS if web page has a CSS with
title=roofpig, then roofpit will not insert its own CSS there is no other
method to override the default CSS, because otherwise roofpig.js appends its
own styles during document ready and gets highest priority. refer to demo
---
demo/alexfung.html | 15 +
demo/ruwix.css | 3423 +++++++++++++++++++++++++++++++++++++++++++
demo/sprite.png | Bin 0 -> 5822 bytes
src/document.coffee | 12 +-
4 files changed, 3449 insertions(+), 1 deletion(-)
create mode 100644 demo/ruwix.css
create mode 100644 demo/sprite.png
diff --git a/demo/alexfung.html b/demo/alexfung.html
index 9d84f1d..997dad9 100644
--- a/demo/alexfung.html
+++ b/demo/alexfung.html
@@ -1,4 +1,8 @@
+
+