Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
sora
/
sanitary-net
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3b9d058d
authored
Apr 15, 2024
by
o.kimura
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
最終結果の関数を切り離す
parent
d79c9fe9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
157 additions
and
98 deletions
takumi-style/app/css/main_ie.css
takumi-style/app/index_inc.html
takumi-style/app/js/quizMaster.js
takumi-style/app/js/takumi.js
takumi-style/app/js/topAnime.js
takumi-style/app/css/main_ie.css
View file @
3b9d058d
This diff is collapsed.
Click to expand it.
takumi-style/app/index_inc.html
View file @
3b9d058d
...
...
@@ -203,8 +203,9 @@
<body>
<script>
navigator
.
serviceWorker
.
register
(
'sw.js'
);
</script>
<!-- sound -->
<audio
preload=
"auto"
id=
"clickmp3"
>
<source
src=
"sound/click.mp3"
type=
"audio/mp3"
>
...
...
@@ -415,6 +416,16 @@
<div
id=
"result_plate"
class=
"vanish"
>
<!------------------------------------------------------------------------------------ begin : ans_plate -->
<img
src=
"images/result/q1.png"
class=
"vanish"
id=
"q1"
>
<img
src=
"images/result/q2.png"
class=
"vanish"
id=
"q2"
>
<img
src=
"images/result/q3.png"
class=
"vanish"
id=
"q3"
>
<img
src=
"images/result/yes1.png"
class=
"vanish"
id=
"yes1"
>
<img
src=
"images/result/yes2.png"
class=
"vanish"
id=
"yes2"
>
<img
src=
"images/result/yes3.png"
class=
"vanish"
id=
"yes3"
>
<img
src=
"images/result/no1.png"
class=
"vanish"
id=
"no1"
>
<img
src=
"images/result/no2.png"
class=
"vanish"
id=
"no2"
>
<img
src=
"images/result/no3.png"
class=
"vanish"
id=
"no3"
>
<img
src=
"images/result/arr_yes.png"
class=
"vanish"
id=
"arr_yes"
width=
"40"
height=
"40"
>
<img
src=
"images/result/arr_no.png"
class=
"vanish"
id=
"arr_no"
width=
"40"
height=
"40"
>
<img
src=
""
class=
"vanish"
id=
"yes_btn"
width=
"200"
height=
"auto"
>
...
...
takumi-style/app/js/quizMaster.js
View file @
3b9d058d
var
rand
=
0
;
// quiz master
function
quizMaster
(
et
)
{
...
...
@@ -275,6 +276,8 @@ function quizMaster(et) {
});
//----- sound : click
function
returnTop
()
{
console
.
log
(
"playSE#seStop"
);
//----------sound : seStop
rand
=
0
;
$
(
"#result_plate"
).
removeClass
(
"goldPrize randomize1 randomize2 randomize3 answer1 answer2"
);
$
(
"#yes_btn"
).
removeClass
(
"yes_btn3 yes_btn2 yes_btn1"
);
$
(
"#no_btn"
).
removeClass
(
"no_btn3 no_btn2 no_btn1"
);
...
...
@@ -282,6 +285,17 @@ function quizMaster(et) {
$
(
"#no_btn"
).
addClass
(
"vanish"
);
$
(
"#arr_yes"
).
addClass
(
"vanish"
);
$
(
"#arr_no"
).
addClass
(
"vanish"
);
$
(
"#q1"
).
addClass
(
"vanish"
);
$
(
"#q2"
).
addClass
(
"vanish"
);
$
(
"#q3"
).
addClass
(
"vanish"
);
$
(
"#yes1"
).
addClass
(
"vanish"
);
$
(
"#yes2"
).
addClass
(
"vanish"
);
$
(
"#yes3"
).
addClass
(
"vanish"
);
$
(
"#no1"
).
addClass
(
"vanish"
);
$
(
"#no2"
).
addClass
(
"vanish"
);
$
(
"#no3"
).
addClass
(
"vanish"
);
$
(
"#button_next_result"
).
addClass
(
"vanish"
);
$
(
"#gamemp3"
).
get
(
0
).
pause
();
...
...
@@ -291,7 +305,7 @@ function quizMaster(et) {
document
.
getElementById
(
"result_title"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_main"
).
classList
.
remove
(
"vanish"
);
resultPlate
.
classList
.
remove
(
"randomize"
+
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
1
));
//
resultPlate.classList.remove("randomize" + (Math.floor(Math.random() * 3) + 1));
myObj
.
hideResult
();
topAnime
.
dispFunc
();
}
...
...
@@ -305,15 +319,29 @@ function quizMaster(et) {
},
{
passive
:
true
});
//----- sound : click
function
returnSelect
()
{
console
.
log
(
"playSE#seStop"
);
//----------sound : seStop 要注意。
$
(
"#result_plate"
).
removeClass
(
"goldPrize randomize1 randomize2 randomize3 answer1 answer2"
);
// $("#result_plate").removeClass("goldPrize randomize1 randomize2 randomize3 answer1 answer2");
rand
=
0
;
$
(
"#yes_btn"
).
removeClass
(
"yes_btn3 yes_btn2 yes_btn1"
);
$
(
"#no_btn"
).
removeClass
(
"no_btn3 no_btn2 no_btn1"
);
$
(
"#yes_btn"
).
addClass
(
"vanish"
);
$
(
"#no_btn"
).
addClass
(
"vanish"
);
$
(
"#arr_yes"
).
addClass
(
"vanish"
);
$
(
"#arr_no"
).
addClass
(
"vanish"
);
$
(
"#q1"
).
addClass
(
"vanish"
);
$
(
"#q2"
).
addClass
(
"vanish"
);
$
(
"#q3"
).
addClass
(
"vanish"
);
$
(
"#yes1"
).
addClass
(
"vanish"
);
$
(
"#yes2"
).
addClass
(
"vanish"
);
$
(
"#yes3"
).
addClass
(
"vanish"
);
$
(
"#no1"
).
addClass
(
"vanish"
);
$
(
"#no2"
).
addClass
(
"vanish"
);
$
(
"#no3"
).
addClass
(
"vanish"
);
$
(
"#button_next_result"
).
addClass
(
"vanish"
);
$
(
"#gamemp3"
).
get
(
0
).
pause
();
...
...
@@ -322,7 +350,6 @@ function quizMaster(et) {
$
(
"#topmp3"
).
get
(
0
).
pause
();
document
.
getElementById
(
"result_title"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_main"
).
classList
.
remove
(
"vanish"
);
resultPlate
.
classList
.
remove
(
"randomize"
+
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
1
));
myObj
.
hideResult
();
levelSelectMenu
.
dispFunc
();
...
...
@@ -389,6 +416,7 @@ function quizMaster(et) {
document
.
getElementById
(
"result_select_button"
).
classList
.
add
(
"vanish"
);
resultPlate
.
classList
.
add
(
"vanish"
);
}
myObj
.
dispResult
=
function
()
{
resultPlate
.
classList
.
remove
(
"vanish"
);
...
...
@@ -401,68 +429,72 @@ function quizMaster(et) {
}
});
//------ anime
setTimeout
(
function
()
{
document
.
getElementById
(
"result_top_button"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_select_button"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"button_next_result"
).
classList
.
remove
(
"vanish"
);
anime
({
targets
:
"#button_next_result"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
anime
({
targets
:
"#result_top_button"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
anime
({
targets
:
"#result_select_button"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
},
1000
);
$
(
"#button_next_result"
).
on
(
"click"
,
function
()
{
judgePat
(
myObj
,
resultPlate
);
$
(
this
).
addClass
(
"vanish"
);
});
document
.
getElementById
(
"result_top_button"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_select_button"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"button_next_result"
).
classList
.
remove
(
"vanish"
);
anime
({
targets
:
"#button_next_result"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
anime
({
targets
:
"#result_top_button"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
anime
({
targets
:
"#result_select_button"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
}
return
myObj
;
}
$
(
function
()
{
$
(
"#button_next_result"
).
on
(
"click"
,
function
()
{
judgePat
();
$
(
this
).
addClass
(
"vanish"
);
});
$
(
"#yes_btn"
).
on
(
"click"
,
function
()
{
$
(
"#result_plate"
).
addClass
(
"answer1"
);
//
$("#result_plate").addClass("answer1");
document
.
getElementById
(
"arr_yes"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"arr_no"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"yes_btn"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"no_btn"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"q"
+
rand
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"yes"
+
rand
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_top_button"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_select_button"
).
classList
.
remove
(
"vanish"
);
});
$
(
"#no_btn"
).
on
(
"click"
,
function
()
{
$
(
"#result_plate"
).
addClass
(
"answer2"
);
//$("#result_plate").addClass("answer2");
document
.
getElementById
(
"arr_yes"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"arr_no"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"yes_btn"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"no_btn"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"q"
+
rand
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"no"
+
rand
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_top_button"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"result_select_button"
).
classList
.
remove
(
"vanish"
);
});
});
function
judgePat
(
myObj
,
resultPlate
)
{
function
judgePat
()
{
console
.
log
(
"hit"
)
document
.
getElementById
(
"result_title"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"result_main"
).
classList
.
add
(
"vanish"
);
var
rand
=
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
1
);
resultPlate
.
classList
.
remove
(
"randomize1"
);
resultPlate
.
classList
.
remove
(
"randomize2"
);
resultPlate
.
classList
.
remove
(
"randomize3"
);
resultPlate
.
classList
.
add
(
"randomize"
+
rand
);
rand
=
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
1
);
document
.
getElementById
(
"arr_yes"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"arr_no"
).
classList
.
remove
(
"vanish"
);
document
.
getElementById
(
"yes_btn"
).
classList
.
remove
(
"vanish"
);
...
...
@@ -471,13 +503,17 @@ function judgePat(myObj, resultPlate) {
document
.
getElementById
(
"no_btn"
).
classList
.
add
(
"no_btn"
+
rand
);
if
(
rand
==
1
)
{
$
(
"#yes_btn"
).
attr
(
"src"
,
"images/result/yesbtn1.png"
);
$
(
"#yes_btn"
).
attr
(
"src"
,
"images/result/yesbtn1.png"
);
$
(
"#no_btn"
).
attr
(
"src"
,
"images/result/nobtn1.png"
);
$
(
"#q1"
).
removeClass
(
"vanish"
);
}
else
if
(
rand
==
2
)
{
$
(
"#yes_btn"
).
attr
(
"src"
,
"images/result/yesbtn2.png"
);
$
(
"#no_btn"
).
attr
(
"src"
,
"images/result/nobtn2.png"
);
$
(
"#q2"
).
removeClass
(
"vanish"
);
}
else
if
(
rand
==
3
)
{
$
(
"#yes_btn"
).
attr
(
"src"
,
"images/result/yesbtn3.png"
);
$
(
"#no_btn"
).
attr
(
"src"
,
"images/result/nobtn3.png"
);
$
(
"#q3"
).
removeClass
(
"vanish"
);
}
anime
({
targets
:
"#result_plate"
,
...
...
@@ -485,5 +521,5 @@ function judgePat(myObj, resultPlate) {
easing
:
"easeOutSine"
,
duration
:
500
});
//------ anime
return
myObj
;
console
.
log
(
"rand: "
+
rand
)
}
takumi-style/app/js/takumi.js
View file @
3b9d058d
// takumi
function
takumiMaster
(){
//---init
var
myObj
=
new
Object
();
var
takumi
=
document
.
getElementById
(
"takumi"
);
var
fuki
=
document
.
getElementById
(
"takumi_fuki"
);
var
fuki_text
=
fuki
.
getElementsByClassName
(
"fuki_text"
)[
0
];
//---------------------------------------------------------------------たくみ君を消します。
myObj
.
hideFunc
=
function
(){
fuki
.
classList
.
add
(
"vanish"
);
anime
({
targets
:
"#takumi"
,
right
:
"-13vw"
,
easing
:
"easeOutQuad"
,
duration
:
300
,
complete
:
function
(){
takumi
.
classList
.
add
(
"vanish"
);
}});
//------ anime
}
myObj
.
directHide
=
function
(){
//-------------演出無しで消します
fuki
.
classList
.
add
(
"vanish"
);
takumi
.
classList
.
add
(
"vanish"
);
}
//---------------------------------------------------------------------たくみ君を表示します。
myObj
.
dispFunc
=
function
(){
takumi
.
classList
.
remove
(
"vanish"
);
anime
({
targets
:
"#takumi"
,
right
:[
"-13vw"
,
"0"
],
duration
:
1000
});
//------ anime
}
//---------------------------------------------------------------------吹き出しを消します。
myObj
.
hideFuki
=
function
(){
fuki
.
classList
.
add
(
"vanish"
);
}
//---------------------------------------------------------------------吹き出しを表示します。
myObj
.
dispFuki
=
function
(
str
){
if
(
str
!=
undefined
){
this
.
setFukiText
(
str
);
}
fuki
.
classList
.
remove
(
"vanish"
);
anime
({
targets
:
"#takumi_fuki"
,
scale
:[
0
,
1
],
duration
:
1000
});
//------ anime
}
//---------------------------------------------------------------------吹き出しの内容を変更します。
myObj
.
setFukiText
=
function
(
str
){
//パスは"images/...."から記述してください。
fuki_text
.
src
=
str
;
}
return
myObj
;
}
\ No newline at end of file
function
takumiMaster
()
{
//---init
var
myObj
=
new
Object
();
var
takumi
=
document
.
getElementById
(
"takumi"
);
var
fuki
=
document
.
getElementById
(
"takumi_fuki"
);
var
fuki_text
=
fuki
.
getElementsByClassName
(
"fuki_text"
)[
0
];
//---------------------------------------------------------------------たくみ君を消します。
myObj
.
hideFunc
=
function
()
{
fuki
.
classList
.
add
(
"vanish"
);
anime
({
targets
:
"#takumi"
,
right
:
"-13vw"
,
easing
:
"easeOutQuad"
,
duration
:
300
,
complete
:
function
()
{
takumi
.
classList
.
add
(
"vanish"
);
}
});
//------ anime
}
myObj
.
directHide
=
function
()
{
//-------------演出無しで消します
fuki
.
classList
.
add
(
"vanish"
);
takumi
.
classList
.
add
(
"vanish"
);
}
//---------------------------------------------------------------------たくみ君を表示します。
myObj
.
dispFunc
=
function
()
{
takumi
.
classList
.
remove
(
"vanish"
);
anime
({
targets
:
"#takumi"
,
right
:
[
"-13vw"
,
"0"
],
duration
:
1000
});
//------ anime
}
//---------------------------------------------------------------------吹き出しを消します。
myObj
.
hideFuki
=
function
()
{
fuki
.
classList
.
add
(
"vanish"
);
}
//---------------------------------------------------------------------吹き出しを表示します。
myObj
.
dispFuki
=
function
(
str
)
{
if
(
str
!=
undefined
)
{
this
.
setFukiText
(
str
);
}
fuki
.
classList
.
remove
(
"vanish"
);
anime
({
targets
:
"#takumi_fuki"
,
scale
:
[
0
,
1
],
duration
:
1000
});
//------ anime
}
//---------------------------------------------------------------------吹き出しの内容を変更します。
myObj
.
setFukiText
=
function
(
str
)
{
//パスは"images/...."から記述してください。
fuki_text
.
src
=
str
;
}
return
myObj
;
}
takumi-style/app/js/topAnime.js
View file @
3b9d058d
...
...
@@ -517,9 +517,8 @@ function topAnime(et) {
$
(
function
()
{
$
(
"#button_return"
).
on
(
"click"
,
function
()
{
console
.
log
(
"hit"
)
$
(
"#topmp3"
).
get
(
0
).
pause
();
$
(
"#selectmp3"
).
get
(
0
).
pause
();
$
(
"#quizmp3"
).
get
(
0
).
pause
();
$
(
"#topmp3"
).
get
(
0
).
pause
();
$
(
"#selectmp3"
).
get
(
0
).
pause
();
$
(
"#quizmp3"
).
get
(
0
).
pause
();
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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