AdvancedThing: Particle System (#4) Example: LookAt: TieredCakeMountain-1 The top of the Tiered Cake Mountain has a series of candles wrapping around the top of the cake. In conjunction with the flickering lights created by the flame, the flame itself is composed of a series of particles. The particles are made using BufferGeometry and Points from Three.js. The particles are randomly spawned around each of the candles (a total particle cap is allocated for every candle combined) with a random starting position, lifespan and velocity. Based on the starting values, it is allocated a color (yellow, orange or red) that matches its respective position of the flame. All of this combined gives a compelling and realistic looking flame to each candle. AdvancedThing: Particle System (#4) Example: Follow SugarAirplane-1 The Sugar Airplane "drops" candy around the city instead of C02 (as Candyland does not suffer from greenhouse gas problems...). This is done using a particle system. The particles are made using BufferGeometry and Points from Three.js. The particles are randomly spawned around the Sugar Airplane with a random starting position, lifespan and velocity. These properties are different than the flames, which instead tracks the particles with object names and object userData from Three.js rather than the custom data structures I made for the flames of the candles. The reason particle system was mentioned twice is because the flames and the candy are both particle systems, but they are implemented differently and have different properties. AdvancedThing: Large Diversity (#13) Example: Entire Scene and Code Base (see below) Although the project has suggestions of re-using assets, object files from online, etc. I opted for creating as much as possible from scratch, specifically for this project. Besides the Candy Car (which is for the obj requirement) and the Sugar Airplane (adapted from Workbook 07) all of the objects were created from scratch using primitives, BufferGeometry, extrusions and techniques used for all of the 3D workbooks. Additionally, each of the new objects are very different from one another and utilize advanced texture maps (which are from the web), original shaders, lighting, etc. to make them unique and interesting. Lastly, there was a lot of work that went in the code that isn't visible in the scene. There is two very big things that were worked on for this. 1. There is a debug mode for the entire scene. I've created a series of bounding boxes, a visualization for where the "rideable" camera is, the axes helper for each GrObject type, console logging with names for every object, lighting helpers, camera helpers and shader helpers. I wish I could have shown this in the scene, but it would have been too distracting and would have taken away from the scene itself (also requires a UI change which I am not sure was allowed). If the grader would like to view it they can go to "town.js" and change "const debug = false" to "true". 2. Every GrObject in the scene follows a very specific template that makes it very easy to manage and adjust objects in the scene. I've provided the file that I copy and pasted to start each object in this repository (objects/template.js). The grader can get a quick look at what gets changed/adapted for each new object that uses the template by searching in the file for "!TODO". AdvancedThing: Complex Object (#3) Example: Follow SugarAirplane-1 The Sugar Airplane is a complex object as it was created entirely from primitives. The object follows a tree-like structure and each "component" is created with a helper function. For example, each propeller is created by a function, which is called twice, and then attached to the wings. This process repeats for the wings, tail, stripes, etc. Furthermore, the objects are composed together in a way to make animations/motion easy as well. Overall, the complexity comes from putting together lots of pieces that are inherently simple in an interesting way. AdvancedThing: None of the Below (#1) Example: Entire Scene Lighting A lot went into the lighting/environment of the scene. They are broken down into the following parts: 1. Adaptive Skybox The skybox is an image found from the web that has some adjustments performed on it based on the time of day. The skybox gets blurred and the color is adjusted to match the time of day. This combined with the day and night cycle makes the scene feels like it is in a real environment. 2. Implemented "timeOfDay" for the "stepWorld" Method The timeOfDay looked like a cool feature, but was explicitly mentioned that it was incomplete. I was able to complete the function by overriding the "stepWorld" method and the world's lastTimeOfDay variable to be able to have "timeOfDay" be correct for every GrObject's "stepWorld" method. The value goes from 0-24 and makes use of delta values and elapsed time to calculate an accurate time of day that is the same for every object and is impacted by the speed slide and the play/pause checkbox. 3. Realistic Lighting from the Sun and Moon Cycle Using the "timeOfDay" value that was finished for "stepWorld", two lights were added to the scene that rotate from east to west to simulate the sun rising and setting each day as well as the subtle lights created by the moon during night. 4. Shadows Shadows were recursively added to each object and then enabled for the entire scene. This combined with the other lights from other objects, the sun/moon cycle, the "timeOfDay" being used and the adaptive skybox helps create a scene that looks and feels like it is "living" and "realistic." AdvancedThing: Key-Framing (#7) Example: Drive/Follow CandyCar-* The car's animation wasn't possible by using trigonometry in a seamless loop. Instead, the car's movement is key-framed by dividing the elapsed time into fixed-sized segments and then performing adjustments to the object in those segments. Each segment can perform a multitude of key-framed operations. These key-framed operations for each segment include one of the follow operations: interpolation between two given positions, trigonometry movement, using quaternions to find "forward" and move "forward", adjustments to materials (transparency) and other minor animation/movement tricks not used in other workbooks.