import * as UTILS from '@utils'; const app = new WHS.App([ ...UTILS.appModules() ]); const sphere = new WHS.Sphere({ // Create sphere comonent. geometry: { radius: 3, widthSegments: 32, heightSegments: 32 }, modules: [ new PHYSICS.SphereModule({ mass: 10 // Mass of physics object. }) ], material: new THREE.MeshLambertMaterial({ color: UTILS.$colors.mesh }), position: [0, 100, 0] }); const box = new WHS.Box({ // Create sphere comonent. geometry: [2, 2, 2], modules: [ new PHYSICS.BoxModule({ mass: 10 // Mass of physics object. }) ], material: new THREE.MeshLambertMaterial({ color: UTILS.$colors.mesh }), position: [2, -3, 2] }); box.addTo(sphere); sphere.addTo(app); UTILS.addPlane(app); UTILS.addBasicLights(app); app.start(); // Start animations and physics simulation.]