# Color change with node-red-contrib-ui-babylonjs-3d

**URL:** <https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884>\
**Category:** Dashboard\
**Created:** [5 October 2021 14:06 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884 "2021-10-05T14:06:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TOSHI1](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@TOSHI1](https://discourse.nodered.org/u/TOSHI1)\
**Post date:** [5 October 2021 14:06 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/1 "2021-10-05T14:06:24Z")

</div>

I want to change the color with node-red-contrib-ui-babylonjs-3d and I am doing trial and error, outlineColor can be changed in the sample and the surrounding frame can be changed, but what I want to change is the frame Not the contents. It looks like the image below.

[![Image from Gyazo](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9b2942d409c811cac6f1539223ab9e4394aecbe3.gif)](https://gyazo.com/c46ba3571081b4106a1780f5bb2991d5)

I am using the inject node to do the following:  
Is there a solution?

[![Image from Gyazo](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/b/7ba65a85b8615795c37f4539f0ef05240431b726.png)](https://gyazo.com/769dc42132946393213fc20fcbc07275)

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [5 October 2021 15:39 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/2 "2021-10-05T15:39:50Z")

</div>

Hi @TOSHI1,  
I don't know this by head, because I didn't had a chance yet to develop this node meanwhile.  
Will try to have a look somewhere this week.  
Please send me a reminder in the weekend, if I should have forgotten to answer!!  
Bart

---

<div class="post-metadata">

**Author:** ![TOSHI1](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@TOSHI1](https://discourse.nodered.org/u/TOSHI1)\
**Post date:** [5 October 2021 20:50 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/3 "2021-10-05T20:50:59Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [10 October 2021 08:56 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/4 "2021-10-10T08:56:06Z")

</div>

Hi @TOSHI1,

This node doesn't implement the entire BabylonJs API, simply due to a lack of free time. I add new features, when users explicit request them. As you did now ...

I have now extended the _ **"update\_mesh"** _ command, to accept the following parameters via the input message:

- outlineWidth
- outlineColor
- renderOutline
- overlayColor --\> new
- renderOverlay --\> new
- showBoundingBox --\> new

You can install my node from Github again, to test this.

And the [update-mesh](https://github.com/bartbutenaers/node-red-contrib-ui-babylonjs-3d/blob/main/README.md#update-mesh) section on my readme page has been extended with example flows.

The _"mission impossible"_ demo on the readme page has also been updated, to show how to apply a red color to the roof of the building. Here is the short version of that demo animation:

![mission_impossible_demo_short](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/7/a72522a1c2cee17619c35dfd5cdea46d8ef331c6.gif)

Note that there is still something _ **incorrect** _ with the new overlayColor example flow on the readme. When I apply that color to a single box, I get this result:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cb13cf7883de74d921d78ec553f0d40a95976902.png)

I have reduced my code to a small code snippet, to be able to ask on the BabylonJs forum what is going wrong. But when I run that code in their playground, everything works fine (see [here](https://playground.babylonjs.com/#0YG7IF#48)). I have no clue why my node does it incorrectly. Will ask tonight on their forum ...

Bart

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [10 October 2021 20:16 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/5 "2021-10-10T20:16:36Z")

</div>

> [@BartButenaers](#):
>
> ask on the BabylonJs forum what is going wrong

@TOSHI1 : I have posted my question on the BabylonJs [forum](https://forum.babylonjs.com/t/weird-effect-when-applying-overlaycolor/24463). Hopefully anybody can assist us...

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [12 October 2021 21:27 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/6 "2021-10-12T21:27:15Z")

</div>

> [@BartButenaers](#):
>
> I have posted my question on the BabylonJs [forum](https://forum.babylonjs.com/t/weird-effect-when-applying-overlaycolor/24463)

I got some nice feedback from the very responsive BabylonJs community. Seems I had misinterpreted some things, so I have updated my readme page to make sure others don't make the same mistake.

Case closed ...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 October 2021 21:28 UTC](https://discourse.nodered.org/t/color-change-with-node-red-contrib-ui-babylonjs-3d/51884/7 "2021-10-26T21:28:10Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
