Jump to content

There's Been Changes to the BabylonJS Playground


Wingnut
 Share

Recommended Posts

Hi everyone!

 

There have been some rather large changes to the BabylonJS Playground.  Although it is completely backward compatible, it now accepts a createScene() function (no parameters/args, please).  This makes it easier to paste-in scenes to the playground... from your home code.

 

All the pre-installed demo scenes are now wrapped in createScene() functions, too.  This makes it easier to copy entire scenes from the playground, and take them home to paste into your own code.

 

The NEW button now creates a basic createScene() function with a camera.  You will still need to add some mesh (before the return scene; line).  You will also need to add some light, or make your mesh's material use an emissiveColor for self-illumination.

 

The function can be named createscene(), Createscene(), createScene(), or CreateScene().  Bullet-proof, eh?  But its parentheses () must remain empty when it is in the playground editor.

 

Using a createScene() function in the playground is not a requirement.  The playground also works fine without it, just like it did before these changes.

 

We have also added a CLEAR button to the playground, which provides a completely empty playground editor (handy for preparing the editor for pasting-in a createScene() function from your home code).

 

These changes are part of the preparation for an overhaul of our Playpen Series Tutorials, which will be starting soon.  We hope that these changes will make it easier to paste-to, and copy-from... the playground editor, and we hope that these modifications will not inconvenience anyone.

 

I would like to send a huge and heartfelt THANK YOU to Deltakosh... for his hard work, extreme patience, and friendly demeanor... in making these changes possible.

 

Best regards!

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