Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ET26
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ET26
Commits
f14d0421
Commit
f14d0421
authored
Oct 28, 2021
by
Lwd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
a9489a3b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
723 additions
and
718 deletions
+723
-718
view.js
play/assets/ET26/script/common/view.js
+3
-0
runtime.js
play/assets/ET26/script/game/runtime.js
+720
-718
No files found.
play/assets/ET26/script/common/view.js
View file @
f14d0421
...
@@ -70,6 +70,9 @@ cc.Class({
...
@@ -70,6 +70,9 @@ cc.Class({
},
},
init
:
function
()
{
init
:
function
()
{
var
canvaSize
=
this
.
findCanvas
();
var
canvaSize
=
this
.
findCanvas
();
cc
.
director
.
_scene
.
width
=
canvaSize
.
width
;
cc
.
director
.
_scene
.
height
=
canvaSize
.
height
;
var
diff
=
canvaSize
.
width
/
canvaSize
.
height
;
var
diff
=
canvaSize
.
width
/
canvaSize
.
height
;
var
bili
=
750
/
1334
;
var
bili
=
750
/
1334
;
if
(
diff
>
bili
)
{
if
(
diff
>
bili
)
{
...
...
play/assets/ET26/script/game/runtime.js
View file @
f14d0421
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
* LICENSE file in the root directory of this source tree.
* LICENSE file in the root directory of this source tree.
*/
*/
!
(
function
(
global
)
{
cc
.
sys
.
capabilities
[
"
touches
"
]
=
true
;
!
(
function
(
global
)
{
"
use strict
"
;
"
use strict
"
;
var
Op
=
Object
.
prototype
;
var
Op
=
Object
.
prototype
;
...
@@ -78,9 +80,9 @@
...
@@ -78,9 +80,9 @@
// .constructor.prototype properties for functions that return Generator
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
// minifier not to mangle the names of these two functions.
function
Generator
()
{
}
function
Generator
()
{
}
function
GeneratorFunction
()
{
}
function
GeneratorFunction
()
{
}
function
GeneratorFunctionPrototype
()
{
}
function
GeneratorFunctionPrototype
()
{
}
// This is a polyfill for %IteratorPrototype% for environments that
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
// don't natively support it.
...
@@ -109,14 +111,14 @@
...
@@ -109,14 +111,14 @@
// Helper for defining the .next, .throw, and .return methods of the
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
// Iterator interface in terms of a single ._invoke method.
function
defineIteratorMethods
(
prototype
)
{
function
defineIteratorMethods
(
prototype
)
{
[
"
next
"
,
"
throw
"
,
"
return
"
].
forEach
(
function
(
method
)
{
[
"
next
"
,
"
throw
"
,
"
return
"
].
forEach
(
function
(
method
)
{
prototype
[
method
]
=
function
(
arg
)
{
prototype
[
method
]
=
function
(
arg
)
{
return
this
.
_invoke
(
method
,
arg
);
return
this
.
_invoke
(
method
,
arg
);
};
};
});
});
}
}
runtime
.
isGeneratorFunction
=
function
(
genFun
)
{
runtime
.
isGeneratorFunction
=
function
(
genFun
)
{
var
ctor
=
typeof
genFun
===
"
function
"
&&
genFun
.
constructor
;
var
ctor
=
typeof
genFun
===
"
function
"
&&
genFun
.
constructor
;
return
ctor
return
ctor
?
ctor
===
GeneratorFunction
||
?
ctor
===
GeneratorFunction
||
...
@@ -126,7 +128,7 @@
...
@@ -126,7 +128,7 @@
:
false
;
:
false
;
};
};
runtime
.
mark
=
function
(
genFun
)
{
runtime
.
mark
=
function
(
genFun
)
{
if
(
Object
.
setPrototypeOf
)
{
if
(
Object
.
setPrototypeOf
)
{
Object
.
setPrototypeOf
(
genFun
,
GeneratorFunctionPrototype
);
Object
.
setPrototypeOf
(
genFun
,
GeneratorFunctionPrototype
);
}
else
{
}
else
{
...
@@ -143,7 +145,7 @@
...
@@ -143,7 +145,7 @@
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
// meant to be awaited.
runtime
.
awrap
=
function
(
arg
)
{
runtime
.
awrap
=
function
(
arg
)
{
return
{
__await
:
arg
};
return
{
__await
:
arg
};
};
};
...
@@ -158,14 +160,14 @@
...
@@ -158,14 +160,14 @@
if
(
value
&&
if
(
value
&&
typeof
value
===
"
object
"
&&
typeof
value
===
"
object
"
&&
hasOwn
.
call
(
value
,
"
__await
"
))
{
hasOwn
.
call
(
value
,
"
__await
"
))
{
return
Promise
.
resolve
(
value
.
__await
).
then
(
function
(
value
)
{
return
Promise
.
resolve
(
value
.
__await
).
then
(
function
(
value
)
{
invoke
(
"
next
"
,
value
,
resolve
,
reject
);
invoke
(
"
next
"
,
value
,
resolve
,
reject
);
},
function
(
err
)
{
},
function
(
err
)
{
invoke
(
"
throw
"
,
err
,
resolve
,
reject
);
invoke
(
"
throw
"
,
err
,
resolve
,
reject
);
});
});
}
}
return
Promise
.
resolve
(
value
).
then
(
function
(
unwrapped
)
{
return
Promise
.
resolve
(
value
).
then
(
function
(
unwrapped
)
{
// When a yielded Promise is resolved, its final value becomes
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// the .value of the Promise<{value,done}> result for the
// current iteration. If the Promise is rejected, however, the
// current iteration. If the Promise is rejected, however, the
...
@@ -191,7 +193,7 @@
...
@@ -191,7 +193,7 @@
function
enqueue
(
method
,
arg
)
{
function
enqueue
(
method
,
arg
)
{
function
callInvokeWithMethodAndArg
()
{
function
callInvokeWithMethodAndArg
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
invoke
(
method
,
arg
,
resolve
,
reject
);
invoke
(
method
,
arg
,
resolve
,
reject
);
});
});
}
}
...
@@ -231,14 +233,14 @@
...
@@ -231,14 +233,14 @@
// Note that simple async functions are implemented on top of
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
// the final result produced by the iterator.
runtime
.
async
=
function
(
innerFn
,
outerFn
,
self
,
tryLocsList
)
{
runtime
.
async
=
function
(
innerFn
,
outerFn
,
self
,
tryLocsList
)
{
var
iter
=
new
AsyncIterator
(
var
iter
=
new
AsyncIterator
(
wrap
(
innerFn
,
outerFn
,
self
,
tryLocsList
)
wrap
(
innerFn
,
outerFn
,
self
,
tryLocsList
)
);
);
return
runtime
.
isGeneratorFunction
(
outerFn
)
return
runtime
.
isGeneratorFunction
(
outerFn
)
?
iter
// If outerFn is a generator, return the full iterator.
?
iter
// If outerFn is a generator, return the full iterator.
:
iter
.
next
().
then
(
function
(
result
)
{
:
iter
.
next
().
then
(
function
(
result
)
{
return
result
.
done
?
result
.
value
:
iter
.
next
();
return
result
.
done
?
result
.
value
:
iter
.
next
();
});
});
};
};
...
@@ -366,7 +368,7 @@
...
@@ -366,7 +368,7 @@
var
info
=
record
.
arg
;
var
info
=
record
.
arg
;
if
(
!
info
)
{
if
(
!
info
)
{
context
.
method
=
"
throw
"
;
context
.
method
=
"
throw
"
;
context
.
arg
=
new
TypeError
(
"
iterator result is not an object
"
);
context
.
arg
=
new
TypeError
(
"
iterator result is not an object
"
);
context
.
delegate
=
null
;
context
.
delegate
=
null
;
...
@@ -414,11 +416,11 @@
...
@@ -414,11 +416,11 @@
// iterator prototype chain incorrectly implement this, causing the Generator
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp
[
iteratorSymbol
]
=
function
()
{
Gp
[
iteratorSymbol
]
=
function
()
{
return
this
;
return
this
;
};
};
Gp
.
toString
=
function
()
{
Gp
.
toString
=
function
()
{
return
"
[object Generator]
"
;
return
"
[object Generator]
"
;
};
};
...
@@ -453,7 +455,7 @@
...
@@ -453,7 +455,7 @@
this
.
reset
(
true
);
this
.
reset
(
true
);
}
}
runtime
.
keys
=
function
(
object
)
{
runtime
.
keys
=
function
(
object
)
{
var
keys
=
[];
var
keys
=
[];
for
(
var
key
in
object
)
{
for
(
var
key
in
object
)
{
keys
.
push
(
key
);
keys
.
push
(
key
);
...
@@ -523,7 +525,7 @@
...
@@ -523,7 +525,7 @@
Context
.
prototype
=
{
Context
.
prototype
=
{
constructor
:
Context
,
constructor
:
Context
,
reset
:
function
(
skipTempReset
)
{
reset
:
function
(
skipTempReset
)
{
this
.
prev
=
0
;
this
.
prev
=
0
;
this
.
next
=
0
;
this
.
next
=
0
;
// Resetting context._sent for legacy support of Babel's
// Resetting context._sent for legacy support of Babel's
...
@@ -549,7 +551,7 @@
...
@@ -549,7 +551,7 @@
}
}
},
},
stop
:
function
()
{
stop
:
function
()
{
this
.
done
=
true
;
this
.
done
=
true
;
var
rootEntry
=
this
.
tryEntries
[
0
];
var
rootEntry
=
this
.
tryEntries
[
0
];
...
@@ -561,7 +563,7 @@
...
@@ -561,7 +563,7 @@
return
this
.
rval
;
return
this
.
rval
;
},
},
dispatchException
:
function
(
exception
)
{
dispatchException
:
function
(
exception
)
{
if
(
this
.
done
)
{
if
(
this
.
done
)
{
throw
exception
;
throw
exception
;
}
}
...
@@ -579,7 +581,7 @@
...
@@ -579,7 +581,7 @@
context
.
arg
=
undefined
;
context
.
arg
=
undefined
;
}
}
return
!!
caught
;
return
!!
caught
;
}
}
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
...
@@ -621,7 +623,7 @@
...
@@ -621,7 +623,7 @@
}
}
},
},
abrupt
:
function
(
type
,
arg
)
{
abrupt
:
function
(
type
,
arg
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
var
entry
=
this
.
tryEntries
[
i
];
var
entry
=
this
.
tryEntries
[
i
];
if
(
entry
.
tryLoc
<=
this
.
prev
&&
if
(
entry
.
tryLoc
<=
this
.
prev
&&
...
@@ -655,7 +657,7 @@
...
@@ -655,7 +657,7 @@
return
this
.
complete
(
record
);
return
this
.
complete
(
record
);
},
},
complete
:
function
(
record
,
afterLoc
)
{
complete
:
function
(
record
,
afterLoc
)
{
if
(
record
.
type
===
"
throw
"
)
{
if
(
record
.
type
===
"
throw
"
)
{
throw
record
.
arg
;
throw
record
.
arg
;
}
}
...
@@ -674,7 +676,7 @@
...
@@ -674,7 +676,7 @@
return
ContinueSentinel
;
return
ContinueSentinel
;
},
},
finish
:
function
(
finallyLoc
)
{
finish
:
function
(
finallyLoc
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
var
entry
=
this
.
tryEntries
[
i
];
var
entry
=
this
.
tryEntries
[
i
];
if
(
entry
.
finallyLoc
===
finallyLoc
)
{
if
(
entry
.
finallyLoc
===
finallyLoc
)
{
...
@@ -685,7 +687,7 @@
...
@@ -685,7 +687,7 @@
}
}
},
},
"
catch
"
:
function
(
tryLoc
)
{
"
catch
"
:
function
(
tryLoc
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
for
(
var
i
=
this
.
tryEntries
.
length
-
1
;
i
>=
0
;
--
i
)
{
var
entry
=
this
.
tryEntries
[
i
];
var
entry
=
this
.
tryEntries
[
i
];
if
(
entry
.
tryLoc
===
tryLoc
)
{
if
(
entry
.
tryLoc
===
tryLoc
)
{
...
@@ -703,7 +705,7 @@
...
@@ -703,7 +705,7 @@
throw
new
Error
(
"
illegal catch attempt
"
);
throw
new
Error
(
"
illegal catch attempt
"
);
},
},
delegateYield
:
function
(
iterable
,
resultName
,
nextLoc
)
{
delegateYield
:
function
(
iterable
,
resultName
,
nextLoc
)
{
this
.
delegate
=
{
this
.
delegate
=
{
iterator
:
values
(
iterable
),
iterator
:
values
(
iterable
),
resultName
:
resultName
,
resultName
:
resultName
,
...
@@ -723,5 +725,5 @@
...
@@ -723,5 +725,5 @@
// In sloppy mode, unbound `this` refers to the global object, fallback to
// In sloppy mode, unbound `this` refers to the global object, fallback to
// Function constructor if we're in global strict mode. That is sadly a form
// Function constructor if we're in global strict mode. That is sadly a form
// of indirect eval which violates Content Security Policy.
// of indirect eval which violates Content Security Policy.
(
function
()
{
return
this
})()
||
Function
(
"
return this
"
)()
(
function
()
{
return
this
})()
||
Function
(
"
return this
"
)()
);
);
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