-
Notifications
You must be signed in to change notification settings - Fork 4
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
Screenshots missing photons #255
Comments
I was able to reproduce the problem on my MacBook Air M1 on Chrome. |
We just need to pass in the canvasBounds like so: Subject: [PATCH] Ignore invisible nodes in move forward/backward, see https://github.com/phetsims/sun/issues/814
---
Index: js/common/PhotonSprites.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/common/PhotonSprites.ts b/js/common/PhotonSprites.ts
--- a/js/common/PhotonSprites.ts (revision c0fd52d298c3a6c9503247c2b107e1ee6490a740)
+++ b/js/common/PhotonSprites.ts (date 1673477063918)
@@ -25,6 +25,7 @@
import Range from '../../../dot/js/Range.js';
import LayersModel from './model/LayersModel.js';
import greenhouseEffect from '../greenhouseEffect.js';
+import Bounds2 from '../../../dot/js/Bounds2.js';
// constants
const TARGET_PHOTON_IMAGE_WIDTH = 17; // empirically determined to match the design
@@ -62,7 +63,8 @@
sprites: [ visiblePhotonSprite, infraredPhotonSprite ],
spriteInstances: spriteInstances,
renderer: 'webgl',
- pickable: false
+ pickable: false,
+ canvasBounds: new Bounds2( 0, 0, 500, 500 )
} );
// Calculate the scale that will be used to render the photon images.
Maybe @jbphet can help specify that dimension. |
I used the same strategy for specifying the canvasBounds as used in WaveLandscapeObservationWindow and it appears to work well. I also tested by eroding it by 10px and it behaved as expected, so it seems well-fitted to the window. Next I will commit it to the release branch as @jbphet has been doing for other issues. |
OK I also pushed to the 1.1 branch. @jbphet will you please review? |
Looks great, thanks @samreid! I'll have QA verify this in the next round of testing. |
I see photons with mac + chrome/safari! |
Test device
MacBook Air (m1 chip) and Dell
Operating System
MacOS 13.1 and Win10
Browser
safari and FF
Problem description
For phetsims/qa#871, the photons don't appear in screenshots
Visuals
The text was updated successfully, but these errors were encountered: