Code Monkey home page Code Monkey logo

alpenglow's People

Contributors

jonathanolson avatar marlitas avatar phet-dev avatar samreid avatar zepumph avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

alpenglow's Issues

Examine visual differences with RenderFromNode.showSim()

(Fairly difficult, it's unclear if this is the linear/radial gradients having an issue, RenderFromNode having an issue, or an internal other Alpenglow issue. Will require knowledge of color spaces and blending, since there might be a bad blend going on - possibly only on gradients with transparency)

There are some minor visual differences that I'm interested in. I am NOT interested in the rendering differences that are size-small (like the slight differences in rendering small lines or text), however I am interested in the gradient shifts (both linear and radial) that seem to happen when using RenderFromNode.showSim().

In Pendulum Lab, this is most noticeable on the ResetAllButton, but also visible on the gradient on the masses themselves.

To reproduce:

  1. Check out Scenery's 'vello' branch (at least at commit phetsims/scenery@e7d846a, pull once it's checked out - I've merged main into it)
  2. Move font files into scenery/js/display/vello/ (talk to @jonathanolson)
  3. Open up Pendulum Lab, go to the first screen
  4. Run phet.alpenglow.RenderFromNode.showSim() in the console. It will display a Canvas OVER everything else with the alpenglow software-rendered image.
  5. To switch back and forth to see visual differences, select the Canvas in devtools, and toggle visibility on it (might need to add the CSS inline), like the following:
image

Alpenglow-rendered:

image

Scenery (SVG) rendered:

image

Alpenglow:
image

Scenery SVG:
image

Radial gradient split failure with EdgedFace

(Hard, this is the bug I was describing with the circular clipping where we're getting a mismatch of edges).

It seems like EdgedFace.getBinaryCircularClip is outputting invalid data. As discussed, later stages need the start/end points of edges to match up precisely. I probably screwed up something like this in CircularClipping.binaryCircularClipEdges.

To reproduce, apply the patch below (or just... enable the one test in RasterizeTests.ts), and run the unit tests.

Subject: [PATCH] Enable test
---
Index: js/raster/RasterizeTests.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/raster/RasterizeTests.ts b/js/raster/RasterizeTests.ts
--- a/js/raster/RasterizeTests.ts	(revision 5e56f9c48be2d1fe4b67f2f93ce2980a7d1f4e8d)
+++ b/js/raster/RasterizeTests.ts	(date 1697254991298)
@@ -14,7 +14,7 @@
 
 QUnit.module( 'Rasterize' );
 
-QUnit.skip( 'split clip start end matches', assert => {
+QUnit.test( 'split clip start end matches', assert => {
 
   const colors = _.range( 0, 100 ).map( i => new RenderColor( new Vector4( i / 100, 0, 0, 1 ) ) );
   const outputSize = 768 * 2;

Geometric Optics visual difference

(Moderate difficulty, somewhat related to #5, but hopefully slightly easier to track down)

Run things similar to #5, but with geometric-optics. First screen.

Scenery SVG:
image

Alpenglow:
image

(as a side note... check out the antialiasing differences on the black line between the two! some is going on with Chrome SVG)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.