Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e265611b0c | |||
| f80aa00d9c | |||
| fb1cf316cb | |||
| 07077e1968 | |||
| 7049b436bb | |||
| 17a3d7072c | |||
| dc97362860 | |||
| c339d4d847 | |||
| a1434ce602 | |||
| 10ec94159b |
@@ -21,5 +21,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CLOUDFLARE_API_TOKEN: rka9QVA_-_NXxkXfZmx4Rh93vwaYU6wfoQA6r0TY
|
CLOUDFLARE_API_TOKEN: rka9QVA_-_NXxkXfZmx4Rh93vwaYU6wfoQA6r0TY
|
||||||
CLOUDFLARE_ACCOUNT_ID: a158eefc10ac767335d6151c3c85d4a7
|
CLOUDFLARE_ACCOUNT_ID: a158eefc10ac767335d6151c3c85d4a7
|
||||||
# 빌드 없이 현재 폴더('.') 전체를 즉시 배포합니다.
|
run: npx wrangler@latest pages deploy . --project-name=anakomi --commit-dirty=true --branch=main
|
||||||
run: npx wrangler@latest pages deploy . --project-name=static
|
|
||||||
|
|||||||
3
_headers
Normal file
3
_headers
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
/*
|
||||||
|
Cross-Origin-Embedder-Policy: require-corp
|
||||||
|
Cross-Origin-Opener-Policy: same-origin
|
||||||
47
index.js
47
index.js
@@ -1,4 +1,4 @@
|
|||||||
// Support for growable heap + pthreads, where the buffer may change, so JS views
|
// Support for growable heap + pthreads, where the buffer may change, so JS views
|
||||||
// must be updated.
|
// must be updated.
|
||||||
function GROWABLE_HEAP_I8() {
|
function GROWABLE_HEAP_I8() {
|
||||||
if (wasmMemory.buffer != HEAP8.buffer) {
|
if (wasmMemory.buffer != HEAP8.buffer) {
|
||||||
@@ -65,6 +65,47 @@ function GROWABLE_HEAP_F64() {
|
|||||||
// can continue to use Module afterwards as well.
|
// can continue to use Module afterwards as well.
|
||||||
var Module = typeof Module != "undefined" ? Module : {};
|
var Module = typeof Module != "undefined" ? Module : {};
|
||||||
|
|
||||||
|
// --- 여기서부터 추가: 쪼개진 WASM 파일을 합치는 커스텀 로더 ---
|
||||||
|
if (typeof Module === 'undefined') {
|
||||||
|
var Module = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🌟 핵심 수정: 웹 워커(Worker) 환경이 아닐 때만 실행하도록 분기 처리
|
||||||
|
if (typeof importScripts === 'undefined') {
|
||||||
|
Module["instantiateWasm"] = function(imports, receiveInstance) {
|
||||||
|
console.log("메인 스레드: 쪼개진 WASM 파일(aa, ab, ac) 다운로드 및 병합 시작...");
|
||||||
|
|
||||||
|
Promise.all([
|
||||||
|
fetch('index.wasm.part-aa').then(res => res.arrayBuffer()),
|
||||||
|
fetch('index.wasm.part-ab').then(res => res.arrayBuffer()),
|
||||||
|
fetch('index.wasm.part-ac').then(res => res.arrayBuffer())
|
||||||
|
]).then(buffers => {
|
||||||
|
const totalLength = buffers.reduce((sum, buf) => sum + buf.byteLength, 0);
|
||||||
|
const combined = new Uint8Array(totalLength);
|
||||||
|
|
||||||
|
let offset = 0;
|
||||||
|
for (const buf of buffers) {
|
||||||
|
combined.set(new Uint8Array(buf), offset);
|
||||||
|
offset += buf.byteLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("WASM 병합 완료! WebAssembly 컴파일 시작...");
|
||||||
|
|
||||||
|
return WebAssembly.instantiate(combined, imports);
|
||||||
|
}).then(instance => {
|
||||||
|
// 컴파일된 모듈(instance.module)을 Emscripten에 넘겨주면, 엔진이 알아서 워커들에게 공유합니다.
|
||||||
|
receiveInstance(instance.instance, instance.module);
|
||||||
|
}).catch(err => {
|
||||||
|
console.error("WASM 다운로드 또는 병합 중 치명적 오류 발생:", err);
|
||||||
|
});
|
||||||
|
|
||||||
|
return {};
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("워커 스레드 초기화됨 (메인 스레드가 넘겨주는 WASM을 대기합니다)");
|
||||||
|
}
|
||||||
|
// --- 여기까지 추가 ---
|
||||||
|
|
||||||
// Determine the runtime environment we are in. You can customize this by
|
// Determine the runtime environment we are in. You can customize this by
|
||||||
// setting the ENVIRONMENT setting at compile time (see settings.js).
|
// setting the ENVIRONMENT setting at compile time (see settings.js).
|
||||||
// Attempt to auto-detect the environment
|
// Attempt to auto-detect the environment
|
||||||
@@ -101,7 +142,7 @@ if (ENVIRONMENT_IS_NODE) {
|
|||||||
|
|
||||||
// --pre-jses are emitted after the Module integration code, so that they can
|
// --pre-jses are emitted after the Module integration code, so that they can
|
||||||
// refer to Module (if they choose; they can also define Module)
|
// refer to Module (if they choose; they can also define Module)
|
||||||
// include: C:\Users\tymmkang\AppData\Local\Temp\tmpyjlnr784.js
|
// include: C:\Users\tymmkang\AppData\Local\Temp\tmps8zlhwdi.js
|
||||||
Module["expectedDataFileDownloads"] ??= 0;
|
Module["expectedDataFileDownloads"] ??= 0;
|
||||||
|
|
||||||
Module["expectedDataFileDownloads"]++;
|
Module["expectedDataFileDownloads"]++;
|
||||||
@@ -653,7 +694,7 @@ Module["expectedDataFileDownloads"]++;
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// end include: C:\Users\tymmkang\AppData\Local\Temp\tmpyjlnr784.js
|
// end include: C:\Users\tymmkang\AppData\Local\Temp\tmps8zlhwdi.js
|
||||||
// Sometimes an existing Module object exists with properties
|
// Sometimes an existing Module object exists with properties
|
||||||
// meant to overwrite the default module functionality. Here
|
// meant to overwrite the default module functionality. Here
|
||||||
// we collect those properties and reapply _after_ we configure
|
// we collect those properties and reapply _after_ we configure
|
||||||
|
|||||||
BIN
index.wasm
BIN
index.wasm
Binary file not shown.
BIN
index.wasm.part-aa
Normal file
BIN
index.wasm.part-aa
Normal file
Binary file not shown.
BIN
index.wasm.part-ab
Normal file
BIN
index.wasm.part-ab
Normal file
Binary file not shown.
BIN
index.wasm.part-ac
Normal file
BIN
index.wasm.part-ac
Normal file
Binary file not shown.
Reference in New Issue
Block a user