Build custom arrow geometry

Hey,

What is the best practice to build a custom arrow Geometry if I need the following props:
1.body width
2.body line style
3.body fill style
4.head width
5.head height
6.head line style
7.head fill style

Thank for your help.

Hello,

We have an arrow material for polylines. You might be able to use this instead of implementing your own: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polyline.html&label=Geometries

If you need more variables, I would suggest editing the polyline arrow material so it has different styles.

Best,

Hannah

בתאריך יום שני, 26 בספטמבר 2016 בשעה 17:01:00 UTC+3, מאת Hannah Pinkos:

Hello,

We have an arrow material for polylines. You might be able to use this instead of implementing your own: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polyline.html&label=Geometries
If you need more variables, I would suggest editing the polyline arrow material so it has different styles.

Best,

Hannah

On Sunday, September 25, 2016 at 4:20:17 AM UTC-4, yoni...@gmail.com wrote:Hey,

What is the best practice to build a custom arrow Geometry if I need the following props:
1.body width
2.body line style
3.body fill style
4.head width
5.head height
6.head line style
7.head fill style
Thank for your help.

Hey hannah,
Thank you for your help.
I tried what you suggested but I couldn't find how to implement my specific properties.
Could you be more specific on how and where I need to implement them.

Thank you very much.

Hello,

There are a few different things you would have to modify.

Here is the glsl shader that creates the arrow shape: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Shaders/Materials/PolylineArrowMaterial.glsl

Then you would need to change Material.js to send whatever new properties you needed to the shader: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Material.js#L1345

And to use the material from the Entity API, you would need to also add properties to PolylineArrowMaterial: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/DataSources/PolylineArrowMaterialProperty.js

See our contributors documentation for instructions on downloading and building the code base: https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Documentation/Contributors/BuildGuide

If you do get something implemented, we would love the contribution back! I think other users would find this really helpful.

Best,

Hannah