MarianG Posted October 18, 2015 Share Posted October 18, 2015 Hi Iceman, i think it's "depth" option, not length. http://www.babylonjs-playground.com/#2L5NQW#1 Have a nice day! Quote Link to comment Share on other sites More sharing options...
jerome Posted October 18, 2015 Share Posted October 18, 2015 you are right, it's depththere is an error in the documentation Quote Link to comment Share on other sites More sharing options...
iiceman Posted October 18, 2015 Share Posted October 18, 2015 I see, yeah, I took it from the docs so I got mislead here. Thanks for the fast reply! Quote Link to comment Share on other sites More sharing options...
jerome Posted October 18, 2015 Share Posted October 18, 2015 I just fixed the doc, waiting for PR Quote Link to comment Share on other sites More sharing options...
iiceman Posted October 18, 2015 Share Posted October 18, 2015 Oh, if you are updating: it still says: BABYLON.Mesh.CreateBox("box", {height: 5, faceColors: myColors}, scene); But it should be BABYLON.MeshBuilder now, right? Quote Link to comment Share on other sites More sharing options...
jerome Posted October 18, 2015 Share Posted October 18, 2015 yep, it is you need to wait for the PR merge and then this github to be pushed in the doc site Quote Link to comment Share on other sites More sharing options...
jerome Posted October 20, 2015 Share Posted October 20, 2015 @JCPalmer or DK or anyone knowing the solution : https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.mesh.vertexData.ts#L25 Can we set VertexData indices as float32array ?I don't know what is the "matricesIndices" kind, which is the lone to allow to set a property talking indices with the type float32array What I would like to do is something like :vertexData.set(myFloat32Array, theRightIndicesKind);orvertexData.indices = myFloat32Array; Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 20, 2015 Share Posted October 20, 2015 Indices are not float32array because they are indices (int32 or int16) Quote Link to comment Share on other sites More sharing options...
jerome Posted October 20, 2015 Share Posted October 20, 2015 feeling stupid, tssssof course mmh... is it better (for passing to the GPU) to set directly a int32 or a int16 :vertexData.indices = myInt32Array ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 20, 2015 Share Posted October 20, 2015 It should but I;m not sure we will gain a lot here Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 20, 2015 Share Posted October 20, 2015 Actually, since indices are not updateable (though I guess they could be set multiple times), & could be either Uint16Array or Uint32Array as DK indices, I left them specified or retrieved as number[]. Quote Link to comment Share on other sites More sharing options...
jerome Posted October 20, 2015 Share Posted October 20, 2015 you are rightnot updatable, this will ease things thanks guys Quote Link to comment Share on other sites More sharing options...
jerome Posted October 21, 2015 Share Posted October 21, 2015 another question about vertices : if we set them as a float32array (setVerticesData), do we get them back as a float32array also (getVerticesData) ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 21, 2015 Share Posted October 21, 2015 yep Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.