Hi @Steve_Xie ,
Thanks for your post and welcome to the Cesium community.
Is my understanding correct that you trying to create your own material beyond what the API supports Material - Cesium Documentation ?
From your code it seems like you probably have already seen our resources of fabrics, but in case not here is a thread regarding them that I think is relevant to your work Creating a new material - #2 by Gabby_Getz
I am not sure all the details of generating an image texture from an html image element as you have attempted it. if it is possible for you to provide an example demonstrating your use case in our sandcastle tool https://sandcastle.cesium.com/ that would be helpful in helping debug the implementation or researching how to enhance the api to make your use case possible.
In addition, it might be helpful to provide more context as to why generating the texture from an html image element is useful. And why it is necessary to take this approach as opposed to using an existing texture generation format. This extra context about the use case would be very helpful as well.
Please let us know if you can provide a sandcastle example and hopefully we can provide more clarity soon.
Thanks,
Luke