I want to make object to become highlighted when selected in order to do this I need a custom shader that scales that renders the model outline - this part of the task I'm familiar with - XML3D provides a way to implement custom shader.
But the missing piece is having access to render pipeline: Its impossible to make nice highlighting without copying the model and painting it over old one or rendering the scene in two passes (postprocessing). Creating another model copy in the usual way (attaching new element to dom tree) won't solve the issue since I need also control scene blending.
How to I get it done with with xml3d? Is it possible without digging deep into the library?
In general there are four approaches to implement highlighting:
selected
has a specific value.
For instance:<mesh id="foo">
<data src="mesh-data.json"></data>
<float name="selected">0</float>
</mesh>
$("#foo float[name=selected]").text("1");
If sufficient for your use-case, I would recommend approach 3, as it is not very intrusive. The interface for creating custom rendering pipeline is not yet very stable.