Jump to content

ClonerSystem: first use-case


javalang
 Share

Recommended Posts

and the last one, a preview of a building generator, very lightweight and with extremly few lines of code (one mesh as input):

            let rg = new BABYLONX.RandomNumberGen({ min: 2, max:4, seed: 21 });
            let lc4 = new BABYLONX.LinearCloner([obj], demo.scene, { useInstances:true,iModeRelative: true, count: rg, P: { x: 0, y: 2, z: 0 } });
            let rc = new BABYLONX.RadialCloner([lc4], demo.scene, { startangle: 65, count: 50, radius: 15 });
            let reff = new BABYLONX.RandomEffector().rot({ x: 1, y: 10, z: 1 }).pos({ x: 5, y: .2, z: .5 }).str(1).updateClients();
            rc.addEffector(reff, 1);

be your own architect

buildings.jpg

Link to comment
Share on other sites

  • 4 weeks later...

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...