This example is running in WebGL2 and should work in most browsers. You can check the WebGPU examples here.
//! Shows multiple transformations of objects. use PI; use *; // A struct for additional data of for a moving cube. // A struct adding information to a scalable entity, // that will be stationary at the center of the scene. // Startup system to setup the scene and spawn all relevant entities. // This system will move the cube forward. // This system will rotate the cube slightly towards the center_sphere. // Due to the forward movement the resulting movement // will be a circular motion around the center_sphere. // This system will scale down the sphere in the center of the scene // according to the traveling distance of the orbiting cube(s) from their start position(s).