Search the Community
Showing results for tags 'meshbuilder'.
-
I am getting the error: "Cannot merge vertex data that do not have the same set of attributes." when I try to merge a BABYLON.Mesh created using Vertex data with ones created with MeshBuilder. What attributes are different/am I missing? https://playground.babylonjs.com/#AGL702 (Line 26) Thanks
- 2 replies
-
- vertexdata
- meshbuilder
-
(and 3 more)
Tagged with:
-
In trying to create a PG to solve another topic I came across the strange phenomenon (well it might not be strange just not what I expected) Having used MeshBuilder to create some small boxes and big box to fit them in I decided to make the box lidless by making the top transparent. Did this by setting a faceColor for the top face as faceColors[4] = new BABYLON.Color4(0,0,0,0); and realised that I then needed to set hasVertexAlpha to be true for the bigbox. http://www.babylonjs-playground.com/#1KH9RY#6 but the the rear and side faces disappear depending on camera angle. Ahah a moment of inspiration, I needed to make the sideOrientation DOUBLESIDE but then the front side disappeared. To check what was happening I made the rear face red faceColors[0] = new BABYLON.Color4(1,0,0,1); As you rotate the box so that you can view towards the rear red face, the red face disappears but the redness is applied to the inner small boxes (or so it appears) STRANGE http://www.babylonjs-playground.com/#1KH9RY#4 Any explanations, corrections, advice very welcome perhaps one for @jerome
- 2 replies
-
- meshbuilder
- hasvertexalpha
-
(and 1 more)
Tagged with:
-
Hi guys, I'm having troubles drawing some lines out of a Vector3 array with MeshBuilder.CreateLines / Mesh.CreateLines.. I've seen many examples of drawing lines in various playgrounds e.g. http://www.babylonjs-playground.com/#1DKDYG#0 - http://www.babylonjs-playground.com/#RF9W9 However, when I try to use these examples in my environment I get the following error: Uncaught TypeError: Cannot set property isPickable of #<i> which has only a getter i @ babylon.2.3.js:5 r @ babylon.2.3.js:10 i @ babylon.2.3.js:18 createScene @ LineScene.js:93 <- my awesome babylon scene :P I was not able to reproduce this error in the playground, the part of my code which causes the error: .. // shape var shape = [ new BABYLON.Vector3(1, 0, 0), new BABYLON.Vector3(0.2, 0.3, 0), new BABYLON.Vector3(0, 1, 0), new BABYLON.Vector3(-0.2, 0.3, 0), new BABYLON.Vector3(-1, 0, 0), new BABYLON.Vector3(-0.2, -0.3, 0), new BABYLON.Vector3(0, -1, 0), new BABYLON.Vector3(0.2, -0.3, 0), ]; shape.push(shape[0]); //this doesn't work var shapeline = BABYLON.MeshBuilder.CreateLines("sl", {points: shape}, scene); //neither does this //var shapeline = BABYLON.Mesh.CreateLines("sl", shape, scene); .. The rest of the code is only the creation of a simple scene from the very basic Babylon getting started tutorial and is working fine when I remove the CreateLines. Any ideas what I'm doing wrong? Cheers, Lesterhaus
- 4 replies
-
- typeerror
- createlines
-
(and 2 more)
Tagged with: