aligator / gcode-viewer

A simple gcode viewer lib using three.js
MIT License
37 stars 8 forks source link

Custom material #14

Open aligator opened 2 years ago

aligator commented 2 years ago

This includes a Phong based material with custom shaders

jane-rose commented 2 years ago

One more thing, where did u find the custom phongMaterial demo code? Thanks

aligator commented 2 years ago

I found it here: https://www.mtmckenna.com/posts/2017/11/06/extending-the-built-in-phong-material-shader-in-threejs

jane-rose commented 2 years ago

One more things, is any clue why each gcode I implemented is a triangular prism and not a cylinder like yours? 051C8B34-9745-4FFA-AEE4-3F3424558637

aligator commented 2 years ago

Maybe you have set renderer.radialSegments = 3 Then its only triangular. (but a little bit faster to render) With 8 it looks more circular.