Skip to content

Commit

Permalink
fix ogzeditor.image callback
Browse files Browse the repository at this point in the history
  • Loading branch information
SalatielSauer committed Dec 29, 2024
1 parent 9f2f99c commit 266b554
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/examples/ogzeditor_mri_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ mapvars({

entities([]);

geometry(() => ogzeditor.image([0, ogzeditor.asset.frames.length], 35, 512, 512, 0, 0, 0, 90, 0, 1, 2, true, 3, (colors, position) => {
return (colors.heightValue >= 5);
geometry(() => ogzeditor.image([0, ogzeditor.asset.frames.length], 35, 512, 512, 0, 0, 0, 90, 0, 1, 2, true, 3, (pixel) => {
return (pixel.heightValue >= 5);
}));
6 changes: 4 additions & 2 deletions scripts/jsocta_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,10 @@ function _addImage(
const localZ = oZ + offsetZ + (height - 1 - yIndex) * cubeSize;

let callbackResult = callback(
{ r, g, b, a, brightness, heightValue, width, height },
{ x: localX, y: localY, z: localZ, frameIndex}
{
r, g, b, a, brightness, heightValue, width, height,
x: localX, y: localY, z: localZ, frameIndex
}
);

// "false" -> skip, "true" -> keep existing RGBA
Expand Down

0 comments on commit 266b554

Please sign in to comment.