Comments (7)
Interesting, I only remember the second one through all my testing. I will look!
from mathbox.
It looks like it was dark at 98c3740, my first big merge (check out and run npm install && gulp build
). So I must have introduced some problem during the migration from Coffeescript...
from mathbox.
If it helps to debug, it also happens in:
file:///Users/sritchie/code/js/mathbox/examples/test/vertexcolor.html
file:///Users/sritchie/code/js/mathbox/examples/test/transition.html
file:///Users/sritchie/code/js/mathbox/examples/test/surface.html
file:///Users/sritchie/code/js/mathbox/examples/test/subdivide.html
file:///Users/sritchie/code/js/mathbox/examples/test/repeat.html
file:///Users/sritchie/code/js/mathbox/examples/math/procedural.html
file:///Users/sritchie/code/js/mathbox/examples/math/hopf.html
file:///Users/sritchie/code/js/mathbox/examples/demo/shapes.html
file:///Users/sritchie/code/js/mathbox/examples/demo/cylindrical-stream.html
It does NOT seem to happen in
file:///Users/sritchie/code/js/mathbox/examples/test/fragmentcolor.html
file:///Users/sritchie/code/js/mathbox/examples/demo/cylindrical.html
which seemed surprising.
from mathbox.
- Left: Steven's original at eaeb8e1 using ThreeJS v71
- Middle: Znah znah@593bdab using ThreeJS v84
- Right: This current repo, with ThreeJS v137
Whatever happened, I'm fairly certain it is not related to Shadergraph. I dropped an old version of Shadergraph into the current repo and stuff was still dark. I also plugged in an old v0.05 version of shaders.js (recall it used to get built to build/shaders.js) and things were still dark.
Znah's is not as dark as modern, but it does have dark lines. Steven's original looks best :/ Hope we can get back to that.
EDIT: I think there are two separate issues: Shading and line color. If you turn off the lines, znah and 0.0.5 look the same.
from mathbox.
@ChristopherChudzicki I agree. here are some clues:
- change "shaded" to false on current master and you'll get the nice luminous colors again, BUT with dark lines and no shading:
- On 0.0.5, setting
lineX
orlineY
totrue
vsfalse
has no effect. the lines are missing in both cases. THAT feels like a bug to me in 0.0.5.
So that makes me suspect something in https://github.com/unconed/mathbox/blob/0.0.5/src/render/meshes/base.coffee#L120-L186... but they really read the same.
from mathbox.
On 0.0.5, setting lineX or lineY to true vs false has no effect. the lines are missing in both cases. THAT feels like a bug to me in 0.0.5
I'm pretty sure this does have an effect in 0.0.5, although the effect is not visible unless you're using a shaded surface. If not using shaded surface, the gridlines and surface are exact same color and you can't differentiate between the two. (I think the original intent was that the grid lines would be. adarker shade of the main surface color. I don't understand why the gridlines turned black, but I think I do understand why they were not behaving as intended in 0.0.5. Changing the x/y/z in this code to r/g/b fixes the lineX lineY issue in current master, and changing the corresponding lines in the old coffeescript code fix it in 0.0.5.
mathbox/src/primitives/types/draw/surface.js
Lines 278 to 288 in 4fd08d6
As for the why the shaded surface itself is darker... I spent a while investiating that this weekend. I still do not fully understand. The shading is done by the two GLSL shader snippts surface.position.normal
and mesh.fragment.shaded
. . I'm a GLSL noob, but my understanding is that the "inputs" to these shader snippets are the "uniforms", and the current master shaders vs 0.0.5 appear to be getting the same inputs.
As best I can tell, there's an issue with gl_FrontFacing
, though I really don't understand why it was working in ThreeJS r71 but not ThreeJS r137. Sigh. See #26 for more.
I'll open a PR for the lineX
, lineY
thing soon, and hopefully get back to the mathbox-react bug you opened. (Thanks for opening that!)
from mathbox.
Fixed by #27.
from mathbox.
Related Issues (20)
- Add "Who is using mathbox?" docs HOT 1
- Add DEVELOPING.md, take a README pass HOT 1
- clean up "string continuations are not recommended" warnings HOT 1
- Internal functions occasionally make invalid css queries
- add more typedefs HOT 2
- Cannot select root HOT 4
- Update the jupyter notebook example to use current version HOT 4
- The build directory should be gitignored HOT 3
- mathbox.debug throws an error
- Suggestion: scalar/complex fields HOT 2
- Update v1 mathbox readme to point here (not gitgud) HOT 1
- Formatting not working on CI
- docs are broken
- Bug when using mathbox + THREE.Color in a bundle HOT 7
- camelcase node ids do not work HOT 1
- get(k) on mathbox root ignores bound properties HOT 5
- RGBFormat removed from r137 HOT 4
- Readback example is broken HOT 3
- Any example code to make a 3D numbered spiral? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathbox.