phetsims / alpenglow Goto Github PK
View Code? Open in Web Editor NEWExperimental rasterization engine, by PhET Interactive Simulations
License: MIT License
Experimental rasterization engine, by PhET Interactive Simulations
License: MIT License
@jonathanolson found a bug that a shear matrix ( eg. [ [ 1, 1, 0 ], [0, 1, 0], [0, 0, 1]] ), was not being handled int the split
function of RenderLinearGradient.
(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:
phet.alpenglow.RenderFromNode.showSim()
in the console. It will display a Canvas OVER everything else with the alpenglow software-rendered image.Alpenglow-rendered:
Scenery (SVG) rendered:
This issue will track review comments and questions for ClippableFace.
This issue will be used to track review questions/comments as well as unit test commits for RenderPrograms
(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;
If you browse https://github.com/phetsims/alpenglow/blob/main/doc/raster-clip.md, it just shows a not-very-helpful error.
@marlitas, any thoughts on what I'm doing wrong here? It is working in the WebStorm/Intellij preview, AND the Mermaid live editor
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.