Skip to content

Commit

Permalink
refacto(process): clean up and remove useless FileSource case.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Sep 10, 2019
1 parent b80ab06 commit 6bf4137
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Process/LayeredMaterialNodeProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ export const SIZE_DIAGONAL_TEXTURE = Math.pow(2 * (SIZE_TEXTURE_TILE * SIZE_TEXT
function materialCommandQueuePriorityFunction(material) {
// We know that 'node' is visible because commands can only be
// issued for visible nodes.

// TODO: need priorization of displayed nodes
if (material.visible) {
// Then prefer displayed node over non-displayed one
return 100;
} else {
return 10;
}
// Then prefer displayed node over non-displayed one
return material.visible ? 100 : 10;
}

function refinementCommandCancellationFn(cmd) {
Expand Down Expand Up @@ -147,7 +142,7 @@ export function updateLayeredMaterialNodeImagery(context, layer, node, parent) {
}

node.layerUpdateState[layer.id].newTry();
const parsedData = layer.source.isFileSource ? layer.source.parsedData : nodeLayer.textures.map(t => t.parsedData);
const parsedData = nodeLayer.textures.map(t => t.parsedData);
const command = buildCommand(context.view, layer, extentsSource, extentsDestination, node, parsedData);

return context.scheduler.execute(command).then(
Expand Down

0 comments on commit 6bf4137

Please sign in to comment.