Moving from THREEjs to BABYLONjs

Hi.
I’m trying to use shader code to animate the shape of a box (using sin and cos)
I can’t get the time uniform to work properly.

I’ve been reading and wondering if the time should be started in javascript inside the “engine.runRenderLoop” function?

Could you please point me in the right direction?

Simple vertex shader | Babylon.js Playground (babylonjs.com)

You called your uniform uTime but used time and you are trying to sum a date with numbers :slight_smile:

This should get you unblocked: https://playground.babylonjs.com/#1OH09K#1407

2 Likes

New demo: I created trippy flowers ( using the shader code from the previous example )

5 Likes

New demo: Game of Life
Fully working. Grabbed the algorithm from Dan Shiffman’s The Nature of Code book.
I may update the look and feel… add some shader spice :smiley:

2 Likes