Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Luc Didry
wemawema
Commits
ce7970f4
Commit
ce7970f4
authored
Oct 29, 2017
by
Luc Didry
Browse files
Fix Rick + glitter bug
parent
5031df45
Pipeline
#27304
passed with stage
in 13 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
js/wema_wema.js
View file @
ce7970f4
...
...
@@ -957,6 +957,7 @@ function drawOver(ctx, rc, ra, ws, wc, wa, wf, wfs, w, wx, wy, ps, pc, pa, pf, p
ctx
.
translate
(
rx
+
(
rw
/
2
),
ry
+
rh
/
2
);
ctx
.
rotate
(
rr
*
Math
.
PI
/
180
);
ctx
.
drawImage
(
rick
,
-
(
rw
/
2
),
-
(
rh
/
2
),
rw
,
rh
);
ctx
.
rotate
(
-
rr
*
Math
.
PI
/
180
);
ctx
.
translate
(
-
(
rx
+
rw
/
2
),
-
(
ry
+
rh
/
2
));
if
(
gli
)
{
var
glitter
=
new
Image
();
...
...
js/wema_wema.min.js
View file @
ce7970f4
...
...
@@ -65,7 +65,7 @@ var U="regular"===n?"":n+" "
if
(
e
.
font
=
U
+
parseInt
(
r
)
+
"
px '
"
+
l
+
"
'
"
,
e
.
fillStyle
=
colorToRGBA
(
s
,
o
),
L
>
0
&&
(
e
.
strokeStyle
=
R
,
e
.
lineWidth
=
L
,
e
.
strokeText
(
i
,
parseInt
(
c
),
parseInt
(
g
),
z
)),
e
.
fillText
(
i
,
parseInt
(
c
),
parseInt
(
g
),
z
),
U
=
"
regular
"
===
u
?
""
:
u
+
"
"
,
e
.
font
=
U
+
parseInt
(
m
)
+
"
px '
"
+
v
,
e
.
fillStyle
=
colorToRGBA
(
d
,
h
),
G
>
0
&&
(
e
.
strokeStyle
=
O
,
e
.
lineWidth
=
G
,
e
.
strokeText
(
f
,
parseInt
(
p
),
parseInt
(
w
),
F
)),
e
.
fillText
(
f
,
parseInt
(
p
),
parseInt
(
w
),
F
),
x
){
var
D
=
new
Image
D
.
src
=
"
img/Rick.png
"
,
D
.
onload
=
function
(){
C
=
parseInt
(
C
),
S
=
parseInt
(
S
)
var
a
=
D
.
width
*
I
/
100
,
t
=
D
.
height
*
I
/
100
if
(
console
.
log
(
a
),
console
.
log
(
t
),
e
.
translate
(
C
+
a
/
2
,
S
+
t
/
2
),
e
.
rotate
(
T
*
Math
.
PI
/
180
),
e
.
drawImage
(
D
,
-
a
/
2
,
-
t
/
2
,
a
,
t
),
e
.
translate
(
-
(
C
+
a
/
2
),
-
(
S
+
t
/
2
)),
b
){
var
r
=
new
Image
if
(
console
.
log
(
a
),
console
.
log
(
t
),
e
.
translate
(
C
+
a
/
2
,
S
+
t
/
2
),
e
.
rotate
(
T
*
Math
.
PI
/
180
),
e
.
drawImage
(
D
,
-
a
/
2
,
-
t
/
2
,
a
,
t
),
e
.
rotate
(
-
T
*
Math
.
PI
/
180
),
e
.
translate
(
-
(
C
+
a
/
2
),
-
(
S
+
t
/
2
)),
b
){
var
r
=
new
Image
r
.
src
=
"
img/glitter-calc.png
"
,
r
.
onload
=
function
(){
e
.
drawImage
(
r
,
0
,
0
),
$
(
"
#svg
"
).
html
(
svg
.
getSerializedSvg
())}}
else
$
(
"
#svg
"
).
html
(
svg
.
getSerializedSvg
())}}
else
if
(
b
){
var
B
=
new
Image
B
.
src
=
"
img/glitter-calc.png
"
,
B
.
onload
=
function
(){
e
.
drawImage
(
B
,
0
,
0
),
$
(
"
#svg
"
).
html
(
svg
.
getSerializedSvg
())}}
else
$
(
"
#svg
"
).
html
(
svg
.
getSerializedSvg
())}
function
roundRect
(
e
,
a
,
t
,
r
,
s
,
o
,
l
,
n
){
if
(
void
0
===
n
&&
(
n
=!
0
),
void
0
===
o
&&
(
o
=
5
),
"
number
"
==
typeof
o
)
o
=
{
tl
:
o
,
tr
:
o
,
br
:
o
,
bl
:
o
}
else
{
var
i
=
{
tl
:
0
,
tr
:
0
,
br
:
0
,
bl
:
0
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment