Adding two playgrounds in one

Hi,

I have a full fledged model in my 1st playground with lightings, progressive load textures and some animations. Now, I have my 2nd playground which is the main stage, I would like to add the model along with its attributes into my 2nd Playground. So instead of copying the whole code and then adding it in 2nd playground, is there an alternative way where I can download the 2 playgrounds (.html) and then integrate 1st html (model) into my 2nd html (main stage) ? Obviously the camera and render canvas from 1st playground is not needed. So what is the best way to do this?

No, I don’t see another way than having all the required code in a single PG.

Even after I download both the HTML files? Because I was hoping for a way to include the Model HTML in the Main Stage’s HTML. Also since both are javascripts.

I don’t see how you can make it work… You have two .html pages, you can’t browse them both on the same tab in a browser.

And how about making the another html as a javascript file? Then I can include it in the main html file isn’t it?

Anyway you’ll need to remove redundant code - in PG or in HTML page.
I don’t see any problems here.
Just create the 3rd PG, copy there the code from the 1st PG, then add the needed parts of code from the second PG and test if it works :slight_smile:

1 Like

yeah that is what I am doing now :slight_smile: It is just that I will have multiple 3D models later and I must add all of them in a single code. I was looking for a way to avoid this :slight_smile:

While your codebase will grow, at some point you’ll feel the need to have separate files for separate tasks anyway.