Not_Solar_System
Movement_Controls




Below is the code for the demo that's running. Click links to see definitions!

class Not_Solar_System extends Scene{ #blocks; #materials; #input_manager; #map; #frustrum; #mapGenerator; #seed; constructor(){ super(); this.#blocks = { grass: new GrassBlock(), brick: new BrickBlock(), stone: new StoneBlock(), sand: new SandBlock(), wood: new WoodBlock(), leaf: new LeafBlock(), bedrock: new BedrockBlock() }; let seed = localStorage.getItem('seed'); if(! seed){ this.#seed = new Date().getTime(); localStorage.setItem('seed', this.#seed); } else this.#seed = parseInt(seed); this.#mapGenerator = new MapGenerator(this.#seed); this.#map = new Map(CHUNK_SIZE, CHUNK_DISPLAY_WIDTH, this.#blocks, this.#mapGenerator); this.movement_controls = new defs.Movement_Controls(this.#map); this.#input_manager = new InputManager(this.#map, this.movement_controls); this.movement_controls.input_manager = this.#input_manager; } make_control_panel(){ } display( context, program_state ) { this.#input_manager.perform_action(context, program_state); //Setup if( !context.scratchpad.controls ) { //Add movement controls panel this.children.push( context.scratchpad.controls = this.movement_controls ); //Set up the camera program_state.set_camera( Mat4.look_at( Vec.of( 0,10,10 ), Vec.of( 0,100,0 ), Vec.of( 100,100,100 ) ) ); this.initial_camera_location = program_state.camera_inverse; program_state.projection_transform = Mat4.perspective( Math.PI/4, context.width/context.height, 1, 200 ); } // Find how much time has passed in seconds const t = program_state.animation_time / 1000; program_state.lights = [ ];//new Light( Vec.of( 0,0,0,1 ), Color.of(1., 1., 1., 1.), 1000 ) ]; this.#map.draw(context, program_state); } }
Click below to navigate through all classes that are defined.

main-scene.js
Main Scene: Not_Solar_System

This page's complete HTML source
tiny-graphics.js
(Always the same)
All other class definitions from dependencies:
Vec Mat Mat4 Keyboard_Manager Graphics_Card_Object Vertex_Buffer Shape Light Color Graphics_Addresses Container Material Shader Texture Program_State Webgl_Manager Scene Canvas_Widget Controls_Widget Code_Manager Code_Widget Text_Widget Triangle Square Tetrahedron Windmill Cube Subdivision_Sphere Minimal_Shape Minimal_Webgl_Demo Basic_Shader Funny_Shader Phong_Shader Textured_Phong Fake_Bump_Map Movement_Controls