From d821579fc4a99366abc435f169ac2570ba57ba72 Mon Sep 17 00:00:00 2001 From: Spentine <114318049+Spentine@users.noreply.github.com> Date: Thu, 27 Jun 2024 01:34:34 -0700 Subject: [PATCH] added recent info --- assets/Bloxyl.otf | Bin 0 -> 9888 bytes index.html | 54 ++-- scratch-wiki/code/atan2.html | 30 -- scratch-wiki/code/clonemanager.html | 158 ----------- scratch-wiki/code/cloudencode.html | 261 ------------------ scratch-wiki/code/easeinout.html | 46 --- scratch-wiki/code/glidetodirection.html | 29 -- scratch-wiki/code/hash.html | 29 -- scratch-wiki/code/hsvrgbconversion.html | 71 ----- scratch-wiki/code/num2hexconverter.html | 38 --- scratch-wiki/code/numberformatter.html | 29 -- scratch-wiki/code/pointrotation.html | 26 -- .../code/pointtowardsnearestclone.html | 36 --- scratch-wiki/code/reload.html | 32 --- scratch-wiki/code/savecode.html | 114 -------- scratch-wiki/code/smoothrotation.html | 32 --- scratch-wiki/code/zoom-art.html | 46 --- scratch-wiki/index.html | 40 --- scratch-wiki/style.css | 44 --- scratch-wiki/template.html | 29 -- style.css | 51 +++- 21 files changed, 78 insertions(+), 1117 deletions(-) create mode 100644 assets/Bloxyl.otf delete mode 100644 scratch-wiki/code/atan2.html delete mode 100644 scratch-wiki/code/clonemanager.html delete mode 100644 scratch-wiki/code/cloudencode.html delete mode 100644 scratch-wiki/code/easeinout.html delete mode 100644 scratch-wiki/code/glidetodirection.html delete mode 100644 scratch-wiki/code/hash.html delete mode 100644 scratch-wiki/code/hsvrgbconversion.html delete mode 100644 scratch-wiki/code/num2hexconverter.html delete mode 100644 scratch-wiki/code/numberformatter.html delete mode 100644 scratch-wiki/code/pointrotation.html delete mode 100644 scratch-wiki/code/pointtowardsnearestclone.html delete mode 100644 scratch-wiki/code/reload.html delete mode 100644 scratch-wiki/code/savecode.html delete mode 100644 scratch-wiki/code/smoothrotation.html delete mode 100644 scratch-wiki/code/zoom-art.html delete mode 100644 scratch-wiki/index.html delete mode 100644 scratch-wiki/style.css delete mode 100644 scratch-wiki/template.html diff --git a/assets/Bloxyl.otf b/assets/Bloxyl.otf new file mode 100644 index 0000000000000000000000000000000000000000..161234598f162a952ce6d4f29882648590e63139 GIT binary patch literal 9888 zcmd5?dw5jknSW<8XC|3RCf5_eA|1I30zwc}yoGB;s8~U*Z3Vdmh!6q^G=zYeWHLE( z=9@ETCX)+c2oWQV5QMT~ZEdxwwU4c~dvUGnmThhA*6luZ+iq8Fyuj@5{m#rJ-umpH z8=iB%+xva*{qmh*&AN4K$W4CAA>Yy!D}3+lFN_d5eMDERU9n=_7f{FA+^x zv-X;bm4ChWZ6aF{#t&?+*|_`Ib5FGrIUdE_SGHGe+%l!^<(si~8qdP*n4quHo9O>L zo+;aF_Udr6?%G&WHFedLmoVOq_4&JN>-VO zb)Fgf_d_Dk@jRv+RBnrrg5Ct0h_^G{syNL9Rq+sS2nI^EBqN%q`y-$73M4e7o@h4u&1eJAE0 zf(C7lJRr;mR;zELd|Ow#Zzr$qRJxx-%WTi3`wq&tU!CqNG|^s}?mIERo0d{7?WRVm zqiWhl+i5R&xQaH@473$A7tgimtp!XK?ZRp`-c=H&{$q3XREZO6Xd_^D(j1&oi_r}9 z-1xT+XIE1_c5cNypX5uA_hGaJXVzh6FQEAJwX~8}qg|86;iDDVU8}Kgv!tdzP01Rp zu9g(vBhRS^1mp10JYb)Pb~c_0T8Q@wKx_i8eW0@rd|O=3rRxAmOKW#G)>UuYzSnov z<{7?=G zs_J}uw^#Yru3YU~gB`vVytKM{bJebT9I|G`>KVR!s_N>iYj^qP&6($$?W*@X3bR4d`M&=o{WZxsa#Q8x2?)oF=wuCkJ8ur2&p1TdGut%#qz!L^y}-id*g@B$bxUuzQ!^QqvaL;}Fy}-6VcT7) zRO&aWS5nWVcBl7ZiT`W}D%N4v_|x7tdyYeKx^nZ}p8NuDVNr2OX_;Dn*|_nSe{RAR z6F={}a?<1}Q>RV8YR1f~XU(2-&D?nv^RHd7@Ve`7Sajn}H{Wt=<>Dnvmn~oMh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&a;CDg%Vv2|V_euet33$ehd3e4k``F|f&oNA<9Si@r`V2pI z&-nB?AIJH(&d99&tv#2g&t=$;!!a*B&uz(=e&*b_sj7sFSi-`GkC2vB|AT=E9)GVg(dU6 ztR8u922bXk&uXs%>}Rcwogd}%lkk#el)+=+|F8Ye!k^)j<(SdqXPwD - - - - -Spentine's Page - - - - - - -

Spentine's page

- -

No information

- -Spentine's Scratch Wiki - - + + + + + Spentine's Page + + + + + +
+

Spentine's page

+ +
+ +

  I don't have much to say about myself.

+ +
+ +

Hobbies

+
    +
  • Front-End Developer (Vanilla JS)
  • +
  • Typographic Designer (FontForge)
  • +
+
+ +

Other Links

+ +
+ +
+ diff --git a/scratch-wiki/code/atan2.html b/scratch-wiki/code/atan2.html deleted file mode 100644 index 6775e7a..0000000 --- a/scratch-wiki/code/atan2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -atan2() - - - - - - -

go back

- -

atan2()

- -

Code:

- -

point in direction (([atan v] of ((x) / (y))) + ((180) * <(y) < (0)>))

- -

If you're looking to have atan2 relative to a point, you can use this:

- -

point in direction (([atan v] of (((target x) - (x position)) / ((target y) - (y position)))) + ((180) * <(target y) < (y position)>))

- -

The code works because the atan() function is the reverse of the tangent function. If you recall the tangent function, you know that it finds the angle of the opposite side of a triangle divided by the adjacent side of a triangle. If you divide both the opposite and adjacent side of the triangle, the adjacent side will be normalized to 1 and then opposite side will be equal to tan(theta). Since the two triangles are similar, angles are preserved. Since the adjacent side is 1, tan(theta), or the opposite side is equal to the slope. The tangent function converts an angle into a slope. Likewise, using the atan function (tan^-1(theta)) will convert a slope into an angle. Now, to get the slope of the sprite to the designated x and y position, we must find the slope. We find the change in values by using i - j, where i = (target x, target y) and j = (x position, y position). (target x) - (x position) and (target y) - (y position). Afterwards, we divide the run by the rise rather than rise over run, since in Scratch, angles go clockwise rather than counterclockwise. If the target position is below the y position, then the atan function will return an angle that is that number + 180. In order to account for this, we have to do (180 * <(target y) < (y position)>). If we find the change in value (target y - y position), and create an inequality (target y - y position < 0), we can add y position to both sides in order to get (target y) < (y position). If this is true, it returns 1, and otherwise it returns 0. We can multiply this number by 180 and add it to the final amount. Now, we have an angle formula that will take in a position i, and the current sprite's position j, and finds the angle the sprite needs to turn so that if it's at position j, it will be facing i.

- - - diff --git a/scratch-wiki/code/clonemanager.html b/scratch-wiki/code/clonemanager.html deleted file mode 100644 index 380d9fe..0000000 --- a/scratch-wiki/code/clonemanager.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -Clone Manager - - - - - - -

go back

- -

Clone Manager

- -

Code:

- -

when gf clicked -delete all of [activecloneids v] :: list -delete all of [lastactive v] :: list -set [past v] to () -set [cloneid v] to (0) -forever -check clones -wait (0) seconds :: control -end - -define check clones -set [number of clones v] to (0) -set [overwritepast v] to () -set [index v] to (0) -repeat (length of [lastactive v]) -change [index v] by (1) -set [overwritepast v] to (join (overwritepast) (item (index) of [lastactive v])) -if <(item (index) of [activecloneids v]) = (1)> then -if <(item (index) of [lastactive v]) = (letter (index) of (past))> then -replace item (index) of [activecloneids v] with (0) -else -change [number of clones v] by (1) -end -end -end -set [past v] to (overwritepast) - -when I start as a clone -set [cloneid v] to (item # of (0) in [activecloneids v] :: list) -if <(cloneid) = (0)> then -add (1) to [activecloneids v] -add (0) to [lastactive v] -set [cloneid v] to (length of [activecloneids v]) -else -replace item (cloneid) of [activecloneids v] with (1) -end -forever -replace item (cloneid) of [lastactive v] with ((1) - (item (cloneid) of [lastactive v])) -wait (0) seconds :: control -end

- -

In order to get the X and Y positions of clones, you can do this

- -

when gf clicked -delete all of [activecloneids v] :: list -delete all of [lastactive v] :: list -delete all of [Clones X v] :: list -delete all of [Clones Y v] :: list -set [past v] to () -set [cloneid v] to (0) -forever -check clones -wait (0) seconds :: control -end - -define check clones -set [number of clones v] to (0) -set [overwritepast v] to () -set [index v] to (0) -repeat (length of [lastactive v]) -change [index v] by (1) -set [overwritepast v] to (join (overwritepast) (item (index) of [lastactive v])) -if <(item (index) of [activecloneids v]) = (1)> then -if <(item (index) of [lastactive v]) = (letter (index) of (past))> then -replace item (index) of [activecloneids v] with (0) -else -change [number of clones v] by (1) -end -end -end -set [past v] to (overwritepast) - -when I start as a clone -set [cloneid v] to (item # of (0) in [activecloneids v] :: list) -if <(cloneid) = (0)> then -add (1) to [activecloneids v] -add (x position) to [Clones X v] -add (y position) to [Clones Y v] -add (0) to [lastactive v] -set [cloneid v] to (length of [activecloneids v]) -else -replace item (cloneid) of [activecloneids v] with (1) -replace item (cloneid) of [Clones X v] with (x position) -replace item (cloneid) of [Clones Y v] with (y position) -end -forever -replace item (cloneid) of [lastactive v] with ((1) - (item (cloneid) of [lastactive v])) -replace item (cloneid) of [Clones X v] with (x position) -replace item (cloneid) of [Clones Y v] with (y position) -wait (0) seconds :: control -end

- -

Alternatively, you can do this:

- -

when gf clicked -delete all of [activeclones v] :: list - -when i start as a clone -set [cloneid v] to (item # of (0) in [activeclones v] :: list) -if <(cloneid) = (0)> then -add (1) to [activeclones v] -set [cloneid v] to (length of [activeclones v]) -else -replace item (cloneid) of [activeclones v] with (1) -end - -define delete this clone -replace item (cloneid) of [activeclones v] with (0) -delete this clone

- -

Starting from the alternative code, you could track the clones' X and Y positions using this code:

- -

when gf clicked -delete all of [activeclones v] :: list -delete all of [Clones X v] :: list -delete all of [Clones Y v] :: list - -when i start as a clone -set [cloneid v] to (item # of (0) in [activeclones v] :: list) -if <(cloneid) = (0)> then -add (1) to [activeclones v] -set [cloneid v] to (length of [activeclones v]) -add (x position) to [Clones X v] -add (y position) to [Clones Y v] -else -replace item (cloneid) of [activeclones v] with (1) -end -forever -replace item (cloneid) of [Clones X v] with (x position) -replace item (cloneid) of [Clones Y v] with (y position) -end - -define delete this clone -replace item (cloneid) of [activeclones v] with (0) -delete this clone

- - - diff --git a/scratch-wiki/code/cloudencode.html b/scratch-wiki/code/cloudencode.html deleted file mode 100644 index 8ae13f7..0000000 --- a/scratch-wiki/code/cloudencode.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - -Cloud Encode - - - - - - -

go back

- -

Cloud Encode

- -

Code:

- -

define encode (str) -set [index v] to (0) -set [return v] to () -repeat (length of (str)) -change [index v] by (1) -set [return v] to (join (return) (item # of (letter (index) of (str)) in [chars v] :: list)) -end - -define decode (num) -set [index v] to (0) -set [return v] to () -repeat ((length of (num)) / (2)) -change [index v] by (2) -set [return v] to (join (return) (item (join (letter ((index) - (1)) of (num)) (letter (index) of (num))) of [chars v])) -

- -

Set the "chars" list to

- -

- - - - - - - - -a -b -c -d -e -f -g -h -i -j -k -l -m -n -o -p -q -r -s -t -u -v -w -x -y -z -1 -2 -3 -4 -5 -6 -7 -8 -9 -0 -- -_ -

- -

Or you can create this script, run it, and delete it.

- -

set [index v] to (0) -delete all of [chars v] :: list -repeat (48) -change [index v] by (1) -add (letter (index) of [#########abcdefghijklmnopqrstuvwxyz1234567890-_ ]) to [chars v] // remember to add a space at the end -end

- -

for voting type projects

- -

define encode (str) -set [index v] to (0) // encode a cloud variable -set [return v] to () -repeat (length of (str)) -change [index v] by (1) -set [return v] to (join (return) (item # of (letter (index) of (str)) in [chars v] :: list)) -end - -define decode (num) -set [index v] to (0) // decode a cloud variable -set [return v] to () -repeat ((length of (num)) / (2)) -change [index v] by (2) -set [return v] to (join (return) (item (join (letter ((index) - (1)) of (num)) (letter (index) of (num))) of [chars v])) - -define get cloud variable (c) -if <(c) = (1)> then // make it easier to retrieve cloud variables -set [return v] to (c1) -else -if <(c) = (2)> then -set [return v] to (c2) -else -if <(c) = (3)> then -set [return v] to (c3) -else -if <(c) = (4)> then -set [return v] to (c4) -else -if <(c) = (5)> then -set [return v] to (c5) -else -if <(c) = (6)> then -set [return v] to (c6) -else -if <(c) = (7)> then -set [return v] to (c7) -else -if <(c) = (8)> then -set [return v] to (c8) - -define set (c) to (v) -if <(c) = (1)> then // make it easier to set cloud variables -set [c1 v] to (v) -else -if <(c) = (2)> then -set [c2 v] to (v) -else -if <(c) = (3)> then -set [c3 v] to (v) -else -if <(c) = (4)> then -set [c4 v] to (v) -else -if <(c) = (5)> then -set [c5 v] to (v) -else -if <(c) = (6)> then -set [c6 v] to (v) -else -if <(c) = (7)> then -set [c7 v] to (v) -else -if <(c) = (8)> then -set [c8 v] to (v) - -define disallow (username :: custom) -set [index 2 v] to (0) -repeat (8) // check if there is an empty slot -change [index 2 v] by (1) -get cloud variable (index 2) -if <(return) = (0)> then // if there is an empty slot -encode (username :: custom) -set (index 2) to (return) // take the slot -stop [this script v] -end -end -set [index v] to (0) // there is no empty slots -repeat (7) // push all slots down and add yours to the 8th -change [index v] by (1) -get cloud variable ((index) + (1)) -set (index) to (return) -end -encode (username :: custom) -set [c8 v] to (return) // set yours to the 8th - -define is (username :: custom) valid? -set [index 2 v] to (0) -repeat (8) // loop through all cloud variables and check if none of them are yours -change [index 2 v] by (1) -get cloud variable (index 2) -decode (return) -if <(return) = (username :: custom)> then // if your username is in the cloud -set [return v] to (false) // this username is not valid -stop [this script v] -end -end -set [return v] to (true) // all of the cloud variables were checked and none of them were yours

- -

Save / Load from a cloud variable up to 10 rather than 8

-

define get cloud variable (c) -if <(c) = (1)> then // make it easier to retrieve cloud variables -set [return v] to (c1) -else -if <(c) = (2)> then -set [return v] to (c2) -else -if <(c) = (3)> then -set [return v] to (c3) -else -if <(c) = (4)> then -set [return v] to (c4) -else -if <(c) = (5)> then -set [return v] to (c5) -else -if <(c) = (6)> then -set [return v] to (c6) -else -if <(c) = (7)> then -set [return v] to (c7) -else -if <(c) = (8)> then -set [return v] to (c8) -else -if <(c) = (9)> then -set [return v] to (c9) -else -if <(c) = (10)> then -set [return v] to (c10) - -define set (c) to (v) -if <(c) = (1)> then // make it easier to set cloud variables -set [c1 v] to (v) -else -if <(c) = (2)> then -set [c2 v] to (v) -else -if <(c) = (3)> then -set [c3 v] to (v) -else -if <(c) = (4)> then -set [c4 v] to (v) -else -if <(c) = (5)> then -set [c5 v] to (v) -else -if <(c) = (6)> then -set [c6 v] to (v) -else -if <(c) = (7)> then -set [c7 v] to (v) -else -if <(c) = (8)> then -set [c8 v] to (v) -else -if <(c) = (9)> then -set [c9 v] to (v) -else -if <(c) = (10)> then -set [c10 v] to (v)

- - - diff --git a/scratch-wiki/code/easeinout.html b/scratch-wiki/code/easeinout.html deleted file mode 100644 index b7ab75e..0000000 --- a/scratch-wiki/code/easeinout.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - -EaseInOut - - - - - - -

go back

- -

Easing In / Out / InOut

- -

Code:

- -

define ease in from (x1) (y1) to (x2) (y2) in (secs) secs with intensity: (intensity) -go to x: (x1) y: (y1) -set [t v] to (0) -repeat (((secs) * (30)) - (1)) -change [t v] by ((0.033333333) / (secs)) -set [u v] to ([sin v] of (([e ^ v] of (([ln v] of (t)) * ((1) / (intensity)))) * (90)) -go to x: (((x1) * ((1) - (u))) + ((x2) * (u))) y: (((y1) * ((1) - (u))) + ((y2) * (u))) -end -go to x: (x2) y: (y2) - -define ease out from (x1) (y1) to (x2) (y2) in (secs) secs with intensity: (intensity) -go to x: (x1) y: (y1) -set [t v] to (0) -repeat (((secs) * (30)) - (1)) -change [t v] by ((0.033333333) / (secs)) -set [u v] to ([cos v] of (([e ^ v] of (([ln v] of (t)) * (intensity))) * (90)) -go to x: (((x1) * (u)) + ((x2) * ((1) - (u)))) y: (((y1) * (u)) + ((y2) * ((1) - (u)))) -end -go to x: (x2) y: (y2) - -define ease in out from (x1) (y1) to (x2) (y2) in (secs) secs with intensity: (intensity) -ease out from (x1) (y1) to (((x1) + (x2)) / (2)) (((y1) + (y2)) / (2)) in ((secs) / (2)) secs with intensity: (intensity) -ease in from (((x1) + (x2)) / (2)) (((y1) + (y2)) / (2)) to (x2) (y2) in ((secs) / (2)) secs with intensity: (intensity)

- - - diff --git a/scratch-wiki/code/glidetodirection.html b/scratch-wiki/code/glidetodirection.html deleted file mode 100644 index b74078e..0000000 --- a/scratch-wiki/code/glidetodirection.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - -glide to direction - - - - - - -

go back

- -

glide to direction

- -

Code:

- -

define glide to direction (dir) in (secs) secs -set [t v] to ((((((dir) - (direction)) + (180)) mod (360)) - (180)) / ((secs) * (30))) -repeat (((secs) * (30)) - (1)) -turn cw (t) degrees -end -point in direction (dir)

- - - diff --git a/scratch-wiki/code/hash.html b/scratch-wiki/code/hash.html deleted file mode 100644 index a7d800c..0000000 --- a/scratch-wiki/code/hash.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - -Hash - - - - - - -

go back

- -

Hash

- -

Code:

- -

define hash(str -set[output v]to(77978 -repeat(length of(str -set[output v]to(((([floor v]of((output)/(77977)))+(1))*(77977))+((((output)mod(77977))*(([e ^ v]of((<[qetuoadgjlxvn13579`!#%&\(-_\[\\};:,/>]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>+((2)*(<[weyupafgklcvm14589~!$%*\(=_\]\\|;",\<\>]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>+((2)*(<[rtyusdfgzxcv23450`~!^&*\(+\[\]\\':",?]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>+((2)*(<[iopasdfgbnm12345@#$%^&*\({}|;':",]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>+((2)*(<[hjklzxcvbnm12345\)-=_+\[\]\\{}|;':",]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>+((2)*(<[67890`~!@#$%^&*\(\)-=_+\[\]\\{}|;':",]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>+((2)*<[./\<\>?]contains(letter([floor v]of((output)/(77977)))of(str))?::operators>))))))))))))/(3)))*(2.71)))mod(77977 -end -set[output v]to((output)mod(77977

- - - diff --git a/scratch-wiki/code/hsvrgbconversion.html b/scratch-wiki/code/hsvrgbconversion.html deleted file mode 100644 index ef69026..0000000 --- a/scratch-wiki/code/hsvrgbconversion.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - -HSV RGB conversion - - - - - - -

go back

- -

HSV to RGB

- -

Code (one line):

-

define hsv2rgb(h)(s)(v -set pen color to(((([floor v]of(((s)*(v))*(255)))*(round([e ^ v]of((2.772588722239781)*(letter(([floor v]of(((h)mod(360))/(60)))+(1))of(422004))))))+(([floor v]of((((s)*(v))*((1)-([abs v]of((((h)/(60))mod(2))-(1)))))*(255)))*(round([e ^ v]of((2.772588722239781)*(letter(([floor v]of(((h)mod(360))/(60)))+(1))of(240240)))))))+(([floor v]of((255)*((v)-((s)*(v)))))*(65793))

- -

Code (0 to 100):

-

define hsv2rgb(h)(s)(v -set pen color to(((([floor v]of(((s)*(v))*(0.0255)))*(round([e ^ v]of((2.772588722239781)*(letter(([floor v]of(((h)mod(100))*(0.06)))+(1))of(422004))))))+(([floor v]of((((s)*(v))*((1)-([abs v]of((((h)*(0.06))mod(2))-(1)))))*(0.0255)))*(round([e ^ v]of((2.772588722239781)*(letter(([floor v]of(((h)mod(100))*(0.06)))+(1))of(240240)))))))+(([floor v]of((2.55)*((v)-(((s)*(v))/(100)))))*(65793))

- -

RGB to HSV

- -

Code (very short):

-

define rgb2hsv(r)(g)(b) -set[h v]to((60)*(((((((g)-(b))*<not<<(r)<(g)>or<(r)<(b)>>>)+((((b)-(r))*<<not<(g)<(b)>>and<(g)>(r)>>)+(((r)-(g))*<<(b)>(r)>and<(b)>(g)>>)))/((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))+(((r)*<not<<(r)>(g)>or<(r)>(b)>>>)+(((g)*<<not<(g)>(b)>>and<(g)<(r)>>)+((b)*<<(b)<(r)>and<(b)<(g)>>)))))mod((6)+(<<(r)<(g)>or<(r)<(b)>>*[Infinity])))+(((2)*<<not<(g)<(b)>>and<(g)>(r)>>)+((4)*<<(b)>(r)>and<(b)>(g)>>)))) -set[s v]to(((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))+(((r)*<not<<(r)>(g)>or<(r)>(b)>>>)+(((g)*<<not<(g)>(b)>>and<(g)<(r)>>)+((b)*<<(b)<(r)>and<(b)<(g)>>))))/(((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))) -set[v v]to((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))/(255))

- -

Code (0 to 100):

-

define rgb2hsv(r)(g)(b) -set[h v]to(round((16.666666666667)*(((((((g)-(b))*<not<<(r)<(g)>or<(r)<(b)>>>)+((((b)-(r))*<<not<(g)<(b)>>and<(g)>(r)>>)+(((r)-(g))*<<(b)>(r)>and<(b)>(g)>>)))/((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))+(((r)*<not<<(r)>(g)>or<(r)>(b)>>>)+(((g)*<<not<(g)>(b)>>and<(g)<(r)>>)+((b)*<<(b)<(r)>and<(b)<(g)>>)))))mod((6)+(<<(r)<(g)>or<(r)<(b)>>*[Infinity])))+(((2)*<<not<(g)<(b)>>and<(g)>(r)>>)+((4)*<<(b)>(r)>and<(b)>(g)>>))))) -set[s v]to(round((100)*(((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))+(((r)*<not<<(r)>(g)>or<(r)>(b)>>>)+(((g)*<<not<(g)>(b)>>and<(g)<(r)>>)+((b)*<<(b)<(r)>and<(b)<(g)>>))))/(((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))))) -set[v v]to(round((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<not<(g)<(b)>>and<(g)>(r)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))/(2.55)))

- -

HSL to RGB

- -

Code:

- -

define hsl2rgb(h)(s)(l -set[a v]to((s)*((0.5)-([abs v]of((l)-(0.5 -f(0)(h)(l -set[return v]to((f)*(65536 -f(8)(h)(l -change[return v]by((f)*(256 -f(4)(h)(l -change[return v]by(f -define f(n)(h)(l -set[k v]to(((n)+((h)/(30)))mod(12 -set[f v]to(((((k)-(4))*<(k)<(4)>)+(((8)-(k))*<(k)>(8)>))+(1 -set[f v]to(round(((l)-((a)*((([abs v]of((f)+(1)))+((f)-(1)))/(2))))*(255

- -

Code (one line):

-

define hsl2rgb(h)(s)(l -set pen color to(((round(((l)-(((s)*((0.5)-([abs v]of((l)-(0.5)))))*((([abs v]of(((((((h)/(30))mod(12))-(4))*<(((h)/(30))mod(12))<(4)>)+(((8)-(((h)/(30))mod(12)))*<(((h)/(30))mod(12))>(8)>))+(2)))+((((((h)/(30))mod(12))-(4))*<(((h)/(30))mod(12))<(4)>)+(((8)-(((h)/(30))mod(12)))*<(((h)/(30))mod(12))>(8)>)))/(2))))*(255)))*(65536))+(((round(((l)-(((s)*((0.5)-([abs v]of((l)-(0.5)))))*((([abs v]of(((((((8)+((h)/(30)))mod(12))-(4))*<(((8)+((h)/(30)))mod(12))<(4)>)+(((8)-(((8)+((h)/(30)))mod(12)))*<(((8)+((h)/(30)))mod(12))>(8)>))+(2)))+((((((8)+((h)/(30)))mod(12))-(4))*<(((8)+((h)/(30)))mod(12))<(4)>)+(((8)-(((8)+((h)/(30)))mod(12)))*<(((8)+((h)/(30)))mod(12))>(8)>)))/(2))))*(255)))*(256))+(round(((l)-(((s)*((0.5)-([abs v]of((l)-(0.5)))))*((([abs v]of(((((((4)+((h)/(30)))mod(12))-(4))*<(((4)+((h)/(30)))mod(12))<(4)>)+(((8)-(((4)+((h)/(30)))mod(12)))*<(((4)+((h)/(30)))mod(12))>(8)>))+(2)))+((((((4)+((h)/(30)))mod(12))-(4))*<(((4)+((h)/(30)))mod(12))<(4)>)+(((8)-(((4)+((h)/(30)))mod(12)))*<(((4)+((h)/(30)))mod(12))>(8)>)))/(2))))*(255

- -

RGB to HSL

- -

Code (one line):

-

define rgb2hsl(r)(g)(b -set[h v]to(((360)*<(b)>(g)>)+(([acos v]of(((r)-(((g)+(b))/(2)))/([sqrt v]of((((r)*((r)-((g)+(b))))+((g)*((g)-(b))))+((b)*(b))))))*((<not<(b)>(g)>>*(2))-(1 -set[s v]to(((1)-(((((r)*<not<<(r)>(g)>or<(r)>(b)>>>)+(((g)*<<(g)<(r)>and<(g)<(b)>>)+((b)*<<(b)<(r)>and<(b)<(g)>>)))+((b)*<<(b)=(g)>and<(b)<(r)>>))/((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<(g)>(r)>and<(g)>(b)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))+((b)*<<(b)=(g)>and<(b)>(r)>>))))*<((r)+((g)+(b)))>(0 -set[l v]to(((((r)*<not<<(r)<(g)>or<(r)<(b)>>>)+(((g)*<<(g)>(r)>and<(g)>(b)>>)+((b)*<<(b)>(r)>and<(b)>(g)>>)))+((b)*<<(b)=(g)>and<(b)>(r)>>))/(255

- - - diff --git a/scratch-wiki/code/num2hexconverter.html b/scratch-wiki/code/num2hexconverter.html deleted file mode 100644 index 6505e7a..0000000 --- a/scratch-wiki/code/num2hexconverter.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -TEMPLATE - - - - - - -

go back

- -

Number to hex color code

- -

Code:

- -

define convert number to hex color code(num -set[output v]to(join(join(letter((([floor v]of((num)/(1048576)))mod(16))+(1))of[0123456789ABCDEF])(join(letter((([floor v]of((num)/(65536)))mod(16))+(1))of[0123456789ABCDEF])(letter((([floor v]of((num)/(4096)))mod(16))+(1))of[0123456789ABCDEF])))(join(letter((([floor v]of((num)/(256)))mod(16))+(1))of[0123456789ABCDEF])(join(letter((([floor v]of((num)/(16)))mod(16))+(1))of[0123456789ABCDEF])(letter((([floor v]of(num))mod(16))+(1))of[0123456789ABCDEF

- -

Code (1-indexed):

- -

define convert number to hex color code(num -set[output v]to(join(join(letter((([floor v]of(((num)-(1))/(1048576)))mod(16))+(1))of[0123456789ABCDEF])(join(letter((([floor v]of(((num)-(1))/(65536)))mod(16))+(1))of[0123456789ABCDEF])(letter((([floor v]of(((num)-(1))/(4096)))mod(16))+(1))of[0123456789ABCDEF])))(join(letter((([floor v]of(((num)-(1))/(256)))mod(16))+(1))of[0123456789ABCDEF])(join(letter((([floor v]of(((num)-(1))/(16)))mod(16))+(1))of[0123456789ABCDEF])(letter((([floor v]of((num)-(1)))mod(16))+(1))of[0123456789ABCDEF

- - -

Hex color code to number

- -

Code:

- -

define hex color to number (hex) -set [output v] to ((join [0x] (hex)) + (0))

- - - diff --git a/scratch-wiki/code/numberformatter.html b/scratch-wiki/code/numberformatter.html deleted file mode 100644 index d7972ff..0000000 --- a/scratch-wiki/code/numberformatter.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - -number formatter - - - - - - -

go back

- -

number formatter

- -

Code (one line, no negatives):

- -

define format number (n) (float) -set [return v] to (join(([floor v]of(((n)/((([10^ v]of((([floor v]of(([log v]of(n))/(3)))*(3))+((3)*<((n)/([10^ v]of(([floor v]of(([log v]of(n))/(3)))*(3))::operators))=(1000)>))::operators)*<(n)>(1)>)+<not<(n)>(1)>>))*([10^ v]of(float)::operators)))/([10^ v]of(float)::operators))(join()(item(((([floor v]of(([log v]of(n))/(3)))*(3))+((3)*<((n)/([10^ v]of(([floor v]of(([log v]of(n))/(3)))*(3))::operators))=(1000)>))/(3))of[endings v])))

- -

Below is a version that supports negative numbers:

- -

define format number(n)(float) -set[return v]to(join(letter<(n)<(0)>of(-))(join(([floor v]of((([abs v]of(n))/([10 ^ v]of((([floor v]of(([log v]of([abs v]of(n)))/(3)))*(3))+((3)*<(([abs v]of(n))/([10 ^ v]of(([floor v]of(([log v]of([abs v]of(n)))/(3)))*(3))))=(1000)>))))*([10 ^ v]of(float))))/([10 ^ v]of(float)))(join( )(item(((([floor v]of(([log v]of([abs v]of(n)))/(3)))*(3))+((3)*<(([abs v]of(n))/([10 ^ v]of([floor v]of((([log v]of([abs v]of(n)))/(3))*(3)))))=(1000)>))/(3))of[endings v]

- - diff --git a/scratch-wiki/code/pointrotation.html b/scratch-wiki/code/pointrotation.html deleted file mode 100644 index af9f61a..0000000 --- a/scratch-wiki/code/pointrotation.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -point rotation - - - - - - -

go back

- -

rotation around a point

- -

Code:

- -

define rotate (deg) degrees around (x) (y) -go to x: (((((x position) - (x)) * ([cos v] of (deg))) + (((y position) - (y)) * ([sin v] of (deg)))) + (x)) y: (((((y position) - (y)) * ([cos v] of (deg))) - (((x position) - (x)) * ([sin v] of (deg)))) + (y)) -turn cw (deg) degrees

- - - diff --git a/scratch-wiki/code/pointtowardsnearestclone.html b/scratch-wiki/code/pointtowardsnearestclone.html deleted file mode 100644 index ce135a4..0000000 --- a/scratch-wiki/code/pointtowardsnearestclone.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -Point Towards Nearest Clone - - - - - - -

go back

- -

Point Towards Nearest Clone

- -

Code:

- -

define Point towards nearest clone -set [index v] to (0) -set [closestclone v] to (0) -set [closestdist v] to [Infinity] -repeat (length of [Clones X v]) -change [index v] by (1) -set [dist v] to ((((x position) - (item (index) of [Clones X v])) * ((x position) - (item (index) of [Clones X v]))) + (((y position) - (item (index) of [Clones Y v])) * ((y position) - (item (index) of [Clones Y v])))) -if <(dist) < (closestdist)> then -set [closestclone v] to (index) -set [closestdist v] to (dist) -end -end -point in direction (([atan v] of (((item (closestclone) of [Clones X v]) - (x position)) / ((item (closestclone) of [Clones Y v]) - (y position)))) + ((180) * <(item (closestclone) of [Clones Y v]) < (y position)>))

- - - diff --git a/scratch-wiki/code/reload.html b/scratch-wiki/code/reload.html deleted file mode 100644 index d145b6b..0000000 --- a/scratch-wiki/code/reload.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -reload - - - - - - -

go back

- -

reload

- -

Code:

- -

set [capacity v] to (6) // set this to the capacity of the barrel or whatever -when I receive [reload v] -if <((ammo in mag) + (total ammo)) > (capacity)> then -change [total ammo v] by ((ammo in mag) - (capacity)) -set [ammo in mag v] to (capacity) -else -change [ammo in mag v] by (total ammo) -set [total ammo v] to (0) -end

- - - \ No newline at end of file diff --git a/scratch-wiki/code/savecode.html b/scratch-wiki/code/savecode.html deleted file mode 100644 index 5e865bd..0000000 --- a/scratch-wiki/code/savecode.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -Savecode - - - - - - -

go back

- -

Savecode

- -

Encode a list:

- -

define encode -set [save code v] to () -set [index v] to (0) -repeat (length of [list v]) -change [index v] by (1) -set [char index v] to (0) -repeat (length of (item (index) of [list v])) -change [char index v] by (1) -if <[/,] contains (letter (char index) of (item (index) of [list v]))? :: operators> then -set [save code v] to (join (savecode) [/] -end -set [save code v] to (join (save code) (letter (char index) of (item (index) of [list v]))) -end -set [save code v] to (join (save code) [,]) -end - -define decode (string) -delete [all v] of [list v] -set [char index v] to () -set [index v] to (1) -repeat until <(index) > (length of (string))> -if <(letter (index) of (string)) = [,]> then -add (char index) to [list v] -set [char index v] to () -else -if <(letter (index) of (string)) = [/]> then -change [index v] by (1) -end -set [char index v] to (join (char index) (letter (index) of (string))) -end -change [index v] by (1) -end

- -

Encode an unmodifiable list using a checksum hash:

- -

define hash(str -set[output v]to(77978 -repeat(length of(str -set[output v]to(((([floor v]of((output)/(77977)))+(1))*(77977))+((((output)mod(77977))*(([e ^ v]of((<[qetuoadgjlxvn13579`!#%&\(-_\[\\};:,/>]contains(letter([floor v]of((output)/(77977)))of(str))?>+((2)*(<[weyupafgklcvm14589~!$%*\(=_\]\\|;",\<\>]contains(letter([floor v]of((output)/(77977)))of(str))?>+((2)*(<[rtyusdfgzxcv23450`~!^&*\(+\[\]\\':",?]contains(letter([floor v]of((output)/(77977)))of(str))?>+((2)*(<[iopasdfgbnm12345@#$%^&*\({}|;':",]contains(letter([floor v]of((output)/(77977)))of(str))?>+((2)*(<[hjklzxcvbnm12345\)-=_+\[\]\\{}|;':",]contains(letter([floor v]of((output)/(77977)))of(str))?>+((2)*(<[67890`~!@#$%^&*\(\)-=_+\[\]\\{}|;':",]contains(letter([floor v]of((output)/(77977)))of(str))?>+((2)*<[./\<\>?]contains(letter([floor v]of((output)/(77977)))of(str))?>))))))))))))/(3)))*(2.71)))mod(77977 -end -set[output v]to((output)mod(77977 - -define encode -set [save code v] to () -set [index v] to (0) -repeat (length of [list v]) -change [index v] by (1) -set [char index v] to (0) -repeat (length of (item (index) of [list v])) -change [char index v] by (1) -if <[/,] contains (letter (char index) of (item (index) of [list v]))? :: operators> then -set [save code v] to (join (savecode) [/] -end -set [save code v] to (join (save code) (letter (char index) of (item (index) of [list v]))) -end -set [save code v] to (join (save code) [,]) -end - -define decode (string) -delete [all v] of [list v] -set [char index v] to () -set [index v] to (1) -repeat until <(index) > (length of (string))> -if <(letter (index) of (string)) = [,]> then -add (char index) to [list v] -set [char index v] to () -else -if <(letter (index) of (string)) = [/]> then -change [index v] by (1) -end -set [char index v] to (join (char index) (letter (index) of (string))) -end -change [index v] by (1) -end - -define encode savecode -encode -hash (savecode) -set [savecode v] to (join (savecode) (join (output) [,])) - -define decode savecode (savecode) -decode (savecode) -set [previous hash v] to (item [last] of [list v]) -delete [last] of [list v] -encode -hash (savecode) -if <(output) = (previous hash)> then -The savecode is valid and not modified :: grey -else -The user modified the savecode :: grey -end

- - - diff --git a/scratch-wiki/code/smoothrotation.html b/scratch-wiki/code/smoothrotation.html deleted file mode 100644 index 33cd54f..0000000 --- a/scratch-wiki/code/smoothrotation.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -smooth rotation - - - - - - -

go back

- -

Smooth Rotation

- -

Code:

- -

turn cw ((((((target direction) - (direction)) + (180)) mod (360)) - (180)) / (smoothness)) degrees

- - - -

The alternate code can be used instead.

- -

turn ccw (target direction) degrees -turn cw ((target direction) - ((direction) / (smoothness))) degrees

- -

Essentially, Scratch automatically adds 180, mods 360, and subtracts 180 when setting a direction. We can take advantage of this by using setting the direction of (target direction - direction) beforehand. Now, in order to add this to the current direction, we must use (target direction - direction) again, which would cancel out the old target direction and set the direction back to normal. Now, it's [set direction to (target direction - direction), set direction to (target direction - direction + (direction / smoothness))]. The next optimization can come from making the first statement negative. This would allow us to use the [turn cw () degrees] or [turn ccw () degrees] block. We simply make every occurence of "direction" in the next line negative. Once we do that, we have [point in direction (direction - target direction) degrees] which can simply be [turn ccw (target direction) degrees], and the second line will become [point in direction (target direction + direction + (-direction / smoothness))], which can be simplified to [turn cw (direction - (direction / smoothness))].

- - diff --git a/scratch-wiki/code/zoom-art.html b/scratch-wiki/code/zoom-art.html deleted file mode 100644 index 7cca748..0000000 --- a/scratch-wiki/code/zoom-art.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - -zoom in - - - - - - -

go back

- -

zoom in art

- -

Code:

- -

when gf clicked -set [smoothing v] to (1.2) // you can change this -set [x bounds v] to (100) // you can change this -set [y bounds v] to (80) // you can change this -set [zoom size v] to (200) // you can change this -forever -if then -set [x pos v] to ((((x pos) + (mouse x)) / (smoothing)) - (mouse x)) -set [y pos v] to((((y pos) + (mouse y)) / (smoothing)) - (mouse y)) -set [size v] to ((((size :: variables) - (zoom size)) / (smoothing)) + (zoom size) -else -set [x pos v] to ((x pos) / (smoothing)) -set [y pos v] to ((y pos) / (smoothing)) -set [size v] to ((((size :: variables) - (100)) / (smoothing)) + (100) -end -if <([abs v] of (x pos)) > (x bounds)> then -set [x pos v] to ((<(x pos) > (0)> * ((x bounds) * (2))) - (x bounds)) -end -if <([abs v] of (y pos)) > (y bounds)> then -set [y pos v] to ((<(y pos) > (0)> * ((y bounds) * (2))) - (y bounds)) -end -go to x: (x pos) y: (y pos) -set size to (size :: variables) %

- - - \ No newline at end of file diff --git a/scratch-wiki/index.html b/scratch-wiki/index.html deleted file mode 100644 index 4884452..0000000 --- a/scratch-wiki/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -Spentine's Scratch Wiki - - - - - - -

Spentine's Scratch Wiki

- -

  A place for me to share some of my codes for the block plugin. It makes it easy to help people very quickly, as they usually have the same kinds of problems and I could just copy and paste it from this little script hub that I made.

- -
- -

articles:

- -

-atan2 -savecode -zoom in art -gun reload -rotation around a point -number formatter -smooth rotation -point towards nearest clone -ease in / out / inout -clone manager -glide to direction -cloud encode -HSV RGB conversion -number to hex color code -hash a string - - - diff --git a/scratch-wiki/style.css b/scratch-wiki/style.css deleted file mode 100644 index 16f6022..0000000 --- a/scratch-wiki/style.css +++ /dev/null @@ -1,44 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@300&family=Overpass+Mono:wght@500&display=swap'); - -body { - background-color: #151515; - padding-top: 120px; - padding-left: calc(30% - 80px); - padding-right: calc(30% - 80px); - font-family: 'Albert Sans'; - color: #FFFFFF; - font-size: 16px; -} - -p { - font-family: inherit; - color: inherit; - font-size: 16px; -} - -h1 { - font-family: inherit; - color: inherit; - font-size: 32px; -} -f -h2 { - font-family: inherit; - color: inherit; - font-size: 24px; - line-height: 0; -} - -a { - color: #BBEEFF; -} - -.code { - font-family: "Overpass Mono"; - padding-left: 40px; - padding-right: 40px; - padding-top: 20px; - padding-bottom: 20px; - background-color: #0d0d0d; - white-space: pre-wrap; -} \ No newline at end of file diff --git a/scratch-wiki/template.html b/scratch-wiki/template.html deleted file mode 100644 index 1aff13b..0000000 --- a/scratch-wiki/template.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - -TEMPLATE - - - - - - -

go back

- -

Template

- -

Code:

- -

- -Lorem ipsum() -dolor sit (amet) - -

- - - \ No newline at end of file diff --git a/style.css b/style.css index c08e80b..288200c 100644 --- a/style.css +++ b/style.css @@ -1,34 +1,67 @@ -@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@300&display=swap'); +@font-face { + font-family: "Bloxyl"; + src: + local("Bloxyl"), + url("assets/Bloxyl.otf"); +} body { - background-color: #050510; - padding-top: 120px; - padding-left: calc(30% - 80px); - padding-right: calc(30% - 80px); - font-family: 'Albert Sans'; + background-color: #101012; + + padding-top: 60px; + padding-left: calc(24px); + padding-right: calc(24px); + + display: flex; + justify-content: center; + + font-family: 'Bloxyl'; color: #FFFFFF; - font-size: 16px; + font-size: 18px; + font-weight: normal; +} + +hr { + border-color: #404050; + background-color: #404050; + height: 2px; + border: 0; + margin: 24px 0px; } -p { +.container { + width: 1024px; +} + +p, li { font-family: inherit; color: inherit; - font-size: 16px; + font-weight: normal; + font-size: 18px; + + text-align: justify; + letter-spacing: 0.5px; } h1 { font-family: inherit; color: inherit; + font-weight: normal; font-size: 32px; } h2 { font-family: inherit; color: inherit; + font-weight: normal; font-size: 24px; line-height: 0; } a { color: #BBEEFF; +} + +.centered { + text-align: center; } \ No newline at end of file