updated graph rendering to be more efficient. added smooth scrolling, added color type, mmb drag for cutting

This commit is contained in:
2026-03-21 06:57:26 +11:00
parent 1f5da03474
commit ae374db9fb
54 changed files with 9147 additions and 138 deletions

View File

@@ -17,6 +17,48 @@ const api = {
return ipcRenderer.invoke("lua:compile", source);
},
/**
* Creates a temporary .p8 cart file for preview
*
* @param {string} cartContent Complete .p8 cart file content
* @returns {Promise<{ filePath: string }>}
*/
previewCart(cartContent) {
if (typeof cartContent !== "string") {
return Promise.reject(new TypeError("Cart content must be a string"));
}
return ipcRenderer.invoke("cart:preview", cartContent);
},
/**
* Writes the PICO-8 player HTML to disk and returns the file path
*
* @param {string} htmlContent The player HTML content
* @returns {Promise<{ filePath: string }>}
*/
writePlayerHtml(htmlContent) {
if (typeof htmlContent !== "string") {
return Promise.reject(new TypeError("HTML content must be a string"));
}
return ipcRenderer.invoke("player:writeHtml", htmlContent);
},
/**
* Writes the cart .p8 file to the public directory for the player to load
*
* @param {string} cartContent The .p8 cart content
* @returns {Promise<{ filePath: string }>}
*/
writePlayerCart(cartContent) {
if (typeof cartContent !== "string") {
return Promise.reject(new TypeError("Cart content must be a string"));
}
return ipcRenderer.invoke("player:writeCart", cartContent);
},
};
contextBridge.exposeInMainWorld("electronAPI", api);