Skip to content

Commit

Permalink
fix loading for stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Ianyourgod committed Jun 23, 2024
1 parent 74380d7 commit ab4acfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/project-fetcher-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ function protobufToJson(buffer) {
rotationStyle: target.rotationStyle
};

if (newTarget.isStage) {
delete newTarget.visible, delete newTarget.size, delete newTarget.direction, delete newTarget.draggable, delete newTarget.rotationStyle;
}

for (const variable in target.variables) {
newTarget.variables[variable] = [target.variables[variable].name, target.variables[variable].value];
}
Expand Down Expand Up @@ -286,7 +290,6 @@ const ProjectFetcherHOC = function (WrappedComponent) {
assetPromise = storage.load(storage.AssetType.Project, projectId, storage.DataFormat.JSON);
} else {
projectUrl = `https://projects.penguinmod.com/api/v1/projects/getprojectwrapper?safe=true&projectId=${projectId}`
// TODO: convert the protobuf to a pmp. Get the pbf file from the server to do this.
assetPromise = progressMonitor.fetchWithProgress(projectUrl)
.then(async r => {
this.props.vm.runtime.renderer.setPrivateSkinAccess(false);
Expand Down

0 comments on commit ab4acfa

Please sign in to comment.