rename vermiparous to karlkoder codec
This commit is contained in:
parent
2b6f9a65d8
commit
43b803dd86
@ -7,7 +7,7 @@ import { AssetEditor } from "./asset_editor.js";
|
|||||||
import { AssetProvider } from "./asset_provider.js";
|
import { AssetProvider } from "./asset_provider.js";
|
||||||
import { Gamelib } from "./gamelib.js";
|
import { Gamelib } from "./gamelib.js";
|
||||||
import { CodeStopper } from "./code_stopper.js";
|
import { CodeStopper } from "./code_stopper.js";
|
||||||
import { Vermiparous } from "./vermiparous.js";
|
import { KarlkoderCodec } from "./karlkoder_codec.js";
|
||||||
import { promptUpload } from "./prompt_upload.js";
|
import { promptUpload } from "./prompt_upload.js";
|
||||||
import { GamelibCompleter } from "./gamelib_completer.js";
|
import { GamelibCompleter } from "./gamelib_completer.js";
|
||||||
import { TextCompleter } from "./text_completer.js";
|
import { TextCompleter } from "./text_completer.js";
|
||||||
@ -89,7 +89,7 @@ loadButton.onclick = async () => {
|
|||||||
`unreachable: something went wrong ! files.length > 1 : files.length = ${files.length}`,
|
`unreachable: something went wrong ! files.length > 1 : files.length = ${files.length}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const items = Vermiparous.de(await fetch(URL.createObjectURL(files[0])).then((x) => x.bytes()));
|
const items = KarlkoderCodec.de(await fetch(URL.createObjectURL(files[0])).then((x) => x.bytes()));
|
||||||
const assets = items
|
const assets = items
|
||||||
.filter((x) => x.tag === "asset")
|
.filter((x) => x.tag === "asset")
|
||||||
.map((x) => {
|
.map((x) => {
|
||||||
@ -132,7 +132,7 @@ exportButton.onclick = async () => {
|
|||||||
function saveKarlKoder() {
|
function saveKarlKoder() {
|
||||||
downloadFile(
|
downloadFile(
|
||||||
slugify(projectName.value) || "project",
|
slugify(projectName.value) || "project",
|
||||||
Vermiparous.en(
|
KarlkoderCodec.en(
|
||||||
projectName.value,
|
projectName.value,
|
||||||
editor.getValue(),
|
editor.getValue(),
|
||||||
assetEditor.assets,
|
assetEditor.assets,
|
||||||
|
@ -12,7 +12,7 @@ function strToBytes(str) {
|
|||||||
return str.split("").map((x) => x.charCodeAt(0));
|
return str.split("").map((x) => x.charCodeAt(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Vermiparous {
|
export class KarlkoderCodec {
|
||||||
static en(name, code, assets) {
|
static en(name, code, assets) {
|
||||||
const ret = [];
|
const ret = [];
|
||||||
for (const asset of assets) {
|
for (const asset of assets) {
|
Loading…
x
Reference in New Issue
Block a user