Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
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-editor
Commits
659c4e39
Commit
659c4e39
authored
Jul 24, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容混淆版本的引擎
parent
5dc859bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
index.js
src/utils/index.js
+9
-1
sheet-pack.js
src/utils/sheet-pack.js
+2
-1
preview-preprocess.js
src/views/Preview/preview-preprocess.js
+2
-2
No files found.
src/utils/index.js
View file @
659c4e39
...
...
@@ -174,6 +174,11 @@ export function findProcess(rootMetas, builtinMetas, filter) {
return
result
;
function
findOnce
(
metas
,
parentPath
)
{
/*if (parentPath) {
//let pathStr = parentPath.map(item=>item.name || item.metaName).join('>');
let pathStr = parentPath.map(item => item.name || item.process.uuid.substr(0, 8)).join('>');
console.log('findProcess', pathStr);
}*/
for
(
let
meta
of
metas
)
{
let
path
=
parentPath
?
parentPath
:
[];
if
(
!
parentPath
)
{
...
...
@@ -181,6 +186,9 @@ export function findProcess(rootMetas, builtinMetas, filter) {
}
for
(
let
key
in
meta
.
sub
)
{
let
subProcess
=
meta
.
sub
[
key
];
if
(
path
.
find
(
item
=>
item
.
process
&&
item
.
process
.
uuid
===
subProcess
.
uuid
))
{
break
;
}
let
subMeta
=
meta
.
metas
?
meta
.
metas
.
find
(
item
=>
item
.
id
===
subProcess
.
meta
)
:
null
;
if
(
!
subMeta
)
{
subMeta
=
rootMetas
.
find
(
item
=>
item
.
id
===
subProcess
.
meta
);
...
...
@@ -486,7 +494,7 @@ export function dataURLtoBlob(dataUrl) {
return
new
Blob
([
u8arr
],
{
type
:
mime
});
}
export
async
function
zipViewFile
(
file
){
export
async
function
zipViewFile
(
file
)
{
let
dataString
=
await
readTextFile
(
file
);
let
buf
=
new
Buffer
(
dataString
);
...
...
src/utils/sheet-pack.js
View file @
659c4e39
...
...
@@ -141,7 +141,8 @@ export async function packImages(assets, options = {}) {
}
async
function
deal
(
assets
,
urls
,
getSheetUrlByUUID
,
name
,
blob
,
frames
)
{
const
sheetUUID
=
sha256
(
urls
.
sort
().
join
()).
toString
();
//const sheetUUID = sha256(urls.sort().join()).toString();
const
sheetUUID
=
sha256
(
Object
.
keys
(
frames
).
sort
().
join
()).
toString
();
let
url
;
if
(
getSheetUrlByUUID
)
{
...
...
src/views/Preview/preview-preprocess.js
View file @
659c4e39
...
...
@@ -53,7 +53,7 @@ export async function preprocess(project, packages) {
const
dataUrl
=
URL
.
createObjectURL
(
new
Blob
([
JSON
.
stringify
(
data
)]));
const
{
libraryScriptElMap
,
analyseResult
}
=
await
generateLibraryScriptEl
(
tpl
,
dependencies
,
getPackages
(
packages
),
'//yun.duiba.com.cn/editor/zeroing/libs/'
);
const
{
libraryScriptElMap
,
analyseResult
}
=
await
generateLibraryScriptEl
(
tpl
,
dependencies
,
getPackages
(
packages
),
'//yun.duiba.com.cn/editor/zeroing/libs/'
,
true
);
tpl
=
fillTemplate
(
tpl
,
{
pageTitle
,
...
...
@@ -64,7 +64,7 @@ export async function preprocess(project, packages) {
tpl
=
tpl
.
replace
(
'//yun.duiba.com.cn/aurora/$VERSION$-data.json'
,
dataUrl
);
console
.
log
(
"塞入数据"
,
storeName
,
data
)
db
.
set
(
storeName
,
{
id
:
project
.
id
,
data
,
...
...
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