Jump to content

[solved] How fill color/texture in CreateLines


Dieterich
 Share

Recommended Posts

@Dieterich  - Could use polygon mesh builder to make triangles, too.  ;)

From another thread:  Your warehouse triangles could have thickness, so perhaps use extrudeShape for those. (You are a pro at using extrude, yes).  :)

Did you know that BJS has a... var oneMesh = BABYLON.Mesh.MergeMeshes( [list, of, mesh, etc] ) feature?  Might be useful.

Or, you could parent all warehouse pieces to a single master parent.  *shrug*  Later.  :)

All in all,  good luck with your polygon!  Keep in mind that you can create a 2D PICTURE of a shape.... with transparent background, and put that texture onto a plane or sprite.

With proper lighting, you will not be able to "see" that it is a shape painted onto a texture, mapped onto a plane.  It will look almost identical to the polygon mesh-builder "thing".

This info... in case you like texturing (2D shape-painting)... more than plotting polygon shapes.  In certain cases, either way, works the same.

The BabylonJS "dynamicTexture" also has options for painting in 2D... onto its "imageBuffer".  Much like SVG, if you know what that is.  Essentially, paint shapes/strokes/text onto a BJS Texture... with math or manual stroke/fill commands.  Web search for 'DOM Context2d' for more info... if you want to try painting onto a dynamicTexture's 2D "canvas".

Link to comment
Share on other sites

Thx John!  That is VERY cool! 

Hey Dieterich... those warehouse roof-cap triangles would look GOOOOOD with a texture in the middle and an edge around the outsides, I bet.

Good building-building tools, happening everywhere!   I like buildings made-of many little pieces, because later, when it's time to blow them up, they blow up REAL GOOD.  :)

Lots of debris.  Yum!  http://www.babylonjs-playground.com/#1JFDFW#10  (an exploder by Jerome.  Click somewhere on red.  POOM!)  FUN!  

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...