Closed BeebBenjamin closed 2 months ago
This isn't anything we're doing wrong. This is a bug in OSD.
We can partially implement a flip of the threejs canvas, but we cannot keep the overlay in the correct position until OSD is fixed!
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;
I have patched our build copy of OpenSeadragon, and put in a PR for the change to the main repo.
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.
The above is fixed and the issue with lighting being updated is also addressed.
The plug-in is incompatible with image tools flip.