Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
劳工
zeroing-engine
Commits
1cc3cf1f
Commit
1cc3cf1f
authored
May 06, 2021
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
。。。
parent
bca64451
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23768 additions
and
6 deletions
+23768
-6
engine.532693328a5de3160fb3650735e23bb131d62e00.js
dist/engine.532693328a5de3160fb3650735e23bb131d62e00.js
+23753
-0
engine.min.b80dd14683c0ed27effe3224feae757dc230f462.js
dist/engine.min.b80dd14683c0ed27effe3224feae757dc230f462.js
+1
-0
manifest.json
manifest.json
+1
-1
rollup.config.js
rollup.config.js
+4
-1
net.ts
src/2d/net.ts
+7
-2
TextField.ts
src/2d/text/TextField.ts
+2
-2
No files found.
dist/engine.532693328a5de3160fb3650735e23bb131d62e00.js
0 → 100644
View file @
1cc3cf1f
This diff is collapsed.
Click to expand it.
dist/engine.min.b80dd14683c0ed27effe3224feae757dc230f462.js
0 → 100644
View file @
1cc3cf1f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
manifest.json
View file @
1cc3cf1f
{
"id"
:
"engine"
,
"url_dbg"
:
"engine.1531e1ce239eefdc940cfc3ee5b6e31b7df98fd9.js"
,
"url"
:
"engine.min.64c67f3bebea51c4d348989ff6bf86d17531bc85.js"
}
\ No newline at end of file
{
"id"
:
"engine"
,
"url_dbg"
:
"engine.532693328a5de3160fb3650735e23bb131d62e00.js"
,
"url"
:
"engine.min.b80dd14683c0ed27effe3224feae757dc230f462.js"
}
\ No newline at end of file
rollup.config.js
View file @
1cc3cf1f
...
...
@@ -12,6 +12,8 @@ const fs = require('fs');
const
tslibWrapper
=
'var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: __decorate,__param: __param,__metadata: __metadata,__awaiter: __awaiter,__generator: __generator,__exportStar: __exportStar,__values: __values,__read: __read,__spread: __spread,__spreadArrays: __spreadArrays,__await: __await,__asyncGenerator: __asyncGenerator,__asyncDelegator: __asyncDelegator,__asyncValues: __asyncValues,__makeTemplateObject: __makeTemplateObject,__importStar: __importStar,__importDefault: __importDefault};'
const
tslibCode
=
fs
.
readFileSync
(
__dirname
+
'/scripts/tslib.min.js'
);
const
isProd
=
process
.
env
.
BUILD
===
'production'
;
export
default
{
input
:
'src/index.ts'
,
output
:
[
...
...
@@ -30,9 +32,10 @@ export default {
resolve
({}),
typescript
({
// useTsconfigDeclarationDir: true,
//target: isProd ? 'ES5' : 'ES2017'
}),
commonjs
(),
process
.
env
.
BUILD
===
'production'
&&
uglify
({})
isProd
&&
uglify
({})
],
external
:
[
'tslib'
],
};
src/2d/net.ts
View file @
1cc3cf1f
...
...
@@ -106,8 +106,13 @@ function doXhrRequest({url, method, params, type, headers}, resolve, reject) {
reject
(
reason
)
};
xhr
.
onloadend
=
():
void
=>
{
if
(
xhr
.
status
==
404
)
{
reject
(
url
+
' 404 (Not Found)'
)
switch
(
xhr
.
status
){
case
404
:
reject
(
url
+
' 404 (Not Found)'
)
break
;
case
429
:
reject
(
url
+
' Bandwidth Limit Exceeded'
)
break
;
}
};
if
(
isGet
)
{
...
...
src/2d/text/TextField.ts
View file @
1cc3cf1f
...
...
@@ -322,7 +322,7 @@ export class TextField extends Sprite {
let
targetItem
;
let
count
=
0
;
for
(
let
item
of
this
.
_textFlow
)
{
count
+=
item
.
text
.
length
;
count
+=
item
.
text
.
replace
(
/
\n
|
\r
/g
,
""
).
length
;
if
(
index
<
count
)
{
targetItem
=
item
;
break
;
...
...
@@ -755,7 +755,7 @@ export class TextField extends Sprite {
for
(
let
i
=
0
,
l
=
hardLines
.
length
;
i
<
l
;
i
++
)
{
let
str
=
hardLines
[
i
];
if
(
!
str
)
continue
;
let
w
=
measureChar
(
str
[
0
],
index
++
);
let
w
=
measureChar
(
str
[
0
],
index
);
let
lineStr
=
str
[
0
];
let
wordW
=
0
;
let
strLen
=
str
.
length
;
...
...
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