Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi Niko. It's been a long time since i posted my last thread. I hope you are ok. Can you please point me on how to return the material type of a meshbuffer in a custom meshscenenode? i can have the texture if i have var Texture = meshBuffer[0].Mat.Tex1.getURL(); but the var MatType = meshBuffer[0].Mat.Type returns undefined. Can ypu help me please? Thanks |
||||
|
Hm that looks ok, did you set the material type yourself sometime in the past? |
||||
|
Yes i did Gpbuff.Mat.Type = CL3D.Material.EMT_SOLID; and it's working ok but it doesn't returning it. I suspect that i need to set something similar like MeshNode.prototype.getMesh = function() { return this.GpMesh; } for the material type but i don't know how???? |
||||
|
Maybe you could post your code of your custom scene node here, difficult to say what could be your problem there. |
||||
|
Ok never mind found it i just had to set the var MatType as table (var MatType = []; and then to get it as MatType[i]=buff[i].Mat.Type;) Now i want to ask you if it's near an update of copperlicht with lights and some decent materials.(By the way have a look at three.js library the guys have done very good job with that.) |
||||
|
Working on dynamic lights now, but it still could take a while. |
|