Skip to main content

Starter Code

Starter Scenes

The example code in the starter repo is pretty extensive and heavily commented. I will be adding documentation here as well, but encourage you to use the different example scenes as your main source of inspiration. You can run the different example scenes by commenting out a different AppClasses in MainApp.tsx:

import AppClasses from "./Scenes/MainScene" // This example is an empty scene. Room to fill with your hopes and dreams... 
// import AppClasses from "./Scenes/Catamari"; // Catamari updated to work with control panel and NodeTransform2D class
// import AppClasses from "./Scenes/Example1" // Articulated spiky shapes. Cool.
// import AppClasses from "./Scenes/Example2" // Lab Cat wants to help!
// import AppClasses from "./Scenes/Example3" // Potentially good starting point for a pyramid animation type scene...

Main Scene

This is an empty scene for you to fill with your imagination...

Catamari

The new repo contains a completed version of the Catamari game updated to use NodeTransform2D's to represent transformations.


Example 1

Articulated object and procedural spiky geometry.

This example demonstrates a bunch of examples of how to add controls to the control panel. Notice that when you change option for ExampleDropDown, it will just print out the selected option in the console of your browser's Developer Tool.

Example 1


Example 2

Lab Cat wants to help you implement particle systems and show you how to use keyboard and mouse controls. And how to texture geometry; in this case, with Lab Cat's face...

Check out the Developer Tool of your browser, and checkout the console tab, and you should see a description of your keyboard and mouse controls printed out there.

Generally, for each scene, the SceneController's initInteractions() function defines all the interactions (like kyeboard and mouse controls).

Example 2


Example 3

Potentially good pyramid starger. Also shows an example of a custom graphics element, and specifying triangle geometry (rather than polygon).

Example 3