Skip to main content

Scenes

A Scene is the basic building block of m2c2kit.

The scene is the "screen" or "page" on which you build your assessment. Everything that will be displayed in an assessment must be added to a scene. The scene itself must be added to the assessment's game object using the game.addScene() method.

Below, we create a new scene with a blue background and add it to the game. You can change the scene's color by changing the backgroundColor property.

Loading...
Explore:
  • Try different colors like WebColors.Red, WebColors.Purple, or any other standard Web color name.
  • Use a color defined in RGBA format (red, blue, green, alpha), e.g., backgroundColor: [139, 234, 10, .80] for a greenish color with 80% opacity