Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Tools Flip doesn't work #86

Closed
BeebBenjamin opened this issue Dec 6, 2023 · 6 comments
Closed

Image Tools Flip doesn't work #86

BeebBenjamin opened this issue Dec 6, 2023 · 6 comments
Assignees
Labels
priority: low Issue can be fixed after higher priority issues status: testing PR/MR is being tested on QA status: won't fix Issue will not be taken further type: bug Something isn't working

Comments

@BeebBenjamin
Copy link
Contributor

The plug-in is incompatible with image tools flip.

@BeebBenjamin BeebBenjamin added type: enhancement Something needs improving, but isn't a bug status: waiting to be addressed Fixing this issue hasn't started yet priority: high Issue needs addressing before medium and low issues labels Dec 6, 2023
@BeebBenjamin BeebBenjamin self-assigned this Dec 6, 2023
@BeebBenjamin
Copy link
Contributor Author

This isn't anything we're doing wrong. This is a bug in OSD.

openseadragon/openseadragon#1614

@BeebBenjamin BeebBenjamin added the status: blocked Fixing this issue is blocked by something label Dec 7, 2023
@BeebBenjamin
Copy link
Contributor Author

We can partially implement a flip of the threejs canvas, but we cannot keep the overlay in the correct position until OSD is fixed!

@BeebBenjamin
Copy link
Contributor Author

BeebBenjamin commented Dec 7, 2023

We can add a double sided material as follows:

plane_material = new THREE.MeshPhongMaterial({
            map: albedoMap,
            normalMap: normalMap,
            flatShading: true,
            normalScale: new THREE.Vector3(1, 1),
            side: THREE.DoubleSide,
});

and then flip the x positions as follows:

mesh.position.set(-x, this.props.intersection.height - y, 0);
mesh.scale.x = -1;

@BeebBenjamin BeebBenjamin added status: won't fix Issue will not be taken further type: bug Something isn't working priority: low Issue can be fixed after higher priority issues and removed status: blocked Fixing this issue is blocked by something type: enhancement Something needs improving, but isn't a bug priority: high Issue needs addressing before medium and low issues labels Dec 7, 2023
@BeebBenjamin
Copy link
Contributor Author

I have patched our build copy of OpenSeadragon, and put in a PR for the change to the main repo.

@BeebBenjamin
Copy link
Contributor Author

The fix negates the need for us to have to flip our scales, we just need to make sure out normals are orientated correctly on rotate or flip.

@BeebBenjamin BeebBenjamin added status: testing PR/MR is being tested on QA and removed status: waiting to be addressed Fixing this issue hasn't started yet labels Jun 21, 2024
@BeebBenjamin
Copy link
Contributor Author

The above is fixed and the issue with lighting being updated is also addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Issue can be fixed after higher priority issues status: testing PR/MR is being tested on QA status: won't fix Issue will not be taken further type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant