after12am / eisenscript

A programming language designed for generating awesome structures.
https://after12am.github.io/eisenscript-docs/
MIT License
46 stars 4 forks source link

triangle with racket notation not working in docs or demo #103

Open kronpano opened 3 years ago

kronpano commented 3 years ago

the notation Triangle[0,0,0;1,0,0;0.5,0.5,0.5] doesn't work in the docs (reference on primitives) and also the "normal" demo eisenscript interpreter doesn't accept it.

Only the standard triangle - as in "triangle" - no brackets is accepted.

after12am commented 3 years ago

@kronpano fix it. Please check it out!

https://after12am.github.io/eisenscript-editor/#B/KynKTMxLz0mNNtABQmtDMGmgZ6oDxbEA

kronpano commented 3 years ago

It works - yes - but all the numbers need to be positive A triangle like triangle[-1,0,1;0,1,0;1,0,1] is not accepted because of the -1

I usually try to define my triangles around 0,0,0 so rotations are easier to handle.

Also - and yes - that is also the case in StructureSynth - the triangle is only visible from one side. That means you need to define always 2 triangles - one clockwise and one counter clockwise to make sure it can be seen from both sides. Might be a nice touch to just make it visible from both sides??

after12am commented 3 years ago

Ok! I am in travel now. So I will fix it until this weekend.

after12am commented 3 years ago

@kronpano

It works - yes - but all the numbers need to be positive A triangle like triangle[-1,0,1;0,1,0;1,0,1] is not accepted because of the -1

fixed it!

https://after12am.github.io/eisenscript-editor/#B/KynKTMxLz0mN1jXUMdAxtAZiHQNrMDsWAA==

Might be a nice touch to just make it visible from both sides??

When using transparent, you can render both sides.

https://after12am.github.io/eisenscript-editor/#B/q1ZIVNCztFSoVSgpykzMS89JjdY11DHQMbQGYh0DazA7FgA=

When not using transparent, you also need to define always 2 triangles. Because the rendering way is different. Performance is a priority when transparency is not used.

after12am commented 3 years ago

When not using transparent, you also need to define always 2 triangles. Because the rendering way is different. Performance is a priority when transparency is not used.

Fixed it. Now you specify only one side.

https://after12am.github.io/eisenscript-editor/#B/KynKTMxLz0mNNtABQmtDMGmgZ6oDxbEA

kronpano commented 3 years ago

Yes, the notation works and it also seems to work in docs but not in the main editor The example fails as soon as long as box is uncommented with render.js:266 Cannot read property 'isBufferGeometry' of null

Comment the box out and everything works. Also the script works if you copy it over to https://after12am.github.io/eisenscript-docs/build/docs/reference-primitives So I guess it is a deployment problem.

after12am commented 3 years ago

Wow! You found it!