0

I am trying to control the opacity of a text entity on the canvas. So I need to know how to do it using jQuery. Here is what I am trying to do:

$("#textEntity").attr("material","opacity: 0;");

Which is not working. Please help.

Thank you.

H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144

1 Answers1

0

The opacity property of a text entity (bmfont-text) needs to be included in the "bmfont-text" attribute itself. Example :

textElem.setAttribute("bmfont-text","text: sampleText; color: #000; opacity: 1.0;");