2020-05-11 at 9:32 am #27444
In the “visual_logic.js”. I tried the following parameter to change the outline color but I’m getting “cannot read property ‘outlinePass’ of undefinded”.
appInstance.postprocessing.outlinePass.visibleEdgeColor = new v3d.Vector4(0,0,1,1)
Also I would like to know if someone could tell me the paramters to set all possible outline effects? For example “render hidden edge” or “edge strength” etc.2020-05-11 at 9:50 am #27445
Was a bit too early with writing here. Setting the outline color is working the way I described above. There was just a browser caching issue.
appInstance.postprocessing.outlinePass.visibleEdgeColor = new v3d.Vector4(0,0,1,1); appInstance.postprocessing.outlinePass.hiddenEdgeColor = new v3d.Vector4(0,1,0,1); appInstance.postprocessing.outlinePass.edgeStrength = 3; appInstance.postprocessing.outlinePass.edgeGlow = 0; appInstance.postprocessing.outlinePass.edgeThickness = 4; appInstance.postprocessing.outlinePass.pulsePeriod = 0;
The only thing I could figure out, is how to set “Render Hidden Edge”. Tried it this way, but doesnt seem to have any effect:
appInstance.postprocessing.outlinePass.renderHiddenEdge = false;
2020-05-11 at 11:12 am #27450Yuri KovelenovStaff
- This reply was modified 1 year, 6 months ago by web.
thanks for sharing your solution!
is how to set “Render Hidden Edge”.
this is alpha channel of hiddenEdgeColor, 0 or 1
2020-05-11 at 12:57 pm #27455
- This reply was modified 1 year, 6 months ago by Yuri Kovelenov.
Ah, okay. Neat hack^^2021-11-25 at 11:15 am #47230brotchenParticipant
Hello, sorry to bump this old topic.
I’m trying to use the puzzle block “exec script” where it executes the specified js code.
Basically, I have a cube and another smaller cube hidden inside it. I’m trying via the exec script puzzle to temporally activate the “Render Hidden egdes” option when clicking on the visible cube but I cant figure out what to write exactly, even using the answer from Yuri : “appInstance.postprocessing.outlinePass.hiddenEdgeColor.setW(1);”
nothing happens. Is there a specific way to write this?
Attachments:You must be logged in to view attached files.2021-11-25 at 4:03 pm #47240Yuri KovelenovStaff2021-11-26 at 8:16 am #47265
- You must be logged in to reply to this topic.