1
0
mirror of https://github.com/teoxoy/factorio-blueprint-editor.git synced 2024-12-26 20:54:22 +02:00

upgrade basis to 1.15

This commit is contained in:
teoxoy 2021-09-29 18:08:10 +02:00
parent a6cb87c489
commit eb3766b4b0
8 changed files with 30 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import * as PIXI from 'pixi.js'
import { BasisLoader } from '@pixi/basis'
import basisTranscoderJS from '@pixi/basis/assets/basis_transcoder.js'
import basisTranscoderWASM from '@pixi/basis/assets/basis_transcoder.wasm'
import basisTranscoderJS from './basis/transcoder.7f0a00a.js'
import basisTranscoderWASM from './basis/transcoder.7f0a00a.wasm'
import { loadData } from './core/factorioData'
import G from './common/globals'
import { Entity } from './core/Entity'

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -873,6 +873,7 @@ dependencies = [
"indicatif",
"lazy_static",
"listenfd",
"num_cpus",
"regex",
"reqwest",
"serde",

View File

@ -31,3 +31,4 @@ indicatif = "0.15.0"
listenfd = { version = "0.3", optional = true }
dotenv = { version = "0.15.0", optional = true }
async-tar = "0.2.0"
num_cpus = "1.13.0"

Binary file not shown.

View File

@ -214,7 +214,7 @@ pub async fn extract(data_dir: &PathBuf, factorio_data: &PathBuf) -> Result<(),
tokio::fs::create_dir_all(&tmp_dir).await?;
let metadata_file = Arc::new(tokio::sync::Mutex::new(metadata_file));
futures::future::try_join_all((0..20).map(|_| {
futures::future::try_join_all((0..num_cpus::get()).map(|_| {
compress_next_img(
file_paths.clone(),
tmp_dir.clone(),
@ -268,6 +268,8 @@ async fn compress_next_img(
let basisu_executable = "./basisu";
let status = Command::new(basisu_executable)
// .args(&["-comp_level", "2"])
.args(&["-no_multithreading"])
// .args(&["-ktx2"])
.args(&["-mipmap"])
.args(&["-file", path.to_str().ok_or("PathBuf to &str failed")?])
.args(&[

View File

@ -39,7 +39,7 @@ class Context {
},
plugins: [
this.luaPlugin,
pluginLink(/basis_transcoder\.(js|wasm)$/, { useDefault: true }),
pluginLink(/transcoder\.(.+?)\.(js|wasm)$/, { useDefault: true }),
pluginReplace({
__CORS_PROXY_URL__: runServer
? 'https://api.allorigins.win/raw?url='