Search the Community
Showing results for tags 'segments'.
-
When creating a Box using BABYLON.MeshBuilder.CreateBox() I can pass it parameters like width, height and depth, but I don't see widthSegments, or heightSegments for example. Is there a way to do that?
- 11 replies
-
- subdivision
- mesh
-
(and 2 more)
Tagged with:
-
Hi, regarding a sphere in a sphere scenario, I would like to ask .. 1) Is intersection possible for an inner intersection event of the spheres? - If I take BABYLON.ActionManager.OnIntersectionExitTrigger this state will be reached if the small inner sphere is more than the half out of the outer sphere - If I take BABYLON.ActionManager.OnIntersectionEnterTrigger this state will be reached direct the scene is started .. and I need exact the intersection if a small inner sphere touches the inner wall of the outer sphere How to do? 2) How can a given sphere segment have materials on both sides of the mesh? At the moment I can give some material & color to the segment but if the segments turns around it is not to see anymore. My first thought was going in direction of backface culling or the DOUBLESIDE option var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {segments: 25, diameter: 5, arc: 1.0, slice: 0.2}, scene, false, BABYLON.Mesh.DOUBLESIDE); but it not seems to help. How to bring on some color to the inner side of the mesh, without having an inverse second mesh? Thanks and with best regards, Stefan
- 7 replies
-
- mesh intersection
- backface
-
(and 1 more)
Tagged with:
-
Hello all. I've been trying to create a simple line drawing 'game' using a bitmapData object and the CanvasRenderingContext2d object it contains. I've been successful, but it wouldn't support drawing two seperate line segments, preferring instead to make a line from the endpoint of the last line to the starting place of the new one. I wrote up some new code to try to fix that, (and I am probably missing something very obvious) but it does not work. No error is thrown, but nothing shows up onscreen. update: function() { if(this.game.input.activePointer.isDown && !this.game.scale.incorrectOrientation) { if(!this.hasMoved) { this.ctx.moveTo(this.game.input.activePointer.x,this.game.input.activePointer.y); this.hasMoved=true; } else { this.ctx.lineTo(this.game.input.activePointer.x,this.game.input.activePointer.y); this.ctx.stroke(); } } if(this.game.input.activePointer.justReleased) this.hasMoved=false; }