Remove layerOrder property, sprites are rendered in the order the targets are listed in in the .sb2 file.

This commit is contained in:
Karishma Chadha committed 2018-07-23 15:48:27 -04:00
1 parent 2508dc46ca
commit b3ee2c439d
1 file changed
+1 -5
+1 -5
View File
@@ -660,11 +660,7 @@ const parseScratchObject = function (object, runtime, extensions, topLevel, zip)
const reorderParsedTargets = function (targets) {
// Reorder parsed targets based on the temporary targetPaneOrder property
// and also create a layerOrder property to track the sprite's layer ordering.
targets.forEach((t, index) => {
t.layerOrder = index;
});
// and then delete it.
targets.sort((a, b) => a.targetPaneOrder - b.targetPaneOrder);