0.7.8-alpha: Merge branch 'main' into release
This commit is contained in:
commit
6d04143606
|
|
@ -1,3 +1,8 @@
|
||||||
|
# 0.7.8-alpha:
|
||||||
|
Bugfixes:
|
||||||
|
- Fix mp4 export on macOS
|
||||||
|
- Fix animations in imported clips not playing grouped object movements correctly
|
||||||
|
|
||||||
# 0.7.7-alpha:
|
# 0.7.7-alpha:
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Fix pasting multiple times
|
- Fix pasting multiple times
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Lightningbeam",
|
"productName": "Lightningbeam",
|
||||||
"version": "0.7.7-alpha",
|
"version": "0.7.8-alpha",
|
||||||
"identifier": "org.lightningbeam.core",
|
"identifier": "org.lightningbeam.core",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../src"
|
"frontendDist": "../src"
|
||||||
|
|
|
||||||
42
src/main.js
42
src/main.js
|
|
@ -2242,6 +2242,7 @@ class Layer extends Widget {
|
||||||
json.children = [];
|
json.children = [];
|
||||||
let idMap = {}
|
let idMap = {}
|
||||||
for (let child of this.children) {
|
for (let child of this.children) {
|
||||||
|
// TODO: we may not need the randomizeUuid parameter anymore
|
||||||
let childJson = child.toJSON(randomizeUuid)
|
let childJson = child.toJSON(randomizeUuid)
|
||||||
idMap[child.idx] = childJson.idx
|
idMap[child.idx] = childJson.idx
|
||||||
json.children.push(childJson);
|
json.children.push(childJson);
|
||||||
|
|
@ -2253,7 +2254,7 @@ class Layer extends Widget {
|
||||||
for (let key in frameJson.keys) {
|
for (let key in frameJson.keys) {
|
||||||
if (key in idMap) {
|
if (key in idMap) {
|
||||||
frameJson.keys[idMap[key]] = frameJson.keys[key]
|
frameJson.keys[idMap[key]] = frameJson.keys[key]
|
||||||
delete frameJson.keys[key]
|
// delete frameJson.keys[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
json.frames.push(frameJson);
|
json.frames.push(frameJson);
|
||||||
|
|
@ -4364,11 +4365,11 @@ async function _save(path) {
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
for (let action of undoStack) {
|
// for (let action of undoStack) {
|
||||||
console.log(action.name);
|
// console.log(action.name);
|
||||||
}
|
// }
|
||||||
const fileData = {
|
const fileData = {
|
||||||
version: "1.7",
|
version: "1.7.5",
|
||||||
width: config.fileWidth,
|
width: config.fileWidth,
|
||||||
height: config.fileHeight,
|
height: config.fileHeight,
|
||||||
fps: config.framerate,
|
fps: config.framerate,
|
||||||
|
|
@ -4686,6 +4687,8 @@ async function importFile() {
|
||||||
uuidCache[key] = uuidv4(); // Store the generated UUID for the value
|
uuidCache[key] = uuidv4(); // Store the generated UUID for the value
|
||||||
}
|
}
|
||||||
obj[key] = uuidCache[key]; // Assign the UUID to the object property
|
obj[key] = uuidCache[key]; // Assign the UUID to the object property
|
||||||
|
} else if (value in uuidCache) {
|
||||||
|
obj[key] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4883,14 +4886,19 @@ function downloadObjectURL(url, filename) {
|
||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function done(output) {
|
async function done(output, path) {
|
||||||
const url = URL.createObjectURL(output);
|
await writeFile(
|
||||||
downloadObjectURL(url, "test.mp4")
|
path, // The destination file path for saving
|
||||||
|
new Uint8Array(await output.arrayBuffer()),
|
||||||
|
);
|
||||||
|
// const url = URL.createObjectURL(output);
|
||||||
|
// downloadObjectURL(url, "test.mp4")
|
||||||
const modal = document.getElementById('progressModal');
|
const modal = document.getElementById('progressModal');
|
||||||
modal.style.display = 'none';
|
modal.style.display = 'none';
|
||||||
|
document.querySelector("body").style.cursor = "default";
|
||||||
}
|
}
|
||||||
|
|
||||||
async function exportMp4() {
|
async function exportMp4(path) {
|
||||||
const worker = new Worker("/ffmpeg-worker-mp4.js")
|
const worker = new Worker("/ffmpeg-worker-mp4.js")
|
||||||
// const worker = new Worker("/ffmpeg-worker-webm.js")
|
// const worker = new Worker("/ffmpeg-worker-webm.js")
|
||||||
|
|
||||||
|
|
@ -5041,7 +5049,7 @@ async function exportMp4() {
|
||||||
type: "video/mp4"
|
type: "video/mp4"
|
||||||
});
|
});
|
||||||
// Trigger the done callback with the final video blob
|
// Trigger the done callback with the final video blob
|
||||||
done(finalBlob);
|
done(finalBlob, path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5100,7 +5108,7 @@ async function exportMp4() {
|
||||||
type: "video/mp4"
|
type: "video/mp4"
|
||||||
});
|
});
|
||||||
// Trigger the done callback with the final video blob
|
// Trigger the done callback with the final video blob
|
||||||
done(finalBlob);
|
done(finalBlob, path);
|
||||||
break;
|
break;
|
||||||
case 'stderr':
|
case 'stderr':
|
||||||
console.log(msg.data);
|
console.log(msg.data);
|
||||||
|
|
@ -5154,11 +5162,13 @@ async function exportMp4() {
|
||||||
// exportMp4()
|
// exportMp4()
|
||||||
|
|
||||||
async function render() {
|
async function render() {
|
||||||
exportMp4()
|
|
||||||
return
|
|
||||||
document.querySelector("body").style.cursor = "wait";
|
document.querySelector("body").style.cursor = "wait";
|
||||||
const path = await saveFileDialog({
|
const path = await saveFileDialog({
|
||||||
filters: [
|
filters: [
|
||||||
|
{
|
||||||
|
name: "MP4 files (.mp4)",
|
||||||
|
extensions: ["mp4"],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "APNG files (.png)",
|
name: "APNG files (.png)",
|
||||||
extensions: ["png"],
|
extensions: ["png"],
|
||||||
|
|
@ -5168,7 +5178,7 @@ async function render() {
|
||||||
extensions: ["html"],
|
extensions: ["html"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
defaultPath: await join(await documentDir(), "untitled.png"),
|
defaultPath: await join(await documentDir(), "untitled.mp4"),
|
||||||
});
|
});
|
||||||
if (path != undefined) {
|
if (path != undefined) {
|
||||||
// SVG balks on images
|
// SVG balks on images
|
||||||
|
|
@ -5183,6 +5193,10 @@ async function render() {
|
||||||
const ext = path.split(".").pop().toLowerCase();
|
const ext = path.split(".").pop().toLowerCase();
|
||||||
|
|
||||||
switch (ext) {
|
switch (ext) {
|
||||||
|
case "mp4":
|
||||||
|
exportMp4(path)
|
||||||
|
return
|
||||||
|
break
|
||||||
case "html":
|
case "html":
|
||||||
fetch("/player.html")
|
fetch("/player.html")
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue