1. Home
  2. /
  3. Playcanvas
  4. /
  5. Bouncing Sphere

Bouncing Sphere - Playcanvas Typing CST Test

Loading…

Bouncing Sphere — Playcanvas Code

A sphere that bounces up and down over time.

# playcanvas/demo/bouncing_sphere.js
const app = new pc.Application(document.getElementById('canvas'));
app.start();

const sphere = new pc.Entity();
sphere.addComponent('model', { type: 'sphere' });
app.root.addChild(sphere);

app.on('update', function(dt) {
	sphere.setPosition(0, Math.abs(Math.sin(Date.now() * 0.002)) * 3, 0);
});

Playcanvas Language Guide

PlayCanvas is a powerful, open-source 3D game engine and interactive content platform that runs entirely in the browser using WebGL/WebGPU. It enables real-time 3D games, simulations, AR/VR, and interactive visualizations without plugins.

Primary Use Cases

  • ▸Web-based 3D games and interactive experiences
  • ▸AR/VR content via WebXR
  • ▸3D product configurators and demos
  • ▸Online simulations and training platforms
  • ▸Real-time collaborative 3D editors

Notable Features

  • ▸Real-time collaborative cloud editor
  • ▸WebXR and VR/AR support
  • ▸Physically based rendering (PBR)
  • ▸Animation and particle systems
  • ▸Asset pipeline with textures, models, and scripts

Origin & Creator

PlayCanvas was originally created by Will Eastcott and Dave Evans in 2011, with ongoing development led by PlayCanvas Ltd.

Industrial Note

PlayCanvas is increasingly used in automotive configurators, online product visualizations, e-learning 3D content, browser-based games, and AR/VR experiences, reducing the need for native apps.

More Playcanvas Typing Exercises

Simple PlayCanvas ScenePlayCanvas Spinning SpherePlayCanvas Directional LightPlayCanvas Ground PlanePlayCanvas Multiple CubesPlayCanvas Orbit CameraPlayCanvas Textured CubePlayCanvas Rotating CylinderPlayCanvas Directional Light Shadow

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher