# Configrator creation

**URL:** <https://forum.babylonjs.com/t/configrator-creation/30343>\
**Category:** Questions\
**Tags:** documentation, tutorial, gui, material, shader\
**Created:** [May 13, 2022, 11:14am UTC](https://forum.babylonjs.com/t/configrator-creation/30343 "2022-05-13T11:14:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 13, 2022, 11:14am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/1 "2022-05-13T11:14:53Z")

</div>

I am creating a configrator and want to get models on the button click that are available in the index page and when i click on the button then a canvas will be shown and in that i want that the models gets changed as i click on the buttons  
this is the link [http://45.79.126.10/AbhiwanDemos/Testbagconfig/](http://45.79.126.10/AbhiwanDemos/Testbagconfig/) and in that there are three buton and i want to load my models based on the button that i click.

this is what i have crated on babylon [https://playground.babylonjs.com/#Z6SWJU#259](https://playground.babylonjs.com/#Z6SWJU#259)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [May 13, 2022, 11:29am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/2 "2022-05-13T11:29:10Z")

</div>

It all looks very nice.  
Is there a question here, or did you just want to show your progress?

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 13, 2022, 11:32am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/3 "2022-05-13T11:32:56Z")

</div>

I have a question that i want to change the models on the button click that are shown in the  
[http://45.79.126.10/AbhiwanDemos/Testbagconfig/](http://45.79.126.10/AbhiwanDemos/Testbagconfig/) there are three buttons and i want to change the model if i click on bag1 and the other models on bag 2, i am not able to find out how to slove this problem

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [May 13, 2022, 12:09pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/4 "2022-05-13T12:09:15Z")

</div>

You have a button which has a click event (or pointer down event). You already know how to subscribe to this event, as you are doing it in the playground.  
You are loading a model in the playground as well.  
All you need is to combine the two.

You also need to make decisions about your site and the structure you want to have. You can load all 3 models in advance and just enable/disable the meshes when clicking the buttons, or you can import on-demand instead. This is something you need to decide, because you know the site, the data, the structure, the models, everything.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 13, 2022, 12:15pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/5 "2022-05-13T12:15:34Z")

</div>

NO there is only one model that is displayed and i want to change the models based on the click.

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 13, 2022, 12:37pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/6 "2022-05-13T12:37:36Z")

</div>

You must have misunderstood @RaananW 's explanation as this is precisely what he describes. Using enable/disable with change the displayed models whilst keeping them all available.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 13, 2022, 1:15pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/7 "2022-05-13T13:15:27Z")

</div>

ok sir thanks for the help and explanation sir , I want the representation of my configrator some thing link this

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/3/d/3d20a455ac0495e65741658db2bf7ff5ac3a23df.png)

and want to change the models on the button click this is the html file  
[config.zip](https://forum.babylonjs.com/uploads/short-url/af38PKHeZYSW62jSWAW93QwGP3O.zip) (3.7 KB)  
i hope that you could help me and i can learn something new with your help.  
Thanks :))

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 13, 2022, 1:22pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/8 "2022-05-13T13:22:46Z")

</div>

Here is a playground along the lines @RaananW suggests. It loads two models and you can switch between them by clicking the appropriate button. It can be extended to several models.

Hopefully you can adapt it to meet your needs.

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#YGUADW%2349)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 13, 2022, 1:53pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/9 "2022-05-13T13:53:08Z")

</div>

Yes i think this will help but i also want to change the texture of the models how will i change the texture of the model

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#YGUADW%2353)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 13, 2022, 3:11pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/10 "2022-05-13T15:11:13Z")

</div>

> [@Ashish\_Abhiwan](#):
>
> i also want to change the texture of the models how will i change the texture of the model

You have the code already to do this. You need to keep track of which model is displayed and just change its material.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 14, 2022, 7:54am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/11 "2022-05-14T07:54:03Z")

</div>

i have changed the texture but now i want to change the models that are there when i give the link of my model it gives the error i am not able to under stand that

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#YGUADW%2364)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

my model link is in line 52  
plz help

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 14, 2022, 8:30am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/12 "2022-05-14T08:30:02Z")

</div>

You have to load your model using LoadEntity with the correct parameters.

LoadEntity(name, meshNameToLoad, url, file, manager, meshArray, entity\_number, props)

name - any name you want to identify your model with  
meshNameToLoad - name of mesh when exported, can use “”  
url - path to model file  
file - name of model file  
manager - assets manager to add model to  
meshArray - name of array where you will store your model entities, can use if you do not know exported name of model.  
entityNumber - index of meshArray to store model.  
props - optional can be a vector3 for for positioning or scaling model

Try this and post a PG with your attempt if it does not load.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 14, 2022, 8:37am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/13 "2022-05-14T08:37:29Z")

</div>

instead of craetng i just changed the model url in the given LOAd Entity script but thr model does not change and gives error

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 14, 2022, 10:05am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/14 "2022-05-14T10:05:53Z")

</div>

We need the playground that produces the error.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 14, 2022, 10:26am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/15 "2022-05-14T10:26:48Z")

</div>

This is the playground with the error where i get the error if i use mine model url

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#YGUADW%2365)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 14, 2022, 11:56am UTC](https://forum.babylonjs.com/t/configrator-creation/30343/16 "2022-05-14T11:56:33Z")

</div>

Your LoadEntity functions do not follow the parameter pattern as given.

The second parameter must be “” or the name you gave to your model when it was exported. The address of your file must be split between the path to the file and the file name.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 14, 2022, 12:01pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/17 "2022-05-14T12:01:42Z")

</div>

> [@JohnK](#):
>
> The second parameter must be

ok thanks, I will try it out

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 14, 2022, 12:28pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/18 "2022-05-14T12:28:50Z")

</div>

i tried that but was not able to get the model can you plz help

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [May 14, 2022, 12:37pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/19 "2022-05-14T12:37:51Z")

</div>

This playground gets you closer

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#YGUADW%2366)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

It needs a lot of refining to get it to look and work as you want but should be enough for you now to work on.

---

<div class="post-metadata">

**Author:** ![Ashish\_Abhiwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ashish_abhiwan/32/24185_2.png) [@Ashish\_Abhiwan](https://forum.babylonjs.com/u/Ashish_Abhiwan)\
**Post date:** [May 14, 2022, 12:41pm UTC](https://forum.babylonjs.com/t/configrator-creation/30343/20 "2022-05-14T12:41:21Z")

</div>

Thanks for the help soo much
