Introducing Playground Templates

Hey Everybody! Over the past couple months, we’ve been doing a lot of thinking about how we can continue to make Babylon even more simple to use. So much thinking about it in fact, that I wrote a blog post about our development philosophy and how it helps us think about Babylon’s simplicity.

Also, as a part of this blog post, we’re incredibly excited to share a brand new feature with you. Playground Templates!!! Simply hit CTRL + SPACE to bring up the new templates in the playground that you can add directly into your code. This is a handy way to help reduce the amount of code you have to write for some of the most commonly used components of Babylon!

Here’s the weekly video that explains how it works!

What other templates should we add???

You all rock!

12 Likes

Great!

Some other templates:

  • Create a default shadow generator
  • Import a node material with ParseFromSnippetAsync
  • Show the debug layer + select an entry
2 Likes

Yes! Great ideas! I’ll add them!

1 Like

This is a great addition and should be especially helpful for new users! I’m not sure if this is possible, but an add random template would be awesome. For instance, add random meshes, random properties, etc.

1 Like

Simple “spin” and “bounce” animations might be good animation starter templates to add as well.

1 Like

Mesh “click” and/or “hover” state action/behaviour template?

2 Likes

@PirateJC : Nice :slight_smile: Hope there are more code snippets to come. Very helpful to a coding duffer like me :relieved:

Stay Safe, gryff :slight_smile:

2 Likes

Love the direction you guys are going. Can we create our own playground templates?

1 Like

Yup absolutely! We’d LOVE to have more folks contribute.

This is the .json file that templates reads from:

And if you’re never contributed to Babylon before, here’s how to get started:
https://doc.babylonjs.com/how_to/how_to_start

1 Like