├── BUILD ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── WORKSPACE ├── data ├── BUILD ├── jsonnet │ ├── animations.jsonnet │ ├── audio.jsonnet │ ├── button_response.jsonnet │ ├── button_template.jsonnet │ ├── colors.jsonnet │ ├── common_values.jsonnet │ ├── cursor_template.jsonnet │ ├── events.jsonnet │ ├── fade.jsonnet │ ├── material_colors.jsonnet │ ├── responses.jsonnet │ ├── reticle_template.jsonnet │ └── utils.jsonnet ├── lullshaders │ ├── apply_color_correction.jsonnet │ ├── apply_gamma_fragment.jsonnet │ ├── base_color_alpha_mask_fragment.jsonnet │ ├── base_color_fragment.jsonnet │ ├── emissive_fragment.jsonnet │ ├── fragment_color.jsonnet │ ├── fragment_cubemap.jsonnet │ ├── fragment_depth.jsonnet │ ├── fragment_dither.jsonnet │ ├── fragment_phong.jsonnet │ ├── fragment_texture.jsonnet │ ├── fragment_tonemap_reinhard.jsonnet │ ├── fragment_tonemap_uncharted2.jsonnet │ ├── fragment_uniform_color.jsonnet │ ├── fragment_white.jsonnet │ ├── include │ │ ├── phong.glslh │ │ ├── premultiply_alpha.glslh │ │ └── skinning.glslh │ ├── normal_fragment.jsonnet │ ├── normal_vertex.jsonnet │ ├── occlusion_roughness_metallic_fragment.jsonnet │ ├── pbr_fragment.jsonnet │ ├── pbr_indirect_light_fragment.jsonnet │ ├── pbr_light_integration_fragment.jsonnet │ ├── pbr_light_setup_fragment.jsonnet │ ├── tangent_bitangent_normal_vertex.jsonnet │ ├── vertex_color.jsonnet │ ├── vertex_cubemap.jsonnet │ ├── vertex_position.jsonnet │ ├── vertex_position_multiview.jsonnet │ ├── vertex_skinning.jsonnet │ ├── vertex_texture.jsonnet │ └── view_direction_vertex.jsonnet ├── shaders │ ├── color.glslf │ ├── color.glslv │ ├── color_border.glslf │ ├── common.glslh │ ├── compatibility.glslh │ ├── composite_shadow.glslf │ ├── controller.glslf │ ├── controller.glslv │ ├── depth.glslf │ ├── depth.glslv │ ├── fragment_common.glslh │ ├── laser.glslf │ ├── laser.glslv │ ├── light.glslf │ ├── light.glslh │ ├── light.glslv │ ├── light_shadow.glslf │ ├── light_shadow.glslv │ ├── light_shadow_texture.glslf │ ├── light_shadow_texture.glslv │ ├── light_texture.glslf │ ├── light_texture.glslv │ ├── math.glslh │ ├── pbr.glslf │ ├── pbr.glslv │ ├── pbr │ │ ├── env_map.glslh │ │ ├── fibl_common.glslh │ │ ├── fur.glslh │ │ ├── gamma.glslh │ │ ├── math_common.glslh │ │ ├── normal_map.glslh │ │ ├── pbr_subsurface_env.glslh │ │ ├── pbr_surface_common.glslh │ │ ├── pbr_surface_env.glslh │ │ ├── pbr_surface_lights.glslh │ │ ├── rgb2hsv.glslh │ │ ├── rgbm_to_rgb.glslh │ │ ├── screen_projection.glslh │ │ ├── specular_conversions.glslh │ │ ├── texture_units.glslh │ │ └── texture_units.h │ ├── pos_uv.glslv │ ├── progress_bar.glslf │ ├── progress_bar.glslv │ ├── reticle.glslf │ ├── reticle.glslv │ ├── screen_space_texture.glslf │ ├── screen_space_texture.glslv │ ├── screen_space_texture_essl3.glslf │ ├── sdf_glyph_aa.glslf │ ├── sdf_glyph_aa.glslv │ ├── skinned_texture.glslv │ ├── skinning.glslh │ ├── text.glslf │ ├── texture.glslf │ ├── texture.glslv │ ├── texture_2d.glslv │ ├── texture_external_oes.glslf │ ├── uber.glslv │ ├── uber_fragment_common.glslh │ ├── uber_vertex_common.glslh │ ├── vertex_color.glslf │ ├── vertex_color.glslv │ ├── vertex_color_texture.glslv │ ├── vertex_common.glslh │ ├── vertex_reticle.glslf │ └── vertical_gradient_texture.glslf └── textures │ └── debug_font.png ├── dev ├── BUILD ├── build_animation.bzl ├── build_blueprint.bzl ├── build_entity.bzl ├── build_model.bzl ├── build_shader.bzl ├── build_stategraph.bzl ├── build_texture.bzl ├── copy_files.bzl ├── custom_rules.bzl ├── generate_entity_schema.bzl ├── generate_schema_cc_library.bzl ├── glob_files.py ├── utils_common.bzl └── utils_jsonnet.bzl ├── external ├── BUILD.absl ├── BUILD.assimp ├── BUILD.astc_codec ├── BUILD.astc_encoder ├── BUILD.bullet ├── BUILD.flatbuffers ├── BUILD.flatui ├── BUILD.fplbase ├── BUILD.fplutil ├── BUILD.freetype2 ├── BUILD.gumbo ├── BUILD.gvr ├── BUILD.harfbuzz ├── BUILD.ktx ├── BUILD.libjpeg_turbo ├── BUILD.libpng ├── BUILD.libunibreak ├── BUILD.libwebp ├── BUILD.mathfu ├── BUILD.motive ├── BUILD.rapidjson ├── BUILD.sdl2 ├── BUILD.stb ├── BUILD.tinygltf ├── BUILD.vectorial └── BUILD.zlib ├── g3doc ├── base-tech.md ├── best-practices.md ├── building.md ├── building_github.md ├── ecs.md ├── index.md ├── integration-guide.md ├── introduction.md ├── list-of-systems.md └── lullscript.md ├── lullaby ├── contrib │ ├── backdrop │ │ ├── BUILD │ │ ├── README.md │ │ ├── backdrop_channels.cc │ │ ├── backdrop_channels.h │ │ ├── backdrop_system.cc │ │ └── backdrop_system.h │ ├── clip │ │ ├── BUILD │ │ ├── README.md │ │ ├── clip_system.cc │ │ └── clip_system.h │ ├── controller │ │ ├── BUILD │ │ ├── README.md │ │ ├── controller_system.cc │ │ └── controller_system.h │ ├── cursor │ │ ├── BUILD │ │ ├── README.md │ │ ├── cursor_system.cc │ │ ├── cursor_system.h │ │ ├── cursor_system_jni.cc │ │ ├── cursor_trail_system.cc │ │ └── cursor_trail_system.h │ ├── deform │ │ ├── BUILD │ │ ├── README.md │ │ ├── deform_system.cc │ │ └── deform_system.h │ ├── device_tooltips │ │ ├── BUILD │ │ ├── README.md │ │ ├── device_tooltips.cc │ │ └── device_tooltips.h │ ├── fade │ │ ├── BUILD │ │ ├── README.md │ │ ├── fade_system.cc │ │ └── fade_system.h │ ├── fpl_mesh │ │ ├── BUILD │ │ ├── fpl_mesh_system.cc │ │ └── fpl_mesh_system.h │ ├── grab │ │ ├── BUILD │ │ ├── README.md │ │ ├── grab_system.cc │ │ ├── grab_system.h │ │ ├── planar_grab_input_system.cc │ │ ├── planar_grab_input_system.h │ │ ├── spatial_grab_input_system.cc │ │ ├── spatial_grab_input_system.h │ │ ├── spherical_grab_input_system.cc │ │ └── spherical_grab_input_system.h │ ├── input_behavior │ │ ├── BUILD │ │ ├── README.md │ │ ├── input_behavior_system.cc │ │ └── input_behavior_system.h │ ├── layout │ │ ├── BUILD │ │ ├── README.md │ │ ├── layout_box_system.cc │ │ ├── layout_box_system.h │ │ ├── layout_system.cc │ │ └── layout_system.h │ ├── linear_grab │ │ ├── BUILD │ │ ├── README.md │ │ ├── linear_grab_system.cc │ │ └── linear_grab_system.h │ ├── map_events │ │ ├── BUILD │ │ ├── README.md │ │ ├── map_events_system.cc │ │ └── map_events_system.h │ ├── mutator │ │ ├── BUILD │ │ ├── README.md │ │ ├── face_point_mutator_system.cc │ │ ├── face_point_mutator_system.h │ │ ├── mutator_system.cc │ │ ├── mutator_system.h │ │ ├── stay_in_box_mutator_system.cc │ │ └── stay_in_box_mutator_system.h │ ├── nav_button │ │ ├── BUILD │ │ ├── README.md │ │ ├── nav_button_system.cc │ │ └── nav_button_system.h │ ├── planar_grab │ │ ├── BUILD │ │ ├── README.md │ │ ├── planar_grab_events.h │ │ ├── planar_grab_system.cc │ │ └── planar_grab_system.h │ ├── reticle │ │ ├── BUILD │ │ ├── README.md │ │ ├── reticle_bounded_movement_system.cc │ │ ├── reticle_bounded_movement_system.h │ │ ├── reticle_system.cc │ │ ├── reticle_system.h │ │ ├── reticle_trail_system.cc │ │ └── reticle_trail_system.h │ ├── scroll │ │ ├── BUILD │ │ ├── README.md │ │ ├── scroll_channels.cc │ │ ├── scroll_channels.h │ │ ├── scroll_content_layout_system.cc │ │ ├── scroll_content_layout_system.h │ │ ├── scroll_snap_to_grandchildren_system.cc │ │ ├── scroll_snap_to_grandchildren_system.h │ │ ├── scroll_snap_to_grid_system.cc │ │ ├── scroll_snap_to_grid_system.h │ │ ├── scroll_system.cc │ │ └── scroll_system.h │ ├── shader_clip │ │ ├── BUILD │ │ ├── README.md │ │ ├── shader_clip_system.cc │ │ └── shader_clip_system.h │ ├── slider │ │ ├── BUILD │ │ ├── README.md │ │ ├── slider_system.cc │ │ └── slider_system.h │ ├── slideshow │ │ ├── BUILD │ │ ├── README.md │ │ ├── slideshow_system.cc │ │ └── slideshow_system.h │ ├── snap │ │ ├── BUILD │ │ ├── README.md │ │ ├── snap_system.cc │ │ └── snap_system.h │ ├── tab_header_layout │ │ ├── BUILD │ │ ├── README.md │ │ ├── tab_header_layout_system.cc │ │ └── tab_header_layout_system.h │ ├── text_input │ │ ├── BUILD │ │ ├── README.md │ │ ├── edit_text.cc │ │ ├── edit_text.h │ │ ├── text_input_system.cc │ │ └── text_input_system.h │ ├── track_hmd │ │ ├── BUILD │ │ ├── README.md │ │ ├── track_hmd_system.cc │ │ └── track_hmd_system.h │ ├── visibility │ │ ├── BUILD │ │ ├── README.md │ │ ├── visibility_system.cc │ │ └── visibility_system.h │ └── word_art │ │ ├── BUILD │ │ ├── word_art_system.cc │ │ └── word_art_system.h ├── events │ ├── BUILD │ ├── animation_events.h │ ├── audio_events.h │ ├── battery_state_changed.h │ ├── camera_events.h │ ├── controller_events.h │ ├── entity_events.h │ ├── fade_events.h │ ├── grab_events.h │ ├── input_events.h │ ├── layout_events.h │ ├── lifetime_events.h │ ├── physics_events.h │ ├── render_events.h │ ├── scroll_events.h │ ├── text_events.h │ └── ui_events.h ├── examples │ ├── example_app │ │ ├── BUILD │ │ ├── build_defs.bzl │ │ ├── example_app.cc │ │ ├── example_app.h │ │ └── port │ │ │ └── sdl2 │ │ │ ├── get_native_window.h │ │ │ ├── get_native_window_osx.mm │ │ │ ├── main.cc │ │ │ ├── software_controller.cc │ │ │ ├── software_controller.h │ │ │ ├── software_hmd.cc │ │ │ └── software_hmd.h │ ├── hello_model │ │ ├── BUILD │ │ ├── data │ │ │ ├── BUILD │ │ │ ├── crab_diffuse.png │ │ │ ├── crabby.fbx │ │ │ └── model.jsonnet │ │ ├── schemas │ │ │ └── entity.fbs │ │ └── src │ │ │ ├── hello_model.cc │ │ │ └── hello_model.h │ └── hello_world │ │ ├── BUILD │ │ ├── data │ │ ├── BUILD │ │ └── hello_world.json │ │ ├── schemas │ │ └── entity.fbs │ │ └── src │ │ ├── hello_world.cc │ │ └── hello_world.h ├── modules │ ├── animation_channels │ │ ├── BUILD │ │ ├── audio_channels.cc │ │ ├── audio_channels.h │ │ ├── deform_channels.cc │ │ ├── deform_channels.h │ │ ├── nine_patch_channels.cc │ │ ├── nine_patch_channels.h │ │ ├── render_channels.cc │ │ ├── render_channels.h │ │ ├── skeleton_channel.cc │ │ ├── skeleton_channel.h │ │ ├── transform_channels.cc │ │ └── transform_channels.h │ ├── camera │ │ ├── BUILD │ │ ├── camera.cc │ │ ├── camera.h │ │ ├── camera_manager.cc │ │ ├── camera_manager.h │ │ ├── camera_manager_binder.cc │ │ ├── camera_manager_binder.h │ │ ├── camera_manager_jni.cc │ │ ├── mutable_camera.cc │ │ └── mutable_camera.h │ ├── config │ │ ├── BUILD │ │ ├── config.cc │ │ └── config.h │ ├── debug │ │ ├── BUILD │ │ ├── README.md │ │ ├── debug_camera.cc │ │ ├── debug_camera.h │ │ ├── debug_render.cc │ │ ├── debug_render.h │ │ ├── debug_render_draw_interface.h │ │ ├── debug_render_impl.cc │ │ ├── debug_render_impl.h │ │ ├── log_tag.cc │ │ └── log_tag.h │ ├── dispatcher │ │ ├── BUILD │ │ ├── dispatcher.cc │ │ ├── dispatcher.h │ │ ├── dispatcher_binder.cc │ │ ├── dispatcher_binder.h │ │ ├── dispatcher_jni.cc │ │ ├── dispatcher_jni.h │ │ ├── event_wrapper.cc │ │ ├── event_wrapper.h │ │ ├── queued_dispatcher.cc │ │ └── queued_dispatcher.h │ ├── ecs │ │ ├── BUILD │ │ ├── blueprint.cc │ │ ├── blueprint.h │ │ ├── blueprint_builder.cc │ │ ├── blueprint_builder.h │ │ ├── blueprint_reader.cc │ │ ├── blueprint_reader.h │ │ ├── blueprint_tree.h │ │ ├── blueprint_type.cc │ │ ├── blueprint_type.h │ │ ├── blueprint_writer.cc │ │ ├── blueprint_writer.h │ │ ├── component.h │ │ ├── component_handlers.cc │ │ ├── component_handlers.h │ │ ├── entity_factory.cc │ │ ├── entity_factory.h │ │ ├── entity_factory_jni.cc │ │ ├── entity_factory_jni.h │ │ ├── system.cc │ │ └── system.h │ ├── file │ │ ├── BUILD │ │ ├── asset.h │ │ ├── asset_loader.cc │ │ ├── asset_loader.h │ │ ├── asset_loader_binder.cc │ │ ├── asset_loader_binder.h │ │ ├── asset_loader_jni.cc │ │ ├── file_loader.cc │ │ ├── file_loader.h │ │ ├── tagged_file_loader.cc │ │ ├── tagged_file_loader.h │ │ └── test │ │ │ ├── mock_tagged_file_loader.cc │ │ │ └── mock_tagged_file_loader.h │ ├── flatbuffers │ │ ├── BUILD │ │ ├── common_fb_conversions.h │ │ ├── mathfu_fb_conversions.h │ │ ├── variant_fb_conversions.cc │ │ └── variant_fb_conversions.h │ ├── function │ │ ├── BUILD │ │ ├── call_native_function.h │ │ ├── function_call.h │ │ └── variant_converter.h │ ├── gvr │ │ ├── BUILD │ │ └── mathfu_gvr_conversions.h │ ├── input │ │ ├── BUILD │ │ ├── device_profile.cc │ │ ├── device_profile.h │ │ ├── input_focus.h │ │ ├── input_manager.cc │ │ ├── input_manager.h │ │ ├── input_manager_binder.cc │ │ ├── input_manager_binder.h │ │ ├── input_manager_jni.cc │ │ ├── input_manager_util.cc │ │ └── input_manager_util.h │ ├── input_processor │ │ ├── BUILD │ │ ├── gesture.cc │ │ ├── gesture.h │ │ ├── input_processor.cc │ │ ├── input_processor.h │ │ ├── input_processor_jni.cc │ │ ├── touchscreen_gestures.cc │ │ └── touchscreen_gestures.h │ ├── javascript │ │ ├── convert.h │ │ ├── engine.cc │ │ ├── engine.h │ │ └── engine_test.cc │ ├── jni │ │ ├── BUILD │ │ ├── android_context_jni.cc │ │ ├── jni_context.cc │ │ ├── jni_context.h │ │ ├── jni_convert.cc │ │ ├── jni_convert.h │ │ ├── jni_signature.h │ │ ├── jni_util.h │ │ ├── registry_jni.cc │ │ ├── registry_jni.h │ │ ├── scoped_java_exception_guard.h │ │ ├── scoped_java_global_ref.h │ │ └── scoped_java_local_ref.h │ ├── layout │ │ ├── BUILD │ │ ├── layout.cc │ │ ├── layout.h │ │ └── layout_manager.h │ ├── lua │ │ ├── convert.h │ │ ├── engine.cc │ │ ├── engine.h │ │ ├── engine_test.cc │ │ ├── stack_checker.h │ │ ├── util_script.h │ │ ├── utils.cc │ │ └── utils.h │ ├── lullscript │ │ ├── BUILD │ │ ├── functions │ │ │ ├── array.cc │ │ │ ├── compare.cc │ │ │ ├── cond.cc │ │ │ ├── converter.h │ │ │ ├── do.cc │ │ │ ├── event.cc │ │ │ ├── functions.h │ │ │ ├── map.cc │ │ │ ├── math.cc │ │ │ ├── mathfu.cc │ │ │ ├── operators.cc │ │ │ ├── stringify.cc │ │ │ ├── time.cc │ │ │ ├── typeof.cc │ │ │ └── types.cc │ │ ├── lull_script_engine.cc │ │ ├── lull_script_engine.h │ │ ├── script_arg_list.cc │ │ ├── script_arg_list.h │ │ ├── script_ast_builder.cc │ │ ├── script_ast_builder.h │ │ ├── script_compiler.cc │ │ ├── script_compiler.h │ │ ├── script_env.cc │ │ ├── script_env.h │ │ ├── script_frame.cc │ │ ├── script_frame.h │ │ ├── script_parser.cc │ │ ├── script_parser.h │ │ ├── script_scoped_symbol_table.cc │ │ ├── script_scoped_symbol_table.h │ │ ├── script_types.h │ │ ├── script_value.cc │ │ └── script_value.h │ ├── manipulator │ │ ├── BUILD │ │ ├── README.md │ │ ├── manipulator.h │ │ ├── manipulator_manager.cc │ │ ├── manipulator_manager.h │ │ ├── rotation_manipulator.cc │ │ ├── rotation_manipulator.h │ │ ├── scaling_manipulator.cc │ │ ├── scaling_manipulator.h │ │ ├── translation_manipulator.cc │ │ └── translation_manipulator.h │ ├── render │ │ ├── BUILD │ │ ├── image_data.cc │ │ ├── image_data.h │ │ ├── image_decode.cc │ │ ├── image_decode.h │ │ ├── image_decode_astc.cc │ │ ├── image_decode_astc.h │ │ ├── image_decode_ktx.cc │ │ ├── image_decode_ktx.h │ │ ├── image_util.cc │ │ ├── image_util.h │ │ ├── material_info.h │ │ ├── mesh_data.cc │ │ ├── mesh_data.h │ │ ├── mesh_util.cc │ │ ├── mesh_util.h │ │ ├── nine_patch.cc │ │ ├── nine_patch.h │ │ ├── quad_util.cc │ │ ├── quad_util.h │ │ ├── render_view.cc │ │ ├── render_view.h │ │ ├── sanitize_shader_source.cc │ │ ├── sanitize_shader_source.h │ │ ├── shader_description.h │ │ ├── shader_snippets_selector.cc │ │ ├── shader_snippets_selector.h │ │ ├── tangent_generation.cc │ │ ├── tangent_generation.h │ │ ├── texture_params.h │ │ ├── vertex.cc │ │ ├── vertex.h │ │ ├── vertex_format.cc │ │ ├── vertex_format.h │ │ ├── vertex_format_util.cc │ │ └── vertex_format_util.h │ ├── reticle │ │ ├── BUILD │ │ ├── input_focus_locker.cc │ │ ├── input_focus_locker.h │ │ ├── reticle_util.cc │ │ ├── reticle_util.h │ │ ├── standard_input_pipeline.cc │ │ ├── standard_input_pipeline.h │ │ └── standard_input_pipeline_jni.cc │ ├── script │ │ ├── BUILD │ │ ├── function_binder.cc │ │ ├── function_binder.h │ │ ├── function_binder_jni.cc │ │ ├── script_engine.cc │ │ ├── script_engine.h │ │ ├── script_engine_binder.cc │ │ ├── script_engine_binder.h │ │ └── script_engine_jni.cc │ ├── serialize │ │ ├── BUILD │ │ ├── buffer_serializer.h │ │ ├── serialize.h │ │ ├── serialize_traits.h │ │ └── variant_serializer.h │ ├── stategraph │ │ ├── BUILD │ │ ├── stategraph.cc │ │ ├── stategraph.h │ │ ├── stategraph_signal.h │ │ ├── stategraph_state.h │ │ ├── stategraph_track.cc │ │ ├── stategraph_track.h │ │ └── stategraph_transition.h │ └── tinygltf │ │ ├── BUILD │ │ ├── tinygltf_util.cc │ │ └── tinygltf_util.h ├── systems │ ├── animation │ │ ├── BUILD │ │ ├── README.md │ │ ├── animation_asset.cc │ │ ├── animation_asset.h │ │ ├── animation_channel.cc │ │ ├── animation_channel.h │ │ ├── animation_system.cc │ │ ├── animation_system.h │ │ ├── animation_system_jni.cc │ │ ├── playback_parameters.h │ │ └── spline_modifiers.h │ ├── audio │ │ ├── BUILD │ │ ├── README.md │ │ ├── audio_system.cc │ │ ├── audio_system.h │ │ ├── play_sound_parameters.h │ │ ├── sound_asset.cc │ │ ├── sound_asset.h │ │ ├── sound_asset_manager.cc │ │ └── sound_asset_manager.h │ ├── blend_shape │ │ ├── BUILD │ │ ├── README.md │ │ ├── blend_shape_system.cc │ │ └── blend_shape_system.h │ ├── collision │ │ ├── BUILD │ │ ├── README.md │ │ ├── collision_provider.h │ │ ├── collision_system.cc │ │ └── collision_system.h │ ├── datastore │ │ ├── BUILD │ │ ├── README.md │ │ ├── datastore_system.cc │ │ └── datastore_system.h │ ├── dispatcher │ │ ├── BUILD │ │ ├── README.md │ │ ├── dispatcher_system.cc │ │ ├── dispatcher_system.h │ │ ├── dispatcher_system_jni.cc │ │ ├── event.cc │ │ └── event.h │ ├── gltf_asset │ │ ├── BUILD │ │ ├── gltf_asset.cc │ │ ├── gltf_asset.h │ │ ├── gltf_asset_system.cc │ │ ├── gltf_asset_system.h │ │ └── gltf_asset_system_jni.cc │ ├── light │ │ ├── BUILD │ │ ├── README.md │ │ ├── light_system.cc │ │ └── light_system.h │ ├── model_asset │ │ ├── BUILD │ │ ├── README.md │ │ ├── model_asset.cc │ │ ├── model_asset.h │ │ ├── model_asset_system.cc │ │ └── model_asset_system.h │ ├── name │ │ ├── BUILD │ │ ├── README.md │ │ ├── name_system.cc │ │ └── name_system.h │ ├── nine_patch │ │ ├── BUILD │ │ ├── README.md │ │ ├── nine_patch_system.cc │ │ └── nine_patch_system.h │ ├── physics │ │ ├── BUILD │ │ ├── bullet_utils.cc │ │ ├── bullet_utils.h │ │ ├── collision_shapes.cc │ │ ├── collision_shapes.h │ │ ├── physics_shape_system.cc │ │ ├── physics_shape_system.h │ │ ├── physics_system.cc │ │ └── physics_system.h │ ├── render │ │ ├── BUILD │ │ ├── README.md │ │ ├── animated_texture_processor.cc │ │ ├── animated_texture_processor.h │ │ ├── custom_render_pass_manager.cc │ │ ├── custom_render_pass_manager.h │ │ ├── detail │ │ │ ├── display_list.h │ │ │ ├── gpu_profiler.h │ │ │ ├── port │ │ │ │ ├── android │ │ │ │ │ └── gpu_profiler.cc │ │ │ │ └── default │ │ │ │ │ └── gpu_profiler.cc │ │ │ ├── profiler.cc │ │ │ ├── profiler.h │ │ │ ├── render_pool.h │ │ │ ├── render_pool_map.h │ │ │ ├── render_stats.cc │ │ │ ├── render_system.inc │ │ │ ├── sort_order.cc │ │ │ ├── sort_order.h │ │ │ ├── sort_order_types.h │ │ │ ├── uniform_data.cc │ │ │ └── uniform_data.h │ │ ├── filament │ │ │ ├── filament_utils.h │ │ │ ├── material_data.cc │ │ │ ├── material_data.h │ │ │ ├── mesh.cc │ │ │ ├── mesh.h │ │ │ ├── mesh_factory.cc │ │ │ ├── mesh_factory.h │ │ │ ├── render_system_filament.cc │ │ │ ├── render_system_filament.h │ │ │ ├── render_system_impl.cc │ │ │ ├── renderable.cc │ │ │ ├── renderable.h │ │ │ ├── renderer.cc │ │ │ ├── renderer.h │ │ │ ├── sceneview.cc │ │ │ ├── sceneview.h │ │ │ ├── shader.cc │ │ │ ├── shader.h │ │ │ ├── shader_factory.cc │ │ │ ├── shader_factory.h │ │ │ ├── shader_material_builder.cc │ │ │ ├── shader_material_builder.h │ │ │ ├── texture.cc │ │ │ ├── texture.h │ │ │ ├── texture_factory.cc │ │ │ └── texture_factory.h │ │ ├── fpl │ │ │ ├── material.cc │ │ │ ├── material.h │ │ │ ├── mesh.cc │ │ │ ├── mesh.h │ │ │ ├── render_component.h │ │ │ ├── render_factory.cc │ │ │ ├── render_factory.h │ │ │ ├── render_system_fpl.cc │ │ │ ├── render_system_fpl.h │ │ │ ├── render_system_impl.cc │ │ │ ├── shader.cc │ │ │ ├── shader.h │ │ │ ├── texture.cc │ │ │ ├── texture.h │ │ │ ├── uniform.cc │ │ │ └── uniform.h │ │ ├── image_texture.cc │ │ ├── image_texture.h │ │ ├── mesh.h │ │ ├── mesh_factory.h │ │ ├── next │ │ │ ├── CHANGELOG.md │ │ │ ├── detail │ │ │ │ ├── async_render_object.cc │ │ │ │ ├── async_render_object.h │ │ │ │ ├── async_render_object_factory.cc │ │ │ │ ├── async_render_object_factory.h │ │ │ │ ├── glplatform.h │ │ │ │ └── render_asset.h │ │ │ ├── gl_helpers.cc │ │ │ ├── gl_helpers.h │ │ │ ├── material.cc │ │ │ ├── material.h │ │ │ ├── mesh.cc │ │ │ ├── mesh.h │ │ │ ├── mesh_factory.cc │ │ │ ├── mesh_factory.h │ │ │ ├── next_renderer.cc │ │ │ ├── next_renderer.h │ │ │ ├── next_renderer.mm │ │ │ ├── render_component.h │ │ │ ├── render_handle.h │ │ │ ├── render_state.cc │ │ │ ├── render_state.h │ │ │ ├── render_state_manager.cc │ │ │ ├── render_state_manager.h │ │ │ ├── render_system_impl.cc │ │ │ ├── render_system_next.cc │ │ │ ├── render_system_next.h │ │ │ ├── render_target.cc │ │ │ ├── render_target.h │ │ │ ├── shader.cc │ │ │ ├── shader.h │ │ │ ├── shader_data.cc │ │ │ ├── shader_data.h │ │ │ ├── shader_factory.cc │ │ │ ├── shader_factory.h │ │ │ ├── texture.cc │ │ │ ├── texture.h │ │ │ ├── texture_atlas.cc │ │ │ ├── texture_atlas.h │ │ │ ├── texture_factory.cc │ │ │ └── texture_factory.h │ │ ├── render_helpers.cc │ │ ├── render_helpers.h │ │ ├── render_stats.h │ │ ├── render_system.h │ │ ├── render_system_deprecated.inc │ │ ├── render_system_jni.cc │ │ ├── render_target.h │ │ ├── render_types.h │ │ ├── shader.h │ │ ├── shader_uniform_initializer.cc │ │ ├── shader_uniform_initializer.h │ │ ├── simple_font.cc │ │ ├── simple_font.h │ │ ├── testing │ │ │ ├── mesh.cc │ │ │ ├── mesh.h │ │ │ ├── mock_render_system_impl.cc │ │ │ ├── mock_render_system_impl.h │ │ │ ├── texture.cc │ │ │ └── texture.h │ │ ├── texture.h │ │ ├── texture_factory.cc │ │ └── texture_factory.h │ ├── rig │ │ ├── BUILD │ │ ├── README.md │ │ ├── rig_system.cc │ │ └── rig_system.h │ ├── script │ │ ├── BUILD │ │ ├── README.md │ │ ├── script_system.cc │ │ └── script_system.h │ ├── shape │ │ ├── BUILD │ │ ├── README.md │ │ ├── shape_system.cc │ │ ├── shape_system.h │ │ └── shape_system_jni.cc │ ├── skin │ │ ├── BUILD │ │ ├── skin_system.cc │ │ ├── skin_system.h │ │ └── skin_system_jni.cc │ ├── stategraph │ │ ├── BUILD │ │ ├── README.md │ │ ├── stategraph_asset.cc │ │ ├── stategraph_asset.h │ │ ├── stategraph_system.cc │ │ └── stategraph_system.h │ ├── text │ │ ├── BUILD │ │ ├── README.md │ │ ├── detail │ │ │ └── util.h │ │ ├── flatui │ │ │ ├── flatui_text_system.cc │ │ │ ├── flatui_text_system.h │ │ │ ├── font.cc │ │ │ ├── font.h │ │ │ ├── text_buffer.cc │ │ │ ├── text_buffer.h │ │ │ ├── text_component.h │ │ │ ├── text_task.cc │ │ │ └── text_task.h │ │ ├── html_tags.h │ │ ├── testing │ │ │ ├── mock_text_system.h │ │ │ ├── stub_text_system.cc │ │ │ └── stub_text_system.h │ │ ├── text_system.cc │ │ └── text_system.h │ └── transform │ │ ├── BUILD │ │ ├── README.md │ │ ├── transform_system.cc │ │ ├── transform_system.h │ │ └── transform_system_jni.cc ├── tests │ ├── BUILD │ ├── animation_system_test.cc │ ├── arg_parser_test.cc │ ├── asset_loader_test.cc │ ├── async_processor_test.cc │ ├── async_render_object_test.cc │ ├── bits_test.cc │ ├── blueprint_reader_test.cc │ ├── blueprint_test.cc │ ├── blueprint_writer_test.cc │ ├── buffered_data_test.cc │ ├── camera_manager_test.cc │ ├── collision_system_test.cc │ ├── color_test.cc │ ├── component_handlers_test.cc │ ├── config_test.cc │ ├── data_container_test.cc │ ├── datastore_system_test.cc │ ├── debug_camera_test.cc │ ├── debug_hash_test.cc │ ├── deform_system_test.cc │ ├── dependency_checker_test.cc │ ├── dispatcher_binder_js_test.cc │ ├── dispatcher_system_js_test.cc │ ├── dispatcher_system_test.cc │ ├── dispatcher_test.cc │ ├── display_list_test.cc │ ├── edit_text_test.cc │ ├── event_wrapper_test.cc │ ├── events_test.cc │ ├── expected_test.cc │ ├── fake_entity_def_test.cc │ ├── fake_entity_factory_test.cc │ ├── fbs_entity_def_test.cc │ ├── fbs_entity_factory_test.cc │ ├── file_test.cc │ ├── fixed_string_test.cc │ ├── flatbuffer_benchmark_lull.cc │ ├── flatbuffer_benchmark_pack.cc │ ├── flatbuffer_reader_test.cc │ ├── flatbuffer_writer_test.cc │ ├── flatc_test.cc │ ├── function_binder_test.cc │ ├── generate_hashes.sh │ ├── gumbo_html_parser_test.cc │ ├── harfbuzz_text_shaper_test.cc │ ├── hash_test.cc │ ├── image_util_test.cc │ ├── input_focus_locker_test.cc │ ├── input_manager_test.cc │ ├── input_processor_test.cc │ ├── interpolation_tests.cc │ ├── intersections_test.cc │ ├── inward_buffer_test.cc │ ├── jni_signature_test.cc │ ├── job_processor_test.cc │ ├── layout_box_system_test.cc │ ├── layout_system_test.cc │ ├── layout_test.cc │ ├── libunibreak_text_breaker_test.cc │ ├── log_tag_test.cc │ ├── lull_script_engine_test.cc │ ├── lullaby_blueprint_test_fuzzer.cc │ ├── lullaby_modelasset_test_fuzzer.cc │ ├── lullscript_array_test.cc │ ├── lullscript_compare_test.cc │ ├── lullscript_cond_test.cc │ ├── lullscript_do_test.cc │ ├── lullscript_event_test.cc │ ├── lullscript_functions_test.cc │ ├── lullscript_map_test.cc │ ├── lullscript_math_test.cc │ ├── lullscript_mathfu_test.cc │ ├── lullscript_operators_test.cc │ ├── lullscript_testing_macros.h │ ├── lullscript_time_test.cc │ ├── lullscript_typeof_test.cc │ ├── lullscript_types_test.cc │ ├── make_unique_test.cc │ ├── mapped_structure_of_arrays_test.cc │ ├── material_test.cc │ ├── math_util_test.cc │ ├── mathfu_fb_conversions_test.cc │ ├── mathfu_gvr_conversions_test.cc │ ├── mathfu_matchers.h │ ├── mathfu_matchers_test.cc │ ├── mesh_data_test.cc │ ├── mesh_util_test.cc │ ├── mock_render_system_test.cc │ ├── mutable_camera_test.cc │ ├── name_system_test.cc │ ├── nine_patch_system_test.cc │ ├── nine_patch_test.cc │ ├── optional_test.cc │ ├── periodic_function_test.cc │ ├── physics_system_test.cc │ ├── portable_test_macros.h │ ├── profiler_test.cc │ ├── queued_dispatcher_test.cc │ ├── random_number_generator_test.cc │ ├── registry_test.cc │ ├── render_pool_map_test.cc │ ├── render_pool_test.cc │ ├── render_profiler_test.cc │ ├── render_view_test.cc │ ├── resource_manager_test.cc │ ├── reticle_system_test.cc │ ├── sanitize_shader_source_test.cc │ ├── scheduled_processor_test.cc │ ├── schemas │ │ ├── backdrop_entity.fbs │ │ └── blend_shape_entity.fbs │ ├── script_compiler_test.cc │ ├── script_env_benchmark.cc │ ├── script_env_test.cc │ ├── script_parser_test.cc │ ├── script_scoped_symbol_table_test.cc │ ├── script_system_js_test.cc │ ├── script_system_lua_test.cc │ ├── script_system_test.cc │ ├── script_value_test.cc │ ├── scroll_test.cc │ ├── serialize_test.cc │ ├── shader_clip_system_test.cc │ ├── shader_data_test.cc │ ├── shader_material_builder_test.cc │ ├── shader_processor_test.cc │ ├── sort_order_test.cc │ ├── span_test.cc │ ├── standard_input_pipeline_test.cc │ ├── stategraph_signal_test.cc │ ├── stategraph_state_test.cc │ ├── stategraph_test.cc │ ├── stategraph_track_test.cc │ ├── string_preprocessor_test.cc │ ├── string_view_test.cc │ ├── structure_of_arrays_test.cc │ ├── tagged_file_loader_test.cc │ ├── tangent_generation_test.cc │ ├── test_data_container.h │ ├── text_input_system_test.cc │ ├── text_layout_test.cc │ ├── text_system_test.cc │ ├── texture_info_test.cc │ ├── thread_safe_deque_test.cc │ ├── thread_safe_queue_test.cc │ ├── time_test.cc │ ├── transform_system_test.cc │ ├── type_name_generator_test.cc │ ├── typed_scheduled_processor_test.cc │ ├── uniform_test.cc │ ├── unordered_vector_map_test.cc │ ├── utf8_string_test.cc │ ├── util │ │ ├── entity_def_test.h │ │ ├── entity_factory_test.h │ │ ├── entity_test.h │ │ ├── fake_entity_def.h │ │ ├── fake_entity_test.h │ │ ├── fake_file_system.h │ │ ├── fake_flatbuffer_union.cc │ │ ├── fake_flatbuffer_union.h │ │ └── hasher.cc │ ├── variant_converter_test.cc │ ├── variant_fb_conversions_test.cc │ ├── variant_test.cc │ ├── vertex_format_test.cc │ └── vertex_test.cc ├── tools │ ├── BUILD │ ├── anim_pipeline │ │ ├── BUILD │ │ ├── anim_bone.h │ │ ├── anim_curve.cc │ │ ├── anim_curve.h │ │ ├── anim_pipeline.cc │ │ ├── anim_pipeline.h │ │ ├── animation.cc │ │ ├── animation.h │ │ ├── export.cc │ │ ├── export.h │ │ ├── import_asset.cc │ │ ├── import_fbx.cc │ │ ├── import_options.h │ │ ├── main.cc │ │ └── tolerances.h │ ├── common │ │ ├── BUILD │ │ ├── assimp_base_importer.cc │ │ ├── assimp_base_importer.h │ │ ├── fbx_base_importer.cc │ │ ├── fbx_base_importer.h │ │ ├── file_utils.cc │ │ ├── file_utils.h │ │ ├── json_utils.cc │ │ ├── json_utils.h │ │ ├── jsonnet_utils.cc │ │ ├── jsonnet_utils.h │ │ ├── log.cc │ │ └── log.h │ ├── compile_blueprint_from_json │ │ ├── BUILD │ │ ├── blueprint_from_json_compiler.cc │ │ ├── blueprint_from_json_compiler.h │ │ └── main.cc │ ├── entity_schema.template │ ├── flatbuffer_code_generator │ │ ├── BUILD │ │ └── flatc.cc │ ├── generate_entity_schema.py │ ├── gltf_converter │ │ ├── BUILD │ │ ├── gltf_converter.cc │ │ ├── gltf_converter.h │ │ └── main.cc │ ├── lull_script_compiler │ │ ├── BUILD │ │ └── lull_script_compiler.cc │ ├── model_pipeline │ │ ├── BUILD │ │ ├── bone.h │ │ ├── drawable.h │ │ ├── export.cc │ │ ├── export.h │ │ ├── export_options.h │ │ ├── import_asset.cc │ │ ├── import_fbx.cc │ │ ├── main.cc │ │ ├── material.h │ │ ├── model.cc │ │ ├── model.h │ │ ├── model_pipeline.cc │ │ ├── model_pipeline.h │ │ ├── texture_info.h │ │ ├── texture_locator.cc │ │ ├── texture_locator.h │ │ ├── util.cc │ │ ├── util.h │ │ └── vertex.h │ ├── shader_pipeline │ │ ├── BUILD │ │ ├── build_shader.cc │ │ ├── build_shader.h │ │ ├── main.cc │ │ ├── process_shader_source.cc │ │ └── process_shader_source.h │ ├── texture_pipeline │ │ ├── BUILD │ │ ├── encode_astc.cc │ │ ├── encode_astc.h │ │ ├── encode_jpg.cc │ │ ├── encode_jpg.h │ │ ├── encode_ktx.cc │ │ ├── encode_ktx.h │ │ ├── encode_png.cc │ │ ├── encode_png.h │ │ ├── encode_texture.h │ │ ├── encode_webp.cc │ │ ├── encode_webp.h │ │ ├── main.cc │ │ ├── mipmap_generator.cc │ │ └── mipmap_generator.h │ └── word_art │ │ ├── BUILD │ │ └── word_art_widths.cc ├── util │ ├── BUILD │ ├── aligned_alloc.h │ ├── android_context.cc │ ├── android_context.h │ ├── arc.h │ ├── arg.h │ ├── arg_parser.cc │ ├── arg_parser.h │ ├── async_processor.h │ ├── bits.h │ ├── buffered_data.h │ ├── built_in_functions.h │ ├── clock.h │ ├── color.cc │ ├── color.h │ ├── common_types.h │ ├── data_container.cc │ ├── data_container.h │ ├── dependency_checker.cc │ ├── dependency_checker.h │ ├── device_util.cc │ ├── device_util.h │ ├── entity.h │ ├── enum_hash.h │ ├── error.h │ ├── expected.h │ ├── filename.cc │ ├── filename.h │ ├── fixed_string.h │ ├── flatbuffer_native_types.h │ ├── flatbuffer_reader.h │ ├── flatbuffer_writer.h │ ├── generate_unhash_table.cc │ ├── hash.cc │ ├── hash.h │ ├── interpolation.cc │ ├── interpolation.h │ ├── intersections.cc │ ├── intersections.h │ ├── inward_buffer.cc │ ├── inward_buffer.h │ ├── job_processor.h │ ├── logging.h │ ├── macros.h │ ├── make_unique.h │ ├── mapped_structure_of_arrays.h │ ├── math.cc │ ├── math.h │ ├── optional.cc │ ├── optional.h │ ├── periodic_function.h │ ├── profiler.cc │ ├── profiler.h │ ├── random_number_generator.h │ ├── registry.h │ ├── resource_manager.h │ ├── scheduled_processor.cc │ ├── scheduled_processor.h │ ├── selector.h │ ├── span.h │ ├── spring.cc │ ├── spring.h │ ├── string_preprocessor.cc │ ├── string_preprocessor.h │ ├── string_view.h │ ├── structure_of_arrays.h │ ├── thread_safe_deque.h │ ├── thread_safe_queue.h │ ├── time.h │ ├── trace.h │ ├── type_name_generator.h │ ├── type_util.h │ ├── typed_pointer.h │ ├── typed_scheduled_processor.cc │ ├── typed_scheduled_processor.h │ ├── typeid.h │ ├── unordered_vector_map.h │ ├── utf8_string.cc │ ├── utf8_string.h │ └── variant.h └── viewer │ ├── BUILD │ ├── data │ ├── README.md │ ├── brdf_lookup.png │ ├── forest_diff_cubemap.png │ └── forest_spec_cubemap.png │ ├── entity.fbs │ ├── fontawesome-webfont.ttf │ └── src │ ├── builders │ ├── build_blueprint.cc │ ├── build_blueprint.h │ ├── build_model.cc │ ├── build_model.h │ ├── build_rig_animation.cc │ ├── build_rig_animation.h │ ├── build_shader.cc │ ├── build_shader.h │ ├── build_shading_model.cc │ ├── build_shading_model.h │ ├── build_stategraph.cc │ ├── build_stategraph.h │ ├── flatbuffers.cc │ ├── flatbuffers.h │ ├── jsonnet.cc │ └── jsonnet.h │ ├── file_manager.cc │ ├── file_manager.h │ ├── imgui_bridge.cc │ ├── imgui_bridge.h │ ├── jsonnet_writer.cc │ ├── jsonnet_writer.h │ ├── main.cc │ ├── viewer.cc │ ├── viewer.h │ ├── widgets │ ├── build_blueprint_popup.cc │ ├── build_blueprint_popup.h │ ├── build_model_popup.cc │ ├── build_model_popup.h │ ├── build_shader_popup.cc │ ├── build_shader_popup.h │ ├── console.cc │ ├── console.h │ ├── entity_editor.cc │ ├── entity_editor.h │ ├── file_dialog.cc │ ├── file_dialog.h │ ├── preview_window.cc │ └── preview_window.h │ ├── window.cc │ └── window.h ├── redux ├── .bazelrc ├── WORKSPACE ├── external │ ├── BUILD.assimp │ ├── BUILD.bullet │ ├── BUILD.eigen │ ├── BUILD.filament │ ├── BUILD.fmtlib │ ├── BUILD.freetype │ ├── BUILD.harfbuzz │ ├── BUILD.libfbx │ ├── BUILD.libogg │ ├── BUILD.libopus │ ├── BUILD.libopusfile │ ├── BUILD.libpng │ ├── BUILD.libunibreak │ ├── BUILD.libvorbis │ ├── BUILD.libwebp │ ├── BUILD.magic_enum │ ├── BUILD.pffft │ ├── BUILD.rapidjson │ ├── BUILD.resonance │ ├── BUILD.sdl2 │ ├── BUILD.stblib │ ├── BUILD.utfcpp │ ├── BUILD.vectorial │ ├── BUILD.zlib │ ├── assimp.patch │ ├── filament.patch │ ├── libogg.patch │ ├── libpng.patch │ └── stblib.patch ├── redux │ ├── BUILD │ ├── data │ │ └── asset_defs │ │ │ ├── BUILD │ │ │ ├── anim_asset_def.fbs │ │ │ ├── model_asset_def.fbs │ │ │ ├── shader_asset_def.fbs │ │ │ └── texture_asset_def.fbs │ ├── engines │ │ ├── animation │ │ │ ├── BUILD │ │ │ ├── README.md │ │ │ ├── animation_clip.cc │ │ │ ├── animation_clip.h │ │ │ ├── animation_engine.cc │ │ │ ├── animation_engine.h │ │ │ ├── animation_playback.h │ │ │ ├── common.h │ │ │ ├── motivator │ │ │ │ ├── motivator.cc │ │ │ │ ├── motivator.h │ │ │ │ ├── rig_motivator.cc │ │ │ │ ├── rig_motivator.h │ │ │ │ ├── spline_motivator.cc │ │ │ │ ├── spline_motivator.h │ │ │ │ ├── transform_motivator.cc │ │ │ │ └── transform_motivator.h │ │ │ ├── processor │ │ │ │ ├── anim_processor.cc │ │ │ │ ├── anim_processor.h │ │ │ │ ├── index_allocator.h │ │ │ │ ├── rig_processor.cc │ │ │ │ ├── rig_processor.h │ │ │ │ ├── spline_processor.cc │ │ │ │ ├── spline_processor.h │ │ │ │ ├── transform_processor.cc │ │ │ │ └── transform_processor.h │ │ │ └── spline │ │ │ │ ├── BUILD │ │ │ │ ├── bulk_spline_evaluator.cc │ │ │ │ ├── bulk_spline_evaluator.h │ │ │ │ ├── bulk_spline_evaluator_neon.s │ │ │ │ ├── bulk_spline_evaluator_tests.cc │ │ │ │ ├── compact_spline.cc │ │ │ │ ├── compact_spline.h │ │ │ │ ├── compact_spline_node.h │ │ │ │ ├── compact_spline_tests.cc │ │ │ │ ├── cubic_curve.cc │ │ │ │ ├── cubic_curve.h │ │ │ │ ├── cubic_curve_tests.cc │ │ │ │ ├── dual_cubic.cc │ │ │ │ ├── dual_cubic.h │ │ │ │ ├── quadratic_curve.cc │ │ │ │ ├── quadratic_curve.h │ │ │ │ └── quadratic_curve_tests.cc │ │ ├── audio │ │ │ ├── BUILD │ │ │ ├── audio_asset.h │ │ │ ├── audio_engine.h │ │ │ ├── resonance │ │ │ │ ├── BUILD │ │ │ │ ├── audio_asset_manager.cc │ │ │ │ ├── audio_asset_manager.h │ │ │ │ ├── audio_asset_manager_tests.cc │ │ │ │ ├── audio_asset_stream.cc │ │ │ │ ├── audio_asset_stream.h │ │ │ │ ├── audio_asset_stream_tests.cc │ │ │ │ ├── audio_planar_data.cc │ │ │ │ ├── audio_planar_data.h │ │ │ │ ├── audio_planar_data_tests.cc │ │ │ │ ├── audio_source_stream.h │ │ │ │ ├── audio_stream_manager.cc │ │ │ │ ├── audio_stream_manager.h │ │ │ │ ├── audio_stream_renderer.cc │ │ │ │ ├── audio_stream_renderer.h │ │ │ │ ├── resonance_audio_asset.cc │ │ │ │ ├── resonance_audio_asset.h │ │ │ │ ├── resonance_audio_engine.cc │ │ │ │ ├── resonance_audio_engine.h │ │ │ │ ├── resonance_sound.cc │ │ │ │ ├── resonance_sound.h │ │ │ │ ├── resonance_utils.cc │ │ │ │ └── resonance_utils.h │ │ │ ├── sound.h │ │ │ └── sound_room.h │ │ ├── physics │ │ │ ├── BUILD │ │ │ ├── bullet │ │ │ │ ├── BUILD │ │ │ │ ├── bullet_collision_shape.cc │ │ │ │ ├── bullet_collision_shape.h │ │ │ │ ├── bullet_physics_engine.cc │ │ │ │ ├── bullet_physics_engine.h │ │ │ │ ├── bullet_rigid_body.cc │ │ │ │ ├── bullet_rigid_body.h │ │ │ │ ├── bullet_trigger_volume.cc │ │ │ │ ├── bullet_trigger_volume.h │ │ │ │ ├── bullet_utils.h │ │ │ │ └── thunks.cc │ │ │ ├── collision_data.cc │ │ │ ├── collision_data.h │ │ │ ├── collision_shape.h │ │ │ ├── enums.h │ │ │ ├── physics_engine.h │ │ │ ├── physics_enums.fbs │ │ │ ├── rigid_body.h │ │ │ ├── thunks │ │ │ │ ├── BUILD │ │ │ │ ├── README.md │ │ │ │ ├── physics_engine.h │ │ │ │ ├── rigid_body.h │ │ │ │ └── trigger_volume.h │ │ │ └── trigger_volume.h │ │ ├── platform │ │ │ ├── BUILD │ │ │ ├── buffered_state.h │ │ │ ├── device_manager.cc │ │ │ ├── device_manager.h │ │ │ ├── device_profiles.h │ │ │ ├── display.cc │ │ │ ├── display.h │ │ │ ├── keyboard.cc │ │ │ ├── keyboard.h │ │ │ ├── keycodes.cc │ │ │ ├── keycodes.h │ │ │ ├── mainloop.cc │ │ │ ├── mainloop.h │ │ │ ├── mouse.cc │ │ │ ├── mouse.h │ │ │ ├── sdl2 │ │ │ │ ├── BUILD │ │ │ │ ├── get_native_window_osx.mm │ │ │ │ ├── sdl2_display.cc │ │ │ │ ├── sdl2_display.h │ │ │ │ ├── sdl2_event_handler.h │ │ │ │ ├── sdl2_keyboard.cc │ │ │ │ ├── sdl2_keyboard.h │ │ │ │ ├── sdl2_mainloop.cc │ │ │ │ ├── sdl2_mainloop.h │ │ │ │ ├── sdl2_mouse.cc │ │ │ │ ├── sdl2_mouse.h │ │ │ │ ├── sdl2_speaker.cc │ │ │ │ └── sdl2_speaker.h │ │ │ ├── speaker.cc │ │ │ ├── speaker.h │ │ │ ├── virtual_device.cc │ │ │ └── virtual_device.h │ │ ├── render │ │ │ ├── BUILD │ │ │ ├── filament │ │ │ │ ├── BUILD │ │ │ │ ├── filament_indirect_light.cc │ │ │ │ ├── filament_indirect_light.h │ │ │ │ ├── filament_light.cc │ │ │ │ ├── filament_light.h │ │ │ │ ├── filament_mesh.cc │ │ │ │ ├── filament_mesh.h │ │ │ │ ├── filament_render_engine.cc │ │ │ │ ├── filament_render_engine.h │ │ │ │ ├── filament_render_layer.cc │ │ │ │ ├── filament_render_layer.h │ │ │ │ ├── filament_render_scene.cc │ │ │ │ ├── filament_render_scene.h │ │ │ │ ├── filament_render_target.cc │ │ │ │ ├── filament_render_target.h │ │ │ │ ├── filament_renderable.cc │ │ │ │ ├── filament_renderable.h │ │ │ │ ├── filament_shader.cc │ │ │ │ ├── filament_shader.h │ │ │ │ ├── filament_texture.cc │ │ │ │ ├── filament_texture.h │ │ │ │ ├── filament_utils.h │ │ │ │ ├── mesh_factory.cc │ │ │ │ ├── render_target_factory.cc │ │ │ │ ├── shader_factory.cc │ │ │ │ ├── texture_factory.cc │ │ │ │ └── thunks.cc │ │ │ ├── indirect_light.h │ │ │ ├── light.h │ │ │ ├── mesh.h │ │ │ ├── mesh_factory.h │ │ │ ├── render_engine.h │ │ │ ├── render_layer.h │ │ │ ├── render_scene.h │ │ │ ├── render_target.h │ │ │ ├── render_target_factory.h │ │ │ ├── renderable.h │ │ │ ├── shader.h │ │ │ ├── shader_factory.h │ │ │ ├── texture.h │ │ │ ├── texture_factory.h │ │ │ └── thunks │ │ │ │ ├── BUILD │ │ │ │ ├── README.md │ │ │ │ ├── indirect_light.h │ │ │ │ ├── light.h │ │ │ │ ├── mesh.h │ │ │ │ ├── render_engine.h │ │ │ │ ├── render_layer.h │ │ │ │ ├── render_scene.h │ │ │ │ ├── render_target.h │ │ │ │ ├── renderable.h │ │ │ │ └── texture.h │ │ ├── script │ │ │ ├── BUILD │ │ │ ├── call_native_function.h │ │ │ ├── call_native_function_tests.cc │ │ │ ├── function_binder.cc │ │ │ ├── function_binder.h │ │ │ ├── redux │ │ │ │ ├── BUILD │ │ │ │ ├── README.md │ │ │ │ ├── functions │ │ │ │ │ ├── array.h │ │ │ │ │ ├── array_tests.cc │ │ │ │ │ ├── cond.h │ │ │ │ │ ├── cond_tests.cc │ │ │ │ │ ├── hash.h │ │ │ │ │ ├── map.h │ │ │ │ │ ├── map_tests.cc │ │ │ │ │ ├── math.h │ │ │ │ │ ├── math_tests.cc │ │ │ │ │ ├── message.h │ │ │ │ │ ├── message_tests.cc │ │ │ │ │ ├── operators.h │ │ │ │ │ ├── operators_tests.cc │ │ │ │ │ ├── typeof.h │ │ │ │ │ └── typeof_tests.cc │ │ │ │ ├── script_ast_builder.cc │ │ │ │ ├── script_ast_builder.h │ │ │ │ ├── script_compiler.cc │ │ │ │ ├── script_compiler.h │ │ │ │ ├── script_compiler_tests.cc │ │ │ │ ├── script_engine.cc │ │ │ │ ├── script_engine_tests.cc │ │ │ │ ├── script_env.cc │ │ │ │ ├── script_env.h │ │ │ │ ├── script_env_tests.cc │ │ │ │ ├── script_frame.cc │ │ │ │ ├── script_frame.h │ │ │ │ ├── script_frame_context.h │ │ │ │ ├── script_parser.cc │ │ │ │ ├── script_parser.h │ │ │ │ ├── script_parser_tests.cc │ │ │ │ ├── script_stack.cc │ │ │ │ ├── script_stack.h │ │ │ │ ├── script_stack_tests.cc │ │ │ │ ├── script_tests.cc │ │ │ │ ├── script_types.h │ │ │ │ ├── script_value.cc │ │ │ │ ├── script_value.h │ │ │ │ ├── stringify.cc │ │ │ │ └── testing.h │ │ │ ├── script.h │ │ │ ├── script_call_context.h │ │ │ └── script_engine.h │ │ └── text │ │ │ ├── BUILD │ │ │ ├── font.cc │ │ │ ├── font.h │ │ │ ├── freetype2 │ │ │ ├── BUILD │ │ │ └── rasterizer.cc │ │ │ ├── harfbuzz │ │ │ ├── BUILD │ │ │ └── sequencer.cc │ │ │ ├── internal │ │ │ ├── glyph.h │ │ │ ├── locale.cc │ │ │ ├── locale.h │ │ │ ├── sdf_computer.cc │ │ │ ├── sdf_computer.h │ │ │ ├── text_layout.cc │ │ │ └── text_layout.h │ │ │ ├── stub │ │ │ ├── BUILD │ │ │ └── breaking.cc │ │ │ ├── text_engine.cc │ │ │ ├── text_engine.h │ │ │ ├── text_enums.h │ │ │ └── unibreak │ │ │ ├── BUILD │ │ │ └── breaking.cc │ ├── modules │ │ ├── audio │ │ │ ├── BUILD │ │ │ ├── audio_enums.fbs │ │ │ ├── audio_reader.h │ │ │ ├── enums.h │ │ │ ├── opus_reader.cc │ │ │ ├── opus_reader.h │ │ │ ├── opus_reader_tests.cc │ │ │ ├── test_data │ │ │ │ ├── ambisonic.wav │ │ │ │ ├── small.ogg │ │ │ │ ├── small.opus │ │ │ │ ├── speech.ogg │ │ │ │ ├── speech.opus │ │ │ │ └── speech.wav │ │ │ ├── vorbis_reader.cc │ │ │ ├── vorbis_reader.h │ │ │ ├── vorbis_reader_tests.cc │ │ │ ├── wav_reader.cc │ │ │ ├── wav_reader.h │ │ │ └── wav_reader_tests.cc │ │ ├── base │ │ │ ├── BUILD │ │ │ ├── archiver.h │ │ │ ├── asset_loader.cc │ │ │ ├── asset_loader.h │ │ │ ├── asset_loader_tests.cc │ │ │ ├── async_processor.h │ │ │ ├── async_processor_tests.cc │ │ │ ├── bits.h │ │ │ ├── bits_tests.cc │ │ │ ├── choreographer.cc │ │ │ ├── choreographer.h │ │ │ ├── choreographer_tests.cc │ │ │ ├── data_buffer.h │ │ │ ├── data_buffer_tests.cc │ │ │ ├── data_builder.h │ │ │ ├── data_builder_tests.cc │ │ │ ├── data_container.h │ │ │ ├── data_container_tests.cc │ │ │ ├── data_reader.cc │ │ │ ├── data_reader.h │ │ │ ├── data_reader_tests.cc │ │ │ ├── data_table.h │ │ │ ├── data_table_tests.cc │ │ │ ├── dependency_graph.h │ │ │ ├── dependency_graph_tests.cc │ │ │ ├── filepath.cc │ │ │ ├── filepath.h │ │ │ ├── filepath_tests.cc │ │ │ ├── function_traits.h │ │ │ ├── function_traits_tests.cc │ │ │ ├── hash.cc │ │ │ ├── hash.h │ │ │ ├── hash_tests.cc │ │ │ ├── logging.h │ │ │ ├── ref_tuple.h │ │ │ ├── ref_tuple_tests.cc │ │ │ ├── registry.cc │ │ │ ├── registry.h │ │ │ ├── registry_tests.cc │ │ │ ├── resource_manager.h │ │ │ ├── resource_manager_tests.cc │ │ │ ├── serialize.h │ │ │ ├── serialize_tests.cc │ │ │ ├── serialize_traits.h │ │ │ ├── serialize_traits_tests.cc │ │ │ ├── static_registry.cc │ │ │ ├── static_registry.h │ │ │ ├── thread_safe_deque.h │ │ │ ├── thread_safe_deque_tests.cc │ │ │ ├── typed_ptr.h │ │ │ ├── typed_ptr_tests.cc │ │ │ └── typeid.h │ │ ├── codecs │ │ │ ├── BUILD │ │ │ ├── decode_image.cc │ │ │ ├── decode_image.h │ │ │ ├── decode_stb.cc │ │ │ ├── decode_stb.h │ │ │ ├── decode_webp.cc │ │ │ ├── decode_webp.h │ │ │ ├── encode_png.cc │ │ │ ├── encode_png.h │ │ │ ├── encode_webp.cc │ │ │ └── encode_webp.h │ │ ├── datafile │ │ │ ├── BUILD │ │ │ ├── README.md │ │ │ ├── datafile_parser.cc │ │ │ ├── datafile_parser.h │ │ │ ├── datafile_parser_tests.cc │ │ │ ├── datafile_reader.cc │ │ │ ├── datafile_reader.h │ │ │ └── datafile_reader_tests.cc │ │ ├── dispatcher │ │ │ ├── BUILD │ │ │ ├── dispatcher.cc │ │ │ ├── dispatcher.h │ │ │ ├── dispatcher_tests.cc │ │ │ ├── message.cc │ │ │ ├── message.h │ │ │ ├── message_tests.cc │ │ │ ├── queued_dispatcher.cc │ │ │ ├── queued_dispatcher.h │ │ │ └── queued_dispatcher_tests.cc │ │ ├── ecs │ │ │ ├── BUILD │ │ │ ├── blueprint.h │ │ │ ├── blueprint_factory.cc │ │ │ ├── blueprint_factory.h │ │ │ ├── blueprint_factory_tests.cc │ │ │ ├── component_serializer.h │ │ │ ├── entity.h │ │ │ ├── entity_factory.cc │ │ │ ├── entity_factory.h │ │ │ ├── entity_factory_tests.cc │ │ │ └── system.h │ │ ├── flatbuffers │ │ │ ├── BUILD │ │ │ ├── common.fbs │ │ │ ├── common.h │ │ │ ├── common_tests.cc │ │ │ ├── math.fbs │ │ │ ├── math.h │ │ │ ├── math_tests.cc │ │ │ ├── var.cc │ │ │ ├── var.fbs │ │ │ ├── var.h │ │ │ └── var_tests.cc │ │ ├── graphics │ │ │ ├── BUILD │ │ │ ├── camera_ops.cc │ │ │ ├── camera_ops.h │ │ │ ├── camera_ops_tests.cc │ │ │ ├── color.cc │ │ │ ├── color.h │ │ │ ├── color_tests.cc │ │ │ ├── enums.h │ │ │ ├── graphics_enums.fbs │ │ │ ├── image_atlaser.cc │ │ │ ├── image_atlaser.h │ │ │ ├── image_atlaser_tests.cc │ │ │ ├── image_data.cc │ │ │ ├── image_data.h │ │ │ ├── image_utils.cc │ │ │ ├── image_utils.h │ │ │ ├── material_data.h │ │ │ ├── mesh_data.cc │ │ │ ├── mesh_data.h │ │ │ ├── texture_usage.h │ │ │ ├── vertex.h │ │ │ ├── vertex_attribute.h │ │ │ ├── vertex_format.cc │ │ │ ├── vertex_format.h │ │ │ ├── vertex_format_tests.cc │ │ │ ├── vertex_layout.h │ │ │ ├── vertex_tests.cc │ │ │ └── vertex_utils.h │ │ ├── math │ │ │ ├── BUILD │ │ │ ├── bounds.h │ │ │ ├── bounds_tests.cc │ │ │ ├── constants.h │ │ │ ├── detail │ │ │ │ ├── matrix_layout.h │ │ │ │ ├── quaternion_layout.h │ │ │ │ └── vector_layout.h │ │ │ ├── float.cc │ │ │ ├── float.h │ │ │ ├── float_tests.cc │ │ │ ├── interpolation.cc │ │ │ ├── interpolation.h │ │ │ ├── interpolation_tests.cc │ │ │ ├── math.h │ │ │ ├── math_tests.cc │ │ │ ├── matrix.h │ │ │ ├── matrix_tests.cc │ │ │ ├── quaternion.h │ │ │ ├── quaternion_tests.cc │ │ │ ├── ray.h │ │ │ ├── ray_tests.cc │ │ │ ├── testing.h │ │ │ ├── transform.h │ │ │ ├── transform_tests.cc │ │ │ ├── vector.h │ │ │ └── vector_tests.cc │ │ ├── testing │ │ │ ├── BUILD │ │ │ ├── testing.cc │ │ │ └── testing.h │ │ └── var │ │ │ ├── BUILD │ │ │ ├── README.md │ │ │ ├── var.cc │ │ │ ├── var.h │ │ │ ├── var_array.cc │ │ │ ├── var_array.h │ │ │ ├── var_array_tests.cc │ │ │ ├── var_convert.h │ │ │ ├── var_convert_tests.cc │ │ │ ├── var_serializer.h │ │ │ ├── var_serializer_tests.cc │ │ │ ├── var_table.cc │ │ │ ├── var_table.h │ │ │ ├── var_table_tests.cc │ │ │ └── var_tests.cc │ ├── systems │ │ ├── animation │ │ │ ├── BUILD │ │ │ ├── animation_system.cc │ │ │ ├── animation_system.h │ │ │ └── static_register.cc │ │ ├── audio │ │ │ ├── BUILD │ │ │ ├── audio_system.cc │ │ │ ├── audio_system.h │ │ │ ├── sound_def.def │ │ │ └── static_register.cc │ │ ├── camera │ │ │ ├── BUILD │ │ │ ├── camera_def.def │ │ │ ├── camera_system.cc │ │ │ ├── camera_system.h │ │ │ └── static_register.cc │ │ ├── constraint │ │ │ ├── BUILD │ │ │ ├── constraint_system.cc │ │ │ ├── constraint_system.h │ │ │ ├── constraint_system_tests.cc │ │ │ ├── events.h │ │ │ └── static_register.cc │ │ ├── datastore │ │ │ ├── BUILD │ │ │ ├── datastore_def.def │ │ │ ├── datastore_system.cc │ │ │ ├── datastore_system.h │ │ │ ├── datastore_system_tests.cc │ │ │ └── static_register.cc │ │ ├── dispatcher │ │ │ ├── BUILD │ │ │ ├── dispatcher_system.cc │ │ │ ├── dispatcher_system.h │ │ │ ├── dispatcher_system_tests.cc │ │ │ └── static_register.cc │ │ ├── light │ │ │ ├── BUILD │ │ │ ├── light_def.def │ │ │ ├── light_system.cc │ │ │ ├── light_system.h │ │ │ └── static_register.cc │ │ ├── model │ │ │ ├── BUILD │ │ │ ├── model_asset.cc │ │ │ ├── model_asset.h │ │ │ ├── model_def.def │ │ │ ├── model_system.cc │ │ │ ├── model_system.h │ │ │ └── static_register.cc │ │ ├── name │ │ │ ├── BUILD │ │ │ ├── name_def.def │ │ │ ├── name_system.cc │ │ │ ├── name_system.h │ │ │ ├── name_system_tests.cc │ │ │ └── static_register.cc │ │ ├── physics │ │ │ ├── BUILD │ │ │ ├── events.h │ │ │ ├── physics_system.cc │ │ │ ├── physics_system.h │ │ │ ├── rigid_body_def.def │ │ │ ├── static_register.cc │ │ │ └── trigger_def.def │ │ ├── render │ │ │ ├── BUILD │ │ │ ├── render_def.def │ │ │ ├── render_system.cc │ │ │ ├── render_system.h │ │ │ └── static_register.cc │ │ ├── rig │ │ │ ├── BUILD │ │ │ ├── rig_system.cc │ │ │ ├── rig_system.h │ │ │ └── static_register.cc │ │ ├── script │ │ │ ├── BUILD │ │ │ ├── script_def.def │ │ │ ├── script_system.cc │ │ │ ├── script_system.h │ │ │ ├── script_system_tests.cc │ │ │ └── static_register.cc │ │ ├── shape │ │ │ ├── BUILD │ │ │ ├── box_shape_generator.h │ │ │ ├── box_shape_generator_tests.cc │ │ │ ├── shape_builder.h │ │ │ ├── shape_def.def │ │ │ ├── shape_system.cc │ │ │ ├── shape_system.h │ │ │ ├── sphere_shape_generator.h │ │ │ ├── sphere_shape_generator_tests.cc │ │ │ └── static_register.cc │ │ ├── text │ │ │ ├── BUILD │ │ │ ├── static_register.cc │ │ │ ├── text_def.def │ │ │ ├── text_system.cc │ │ │ └── text_system.h │ │ ├── transform │ │ │ ├── BUILD │ │ │ ├── static_register.cc │ │ │ ├── transform_def.def │ │ │ ├── transform_system.cc │ │ │ ├── transform_system.h │ │ │ └── transform_system_tests.cc │ │ └── tween │ │ │ ├── BUILD │ │ │ ├── static_register.cc │ │ │ ├── tween_system.cc │ │ │ ├── tween_system.h │ │ │ └── tween_system_tests.cc │ └── tools │ │ ├── BUILD │ │ ├── anim_pipeline │ │ ├── BUILD │ │ ├── README.md │ │ ├── anim_curve.cc │ │ ├── anim_curve.h │ │ ├── anim_pipeline.cc │ │ ├── anim_pipeline.h │ │ ├── animation.cc │ │ ├── animation.h │ │ ├── export.cc │ │ ├── export.h │ │ ├── import_asset.cc │ │ ├── import_fbx.cc │ │ ├── import_options.h │ │ ├── main.cc │ │ └── tolerances.h │ │ ├── build_anim.bzl │ │ ├── build_model.bzl │ │ ├── build_shader.bzl │ │ ├── common │ │ ├── BUILD │ │ ├── README.md │ │ ├── assimp_utils.cc │ │ ├── assimp_utils.h │ │ ├── axis_system.fbs │ │ ├── axis_system.h │ │ ├── fbx_utils.cc │ │ ├── fbx_utils.h │ │ ├── file_utils.cc │ │ ├── file_utils.h │ │ ├── file_utils_tests.cc │ │ ├── flatbuffer_utils.cc │ │ ├── flatbuffer_utils.h │ │ ├── flatbuffer_utils_tests.cc │ │ ├── json_utils.h │ │ ├── json_utils_tests.cc │ │ ├── jsonnet_utils.cc │ │ ├── jsonnet_utils.h │ │ ├── jsonnet_utils_tests.cc │ │ ├── log_utils.cc │ │ ├── log_utils.h │ │ └── test_data │ │ │ ├── hello.txt │ │ │ ├── schema.fbs │ │ │ ├── schema_include.fbs │ │ │ └── sum.jsonnet │ │ ├── def_cc_library.bzl │ │ ├── def_code_generator │ │ ├── BUILD │ │ ├── code_builder.cc │ │ ├── code_builder.h │ │ ├── def_document.h │ │ ├── generate_code.cc │ │ ├── generate_code.h │ │ ├── main.cc │ │ ├── metadata_types.h │ │ ├── parse_def_file.cc │ │ ├── parse_def_file.h │ │ └── parse_def_file_tests.cc │ │ ├── env_repository.bzl │ │ ├── flatbuffer_cc_library.bzl │ │ ├── model_pipeline │ │ ├── BUILD │ │ ├── README.md │ │ ├── bone.h │ │ ├── config.fbs │ │ ├── drawable.h │ │ ├── export.cc │ │ ├── export.h │ │ ├── import_asset.cc │ │ ├── import_fbx.cc │ │ ├── main.cc │ │ ├── material.h │ │ ├── model.cc │ │ ├── model.h │ │ ├── model_pipeline.cc │ │ ├── model_pipeline.h │ │ ├── texture_info.h │ │ ├── texture_locator.cc │ │ ├── texture_locator.h │ │ ├── util.cc │ │ ├── util.h │ │ ├── vertex.cc │ │ └── vertex.h │ │ ├── shader_pipeline │ │ ├── BUILD │ │ ├── README.md │ │ ├── main.cc │ │ ├── shader_pipeline.cc │ │ └── shader_pipeline.h │ │ └── texture_pipeline │ │ ├── BUILD │ │ ├── README.md │ │ ├── generate_mipmaps.cc │ │ ├── generate_mipmaps.h │ │ └── main.cc └── third_party │ ├── filament │ ├── BUILD │ ├── generate_shaders.bzl │ └── licenses │ │ └── licenses.inc │ └── gl │ └── BUILD ├── schemas └── lull │ ├── animation_def.fbs │ ├── animation_response_def.fbs │ ├── animation_stategraph.fbs │ ├── audio_environment_def.fbs │ ├── audio_listener_def.fbs │ ├── audio_playback_types.fbs │ ├── audio_response_def.fbs │ ├── audio_source_def.fbs │ ├── axis_system.fbs │ ├── backdrop_def.fbs │ ├── blend_shape_def.fbs │ ├── blueprint_def.fbs │ ├── clip_def.fbs │ ├── collision_def.fbs │ ├── common.fbs │ ├── config_def.fbs │ ├── controller_def.fbs │ ├── cursor_def.fbs │ ├── cursor_trail_def.fbs │ ├── datastore_def.fbs │ ├── deform_def.fbs │ ├── dispatcher_def.fbs │ ├── face_point_mutator_def.fbs │ ├── fade_in_def.fbs │ ├── fpl_mesh_def.fbs │ ├── gltf_asset_def.fbs │ ├── grab_def.fbs │ ├── input_behavior_def.fbs │ ├── layout_def.fbs │ ├── light_def.fbs │ ├── linear_grabbable_def.fbs │ ├── lull_common.fbs │ ├── map_events_def.fbs │ ├── material_def.fbs │ ├── model_asset_def.fbs │ ├── model_def.fbs │ ├── model_pipeline_def.fbs │ ├── mutator_def.fbs │ ├── name_def.fbs │ ├── nav_button_def.fbs │ ├── nine_patch_def.fbs │ ├── pano_def.fbs │ ├── physics_shape_def.fbs │ ├── physics_shapes.fbs │ ├── planar_grab_input_def.fbs │ ├── planar_grabbable_def.fbs │ ├── render_def.fbs │ ├── render_pass_def.fbs │ ├── render_state_def.fbs │ ├── render_target_def.fbs │ ├── reticle_behaviour_def.fbs │ ├── reticle_boundary_def.fbs │ ├── reticle_def.fbs │ ├── reticle_trail_def.fbs │ ├── rigid_body_def.fbs │ ├── script_def.fbs │ ├── scroll_def.fbs │ ├── shader_clip_def.fbs │ ├── shader_def.fbs │ ├── shape_def.fbs │ ├── skeleton_def.fbs │ ├── slider_def.fbs │ ├── slideshow_def.fbs │ ├── snap_def.fbs │ ├── sort_mode.fbs │ ├── spatial_grab_input_def.fbs │ ├── spherical_grab_input_def.fbs │ ├── stategraph_def.fbs │ ├── stay_in_box_mutator_def.fbs │ ├── tab_header_layout_def.fbs │ ├── templates │ ├── button_template.fbs │ ├── cursor_template.fbs │ └── reticle_template.fbs │ ├── text_def.fbs │ ├── text_input_def.fbs │ ├── texture_atlas_def.fbs │ ├── texture_def.fbs │ ├── track_hmd_def.fbs │ ├── transform_def.fbs │ ├── variant_def.fbs │ ├── vertex_attribute_def.fbs │ ├── visibility_def.fbs │ └── word_art_def.fbs └── third_party ├── assimp ├── BUILD ├── config.h └── revision.h ├── flatbuffers ├── BUILD └── build_defs.bzl ├── freetype2 ├── BUILD ├── ftconfig.h └── ftmodule.h ├── gl └── BUILD ├── harfbuzz ├── BUILD ├── config.h ├── hb-buffer-deserialize-json.hh ├── hb-buffer-deserialize-text.hh ├── hb-ot-shape-complex-indic-machine.hh ├── hb-ot-shape-complex-myanmar-machine.hh ├── hb-ot-shape-complex-use-machine.hh ├── hb-version.h └── unicodedata_db.h ├── libfbx ├── BUILD └── build_defs.bzl ├── libjpeg_turbo ├── BUILD ├── jconfig.h └── jconfigint.h ├── libpng ├── BUILD ├── config.h └── pnglibconf.h └── stb_image_resize ├── BUILD └── stb_image_resize.c /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We would love to accept your patches and contributions to this project, but are 4 | unable to do so at the moment. We are actively working on making this possible 5 | in the very near future. 6 | -------------------------------------------------------------------------------- /data/lullshaders/apply_gamma_fragment.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Apply Gamma to gl_FragColor', 6 | versions: [{ 7 | lang: 'GL_Compat', 8 | min_version: 100, 9 | max_version: 300, 10 | }], 11 | code: ||| 12 | #include "lullaby/data/shaders/pbr/gamma.glslh" 13 | |||, 14 | main_code: ||| 15 | gl_FragColor.rgb = ApplyGamma(gl_FragColor.rgb); 16 | |||, 17 | }, 18 | { 19 | name: 'Apply Gamma to gl_FragColor', 20 | outputs: [{ 21 | name: 'outColor', 22 | type: 'Vec4f', 23 | }], 24 | versions: [{ 25 | lang: 'GL_Compat', 26 | min_version: 300, 27 | max_version: 0, 28 | }], 29 | code: ||| 30 | #include "lullaby/data/shaders/pbr/gamma.glslh" 31 | |||, 32 | main_code: ||| 33 | outColor.rgb = ApplyGamma(outColor.rgb); 34 | |||, 35 | }, 36 | ], 37 | } 38 | -------------------------------------------------------------------------------- /data/lullshaders/base_color_alpha_mask_fragment.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Base Color Alpha Mask (Uniform)', 6 | uniforms: [{ 7 | name: 'AlphaCutoff', 8 | type: 'Float1', 9 | }], 10 | environment: [utils.hash('AlphaCutoff')], 11 | main_code: ||| 12 | if (base_color.a < UNIFORM(AlphaCutoff)) { 13 | discard; 14 | } 15 | |||, 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /data/lullshaders/fragment_depth.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [{ 4 | name: 'Depth', 5 | main_code: ||| 6 | gl_FragColor = vec4(gl_FragCoord.zzz, 1); 7 | |||, 8 | }], 9 | } 10 | -------------------------------------------------------------------------------- /data/lullshaders/fragment_tonemap_reinhard.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Reinhard Tonemapping', 6 | versions: [{ 7 | lang: 'GL_Compat', 8 | min_version: 100, 9 | max_version: 300, 10 | }], 11 | main_code: ||| 12 | gl_FragColor.rgb = gl_FragColor.rgb / (gl_FragColor.rgb + 1.0); 13 | |||, 14 | }, 15 | { 16 | name: 'Reinhard Tonemapping', 17 | outputs: [{ 18 | name: 'outColor', 19 | type: 'Vec4f', 20 | }], 21 | versions: [{ 22 | lang: 'GL_Compat', 23 | min_version: 300, 24 | max_version: 0, 25 | }], 26 | main_code: ||| 27 | outColor.rgb = outColor.rgb / (outColor.rgb + 1.0); 28 | |||, 29 | }, 30 | ], 31 | } 32 | -------------------------------------------------------------------------------- /data/lullshaders/fragment_white.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'White', 6 | versions: [{ 7 | lang: 'GL_Compat', 8 | min_version: 100, 9 | max_version: 300, 10 | }], 11 | main_code: ||| 12 | gl_FragColor = vec4(1.0); 13 | |||, 14 | }, 15 | { 16 | name: 'White', 17 | outputs: [{ 18 | name: 'outColor', 19 | type: 'Vec4f', 20 | }], 21 | versions: [{ 22 | lang: 'GL_Compat', 23 | min_version: 300, 24 | max_version: 0, 25 | }], 26 | main_code: ||| 27 | outColor = vec4(1.0); 28 | |||, 29 | }, 30 | ], 31 | } 32 | -------------------------------------------------------------------------------- /data/lullshaders/include/premultiply_alpha.glslh: -------------------------------------------------------------------------------- 1 | #ifndef LULLABY_DATA_LULLSHADERS_INCLUDE_PREMULTIPLY_ALPHA_GLSLH_ 2 | #define LULLABY_DATA_LULLSHADERS_INCLUDE_PREMULTIPLY_ALPHA_GLSLH_ 3 | 4 | vec4 PremultiplyAlpha(vec4 c) { return vec4(c.rgb * c.a, c.a); } 5 | 6 | #endif // LULLABY_DATA_LULLSHADERS_INCLUDE_PREMULTIPLY_ALPHA_GLSLH_ 7 | -------------------------------------------------------------------------------- /data/lullshaders/vertex_color.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Vertex Color', 6 | features: [utils.hash('VertexColor')], 7 | inputs: [{ 8 | name: 'aColor', 9 | type: 'Vec4f', 10 | usage: 'Color', 11 | }], 12 | outputs: [{ 13 | name: 'vColor', 14 | type: 'Vec4f', 15 | }], 16 | main_code: ||| 17 | vColor = aColor; 18 | |||, 19 | }, 20 | ], 21 | } 22 | -------------------------------------------------------------------------------- /data/lullshaders/vertex_cubemap.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Cubemap TexCoords', 6 | inputs: [{ 7 | name: 'aNormal', 8 | type: 'Vec3f', 9 | usage: 'Normal', 10 | }], 11 | outputs: [{ 12 | name: 'vCubeCoord', 13 | type: 'Vec3f', 14 | }], 15 | uniforms: [ 16 | { 17 | name: 'model', 18 | type: 'Float4x4', 19 | }, 20 | { 21 | name: 'mat_normal', 22 | type: 'Float3x3', 23 | }, 24 | ], 25 | main_code: ||| 26 | vCubeCoord = UNIFORM(mat_normal) * aNormal; 27 | |||, 28 | }, 29 | ], 30 | } 31 | -------------------------------------------------------------------------------- /data/lullshaders/vertex_position_multiview.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Multiview Transform', 6 | features: [utils.hash('Transform')], 7 | environment: [utils.hash('MULTIVIEW')], 8 | inputs: [{ 9 | name: 'aPosition', 10 | type: 'Vec4f', 11 | usage: 'Position', 12 | }], 13 | uniforms: [{ 14 | name: 'model_view_projection', 15 | type: 'Float4x4', 16 | array_size: 2, 17 | }], 18 | code: ||| 19 | #extension GL_OVR_multiview2 : require 20 | layout(num_views = 2) in; 21 | |||, 22 | main_code: ||| 23 | gl_Position = UNIFORM(model_view_projection)[gl_ViewID_OVR] * aPosition; 24 | |||, 25 | }, 26 | ], 27 | } 28 | -------------------------------------------------------------------------------- /data/lullshaders/vertex_texture.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'Texture UVs', 6 | features: [utils.hash('Texture')], 7 | inputs: [{ 8 | name: 'aTexCoord', 9 | type: 'Vec2f', 10 | usage: 'TexCoord', 11 | }], 12 | outputs: [{ 13 | name: 'vTexCoord', 14 | type: 'Vec2f', 15 | }], 16 | uniforms: [{ 17 | name: 'uv_bounds', 18 | type: 'Float4', 19 | }], 20 | main_code: ||| 21 | vTexCoord = uv_bounds.xy + aTexCoord * uv_bounds.zw; 22 | |||, 23 | }, 24 | { 25 | name: 'Texture UV1s', 26 | features: [utils.hash('Texture1')], 27 | inputs: [{ 28 | name: 'aTexCoordAlt', 29 | type: 'Vec2f', 30 | usage: 'TexCoord', 31 | }], 32 | outputs: [{ 33 | name: 'vTexCoordAlt', 34 | type: 'Vec2f', 35 | }], 36 | main_code: ||| 37 | vTexCoordAlt = aTexCoordAlt; 38 | |||, 39 | }, 40 | ], 41 | } 42 | -------------------------------------------------------------------------------- /data/lullshaders/view_direction_vertex.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | snippets: [ 4 | { 5 | name: 'View Direction', 6 | outputs: [{ 7 | name: 'vViewDirection', 8 | type: 'Vec3f', 9 | }], 10 | uniforms: [{ 11 | name: 'camera_pos', 12 | type: 'Float3', 13 | }], 14 | // world_position variable is assumed to exist and be set by a preceding 15 | // snippet. We have no way to establish this contract formally at build 16 | // time. 17 | main_code: ||| 18 | vViewDirection = UNIFORM(camera_pos) - world_position; 19 | |||, 20 | }, 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /data/shaders/color.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/uber_fragment_common.glslh" 2 | 3 | void main() { 4 | SetFragColor(PremultiplyAlpha(GetColor())); 5 | } 6 | -------------------------------------------------------------------------------- /data/shaders/color.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | 5 | void main() { 6 | gl_Position = GetClipFromModelMatrix() * aPosition; 7 | } 8 | -------------------------------------------------------------------------------- /data/shaders/color_border.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/uber_fragment_common.glslh" 2 | 3 | uniform vec4 border_color; 4 | uniform float border_width; 5 | 6 | void main() { 7 | float sdf_dist = distance(vTexCoord, vec2(0.5)) + border_width - 0.5; 8 | float border_amount = GET_AA_FROM_SDF(float, sdf_dist); 9 | // Interpolate between the normal color and the border color with that amount. 10 | vec4 color = mix(GetColor(), border_color, border_amount); 11 | SetFragColor(PremultiplyAlpha(color)); 12 | } 13 | -------------------------------------------------------------------------------- /data/shaders/common.glslh: -------------------------------------------------------------------------------- 1 | 2 | // This macro provides a way to do a ternary operator in the preprocessor, ie 3 | // (GL_ES ? _es : _desktop). 4 | #ifdef GL_ES 5 | #define GLES_ELSE(_es, _desktop) _es 6 | #else 7 | #define GLES_ELSE(_es, _desktop) _desktop 8 | #endif 9 | -------------------------------------------------------------------------------- /data/shaders/compatibility.glslh: -------------------------------------------------------------------------------- 1 | #ifndef LULLABY_DATA_SHADERS_COMPATIBILITY_GLSLH_ 2 | #define LULLABY_DATA_SHADERS_COMPATIBILITY_GLSLH_ 3 | 4 | /// These macros allow the old-style texture syntax to be used in GL ES 3.0. 5 | 6 | #include "lullaby/data/shaders/common.glslh" 7 | 8 | #if __VERSION__ >= GLES_ELSE(300, 330) 9 | // Binds old syntax to new ES 3.0 syntax. 10 | #define texture2DLod(_sampler, _uv, _lod) textureLod(_sampler, _uv, _lod) 11 | #define textureCubeLod(_sampler, _uv, _lod) textureLod(_sampler, _uv, _lod) 12 | #define texture2DExternal(_sampler, _uv) texture(_sampler, _uv) 13 | #endif // __VERSION__ >= GLES_ELSE(300, 330) 14 | 15 | #endif // LULLABY_DATA_SHADERS_COMPATIBILITY_GLSLH_ 16 | -------------------------------------------------------------------------------- /data/shaders/composite_shadow.glslf: -------------------------------------------------------------------------------- 1 | varying mediump vec2 vTexCoord; 2 | uniform sampler2D texture_unit_0; 3 | uniform lowp vec4 color; 4 | 5 | uniform mediump vec4 clamp_bounds; 6 | uniform mediump float blur_level; 7 | 8 | void main() { 9 | mediump vec2 uv = clamp(vTexCoord, clamp_bounds.xy, clamp_bounds.zw); 10 | 11 | vec3 shadow_opacities = texture2D(texture_unit_0, uv).rgb; 12 | 13 | float shadow_opacity = blur_level <= 0.5 ? 14 | mix(shadow_opacities[0], shadow_opacities[1], blur_level * 2.0) : 15 | mix(shadow_opacities[1], shadow_opacities[2], blur_level * 2.0 - 1.0); 16 | float final_alpha = color.a * shadow_opacity; 17 | gl_FragColor = vec4(color.rgb * final_alpha, final_alpha); 18 | } 19 | -------------------------------------------------------------------------------- /data/shaders/depth.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/fragment_common.glslh" 2 | 3 | void main() { 4 | gl_FragColor = vec4(gl_FragCoord.z, gl_FragCoord.z, gl_FragCoord.z, 1); 5 | } 6 | -------------------------------------------------------------------------------- /data/shaders/depth.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | 5 | uniform mat4 model; 6 | 7 | void main() { 8 | gl_Position = GetClipFromModelMatrix() * aPosition; 9 | } 10 | -------------------------------------------------------------------------------- /data/shaders/laser.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/fragment_common.glslh" 2 | 3 | STAGE_INPUT mediump vec2 vTexCoord; 4 | uniform sampler2D texture_unit_0; 5 | uniform lowp vec4 color; 6 | uniform mediump vec4 fade_points; 7 | 8 | #define kNearFadeWidth 0.02 9 | #define kNearFadeLength 0.0033 10 | 11 | void main() { 12 | mediump float near_fade = 13 | clamp((vTexCoord.y - fade_points[0]) / (fade_points[1] - fade_points[0]), 14 | 0.0, 1.0); 15 | mediump float far_fade = clamp( 16 | 1.0 - (vTexCoord.y - fade_points[2]) / (fade_points[3] - fade_points[2]), 17 | 0.0, 1.0); 18 | mediump float width_fade = clamp( 19 | (vTexCoord.y - abs(vTexCoord.x - 0.5) * kNearFadeWidth) / kNearFadeLength, 20 | 0.0, 1.0); 21 | mediump float fade_factor = near_fade * far_fade * width_fade; 22 | 23 | lowp vec4 texture_color = texture2D(texture_unit_0, vTexCoord); 24 | lowp vec4 premult_uniform_color = vec4(color.rgb * color.a, color.a); 25 | gl_FragColor = premult_uniform_color * texture_color * fade_factor; 26 | } 27 | -------------------------------------------------------------------------------- /data/shaders/light.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/fragment_common.glslh" 2 | #include "lullaby/data/shaders/light.glslh" 3 | 4 | STAGE_INPUT mediump vec3 vNormal; 5 | STAGE_INPUT mediump vec3 vVertPos; 6 | 7 | LIGHT_DECL_AMBIENT(1); 8 | LIGHT_DECL_DIRECTIONAL(1); 9 | LIGHT_DECL_POINT(1); 10 | 11 | uniform vec3 camera_dir; 12 | uniform lowp vec4 color; 13 | 14 | void main() { 15 | // Re-normalize the normal which been could have been scaled or interpolated 16 | // from the vertex stage. 17 | vec3 normal = normalize(vNormal); 18 | 19 | // Light calculaltions. 20 | vec3 light_color = vec3(0.0, 0.0, 0.0); 21 | LIGHT_CALCULATE_AMBIENTS(light_color) 22 | LIGHT_CALCULATE_DIRECTIONALS(light_color, vVertPos, normal, camera_dir) 23 | LIGHT_CALCULATE_POINTS(light_color, vVertPos, normal, camera_dir) 24 | 25 | gl_FragColor = vec4(light_color * color.rgb, color.a); 26 | } 27 | -------------------------------------------------------------------------------- /data/shaders/light.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec3 aNormal; 5 | STAGE_OUTPUT vec3 vNormal; 6 | STAGE_OUTPUT vec3 vVertPos; 7 | 8 | uniform mat4 model; 9 | uniform mat3 mat_normal; 10 | 11 | void main() { 12 | gl_Position = GetClipFromModelMatrix() * aPosition; 13 | vNormal = mat_normal * aNormal; 14 | vVertPos = (model * aPosition).xyz; 15 | } 16 | -------------------------------------------------------------------------------- /data/shaders/light_shadow.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/fragment_common.glslh" 2 | #include "lullaby/data/shaders/light.glslh" 3 | 4 | STAGE_INPUT mediump vec3 vNormal; 5 | STAGE_INPUT mediump vec3 vVertPos; 6 | 7 | LIGHT_DECL_AMBIENT(1); 8 | LIGHT_DECL_POINT(1); 9 | LIGHT_DECL_DIRECTIONAL_SHADOW_5; 10 | 11 | uniform vec3 camera_dir; 12 | uniform lowp vec4 color; 13 | 14 | void main() { 15 | // Re-normalize the normal which been could have been scaled or interpolated 16 | // from the vertex stage. 17 | vec3 normal = normalize(vNormal); 18 | 19 | // Light calculaltions. 20 | vec3 light_color = vec3(0.0, 0.0, 0.0); 21 | LIGHT_CALCULATE_AMBIENTS(light_color) 22 | LIGHT_CALCULATE_DIRECTIONALS_SHADOW_5(light_color, vVertPos, normal, camera_dir) 23 | LIGHT_CALCULATE_POINTS(light_color, vVertPos, normal, camera_dir) 24 | 25 | gl_FragColor = vec4(light_color * color.rgb * color.a, color.a); 26 | } 27 | -------------------------------------------------------------------------------- /data/shaders/light_shadow.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec3 aNormal; 5 | STAGE_OUTPUT vec3 vNormal; 6 | STAGE_OUTPUT vec3 vVertPos; 7 | STAGE_OUTPUT vec4 vVertPosLightSpace; 8 | 9 | uniform mat4 model; 10 | uniform mat3 mat_normal; 11 | uniform mat4 directional_light_shadow_matrix; 12 | 13 | void main() { 14 | vec4 model_position = (model * aPosition); 15 | gl_Position = GetClipFromModelMatrix() * aPosition; 16 | vNormal = mat_normal * aNormal; 17 | vVertPos = model_position.xyz; 18 | vVertPosLightSpace = directional_light_shadow_matrix * model_position; 19 | } 20 | -------------------------------------------------------------------------------- /data/shaders/light_shadow_texture.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec3 aNormal; 5 | STAGE_INPUT vec2 aTexCoord; 6 | STAGE_OUTPUT vec3 vNormal; 7 | STAGE_OUTPUT vec3 vVertPos; 8 | STAGE_OUTPUT vec2 vTexCoord; 9 | STAGE_OUTPUT vec4 vVertPosLightSpace; 10 | 11 | uniform mat4 model; 12 | uniform mat3 mat_normal; 13 | uniform mat4 directional_light_shadow_matrix; 14 | 15 | void main() { 16 | vec4 model_position = (model * aPosition); 17 | gl_Position = GetClipFromModelMatrix() * aPosition; 18 | vNormal = mat_normal * aNormal; 19 | vVertPos = model_position.xyz; 20 | vTexCoord = aTexCoord; 21 | vVertPosLightSpace = directional_light_shadow_matrix * model_position; 22 | } 23 | -------------------------------------------------------------------------------- /data/shaders/light_texture.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/fragment_common.glslh" 2 | #include "lullaby/data/shaders/light.glslh" 3 | 4 | STAGE_INPUT mediump vec3 vNormal; 5 | STAGE_INPUT mediump vec3 vVertPos; 6 | STAGE_INPUT mediump vec2 vTexCoord; 7 | 8 | uniform sampler2D texture_unit_0; 9 | 10 | LIGHT_DECL_AMBIENT(1); 11 | LIGHT_DECL_DIRECTIONAL(1); 12 | LIGHT_DECL_POINT(1); 13 | 14 | uniform vec3 camera_dir; 15 | 16 | void main() { 17 | // Sample the texture. 18 | lowp vec4 texture_color = texture2D(texture_unit_0, vTexCoord); 19 | 20 | // Re-normalize the normal which been could have been scaled or interpolated 21 | // from the vertex stage. 22 | vec3 normal = normalize(vNormal); 23 | 24 | // Light calculations. 25 | vec3 light_color = vec3(0.0, 0.0, 0.0); 26 | LIGHT_CALCULATE_AMBIENTS(light_color) 27 | LIGHT_CALCULATE_DIRECTIONALS(light_color, vVertPos, normal, camera_dir) 28 | LIGHT_CALCULATE_POINTS(light_color, vVertPos, normal, camera_dir) 29 | 30 | gl_FragColor = vec4(texture_color.rgb * light_color, texture_color.a); 31 | } 32 | -------------------------------------------------------------------------------- /data/shaders/light_texture.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec3 aNormal; 5 | STAGE_INPUT vec2 aTexCoord; 6 | STAGE_OUTPUT vec3 vNormal; 7 | STAGE_OUTPUT vec3 vVertPos; 8 | STAGE_OUTPUT vec2 vTexCoord; 9 | 10 | uniform mat4 model; 11 | uniform mat3 mat_normal; 12 | 13 | void main() { 14 | gl_Position = GetClipFromModelMatrix() * aPosition; 15 | vNormal = mat_normal * aNormal; 16 | vVertPos = (model * aPosition).xyz; 17 | vTexCoord = aTexCoord; 18 | } 19 | -------------------------------------------------------------------------------- /data/shaders/math.glslh: -------------------------------------------------------------------------------- 1 | #ifndef LULLABY_DATA_SHADERS_MATH_GLSLH_ 2 | #define LULLABY_DATA_SHADERS_MATH_GLSLH_ 3 | 4 | /// General-purpose math constants and functions. 5 | 6 | /// A partial value of Pi. 7 | const float kPi = 3.14159265; 8 | 9 | mat3 Mat3FromQuaternion(vec4 q) { 10 | mat3 dest; 11 | vec3 two_v = 2. * q.xyz; 12 | vec3 two_v_sq = two_v * q.xyz; 13 | float two_x_y = two_v.x * q.y; 14 | float two_x_z = two_v.x * q.z; 15 | float two_y_z = two_v.y * q.z; 16 | vec3 two_v_w = two_v * q.w; 17 | 18 | dest[0][0] = 1. - two_v_sq.y - two_v_sq.z; 19 | dest[1][0] = two_x_y - two_v_w.z; 20 | dest[2][0] = two_x_z + two_v_w.y; 21 | 22 | dest[0][1] = two_x_y + two_v_w.z; 23 | dest[1][1] = 1. - two_v_sq.x - two_v_sq.z; 24 | dest[2][1] = two_y_z - two_v_w.x; 25 | 26 | dest[0][2] = two_x_z - two_v_w.y; 27 | dest[1][2] = two_y_z + two_v_w.x; 28 | dest[2][2] = 1. - two_v_sq.x - two_v_sq.y; 29 | 30 | return dest; 31 | } 32 | 33 | #endif // LULLABY_DATA_SHADERS_MATH_GLSLH_ 34 | -------------------------------------------------------------------------------- /data/shaders/pbr/fibl_common.glslh: -------------------------------------------------------------------------------- 1 | #ifndef LULLABY_DATA_SHADERS_FIBL_COMMON_GLSLH_ 2 | #define LULLABY_DATA_SHADERS_FIBL_COMMON_GLSLH_ 3 | 4 | uniform vec4 fibl_args; // 5 | 6 | bool IsFiblEnabled() { 7 | return bool(fibl_args.x); 8 | } 9 | 10 | float GetFiblTanHalfFov() { 11 | return fibl_args.y; 12 | } 13 | 14 | vec2 GetFiblSampleScale() { 15 | return fibl_args.zw; 16 | } 17 | 18 | #endif // LULLABY_DATA_SHADERS_FIBL_COMMON_GLSLH_ 19 | -------------------------------------------------------------------------------- /data/shaders/pbr/math_common.glslh: -------------------------------------------------------------------------------- 1 | #ifndef LULLABY_DATA_SHADERS_PBR_MATH_COMMON_GLSLH_ 2 | #define LULLABY_DATA_SHADERS_PBR_MATH_COMMON_GLSLH_ 3 | 4 | #include "lullaby/data/shaders/math.glslh" 5 | 6 | /// Math constants and functions specific to the PBR shader. 7 | 8 | float Pow5(float x) { 9 | float xx = x * x; 10 | return xx * xx * x; 11 | } 12 | 13 | #endif // LULLABY_DATA_SHADERS_PBR_MATH_COMMON_GLSLH_ 14 | -------------------------------------------------------------------------------- /data/shaders/pos_uv.glslv: -------------------------------------------------------------------------------- 1 | // Copies UV0. Supports multiview. 2 | 3 | #include "lullaby/data/shaders/vertex_common.glslh" 4 | 5 | STAGE_INPUT vec4 aPosition; 6 | STAGE_INPUT vec2 aTexCoord; 7 | STAGE_OUTPUT vec2 vTexCoord; 8 | 9 | void main() { 10 | gl_Position = GetClipFromModelMatrix() * aPosition; 11 | vTexCoord = aTexCoord; 12 | } 13 | -------------------------------------------------------------------------------- /data/shaders/progress_bar.glslf: -------------------------------------------------------------------------------- 1 | #extension GL_OES_standard_derivatives : enable 2 | 3 | #include "lullaby/data/shaders/fragment_common.glslh" 4 | 5 | STAGE_INPUT mediump vec2 vTexCoord; 6 | uniform lowp vec4 color; 7 | 8 | uniform lowp vec4 progress_base_color; 9 | uniform lowp vec4 progress_color; 10 | 11 | uniform lowp float progress_start; 12 | uniform lowp float progress_stop; 13 | 14 | void main() { 15 | // Compute 1-D distance inside in-progress region 16 | float start_distance = vTexCoord.x - progress_start; 17 | float stop_distance = progress_stop - vTexCoord.x; 18 | float progress_distance = min(start_distance, stop_distance); 19 | 20 | // Scale distance by rate-of-change of distance and clamp, and 21 | // this is our blend ratio 22 | float blend = progress_distance / fwidth(progress_distance); 23 | blend = clamp(blend, 0., 1.); 24 | 25 | // Blend and set frag color 26 | vec4 out_color = color * mix(progress_base_color, progress_color, blend); 27 | gl_FragColor = vec4(out_color.rgb * out_color.a, out_color.a); 28 | } 29 | -------------------------------------------------------------------------------- /data/shaders/progress_bar.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec2 aTexCoord; 5 | STAGE_OUTPUT mediump vec2 vTexCoord; 6 | 7 | void main() { 8 | gl_Position = GetClipFromModelMatrix() * aPosition; 9 | vTexCoord = aTexCoord; 10 | } 11 | -------------------------------------------------------------------------------- /data/shaders/reticle.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec2 aTexCoord; 5 | STAGE_OUTPUT mediump vec2 vTexCoord; 6 | 7 | void main() { 8 | gl_Position = GetClipFromModelMatrix() * aPosition; 9 | vTexCoord = aTexCoord; 10 | } 11 | -------------------------------------------------------------------------------- /data/shaders/screen_space_texture.glslf: -------------------------------------------------------------------------------- 1 | #extension GL_OES_EGL_image_external : require 2 | #include "lullaby/data/shaders/fragment_common.glslh" 3 | 4 | STAGE_INPUT mediump vec2 vTexCoord; 5 | uniform samplerExternalOES texture_unit_0; 6 | uniform lowp vec4 color; 7 | 8 | void main() { 9 | lowp vec4 texture_color = texture2D(texture_unit_0, vTexCoord); 10 | gl_FragColor = vec4(color.rgb * color.a, color.a) * texture_color; 11 | } 12 | -------------------------------------------------------------------------------- /data/shaders/screen_space_texture.glslv: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/vertex_common.glslh" 2 | 3 | STAGE_INPUT vec4 aPosition; 4 | STAGE_INPUT vec2 aTexCoord; 5 | STAGE_OUTPUT vec2 vTexCoord; 6 | 7 | uniform vec3 uv_matrix_rows[2]; 8 | 9 | void main() { 10 | gl_Position = aPosition; 11 | 12 | // Apply a 2x3 transform matrix to our UVs to allow for rotations & offsets. 13 | vec3 uv_vec3 = vec3(aTexCoord, 1.0); 14 | vTexCoord.x = dot(uv_matrix_rows[0], uv_vec3); 15 | vTexCoord.y = dot(uv_matrix_rows[1], uv_vec3); 16 | } 17 | -------------------------------------------------------------------------------- /data/shaders/screen_space_texture_essl3.glslf: -------------------------------------------------------------------------------- 1 | #version 300 es 2 | #extension GL_OES_EGL_image_external_essl3 : require 3 | #include "lullaby/data/shaders/fragment_common.glslh" 4 | 5 | STAGE_INPUT mediump vec2 vTexCoord; 6 | uniform samplerExternalOES texture_unit_0; 7 | uniform lowp vec4 color; 8 | 9 | void main() { 10 | lowp vec4 texture_color = texture2D(texture_unit_0, vTexCoord); 11 | gl_FragColor = vec4(color.rgb * color.a, color.a) * texture_color; 12 | } 13 | -------------------------------------------------------------------------------- /data/shaders/sdf_glyph_aa.glslv: -------------------------------------------------------------------------------- 1 | #version 300 es 2 | 3 | // We need a separate vertex shader to match the version used in the fragment 4 | // shader. The version should also go on the first line of the shader. 5 | 6 | #include "lullaby/data/shaders/uber_vertex_common.glslh" 7 | 8 | void main() { 9 | InitVertexShading(); 10 | } 11 | -------------------------------------------------------------------------------- /data/shaders/skinned_texture.glslv: -------------------------------------------------------------------------------- 1 | #define MAX_BONES 96 2 | #define NUM_VEC4S_IN_AFFINE_TRANSFORM 3 3 | 4 | #include "lullaby/data/shaders/vertex_common.glslh" 5 | #include "lullaby/data/shaders/skinning.glslh" 6 | 7 | // TODO Merge this into texture.glslv using 8 | 9 | STAGE_INPUT vec4 aPosition; 10 | STAGE_INPUT vec2 aTexCoord; 11 | STAGE_OUTPUT mediump vec2 vTexCoord; 12 | 13 | uniform mediump vec4 uv_bounds; 14 | 15 | DECL_SOFT_SKINNING; 16 | 17 | void main() { 18 | vec4 skinned_position = FOUR_BONE_SKINNED_VERTEX(aPosition); 19 | 20 | gl_Position = GetClipFromModelMatrix() * skinned_position; 21 | vTexCoord = uv_bounds.xy + aTexCoord * uv_bounds.zw; 22 | } 23 | -------------------------------------------------------------------------------- /data/shaders/texture.glslf: -------------------------------------------------------------------------------- 1 | // Samples texture 0 and scales by a "color" uniform. 2 | 3 | #include "lullaby/data/shaders/uber_fragment_common.glslh" 4 | 5 | uniform sampler2D texture_unit_0; 6 | 7 | void main() { 8 | lowp vec4 texture_color = SampleTexture(texture_unit_0, GetVTexCoord()); 9 | SetFragColor(PremultiplyAlpha(GetColor()) * texture_color); 10 | } 11 | -------------------------------------------------------------------------------- /data/shaders/texture.glslv: -------------------------------------------------------------------------------- 1 | // Scales and offsets UV0 by "uv_bounds" uniform. Supports multiview. 2 | 3 | #include "lullaby/data/shaders/vertex_common.glslh" 4 | 5 | STAGE_INPUT vec4 aPosition; 6 | STAGE_INPUT vec2 aTexCoord; 7 | STAGE_OUTPUT vec2 vTexCoord; 8 | 9 | uniform vec4 uv_bounds; 10 | 11 | void main() { 12 | gl_Position = GetClipFromModelMatrix() * aPosition; 13 | vTexCoord = uv_bounds.xy + aTexCoord * uv_bounds.zw; 14 | } 15 | -------------------------------------------------------------------------------- /data/shaders/texture_2d.glslv: -------------------------------------------------------------------------------- 1 | // Simple 2D textured shader. Position is scaled and offset into normalized 2 | // device coordinates, bypassing the view transform. 3 | 4 | #include "lullaby/data/shaders/vertex_common.glslh" 5 | 6 | STAGE_INPUT vec4 aPosition; 7 | STAGE_INPUT vec2 aTexCoord; 8 | STAGE_OUTPUT vec2 vTexCoord; 9 | 10 | uniform vec4 position_offset; 11 | uniform vec4 position_scale; 12 | uniform vec4 uv_bounds; 13 | 14 | void main() { 15 | gl_Position = position_offset + aPosition * position_scale; 16 | vTexCoord = uv_bounds.xy + aTexCoord * uv_bounds.zw; 17 | } 18 | -------------------------------------------------------------------------------- /data/shaders/texture_external_oes.glslf: -------------------------------------------------------------------------------- 1 | // Samples external texture 0 and scales by a "color" uniform. 2 | // TODO: It would be useful to merge this shader with texture.glslf 3 | // and switch the input according to a define. But this breaks compatibility 4 | // with the Android emulator due to a bug in the emulator's shader compiler (it 5 | // performs a dumb search for samplerExternalOES textures, locating them even in 6 | // disabled code blocks). 7 | 8 | #ifdef GL_ES 9 | #extension GL_OES_EGL_image_external : enable 10 | #endif // GL_ES 11 | 12 | #include "lullaby/data/shaders/uber_fragment_common.glslh" 13 | 14 | #ifdef GL_ES 15 | uniform samplerExternalOES texture_unit_0; 16 | #else // GL_ES 17 | uniform sampler2D texture_unit_0; 18 | #endif // GL_ES 19 | 20 | void main() { 21 | lowp vec4 texture_color = texture2D(texture_unit_0, GetVTexCoord()); 22 | SetFragColor(PremultiplyAlpha(GetColor()) * texture_color); 23 | } 24 | -------------------------------------------------------------------------------- /data/shaders/uber.glslv: -------------------------------------------------------------------------------- 1 | // Simple vertex shader that does not implement any special functionality. 2 | 3 | #include "lullaby/data/shaders/uber_vertex_common.glslh" 4 | 5 | void main() { 6 | InitVertexShading(); 7 | } 8 | -------------------------------------------------------------------------------- /data/shaders/vertex_color.glslf: -------------------------------------------------------------------------------- 1 | // Outputs the vertex color. 2 | 3 | #include "lullaby/data/shaders/fragment_common.glslh" 4 | 5 | // It's assumed that vColor has already been multiplied by the "color" uniform 6 | // in the vertex shader. 7 | STAGE_INPUT lowp vec4 vColor; 8 | 9 | void main() { 10 | gl_FragColor = vec4(vColor.rgb * vColor.a, vColor.a); 11 | } 12 | -------------------------------------------------------------------------------- /data/shaders/vertex_color.glslv: -------------------------------------------------------------------------------- 1 | // Scales color uniform by vertex color and passes result to frag as "vColor". 2 | // Supports multiview. 3 | 4 | #include "lullaby/data/shaders/vertex_common.glslh" 5 | 6 | STAGE_INPUT vec4 aPosition; 7 | STAGE_INPUT vec4 aColor; 8 | STAGE_OUTPUT vec4 vColor; 9 | uniform lowp vec4 color; 10 | 11 | void main() { 12 | gl_Position = GetClipFromModelMatrix() * aPosition; 13 | vColor = aColor * color; 14 | } 15 | -------------------------------------------------------------------------------- /data/shaders/vertex_color_texture.glslv: -------------------------------------------------------------------------------- 1 | // Scales color uniform by vertex color and passes result to frag as "vColor". 2 | // Passes through UV0. Supports multiview. 3 | 4 | #include "lullaby/data/shaders/vertex_common.glslh" 5 | 6 | STAGE_INPUT vec4 aPosition; 7 | STAGE_INPUT vec4 aColor; 8 | STAGE_INPUT vec2 aTexCoord; 9 | STAGE_OUTPUT vec4 vColor; 10 | STAGE_OUTPUT vec2 vTexCoord; 11 | uniform lowp vec4 color; 12 | 13 | void main() { 14 | gl_Position = GetClipFromModelMatrix() * aPosition; 15 | vColor = aColor * color; 16 | vTexCoord = aTexCoord; 17 | } 18 | -------------------------------------------------------------------------------- /data/shaders/vertical_gradient_texture.glslf: -------------------------------------------------------------------------------- 1 | #include "lullaby/data/shaders/uber_fragment_common.glslh" 2 | 3 | uniform lowp vec4 color_top; 4 | uniform lowp vec4 color_bottom; 5 | uniform sampler2D texture_unit_0; 6 | 7 | void main() { 8 | lowp vec4 mixed_color = 9 | GetColor() * mix(color_top, color_bottom, GetVTexCoord().y); 10 | lowp vec4 texture_color = SampleTexture(texture_unit_0, vTexCoord); 11 | SetFragColor(PremultiplyAlpha(mixed_color) * texture_color); 12 | } 13 | -------------------------------------------------------------------------------- /data/textures/debug_font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/data/textures/debug_font.png -------------------------------------------------------------------------------- /dev/BUILD: -------------------------------------------------------------------------------- 1 | # This package contains various build rules for generating code and data for Lullaby. 2 | 3 | # This file intentionally is empty otherwise. 4 | -------------------------------------------------------------------------------- /dev/copy_files.bzl: -------------------------------------------------------------------------------- 1 | def copy_files( 2 | name, 3 | srcs = [], 4 | outs = []): 5 | """ 6 | We have dependencies on data files outside of our project, and the filegroups 7 | provided by that project include extra stuff we don't want. This function 8 | will extract the provided filenames from the provided filegroups and copy them 9 | into a temporary output directory for use by subsequent build rules. 10 | Args: 11 | name: string, name of the output filegroup to generate 12 | filenames: list of strings, the file names we want to use 13 | filegroups: list of strings, the provided filegroups that contain the 14 | filenames 15 | """ 16 | native.genrule( 17 | name = "%s_copy" % name, 18 | srcs = srcs, 19 | outs = outs, 20 | cmd = "(for file in $(SRCS) ; do cp $$file $(@D) ; done)", 21 | message = "copying files for %s" % name, 22 | ) 23 | native.filegroup( 24 | name = name, 25 | srcs = outs, 26 | ) 27 | -------------------------------------------------------------------------------- /dev/custom_rules.bzl: -------------------------------------------------------------------------------- 1 | """Custom rules for OSS bazel project.""" 2 | 3 | def _local_repository(ctx): 4 | ctx.symlink(ctx.os.environ[ctx.attr.env], ctx.attr.env) 5 | ctx.file("BUILD", ctx.attr.build_file) 6 | return None 7 | 8 | local_repository_env = repository_rule( 9 | implementation = _local_repository, 10 | local = True, 11 | attrs = { 12 | "env": attr.string(mandatory = True), 13 | "build_file": attr.string(mandatory = True), 14 | }, 15 | ) 16 | -------------------------------------------------------------------------------- /dev/glob_files.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | """Gathers file paths according to patterns specified on the command line.""" 4 | 5 | import glob 6 | import sys 7 | 8 | 9 | def main(argv): 10 | files = [] 11 | for pattern in argv[1:]: 12 | files.extend(glob.glob(pattern)) 13 | print '\n'.join(files).replace('\\', '/') 14 | return 0 15 | 16 | if __name__ == '__main__': 17 | sys.exit(main(sys.argv)) 18 | -------------------------------------------------------------------------------- /dev/utils_common.bzl: -------------------------------------------------------------------------------- 1 | """Common functions and definitions used by other build rules.""" 2 | 3 | FLATC_DEFAULT_ARGS = [ 4 | "--no-union-value-namespacing", 5 | "--gen-name-strings", 6 | ] 7 | 8 | FLATC_JS_DEFAULT_ARGS = [ 9 | "--bfbs-comments", 10 | "--gen-name-strings", 11 | "--goog-js-export", 12 | "--gen-all", 13 | ] 14 | 15 | FLATC_DEFAULT_INCLUDES = [ 16 | "//:fbs_includes", 17 | ] 18 | 19 | FLATC_DEFAULT_INCLUDE_PATHS = [ 20 | "schemas", 21 | ] 22 | -------------------------------------------------------------------------------- /external/BUILD.absl: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | -------------------------------------------------------------------------------- /external/BUILD.astc_codec: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "astc_codec", 7 | hdrs = glob(["include/**/*.h"]), 8 | includes = ["include"], 9 | ) 10 | -------------------------------------------------------------------------------- /external/BUILD.astc_encoder: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "astc_encoder", 7 | srcs = glob([ 8 | "Source/*.cpp" 9 | ], exclude = [ 10 | "Source/exr_to_htga.cpp", 11 | "Source/astc_stb_tga.cpp" 12 | ]), 13 | hdrs = glob(["Source/*.h"]), 14 | includes = ["Source"], 15 | deps = [ 16 | "@stb//:stb", 17 | ] 18 | ) 19 | -------------------------------------------------------------------------------- /external/BUILD.fplutil: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "fplutil", 7 | srcs = [ 8 | "libfplutil/src/android_utils.cpp", 9 | "libfplutil/src/file_utils.cpp", 10 | "libfplutil/src/print_cxx.cc", 11 | "libfplutil/src/string_utils.cpp", 12 | ], 13 | hdrs = [ 14 | "libfplutil/include/fplutil/android_utils.h", 15 | "libfplutil/include/fplutil/file_utils.h", 16 | "libfplutil/include/fplutil/index_allocator.h", 17 | "libfplutil/include/fplutil/intrusive_list.h", 18 | "libfplutil/include/fplutil/mutex.h", 19 | "libfplutil/include/fplutil/print.h", 20 | "libfplutil/include/fplutil/string_utils.h", 21 | "libfplutil/include/fplutil/version.h", 22 | ], 23 | features = ["-parse_headers"], 24 | includes = ["libfplutil/include"], 25 | linkopts = ["-lpthread"], 26 | ) 27 | -------------------------------------------------------------------------------- /external/BUILD.gumbo: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "gumbo", 7 | srcs = glob(["src/*.c"]), 8 | hdrs = glob(["src/*.h"]), 9 | copts = ["-std=c99"], 10 | ) 11 | -------------------------------------------------------------------------------- /external/BUILD.gvr: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "gvr", 7 | hdrs = glob(["libraries/headers/vr/gvr/capi/include/*.h"]), 8 | includes = ["libraries/headers"], 9 | ) 10 | 11 | cc_library( 12 | name = "gvr_headers", 13 | deps = [":gvr"], 14 | ) 15 | 16 | cc_library( 17 | name = "gvr_audio", 18 | deps = [":gvr"], 19 | ) 20 | -------------------------------------------------------------------------------- /external/BUILD.ktx: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "ktx", 7 | srcs = glob(["lib/*.c", "lib/*.h", "other_include/*.h"]), 8 | hdrs = glob(["include/*.h"]), 9 | includes = ["include", "other_include"], 10 | defines = ["KTX_OPENGL=1"], 11 | deps = [ 12 | "@//third_party/gl", 13 | ] 14 | ) 15 | -------------------------------------------------------------------------------- /external/BUILD.libjpeg_turbo: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "jpeg", 7 | srcs = glob([ 8 | "*.c", 9 | ], exclude = [ 10 | "jstdhuff.c", 11 | "jccolext.c", 12 | "jdcolext.c", 13 | "jdmrg565.c", 14 | "jdmrgext.c", 15 | "jdcol565.c", 16 | "turbojpeg-jni.c", 17 | "tjunittest.c", 18 | ]), 19 | hdrs = glob([ 20 | "*.h", 21 | "jstdhuff.c", 22 | "jccolext.c", 23 | "jdcolext.c", 24 | "jdmrg565.c", 25 | "jdmrgext.c", 26 | "jdcol565.c", 27 | ]), 28 | includes = ["."], 29 | deps = [ 30 | "@//third_party/libjpeg_turbo:config", 31 | ], 32 | ) 33 | -------------------------------------------------------------------------------- /external/BUILD.libpng: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "libpng", 7 | srcs = glob([ 8 | "*.c" 9 | ], exclude = [ 10 | "pngtest.c", 11 | ]), 12 | hdrs = glob(["*.h"]), 13 | copts = [ 14 | "-DHAVE_CONFIG_H", 15 | ], 16 | includes = ["."], 17 | linkopts = ["-lm"], 18 | deps = [ 19 | "@//third_party/libpng:config", 20 | "@zlib//:zlib", 21 | ], 22 | ) 23 | -------------------------------------------------------------------------------- /external/BUILD.libunibreak: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "libunibreak", 7 | srcs = glob([ 8 | "src/*.c" 9 | ], exclude = [ 10 | "src/filter_dup.c", 11 | ]), 12 | hdrs = glob([ 13 | "src/*.h", 14 | "src/wordbreakdata.c", 15 | ]), 16 | includes = ["src"], 17 | copts = ["-Wno-unused-variable"], 18 | ) 19 | -------------------------------------------------------------------------------- /external/BUILD.mathfu: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "mathfu", 7 | hdrs = [ 8 | "include/mathfu/constants.h", 9 | "include/mathfu/glsl_mappings.h", 10 | "include/mathfu/internal/disable_warnings_begin.h", 11 | "include/mathfu/internal/disable_warnings_end.h", 12 | "include/mathfu/internal/vector_2.h", 13 | "include/mathfu/internal/vector_2_simd.h", 14 | "include/mathfu/internal/vector_3.h", 15 | "include/mathfu/internal/vector_3_simd.h", 16 | "include/mathfu/internal/vector_4.h", 17 | "include/mathfu/internal/vector_4_simd.h", 18 | "include/mathfu/io.h", 19 | "include/mathfu/matrix.h", 20 | "include/mathfu/quaternion.h", 21 | "include/mathfu/rect.h", 22 | "include/mathfu/utilities.h", 23 | "include/mathfu/vector.h", 24 | ], 25 | features = ["-parse_headers"], 26 | includes = ["include"], 27 | deps = [ 28 | "@vectorial//:vectorial", 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /external/BUILD.rapidjson: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "rapidjson", 7 | hdrs = glob(["include/rapidjson/**/*.h"]), 8 | includes = ["include"], 9 | ) 10 | -------------------------------------------------------------------------------- /external/BUILD.stb: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "stb", 7 | srcs = glob([ 8 | "*.c", 9 | "deprecated/*.c" 10 | ]), 11 | hdrs = glob(["*.h"]), 12 | includes = [".", ".."], 13 | copts = ["-Wno-unused-value"], 14 | ) 15 | -------------------------------------------------------------------------------- /external/BUILD.tinygltf: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "tinygltf", 7 | hdrs = ["tiny_gltf.h"], 8 | includes = ["."], 9 | ) 10 | -------------------------------------------------------------------------------- /external/BUILD.vectorial: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "vectorial", 7 | includes = ["include"], 8 | textual_hdrs = glob(["include/vectorial/*.h"]), 9 | ) 10 | -------------------------------------------------------------------------------- /external/BUILD.zlib: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "zlib", 7 | srcs = glob(["*.c"]), 8 | hdrs = glob(["*.h"]), 9 | includes = ["."], 10 | copts = ["-Wno-implicit-function-declaration"], 11 | ) 12 | -------------------------------------------------------------------------------- /lullaby/contrib/backdrop/README.md: -------------------------------------------------------------------------------- 1 | # `BackdropSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Creates an entity with a `RenderModel` that acts as a backdrop to the other 6 | children of the entity that owns a backdrop component. 7 | -------------------------------------------------------------------------------- /lullaby/contrib/clip/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "clip", 10 | srcs = ["clip_system.cc"], 11 | hdrs = ["clip_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/systems/render", 18 | "//lullaby/systems/transform", 19 | "//lullaby/util:logging", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /lullaby/contrib/clip/README.md: -------------------------------------------------------------------------------- 1 | # `ClipSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Allows an entity to act as a stencil mask for its descendents. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/controller/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "controller", 10 | srcs = ["controller_system.cc"], 11 | hdrs = ["controller_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/contrib/fade", 15 | "//lullaby/contrib/fpl_mesh", 16 | "//lullaby/events", 17 | "//lullaby/modules/dispatcher", 18 | "//lullaby/modules/ecs", 19 | "//lullaby/modules/flatbuffers", 20 | "//lullaby/modules/input", 21 | "//lullaby/modules/input_processor", 22 | "//lullaby/modules/reticle", 23 | "//lullaby/systems/dispatcher", 24 | "//lullaby/systems/render", 25 | "//lullaby/systems/transform", 26 | "//lullaby/util:clock", 27 | "//lullaby/util:device_util", 28 | "//lullaby/util:interpolation", 29 | "//lullaby/util:math", 30 | "//lullaby/util:time", 31 | "//lullaby/util:trace", 32 | ], 33 | ) 34 | -------------------------------------------------------------------------------- /lullaby/contrib/controller/README.md: -------------------------------------------------------------------------------- 1 | # `ControllerSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Handles the visual representation of the controller, tracking the controller's 6 | position in a similar manner as the `TrackHmdSystem` tracks the head. 7 | -------------------------------------------------------------------------------- /lullaby/contrib/cursor/README.md: -------------------------------------------------------------------------------- 1 | # `CursorSystem` 2 | 3 | 4 | Provides the rendering for a ray based cursor, with position and state based on 5 | InputProcessor's GetInputFocus. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/cursor/cursor_system_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | #include "lullaby/contrib/cursor/cursor_system.h" 19 | 20 | LULLABY_JNI_CREATE_SYSTEM(CursorSystem, nativeCreate) 21 | -------------------------------------------------------------------------------- /lullaby/contrib/deform/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "deform", 10 | srcs = ["deform_system.cc"], 11 | hdrs = ["deform_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/modules/render:mesh", 19 | "//lullaby/modules/render:mesh_util", 20 | "//lullaby/systems/render", 21 | "//lullaby/systems/transform", 22 | "//lullaby/util:math", 23 | "//lullaby/util:optional", 24 | "//lullaby/util:string_view", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /lullaby/contrib/deform/README.md: -------------------------------------------------------------------------------- 1 | # `DeformSystem` 2 | 3 | 4 | Handles cylindrical deformation logic for transform and render systems. 5 | -------------------------------------------------------------------------------- /lullaby/contrib/device_tooltips/BUILD: -------------------------------------------------------------------------------- 1 | # Description: 2 | # Tooltips for any arbitrary device. 3 | 4 | 5 | package( 6 | default_visibility = ["//visibility:public"], 7 | ) 8 | 9 | licenses(["notice"]) # Apache 2.0 10 | 11 | cc_library( 12 | name = "device_tooltips", 13 | srcs = ["device_tooltips.cc"], 14 | hdrs = ["device_tooltips.h"], 15 | deps = [ 16 | "//lullaby/events", 17 | "//lullaby/modules/dispatcher", 18 | "//lullaby/modules/ecs", 19 | "//lullaby/modules/input", 20 | "//lullaby/systems/dispatcher", 21 | "//lullaby/contrib/layout:layout_box", 22 | "//lullaby/systems/text", 23 | "//lullaby/systems/transform", 24 | "//lullaby/util:entity", 25 | "//lullaby/util:enum_hash", 26 | "//lullaby/util:registry", 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /lullaby/contrib/device_tooltips/README.md: -------------------------------------------------------------------------------- 1 | # `DeviceTooltipsSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Provides methods for showing/hiding tooltips on a controller. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/fade/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "fade", 10 | srcs = ["fade_system.cc"], 11 | hdrs = ["fade_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/animation_channels:render_channels", 16 | "//lullaby/modules/dispatcher", 17 | "//lullaby/modules/ecs", 18 | "//lullaby/systems/animation", 19 | "//lullaby/systems/collision", 20 | "//lullaby/systems/dispatcher", 21 | "//lullaby/systems/render", 22 | "//lullaby/systems/transform", 23 | "//lullaby/util:clock", 24 | "//lullaby/util:logging", 25 | "@mathfu//:mathfu", 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /lullaby/contrib/fade/README.md: -------------------------------------------------------------------------------- 1 | # `FadeSystem` 2 | 3 | * Status: **Deprecated** 4 | 5 | Animates fade in and fade out on entities. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/fpl_mesh/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "fpl_mesh", 10 | srcs = [ 11 | "fpl_mesh_system.cc", 12 | ], 13 | hdrs = [ 14 | "fpl_mesh_system.h", 15 | ], 16 | deps = [ 17 | "@fplbase//:fplbase_fbs", 18 | "//:fbs", 19 | "//lullaby/modules/ecs", 20 | "//lullaby/modules/file", 21 | "//lullaby/modules/render:mesh", 22 | "//lullaby/modules/render:vertex", 23 | "//lullaby/systems/render", 24 | "//lullaby/systems/rig", 25 | "//lullaby/util:entity", 26 | "//lullaby/util:filename", 27 | "//lullaby/util:flatbuffer_reader", 28 | "//lullaby/util:make_unique", 29 | "//lullaby/util:registry", 30 | "//lullaby/util:resource_manager", 31 | "//lullaby/util:span", 32 | "//lullaby/util:string_view", 33 | ], 34 | ) 35 | -------------------------------------------------------------------------------- /lullaby/contrib/grab/README.md: -------------------------------------------------------------------------------- 1 | # `GrabSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Handles picking up items and moving them around. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/input_behavior/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "input_behavior", 10 | srcs = [ 11 | "input_behavior_system.cc", 12 | ], 13 | hdrs = [ 14 | "input_behavior_system.h", 15 | ], 16 | deps = [ 17 | "//:fbs", 18 | "//lullaby/modules/ecs", 19 | "//lullaby/modules/flatbuffers", 20 | "//lullaby/modules/input", 21 | "//lullaby/modules/input_processor", 22 | "//lullaby/systems/collision", 23 | "//lullaby/systems/dispatcher", 24 | "//lullaby/systems/transform", 25 | "//lullaby/util:clock", 26 | "//lullaby/util:math", 27 | "@mathfu//:mathfu", 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /lullaby/contrib/input_behavior/README.md: -------------------------------------------------------------------------------- 1 | # `InputBehaviorSystem` 2 | 3 | 4 | Handles grouping entities together so that all input events are sent to a single 5 | parent. Also handles deadzones, which prevent focus from starting on an entity 6 | at the edges of its collision volume. 7 | -------------------------------------------------------------------------------- /lullaby/contrib/layout/README.md: -------------------------------------------------------------------------------- 1 | # `LayoutSystem` 2 | 3 | 4 | Controls all children's translation using the Layout utility. 5 | 6 | LayoutBoxSystem stores data for separate steps of the Layout process so that 7 | other systems such as Text or NinePatch can resize without getting stuck in an 8 | infinite loop. 9 | -------------------------------------------------------------------------------- /lullaby/contrib/linear_grab/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "linear_grab", 10 | srcs = glob(["*.cc"]), 11 | hdrs = glob(["*.h"]), 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/modules/input", 19 | "//lullaby/modules/reticle:input_focus_locker", 20 | "//lullaby/systems/dispatcher", 21 | "//lullaby/contrib/input_behavior", 22 | "//lullaby/contrib/reticle", 23 | "//lullaby/systems/transform", 24 | "//lullaby/util:clock", 25 | "//lullaby/util:entity", 26 | "//lullaby/util:math", 27 | "//lullaby/util:optional", 28 | "//lullaby/util:typeid", 29 | "@mathfu//:mathfu", 30 | ], 31 | ) 32 | -------------------------------------------------------------------------------- /lullaby/contrib/linear_grab/README.md: -------------------------------------------------------------------------------- 1 | # `LinearGrabSystem` 2 | 3 | 4 | Allows entities to be grabbed and moved by the controller along a line. 5 | 6 | The line can be defined in either world space or the local space of the 7 | grabbed entity. The line direction is specified in the entity's blueprint, 8 | and the origin of the line is defined at runtime as the point where the 9 | entity is grabbed. 10 | -------------------------------------------------------------------------------- /lullaby/contrib/map_events/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "map_events", 10 | srcs = ["map_events_system.cc"], 11 | hdrs = ["map_events_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/modules/ecs", 15 | "//lullaby/systems/dispatcher", 16 | "//lullaby/systems/transform", 17 | "//lullaby/util:logging", 18 | "//lullaby/util:math", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /lullaby/contrib/map_events/README.md: -------------------------------------------------------------------------------- 1 | # `MapEventsSystem` 2 | 3 | 4 | Exposes `EventResponders` that allow complex event mapping. 5 | -------------------------------------------------------------------------------- /lullaby/contrib/mutator/README.md: -------------------------------------------------------------------------------- 1 | # `MutatorSystem` 2 | 3 | * Status: **Ready** 4 | 5 | The MutatorSystem is a utility that allows other systems to apply standardized 6 | mutation functions. 7 | 8 | The StayInBoxMutatorSystem is a mutation that limits an sqt to a bounding box, 9 | with the option to make the boundaries springy. 10 | -------------------------------------------------------------------------------- /lullaby/contrib/nav_button/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "nav_button", 10 | srcs = ["nav_button_system.cc"], 11 | hdrs = ["nav_button_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/animation_channels:render_channels", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/systems/animation", 19 | "//lullaby/systems/dispatcher", 20 | "//lullaby/systems/render", 21 | "//lullaby/systems/text", 22 | "//lullaby/systems/transform", 23 | "//lullaby/util:logging", 24 | "@mathfu//:mathfu", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /lullaby/contrib/nav_button/README.md: -------------------------------------------------------------------------------- 1 | # `NavButtonSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Supports easy creation of the standard design for navigation buttons. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/planar_grab/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "planar_grab", 10 | srcs = glob(["*.cc"]), 11 | hdrs = glob(["*.h"]), 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/modules/input", 19 | "//lullaby/modules/input_processor", 20 | "//lullaby/systems/dispatcher", 21 | "//lullaby/systems/transform", 22 | "//lullaby/util:clock", 23 | "//lullaby/util:entity", 24 | "//lullaby/util:math", 25 | "//lullaby/util:optional", 26 | "//lullaby/util:time", 27 | "//lullaby/util:typeid", 28 | "@mathfu//:mathfu", 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /lullaby/contrib/planar_grab/README.md: -------------------------------------------------------------------------------- 1 | # `PlanarGrabSystem` 2 | 3 | 4 | Allows entities to be grabbed and moved by the controller. 5 | 6 | Supports translations in a plane. The plane can be defined in either world or 7 | local space of the grabbable entity. 8 | -------------------------------------------------------------------------------- /lullaby/contrib/reticle/README.md: -------------------------------------------------------------------------------- 1 | # `ReticleSystem` 2 | 3 | 4 | Provides a point-and-click style cursor for user input events such as button 5 | hover, press, release, etc. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/scroll/README.md: -------------------------------------------------------------------------------- 1 | # `ScrollSystem` 2 | 3 | 4 | Translates its descendents in response to touchpad input. Depends on 5 | `DispatcherSystem`, `AnimationSystem`, and `TransformSystem`. 6 | 7 | The following systems are also required in order to create a scrollable view 8 | that responds to touchpad events when hovered over: 9 | 10 | * `ReticleSystem` (for tracking where the remote is pointing). It's probably 11 | also desireable to create an entity from `data:blueprints/reticle.json` to 12 | actually draw the reticle. That blueprint depends on `data:reticle_shader`. 13 | * `CollisionSystem` (for tracking if the remote is pointing at any specific 14 | entity, depended on by `ReticleSystem`). The scrollable entity will need 15 | a `CollisionDef` in its blueprint, or else it won't respond to the hover. 16 | 17 | No extra systems are requried to create a scrollable view that responds to 18 | touchpad input regardless of whether or not it's currently being hovered on. 19 | Instead, set `active_priority` to any positive int in the entity's `ScrollDef`. 20 | -------------------------------------------------------------------------------- /lullaby/contrib/shader_clip/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "shader_clip", 10 | srcs = ["shader_clip_system.cc"], 11 | hdrs = ["shader_clip_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/systems/render", 19 | "//lullaby/systems/transform", 20 | "//lullaby/util:hash", 21 | "//lullaby/util:logging", 22 | "//lullaby/util:math", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /lullaby/contrib/shader_clip/README.md: -------------------------------------------------------------------------------- 1 | # `ShaderClipSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Allows a ClipRegion entity to set uniforms for customized shaders to clip the 6 | rendering of its targets to within a specified aabb. 7 | -------------------------------------------------------------------------------- /lullaby/contrib/slider/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "slider", 10 | srcs = ["slider_system.cc"], 11 | hdrs = ["slider_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/animation_channels:transform_channels", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/modules/input", 19 | "//lullaby/modules/input_processor", 20 | "//lullaby/systems/collision", 21 | "//lullaby/systems/dispatcher", 22 | "//lullaby/systems/render", 23 | "//lullaby/systems/transform", 24 | "//lullaby/util:clock", 25 | "//lullaby/util:math", 26 | "//lullaby/util:time", 27 | "//lullaby/util:trace", 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /lullaby/contrib/slider/README.md: -------------------------------------------------------------------------------- 1 | # `SliderSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Standard slider UI widget with draggable entity. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/slideshow/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "slideshow", 10 | srcs = ["slideshow_system.cc"], 11 | hdrs = ["slideshow_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/animation_channels:transform_channels", 16 | "//lullaby/modules/dispatcher", 17 | "//lullaby/modules/ecs", 18 | "//lullaby/systems/animation", 19 | "//lullaby/systems/dispatcher", 20 | "//lullaby/systems/transform", 21 | "//lullaby/util:clock", 22 | "//lullaby/util:logging", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /lullaby/contrib/slideshow/README.md: -------------------------------------------------------------------------------- 1 | # `SlideshowSystem` 2 | 3 | * Status: **Draft** 4 | 5 | A slideshow entity shows one child at a time among its children, and can 6 | transition between them in sequence. It also animates its Aabb to match the 7 | shown child's Aabb. 8 | 9 | This system requires AabbMinChannel and AabbMaxChannel from 10 | transform_channels.h. 11 | -------------------------------------------------------------------------------- /lullaby/contrib/snap/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "snap", 10 | srcs = ["snap_system.cc"], 11 | hdrs = ["snap_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/animation_channels:transform_channels", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/systems/animation", 18 | "//lullaby/systems/transform", 19 | "//lullaby/util:clock", 20 | "//lullaby/util:entity", 21 | "//lullaby/util:logging", 22 | "//lullaby/util:math", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /lullaby/contrib/snap/README.md: -------------------------------------------------------------------------------- 1 | # `SnapSystem` 2 | 3 | * Status: **Draft** 4 | 5 | A system for animating entities to the world position of other entities. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/tab_header_layout/README.md: -------------------------------------------------------------------------------- 1 | # `TabHeaderLayoutSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Manages a set of tab headers that the user can switch between. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/text_input/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "text_input", 10 | srcs = [ 11 | "edit_text.cc", 12 | "text_input_system.cc", 13 | ], 14 | hdrs = [ 15 | "edit_text.h", 16 | "text_input_system.h", 17 | ], 18 | deps = [ 19 | "//:fbs", 20 | "//lullaby/events", 21 | "//lullaby/modules/dispatcher", 22 | "//lullaby/modules/ecs", 23 | "//lullaby/modules/flatbuffers", 24 | "//lullaby/modules/input", 25 | "//lullaby/systems/dispatcher", 26 | "//lullaby/systems/render", 27 | "//lullaby/systems/text", 28 | "//lullaby/systems/transform", 29 | "//lullaby/util:clock", 30 | "//lullaby/util:logging", 31 | "//lullaby/util:math", 32 | "//lullaby/util:periodic_function", 33 | "//lullaby/util:string_preprocessor", 34 | "//lullaby/util:utf8", 35 | ], 36 | ) 37 | -------------------------------------------------------------------------------- /lullaby/contrib/text_input/README.md: -------------------------------------------------------------------------------- 1 | # `TextInputSystem` 2 | 3 | 4 | Listens for input from the input manager and updates associated Entity display 5 | text. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/track_hmd/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "track_hmd", 10 | srcs = ["track_hmd_system.cc"], 11 | hdrs = ["track_hmd_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/modules/ecs", 15 | "//lullaby/modules/flatbuffers", 16 | "//lullaby/modules/input", 17 | "//lullaby/systems/transform", 18 | "//lullaby/util:clock", 19 | "//lullaby/util:math", 20 | "//lullaby/util:trace", 21 | "@mathfu//:mathfu", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /lullaby/contrib/track_hmd/README.md: -------------------------------------------------------------------------------- 1 | # `TrackHMDSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Updates the transform of associated entities based on the HMD transform. 6 | -------------------------------------------------------------------------------- /lullaby/contrib/visibility/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "visibility", 10 | srcs = ["visibility_system.cc"], 11 | hdrs = ["visibility_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/systems/dispatcher", 19 | "//lullaby/systems/transform", 20 | "//lullaby/util:math", 21 | "//lullaby/util:trace", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /lullaby/contrib/visibility/README.md: -------------------------------------------------------------------------------- 1 | # `VisibilitySystem` 2 | 3 | * Status: **Ready** 4 | 5 | Calculates the visibility of entities that have a VisibilityContentDef and are 6 | descendents of an entity which have a `VisibilityWindowDef`. 7 | -------------------------------------------------------------------------------- /lullaby/events/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "events", 10 | hdrs = [ 11 | "animation_events.h", 12 | "audio_events.h", 13 | "battery_state_changed.h", 14 | "camera_events.h", 15 | "controller_events.h", 16 | "entity_events.h", 17 | "fade_events.h", 18 | "grab_events.h", 19 | "input_events.h", 20 | "layout_events.h", 21 | "lifetime_events.h", 22 | "physics_events.h", 23 | "render_events.h", 24 | "scroll_events.h", 25 | "text_events.h", 26 | "ui_events.h", 27 | ], 28 | deps = [ 29 | "//lullaby/modules/input", 30 | "//lullaby/util:entity", 31 | "//lullaby/util:hash", 32 | "//lullaby/util:math", 33 | "//lullaby/util:optional", 34 | "//lullaby/util:typeid", 35 | "@mathfu//:mathfu", 36 | ], 37 | ) 38 | -------------------------------------------------------------------------------- /lullaby/examples/example_app/port/sdl2/get_native_window.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef LULLABY_EXAMPLES_EXAMPLE_APP_PORT_SDL2_GET_NATIVE_WINDOW_H_ 18 | #define LULLABY_EXAMPLES_EXAMPLE_APP_PORT_SDL2_GET_NATIVE_WINDOW_H_ 19 | 20 | void* GetNativeWindow(void* window); 21 | 22 | #endif // LULLABY_EXAMPLES_EXAMPLE_APP_PORT_SDL2_GET_NATIVE_WINDOW_H_ 23 | -------------------------------------------------------------------------------- /lullaby/examples/example_app/port/sdl2/get_native_window_osx.mm: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | void* GetNativeWindow(void *window) { 21 | NSWindow* ns_window = (__bridge NSWindow*)window; 22 | NSView* ns_view = [ns_window contentView]; 23 | return (__bridge void*)ns_view; 24 | } 25 | -------------------------------------------------------------------------------- /lullaby/examples/hello_model/data/crab_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/lullaby/examples/hello_model/data/crab_diffuse.png -------------------------------------------------------------------------------- /lullaby/examples/hello_model/data/model.jsonnet: -------------------------------------------------------------------------------- 1 | local utils = import 'lullaby/data/jsonnet/utils.jsonnet'; 2 | { 3 | components: [ 4 | { 5 | def_type: 'TransformDef', 6 | def: { 7 | position: { 8 | x: 0.0, 9 | y: 0.0, 10 | z: -1.0, 11 | }, 12 | scale: { 13 | x: 0.01, 14 | y: 0.01, 15 | z: 0.01, 16 | }, 17 | }, 18 | }, 19 | { 20 | def_type: 'ModelAssetDef', 21 | def: { 22 | pass: utils.hash('Opaque'), 23 | filename: 'crabby.lullmodel', 24 | materials: [{ 25 | shading_model: 'pbr', 26 | }], 27 | }, 28 | }, 29 | ], 30 | } 31 | -------------------------------------------------------------------------------- /lullaby/examples/hello_model/schemas/entity.fbs: -------------------------------------------------------------------------------- 1 | include "lull/common.fbs"; 2 | 3 | include "lull/model_asset_def.fbs"; 4 | include "lull/render_def.fbs"; 5 | include "lull/transform_def.fbs"; 6 | 7 | union ComponentDefType { 8 | lull.ModelAssetDef, 9 | lull.RenderDef, 10 | lull.TransformDef, 11 | } 12 | -------------------------------------------------------------------------------- /lullaby/examples/hello_world/BUILD: -------------------------------------------------------------------------------- 1 | load( 2 | "@//dev:generate_entity_schema.bzl", 3 | "generate_entity_schema", 4 | ) 5 | load( 6 | "//lullaby/examples/example_app:build_defs.bzl", 7 | "lullaby_example", 8 | ) 9 | 10 | licenses(["notice"]) # Apache 2.0 11 | 12 | generate_entity_schema( 13 | src = "schemas/entity.fbs", 14 | library_name = "entity_library", 15 | schema_name = "entity_schema", 16 | ) 17 | 18 | lullaby_example( 19 | name = "hello_world", 20 | srcs = [ 21 | "src/hello_world.cc", 22 | ], 23 | hdrs = [ 24 | "src/hello_world.h", 25 | ], 26 | data = [ 27 | "//lullaby/examples/hello_world/data", 28 | ], 29 | ports = [ 30 | "android", 31 | "desktop", 32 | "daydream", 33 | ], 34 | deps = [ 35 | ":entity_library", 36 | "//lullaby/examples/example_app", 37 | "//lullaby/modules/ecs", 38 | "//lullaby/systems/render:next", 39 | "//lullaby/systems/text:flatui", 40 | "//lullaby/systems/transform", 41 | ], 42 | ) 43 | -------------------------------------------------------------------------------- /lullaby/examples/hello_world/data/BUILD: -------------------------------------------------------------------------------- 1 | load("@//dev:build_entity.bzl", "build_entity_bin") 2 | load("@//dev:copy_files.bzl", "copy_files") 3 | 4 | licenses(["notice"]) # Apache 2.0 5 | 6 | build_entity_bin( 7 | name = "entities", 8 | srcs = glob(["*.json"]), 9 | schema = "//lullaby/examples/hello_world:entity_schema", 10 | ) 11 | 12 | copy_files( 13 | name = "fonts", 14 | srcs = ["//third_party/webfonts/apache:Roboto-Regular.ttf"], 15 | outs = ["Roboto-Regular.ttf"], 16 | ) 17 | 18 | Fileset( 19 | name = "data", 20 | out = "assets", 21 | entries = [ 22 | FilesetEntry( 23 | files = [ 24 | ":entities", 25 | ":fonts", 26 | ], 27 | strip_prefix = "", 28 | ), 29 | FilesetEntry( 30 | srcdir = "//data:BUILD", 31 | files = [ 32 | "//data:text_shader", 33 | ], 34 | strip_prefix = "", 35 | ), 36 | ], 37 | visibility = ["//lullaby/examples/hello_world:__pkg__"], 38 | ) 39 | -------------------------------------------------------------------------------- /lullaby/examples/hello_world/data/hello_world.json: -------------------------------------------------------------------------------- 1 | { 2 | "components": [{ 3 | "def_type": "TransformDef", 4 | "def": { 5 | "position": { 6 | "x": 0.0, 7 | "y": 0.0, 8 | "z": -2.0 9 | }, 10 | "rotation": { 11 | "x": 0, 12 | "y": 0, 13 | "z": 0 14 | }, 15 | "scale": { 16 | "x": 1, 17 | "y": 1, 18 | "z": 1 19 | } 20 | } 21 | }, { 22 | "def_type": "RenderDef", 23 | "def": { 24 | "shader": "shaders/text.fplshader", 25 | "color": { 26 | "r": 0.0, 27 | "g": 0.5, 28 | "b": 0.0, 29 | "a": 1.0 30 | } 31 | } 32 | }, { 33 | "def_type": "TextDef", 34 | "def": { 35 | "fonts": [ 36 | "Roboto-Regular.ttf" 37 | ], 38 | "text": "Hello World!\nThis is a Lullaby example.", 39 | "font_size": 0.5, 40 | "bounds": { 41 | "x": 10.0, 42 | "y": 0.0, 43 | }, 44 | "vertical_alignment": "Center" 45 | } 46 | }] 47 | } 48 | -------------------------------------------------------------------------------- /lullaby/examples/hello_world/schemas/entity.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | include "lull/render_def.fbs"; 4 | include "lull/text_def.fbs"; 5 | include "lull/transform_def.fbs"; 6 | 7 | union ComponentDefType { 8 | lull.RenderDef, 9 | lull.TextDef, 10 | lull.TransformDef, 11 | } 12 | -------------------------------------------------------------------------------- /lullaby/modules/camera/camera_manager_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/camera/camera_manager.h" 18 | #include "lullaby/modules/camera/camera_manager_binder.h" 19 | #include "lullaby/modules/jni/registry_jni.h" 20 | 21 | LULLABY_JNI_CALL_CLASS_WITH_REGISTRY(CameraManager, nativeCreate, 22 | CameraManagerBinder, Create) 23 | -------------------------------------------------------------------------------- /lullaby/modules/config/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "config", 10 | srcs = [ 11 | "config.cc", 12 | ], 13 | hdrs = [ 14 | "config.h", 15 | ], 16 | deps = [ 17 | "//:fbs", 18 | "//lullaby/modules/file", 19 | "//lullaby/modules/flatbuffers", 20 | "//lullaby/util:flatbuffer_reader", 21 | "//lullaby/util:registry", 22 | "//lullaby/util:string_view", 23 | "//lullaby/util:typeid", 24 | "//lullaby/util:variant", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /lullaby/modules/ecs/entity_factory_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | 19 | LULLABY_JNI_CALL_WITH_REGISTRY(EntityFactory, nativeCreate, Create) 20 | -------------------------------------------------------------------------------- /lullaby/modules/file/asset_loader_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/file/asset_loader_binder.h" 18 | #include "lullaby/modules/jni/registry_jni.h" 19 | 20 | LULLABY_JNI_CALL_CLASS_WITH_REGISTRY(AssetLoader, nativeCreate, 21 | AssetLoaderBinder, CreateAssetLoader) 22 | -------------------------------------------------------------------------------- /lullaby/modules/flatbuffers/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "flatbuffers", 10 | srcs = [ 11 | "variant_fb_conversions.cc", 12 | ], 13 | hdrs = [ 14 | "common_fb_conversions.h", 15 | "mathfu_fb_conversions.h", 16 | "variant_fb_conversions.h", 17 | ], 18 | deps = [ 19 | "@flatbuffers//:flatbuffers", 20 | "//:fbs", 21 | "//lullaby/modules/input", 22 | "//lullaby/util:arc", 23 | "//lullaby/util:color", 24 | "//lullaby/util:common_types", 25 | "//lullaby/util:inward_buffer", 26 | "//lullaby/util:logging", 27 | "//lullaby/util:math", 28 | "//lullaby/util:optional", 29 | "//lullaby/util:variant", 30 | "@mathfu//:mathfu", 31 | ], 32 | ) 33 | -------------------------------------------------------------------------------- /lullaby/modules/function/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "function", 10 | hdrs = [ 11 | "call_native_function.h", 12 | "function_call.h", 13 | "variant_converter.h", 14 | ], 15 | deps = [ 16 | "//lullaby/modules/dispatcher", 17 | "//lullaby/modules/serialize", 18 | "//lullaby/util:fixed_string", 19 | "//lullaby/util:hash", 20 | "//lullaby/util:optional", 21 | "//lullaby/util:string_view", 22 | "//lullaby/util:type_name_generator", 23 | "//lullaby/util:type_util", 24 | "//lullaby/util:typeid", 25 | "//lullaby/util:variant", 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /lullaby/modules/gvr/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "gvr", 10 | hdrs = [ 11 | "mathfu_gvr_conversions.h", 12 | ], 13 | deps = [ 14 | "@mathfu//:mathfu", 15 | "@gvr//:gvr", 16 | ], 17 | ) 18 | 19 | -------------------------------------------------------------------------------- /lullaby/modules/input/device_profile.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/input/device_profile.h" 18 | 19 | namespace lull { 20 | const Clock::duration kDefaultLongPressTime = std::chrono::milliseconds(500); 21 | } // namespace lull 22 | -------------------------------------------------------------------------------- /lullaby/modules/input/input_manager_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/input/input_manager.h" 18 | #include "lullaby/modules/input/input_manager_binder.h" 19 | #include "lullaby/modules/jni/registry_jni.h" 20 | 21 | LULLABY_JNI_CALL_CLASS_WITH_REGISTRY(InputManager, nativeCreate, 22 | InputManagerBinder, Create) 23 | -------------------------------------------------------------------------------- /lullaby/modules/input_processor/input_processor_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/input_processor/input_processor.h" 18 | #include "lullaby/modules/jni/registry_jni.h" 19 | 20 | LULLABY_JNI_CALL_WITH_REGISTRY(InputProcessor, nativeCreate, Create) 21 | -------------------------------------------------------------------------------- /lullaby/modules/layout/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "layout", 10 | srcs = [ 11 | "layout.cc", 12 | ], 13 | hdrs = [ 14 | "layout.h", 15 | "layout_manager.h", 16 | ], 17 | deps = [ 18 | "//:fbs", 19 | "//lullaby/contrib/layout:layout_box", 20 | "//lullaby/systems/transform", 21 | "//lullaby/util:clock", 22 | "//lullaby/util:entity", 23 | "//lullaby/util:logging", 24 | "//lullaby/util:math", 25 | "//lullaby/util:registry", 26 | "@mathfu//:mathfu", 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /lullaby/modules/lullscript/script_frame.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/lullscript/script_frame.h" 18 | #include "lullaby/modules/lullscript/script_env.h" 19 | 20 | namespace lull { 21 | 22 | void ScriptFrame::Error(const char* message) { env_->Error(message, args_); } 23 | 24 | } // namespace lull 25 | -------------------------------------------------------------------------------- /lullaby/modules/manipulator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/lullaby/modules/manipulator/README.md -------------------------------------------------------------------------------- /lullaby/modules/reticle/standard_input_pipeline_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/jni/registry_jni.h" 18 | #include "lullaby/modules/reticle/standard_input_pipeline.h" 19 | 20 | LULLABY_JNI_CALL_WITH_REGISTRY(StandardInputPipeline, nativeCreate, Create) 21 | -------------------------------------------------------------------------------- /lullaby/modules/serialize/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "serialize", 10 | hdrs = [ 11 | "buffer_serializer.h", 12 | "serialize.h", 13 | "serialize_traits.h", 14 | "variant_serializer.h", 15 | ], 16 | deps = [ 17 | "//lullaby/util:clock", 18 | "//lullaby/util:common_types", 19 | "//lullaby/util:entity", 20 | "//lullaby/util:hash", 21 | "//lullaby/util:logging", 22 | "//lullaby/util:string_view", 23 | "//lullaby/util:variant", 24 | "@mathfu//:mathfu", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /lullaby/modules/stategraph/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "stategraph", 10 | srcs = [ 11 | "stategraph.cc", 12 | "stategraph_track.cc", 13 | ], 14 | hdrs = [ 15 | "stategraph.h", 16 | "stategraph_signal.h", 17 | "stategraph_state.h", 18 | "stategraph_track.h", 19 | "stategraph_transition.h", 20 | ], 21 | deps = [ 22 | "//lullaby/util:clock", 23 | "//lullaby/util:hash", 24 | "//lullaby/util:logging", 25 | "//lullaby/util:optional", 26 | "//lullaby/util:selector", 27 | "//lullaby/util:span", 28 | "//lullaby/util:typed_pointer", 29 | "//lullaby/util:typeid", 30 | "//lullaby/util:variant", 31 | "@mathfu//:mathfu", 32 | ], 33 | ) 34 | -------------------------------------------------------------------------------- /lullaby/modules/tinygltf/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "tinygltf", 10 | srcs = [ 11 | "tinygltf_util.cc", 12 | ], 13 | hdrs = [ 14 | "tinygltf_util.h", 15 | ], 16 | deps = [ 17 | "//lullaby/util:optional", 18 | "//lullaby/util:span", 19 | "@motive//:motive", 20 | "@tinygltf//:tinygltf", 21 | ], 22 | ) 23 | -------------------------------------------------------------------------------- /lullaby/systems/animation/README.md: -------------------------------------------------------------------------------- 1 | # `AnimationSystem` 2 | 3 | 4 | Uses the motive library to play animations on Entities. 5 | -------------------------------------------------------------------------------- /lullaby/systems/animation/animation_system_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | #include "lullaby/systems/animation/animation_system.h" 19 | 20 | LULLABY_JNI_CREATE_SYSTEM(AnimationSystem, nativeCreate) 21 | -------------------------------------------------------------------------------- /lullaby/systems/audio/README.md: -------------------------------------------------------------------------------- 1 | # `AudioSystem` 2 | 3 | 4 | Loads, plays, and maintains audio assets using the GVR Audio API. Includes 5 | maintenence of audio environments and listeners. 6 | -------------------------------------------------------------------------------- /lullaby/systems/blend_shape/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "blend_shape", 10 | srcs = [ 11 | "blend_shape_system.cc", 12 | ], 13 | hdrs = [ 14 | "blend_shape_system.h", 15 | ], 16 | deps = [ 17 | "//:fbs", 18 | "//lullaby/modules/ecs", 19 | "//lullaby/modules/file", 20 | "//lullaby/systems/render", 21 | "//lullaby/util:filename", 22 | "//lullaby/util:resource_manager", 23 | "//lullaby/util:string_view", 24 | "@mathfu//:mathfu", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /lullaby/systems/blend_shape/README.md: -------------------------------------------------------------------------------- 1 | # `BlendShapeSystem` 2 | 3 | * Status: **Under Development** 4 | 5 | Creates a model whose mesh can be interpolated (morphed) across several meshes 6 | that are blended together using a set of weights set between 0..1. 7 | -------------------------------------------------------------------------------- /lullaby/systems/collision/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "collision", 10 | srcs = [ 11 | "collision_system.cc", 12 | ], 13 | hdrs = [ 14 | "collision_provider.h", 15 | "collision_system.h", 16 | ], 17 | deps = [ 18 | "//:fbs", 19 | "//lullaby/events", 20 | "//lullaby/modules/ecs", 21 | "//lullaby/modules/flatbuffers", 22 | "//lullaby/systems/dispatcher", 23 | "//lullaby/systems/transform", 24 | "//lullaby/util:entity", 25 | "//lullaby/util:hash", 26 | "//lullaby/util:logging", 27 | "//lullaby/util:math", 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /lullaby/systems/collision/README.md: -------------------------------------------------------------------------------- 1 | # `CollisionSystem` 2 | 3 | 4 | Provides basic spatial queries such as raycasts and point collisions. 5 | -------------------------------------------------------------------------------- /lullaby/systems/datastore/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "datastore", 10 | srcs = ["datastore_system.cc"], 11 | hdrs = ["datastore_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/modules/ecs", 15 | "//lullaby/modules/flatbuffers", 16 | "//lullaby/modules/script", 17 | "//lullaby/util:common_types", 18 | "//lullaby/util:logging", 19 | "//lullaby/util:variant", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /lullaby/systems/datastore/README.md: -------------------------------------------------------------------------------- 1 | # `DatastoreSystem` 2 | 3 | 4 | Manages a Datastore per Entity. 5 | -------------------------------------------------------------------------------- /lullaby/systems/dispatcher/README.md: -------------------------------------------------------------------------------- 1 | # `DispatcherSystem` 2 | 3 | 4 | Provides a Dispatcher as a Component for each Entity. 5 | -------------------------------------------------------------------------------- /lullaby/systems/gltf_asset/gltf_asset_system_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | #include "lullaby/systems/gltf_asset/gltf_asset_system.h" 19 | 20 | LULLABY_JNI_CREATE_SYSTEM(GltfAssetSystem, nativeCreate) 21 | -------------------------------------------------------------------------------- /lullaby/systems/light/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "light", 10 | srcs = ["light_system.cc"], 11 | hdrs = [ 12 | "light_system.h", 13 | ], 14 | deps = [ 15 | "//:fbs", 16 | "//lullaby/events", 17 | "//lullaby/modules/ecs", 18 | "//lullaby/modules/render:render_view", 19 | "//lullaby/systems/dispatcher", 20 | "//lullaby/systems/render", 21 | "//lullaby/systems/transform", 22 | "//lullaby/util:math", 23 | "//lullaby/util:optional", 24 | "@mathfu//:mathfu", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /lullaby/systems/light/README.md: -------------------------------------------------------------------------------- 1 | # `LightSystem` 2 | 3 | 4 | The light system manages lights and lightable objects. It is responsible for 5 | setting the light uniforms on lightable entities according to the lights that 6 | affect them. See hello_light for an example on how to use it. 7 | 8 | This system requires TransformSystem and RenderSystem. 9 | -------------------------------------------------------------------------------- /lullaby/systems/model_asset/README.md: -------------------------------------------------------------------------------- 1 | # `ModelAssetSystem` 2 | 3 | 4 | Loads meshes and materials from a data file and sets up the corresponding 5 | RenderSystem components. 6 | -------------------------------------------------------------------------------- /lullaby/systems/name/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "name", 10 | srcs = ["name_system.cc"], 11 | hdrs = ["name_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/modules/dispatcher", 15 | "//lullaby/modules/ecs", 16 | "//lullaby/modules/script", 17 | "//lullaby/systems/transform", 18 | "//lullaby/util:hash", 19 | "//lullaby/util:logging", 20 | "//lullaby/util:string_view", 21 | ], 22 | ) 23 | -------------------------------------------------------------------------------- /lullaby/systems/name/README.md: -------------------------------------------------------------------------------- 1 | # `NameSystem` 2 | 3 | 4 | Associates a name with an entity. 5 | -------------------------------------------------------------------------------- /lullaby/systems/nine_patch/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | public_headers = [ 9 | "nine_patch_system.h", 10 | ] 11 | 12 | cc_library( 13 | name = "nine_patch", 14 | srcs = [ 15 | "nine_patch_system.cc", 16 | ], 17 | hdrs = public_headers, 18 | deps = [ 19 | "//:fbs", 20 | "//lullaby/events", 21 | "//lullaby/modules/dispatcher", 22 | "//lullaby/modules/ecs", 23 | "//lullaby/modules/flatbuffers", 24 | "//lullaby/modules/render:mesh", 25 | "//lullaby/modules/render:nine_patch", 26 | "//lullaby/contrib/layout:layout_box", 27 | "//lullaby/systems/render", 28 | "//lullaby/systems/transform", 29 | "//lullaby/util:logging", 30 | "//lullaby/util:optional", 31 | "@mathfu//:mathfu", 32 | ], 33 | ) 34 | -------------------------------------------------------------------------------- /lullaby/systems/nine_patch/README.md: -------------------------------------------------------------------------------- 1 | # `NinePatchSystem` 2 | 3 | * Status: **Ready** 4 | 5 | Provides a component for rendering nine patches. Given the dimensions of a quad 6 | to fill, the original (unaltered) size of the nine patch, and the locations of 7 | the slices, a mesh is generated with appropriate vertex locations and texture 8 | coordinates. A RenderDef should be paired with this component to actually get it 9 | to draw. No nine patch specific shader is needed--texture coordinates will be 10 | set up so that unstretchable and stretchable regions behave appropriately. 11 | -------------------------------------------------------------------------------- /lullaby/systems/render/filament/render_system_impl.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/systems/render/filament/render_system_filament.h" 18 | 19 | #if !defined(LULLABY_RENDER_BACKEND_FILAMENT) 20 | #error This file should only be included with filament backend targets. 21 | #endif 22 | 23 | #include "lullaby/systems/render/detail/render_system.inc" 24 | -------------------------------------------------------------------------------- /lullaby/systems/render/fpl/render_system_impl.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/systems/render/fpl/render_system_fpl.h" 18 | 19 | #if !defined(LULLABY_RENDER_BACKEND_FPL) 20 | #error This file should only be included with FPL backend targets. 21 | #endif 22 | 23 | #include "lullaby/systems/render/detail/render_system.inc" 24 | -------------------------------------------------------------------------------- /lullaby/systems/render/next/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | This file contains a list of changes that apps will need to make in order to 2 | switch to RenderSystemNext. 3 | 4 | ### SubmitRenderData/BeginRendering/EndRendering 5 | 6 | Clients need to call SubmitRenderData on the SimThread. Then, on the 7 | RenderThread, they should call: 8 | 9 | BeginFrame 10 | BeginRendering 11 | Render 12 | EndRendering 13 | EndFrame 14 | 15 | 16 | ### RenderPass 17 | 18 | The RenderPass enum is no longer valid. Clients should now create/manage 19 | passes by HashValue. 20 | 21 | 22 | ### TextDef, QuadDef, PanoDef 23 | 24 | You can no longer create Text, Quad, or Panos using the RenderDef. Instead, the 25 | corresponding Systems should be used to create those Entities. Specifically: 26 | * TextSystem for creating text. 27 | * PanoSystem for creating panos. 28 | * NinePatchSystem for creating quads. 29 | 30 | -------------------------------------------------------------------------------- /lullaby/systems/render/next/detail/glplatform.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef LULLABY_SYSTEMS_RENDER_NEXT_DETAIL_GLPLATFORM_H_ 18 | #define LULLABY_SYSTEMS_RENDER_NEXT_DETAIL_GLPLATFORM_H_ 19 | 20 | #include "fplbase/glplatform.h" 21 | 22 | #endif // LULLABY_SYSTEMS_RENDER_NEXT_DETAIL_GLPLATFORM_H_ 23 | -------------------------------------------------------------------------------- /lullaby/systems/render/next/render_system_impl.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/systems/render/next/render_system_next.h" 18 | 19 | #if !defined(LULLABY_RENDER_BACKEND_NEXT) 20 | #error This file should only be included with FPL backend targets. 21 | #endif 22 | 23 | #include "lullaby/systems/render/detail/render_system.inc" 24 | -------------------------------------------------------------------------------- /lullaby/systems/render/shader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef LULLABY_SYSTEMS_RENDER_SHADER_H_ 18 | #define LULLABY_SYSTEMS_RENDER_SHADER_H_ 19 | 20 | #include 21 | 22 | namespace lull { 23 | 24 | class Shader; 25 | typedef std::shared_ptr ShaderPtr; 26 | 27 | } // namespace lull 28 | 29 | #endif // LULLABY_SYSTEMS_RENDER_SHADER_H_ 30 | -------------------------------------------------------------------------------- /lullaby/systems/render/testing/mesh.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef LULLABY_SYSTEMS_RENDER_TESTING_MESH_H_ 18 | #define LULLABY_SYSTEMS_RENDER_TESTING_MESH_H_ 19 | 20 | #include "lullaby/systems/render/mesh.h" 21 | 22 | namespace lull { 23 | 24 | // A mock mesh implementation that can be used to create non-null 25 | // MeshPtrs in test code. 26 | class Mesh {}; 27 | 28 | } // namespace lull 29 | 30 | #endif // LULLABY_SYSTEMS_RENDER_TESTING_MESH_H_ 31 | -------------------------------------------------------------------------------- /lullaby/systems/render/testing/mock_render_system_impl.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/systems/render/testing/mock_render_system_impl.h" 18 | 19 | #if !defined(LULLABY_RENDER_BACKEND_MOCK) 20 | #error This file should only be included with mock backend targets. 21 | #endif 22 | 23 | #include "lullaby/systems/render/detail/render_system.inc" 24 | -------------------------------------------------------------------------------- /lullaby/systems/rig/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "rig", 10 | srcs = ["rig_system.cc"], 11 | hdrs = ["rig_system.h"], 12 | deps = [ 13 | "//lullaby/modules/ecs", 14 | "//lullaby/systems/animation", 15 | "//lullaby/systems/render", 16 | "//lullaby/util:make_unique", 17 | "//lullaby/util:math", 18 | "//lullaby/util:span", 19 | "@mathfu//:mathfu", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /lullaby/systems/rig/README.md: -------------------------------------------------------------------------------- 1 | # `RigSystem` 2 | 3 | 4 | Provides storage for rigs and poses used for skinned animations. 5 | -------------------------------------------------------------------------------- /lullaby/systems/script/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "script", 10 | srcs = ["script_system.cc"], 11 | hdrs = ["script_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/modules/dispatcher", 15 | "//lullaby/modules/ecs", 16 | "//lullaby/modules/file", 17 | "//lullaby/modules/script", 18 | "//lullaby/systems/dispatcher", 19 | "//lullaby/systems/transform", 20 | "//lullaby/util:clock", 21 | "//lullaby/util:entity", 22 | "//lullaby/util:hash", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /lullaby/systems/script/README.md: -------------------------------------------------------------------------------- 1 | # `ScriptSystem` 2 | 3 | 4 | Allows scripts to be attached to entites, that are run when an event fires, or 5 | every frame. 6 | 7 | Projects that want to use a particular scripting language must be built with 8 | build flags that link in that language. For example, JS support requires 9 | `--define lullaby_script_js=1`. 10 | 11 | -------------------------------------------------------------------------------- /lullaby/systems/shape/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "shape", 10 | srcs = ["shape_system.cc"], 11 | hdrs = ["shape_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/modules/ecs", 15 | "//lullaby/modules/render:mesh", 16 | "//lullaby/modules/render:mesh_util", 17 | "//lullaby/systems/render", 18 | ], 19 | ) 20 | 21 | cc_library( 22 | name = "shape_jni", 23 | srcs = ["shape_system_jni.cc"], 24 | deps = [ 25 | ":shape", 26 | "//lullaby/modules/ecs:ecs_jni", 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /lullaby/systems/shape/README.md: -------------------------------------------------------------------------------- 1 | # `ShapeSystem` 2 | 3 | 4 | Generates a mesh of a specific shape for an entity. 5 | -------------------------------------------------------------------------------- /lullaby/systems/shape/shape_system_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | #include "lullaby/systems/shape/shape_system.h" 19 | 20 | LULLABY_JNI_CREATE_SYSTEM(ShapeSystem, nativeCreate) 21 | -------------------------------------------------------------------------------- /lullaby/systems/skin/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "skin", 10 | srcs = ["skin_system.cc"], 11 | hdrs = ["skin_system.h"], 12 | deps = [ 13 | "//lullaby/modules/ecs", 14 | "//lullaby/modules/script", 15 | "//lullaby/systems/render", 16 | "//lullaby/systems/transform", 17 | "//lullaby/util:math", 18 | "//lullaby/util:span", 19 | "@mathfu//:mathfu", 20 | ], 21 | ) 22 | 23 | cc_library( 24 | name = "skin_jni", 25 | srcs = [ 26 | "skin_system_jni.cc", 27 | ], 28 | deps = [ 29 | ":skin", 30 | "//lullaby/modules/ecs:ecs_jni", 31 | ], 32 | ) 33 | -------------------------------------------------------------------------------- /lullaby/systems/skin/skin_system_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | #include "lullaby/systems/skin/skin_system.h" 19 | 20 | LULLABY_JNI_CREATE_SYSTEM(SkinSystem, nativeCreate) 21 | -------------------------------------------------------------------------------- /lullaby/systems/stategraph/README.md: -------------------------------------------------------------------------------- 1 | # `StategraphSystem` 2 | 3 | -------------------------------------------------------------------------------- /lullaby/systems/text/README.md: -------------------------------------------------------------------------------- 1 | # `TextSystem` 2 | 3 | 4 | Manages the rendering of i18n strings. 5 | 6 | ## Backends 7 | 8 | ### FlatUI 9 | 10 | FlatUI supports our full feature set: i18n, line wrapping, hyphenation, system 11 | fonts, ellipsis, HTML parsing. 12 | 13 | #### System fonts 14 | 15 | System fonts are most often used to fill in glyphs that are unsupported by the 16 | primary font. 17 | 18 | A few things are necessary to load system fonts on Android: 19 | 20 | * App must have storage read access. 21 | * `` 23 | * File loader must support absolute paths. 24 | * FlatUI needs to read from /system/etc/fonts.xml and system/fonts/. 25 | * The default file loader supports absolute paths. 26 | * App must have a JavaVM. 27 | * Use the fplbase::AndroidSetJavaVM function. 28 | 29 | -------------------------------------------------------------------------------- /lullaby/systems/text/testing/stub_text_system.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/systems/text/testing/stub_text_system.h" 18 | 19 | namespace lull { 20 | 21 | TextSystem::TextSystem(Registry* registry) 22 | : TextSystem(registry, std::unique_ptr( 23 | new StubTextSystem(registry))) {} 24 | 25 | } // namespace lull 26 | -------------------------------------------------------------------------------- /lullaby/systems/transform/BUILD: -------------------------------------------------------------------------------- 1 | 2 | package( 3 | default_visibility = ["//visibility:public"], 4 | ) 5 | 6 | licenses(["notice"]) # Apache 2.0 7 | 8 | cc_library( 9 | name = "transform", 10 | srcs = ["transform_system.cc"], 11 | hdrs = ["transform_system.h"], 12 | deps = [ 13 | "//:fbs", 14 | "//lullaby/events", 15 | "//lullaby/modules/dispatcher", 16 | "//lullaby/modules/ecs", 17 | "//lullaby/modules/flatbuffers", 18 | "//lullaby/modules/script", 19 | "//lullaby/systems/dispatcher", 20 | "//lullaby/util:bits", 21 | "//lullaby/util:logging", 22 | "//lullaby/util:math", 23 | "@mathfu//:mathfu", 24 | ], 25 | ) 26 | 27 | cc_library( 28 | name = "transform_jni", 29 | srcs = ["transform_system_jni.cc"], 30 | deps = [ 31 | ":transform", 32 | "//lullaby/modules/ecs:ecs_jni", 33 | ], 34 | ) 35 | -------------------------------------------------------------------------------- /lullaby/systems/transform/README.md: -------------------------------------------------------------------------------- 1 | # `TransformSystem` 2 | 3 | 4 | Provides Entities with position, rotation, scale and volume (via an AABB). 5 | -------------------------------------------------------------------------------- /lullaby/systems/transform/transform_system_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/modules/ecs/entity_factory_jni.h" 18 | #include "lullaby/systems/transform/transform_system.h" 19 | 20 | LULLABY_JNI_CREATE_SYSTEM(TransformSystem, nativeCreate) 21 | -------------------------------------------------------------------------------- /lullaby/tests/fbs_entity_def_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/tests/test_entity_generated.h" 18 | 19 | #include "gtest/gtest.h" 20 | #include "lullaby/tests/util/entity_def_test.h" 21 | 22 | namespace lull { 23 | namespace testing { 24 | 25 | INSTANTIATE_TYPED_TEST_SUITE_P(Fbs, EntityDefTest, 26 | LULL_ENTITY_TEST_TYPE(EntityDef, ComponentDef)); 27 | 28 | } // namespace testing 29 | } // namespace lull 30 | -------------------------------------------------------------------------------- /lullaby/tests/schemas/backdrop_entity.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | include "lull/nine_patch_def.fbs"; 4 | include "lull/render_def.fbs"; 5 | include "lull/transform_def.fbs"; 6 | 7 | union ComponentDefType { 8 | lull.NinePatchDef, 9 | lull.RenderDef, 10 | lull.TransformDef, 11 | } 12 | -------------------------------------------------------------------------------- /lullaby/tests/schemas/blend_shape_entity.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | include "lull/blend_shape_def.fbs"; 4 | include "lull/transform_def.fbs"; 5 | 6 | union ComponentDefType { 7 | lull.TransformDef, 8 | lull.BlendShapeDef, 9 | } 10 | -------------------------------------------------------------------------------- /lullaby/tests/util/hasher.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "lullaby/util/hash.h" 20 | 21 | int main(int argc, char* argv[]) { 22 | std::cout << lull::Hash(argc > 1 ? argv[1] : "") << std::endl; 23 | } 24 | -------------------------------------------------------------------------------- /lullaby/tools/BUILD: -------------------------------------------------------------------------------- 1 | licenses(["notice"]) # Apache 2.0 2 | 3 | # Python script to generate lullaby-specific EntityDef schema using 4 | # client-provided schema containing ComponentDef union. 5 | py_binary( 6 | name = "generate_entity_schema", 7 | srcs = ["generate_entity_schema.py"], 8 | python_version = "PY3", 9 | srcs_version = "PY2AND3", 10 | visibility = ["//visibility:public"], 11 | ) 12 | 13 | # Entity template file used by |generate_entity_schema| binary. 14 | exports_files([ 15 | "entity_schema.template", 16 | ]) 17 | 18 | -------------------------------------------------------------------------------- /lullaby/tools/common/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef LULLABY_TOOLS_COMMON_LOG_H_ 18 | #define LULLABY_TOOLS_COMMON_LOG_H_ 19 | 20 | namespace lull { 21 | 22 | void LogOpen(const char* log_file); 23 | 24 | void LogClose(); 25 | 26 | void LogWrite(const char* format, ...); 27 | 28 | } 29 | 30 | #endif // LULLABY_TOOLS_COMMON_LOG_H_ 31 | -------------------------------------------------------------------------------- /lullaby/tools/entity_schema.template: -------------------------------------------------------------------------------- 1 | // This is not a complete schema and is only meant to be used by the 2 | // generate_entity_schema build extension. 3 | 4 | table ComponentDef { 5 | def: ComponentDefType; 6 | } 7 | 8 | table EntityDef { 9 | components: [ComponentDef]; 10 | children: [EntityDef]; 11 | } 12 | 13 | root_type EntityDef; 14 | -------------------------------------------------------------------------------- /lullaby/tools/flatbuffer_code_generator/BUILD: -------------------------------------------------------------------------------- 1 | # BUILD file for lullaby's flatbuffer fbs code generator. 2 | 3 | licenses(["notice"]) # Apache 2.0 4 | 5 | cc_binary( 6 | name = "flatbuffer_code_generator", 7 | srcs = [ 8 | "flatc.cc", 9 | ], 10 | visibility = ["//visibility:public"], 11 | deps = [ 12 | "@flatbuffers//:flatc_library", 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /lullaby/tools/lull_script_compiler/BUILD: -------------------------------------------------------------------------------- 1 | # BUILD file for a LullScript compiler. 2 | 3 | licenses(["notice"]) # Apache 2.0 4 | 5 | cc_binary( 6 | name = "lull_script_compiler", 7 | srcs = [ 8 | "lull_script_compiler.cc", 9 | ], 10 | visibility = ["//visibility:public"], 11 | deps = [ 12 | "//lullaby/modules/lullscript", 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /lullaby/tools/texture_pipeline/encode_jpg.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/tools/texture_pipeline/encode_jpg.h" 18 | 19 | namespace lull { 20 | namespace tool { 21 | 22 | ByteArray EncodeJpg(const ImageData& src) { 23 | return ByteArray(); 24 | } 25 | 26 | } // namespace tool 27 | } // namespace lull 28 | -------------------------------------------------------------------------------- /lullaby/tools/word_art/BUILD: -------------------------------------------------------------------------------- 1 | licenses(["notice"]) # Apache 2.0 2 | 3 | cc_binary( 4 | name = "word_art_widths", 5 | srcs = [ 6 | "word_art_widths.cc", 7 | ], 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//:fbs", 11 | "//lullaby/util:arg_parser", 12 | "//lullaby/util:filename", 13 | "//lullaby/tools/common:file_utils", 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /lullaby/util/optional.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "lullaby/util/optional.h" 18 | 19 | namespace lull { 20 | 21 | NullOptT::DetailInit NullOptT::init; 22 | extern const NullOptT NullOpt{NullOptT::init}; 23 | 24 | } // namespace lull 25 | 26 | -------------------------------------------------------------------------------- /lullaby/util/trace.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2019 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef LULLABY_UTIL_TRACE_H_ 18 | #define LULLABY_UTIL_TRACE_H_ 19 | 20 | #define LULLABY_CPU_TRACE_CALL() 21 | #define LULLABY_CPU_TRACE(name) 22 | #define LULLABY_CPU_TRACE_INT(name, value) 23 | #define LULLABY_CPU_TRACE_FORMAT(format, ...) 24 | 25 | #endif // LULLABY_UTIL_TRACE_H_ 26 | -------------------------------------------------------------------------------- /lullaby/viewer/data/README.md: -------------------------------------------------------------------------------- 1 | brdf_lookup.png is a 2D texture containing precompute bidirectional 2 | reflectance distribution function (BRDF) used in environment lighting 3 | computations. 4 | Image source: https://github.com/KhronosGroup/glTF-WebGL-PBR. 5 | The project is licensed under MIT. 6 | -------------------------------------------------------------------------------- /lullaby/viewer/data/brdf_lookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/lullaby/viewer/data/brdf_lookup.png -------------------------------------------------------------------------------- /lullaby/viewer/data/forest_diff_cubemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/lullaby/viewer/data/forest_diff_cubemap.png -------------------------------------------------------------------------------- /lullaby/viewer/data/forest_spec_cubemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/lullaby/viewer/data/forest_spec_cubemap.png -------------------------------------------------------------------------------- /lullaby/viewer/entity.fbs: -------------------------------------------------------------------------------- 1 | include "lull/common.fbs"; 2 | 3 | include "lull/animation_def.fbs"; 4 | include "lull/light_def.fbs"; 5 | include "lull/name_def.fbs"; 6 | include "lull/model_asset_def.fbs"; 7 | include "lull/render_def.fbs"; 8 | include "lull/stategraph_def.fbs"; 9 | include "lull/transform_def.fbs"; 10 | 11 | union ComponentDefType { 12 | lull.AmbientLightDef, 13 | lull.AnimationDef, 14 | lull.DirectionalLightDef, 15 | lull.EnvironmentLightDef, 16 | lull.LightableDef, 17 | lull.NameDef, 18 | lull.ModelAssetDef, 19 | lull.RenderDef, 20 | lull.StategraphDef, 21 | lull.TransformDef, 22 | } 23 | -------------------------------------------------------------------------------- /lullaby/viewer/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/lullaby/viewer/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /redux/.bazelrc: -------------------------------------------------------------------------------- 1 | common --enable_platform_specific_config 2 | 3 | # linux 4 | build:linux --cxxopt='-std=c++17' 5 | build:linux --host_cxxopt='-std=c++17' 6 | build:linux --cxxopt='-fpermissive' 7 | 8 | # macos 9 | build:macos --cxxopt='-std=c++17' 10 | build:macos --host_cxxopt='-std=c++17' 11 | 12 | # windows 13 | build:windows --cxxopt=/std:c++20 14 | build:windows --host_cxxopt=/std:c++20 15 | build:windows --copt=/D_USE_MATH_DEFINES 16 | build:windows --host_copt=/D_USE_MATH_DEFINES 17 | -------------------------------------------------------------------------------- /redux/external/BUILD.eigen: -------------------------------------------------------------------------------- 1 | EIGEN_HDRS = glob( 2 | [ 3 | "Eigen/*", 4 | ], 5 | exclude = [ 6 | "**/src/**", 7 | ] + glob(["**/*.*"]) 8 | ) 9 | 10 | EIGEN_SRCS = glob( 11 | [ 12 | "Eigen/**/src/**/*.h", 13 | "Eigen/**/src/**/*.inc", 14 | ], 15 | exclude = [ 16 | "Eigen/src/Core/util/NonMPL2.h", 17 | ], 18 | ) 19 | 20 | cc_library( 21 | name = "eigen", 22 | srcs = EIGEN_SRCS, 23 | hdrs = EIGEN_HDRS, 24 | includes = ["."], 25 | visibility = ["//visibility:public"], 26 | ) 27 | -------------------------------------------------------------------------------- /redux/external/BUILD.fmtlib: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "fmtlib", 3 | srcs = ["src/format.cc", "src/os.cc"], 4 | hdrs = glob(["include/fmt/*.h"]), 5 | includes = ["include"], 6 | visibility = ["//visibility:public"], 7 | ) 8 | -------------------------------------------------------------------------------- /redux/external/BUILD.harfbuzz: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "harfbuzz", 3 | srcs = ["src/harfbuzz.cc"], 4 | hdrs = glob([ 5 | "src/**/*.h", 6 | "src/**/*.hh", 7 | ]), 8 | textual_hdrs = glob(["src/**/*.cc"]), 9 | includes = ["src"], 10 | deps = ["@freetype//:freetype"], 11 | visibility = ["//visibility:public"], 12 | ) 13 | -------------------------------------------------------------------------------- /redux/external/BUILD.libfbx: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "libfbx", 3 | srcs = select({ 4 | "@platforms//os:osx": ["FBX_SDK_ROOT/lib/osx/release/libfbxsdk.a"], 5 | "@platforms//os:linux": ["FBX_SDK_ROOT/lib/linux/release/libfbxsdk.a"], 6 | "@platforms//os:windows": ["FBX_SDK_ROOT/lib/windows/release/libfbxsdk.lib"], 7 | "//conditions:default": [], 8 | }), 9 | hdrs = glob(["FBX_SDK_ROOT/include/**/*.h"]), 10 | includes = ["FBX_SDK_ROOT/include"], 11 | visibility = ["//visibility:public"], 12 | linkopts = [ 13 | "-ldl", 14 | "-pthread", 15 | ] 16 | ) 17 | -------------------------------------------------------------------------------- /redux/external/BUILD.libogg: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "libogg", 3 | srcs = glob(["src/**/*.c", "src/**/*.h"]), 4 | hdrs = glob(["include/**/*.h"]), 5 | includes = ["include"], 6 | visibility = ["//visibility:public"], 7 | ) 8 | -------------------------------------------------------------------------------- /redux/external/BUILD.libopusfile: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "libopusfile", 3 | srcs = glob(["src/**/*.c", "src/**/*.h"]), 4 | hdrs = glob(["include/*.h"]), 5 | includes = ["include"], 6 | deps = [ 7 | "@libogg//:libogg", 8 | "@libopus//:libopus", 9 | ], 10 | visibility = ["//visibility:public"], 11 | ) 12 | -------------------------------------------------------------------------------- /redux/external/BUILD.libpng: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "libpng", 3 | srcs = glob([ 4 | "*.c" 5 | ], exclude = [ 6 | "pngtest.c", 7 | ]), 8 | hdrs = glob(["*.h"]), 9 | copts = [ 10 | "-DHAVE_CONFIG_H", 11 | ], 12 | includes = ["."], 13 | linkopts = ["-lm"], 14 | deps = [ 15 | "@zlib//:zlib", 16 | ], 17 | visibility = ["//visibility:public"], 18 | ) 19 | -------------------------------------------------------------------------------- /redux/external/BUILD.libunibreak: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "libunibreak", 3 | srcs = glob([ 4 | "src/*.c" 5 | ], exclude = [ 6 | "src/emojidata.c", 7 | "src/graphemebreakdata.c", 8 | "src/wordbreakdata.c", 9 | ]), 10 | hdrs = glob([ 11 | "src/*.h", 12 | ]), 13 | textual_hdrs = glob([ 14 | "src/emojidata.c", 15 | "src/graphemebreakdata.c", 16 | "src/wordbreakdata.c", 17 | ]), 18 | includes = ["src"], 19 | visibility = ["//visibility:public"], 20 | ) 21 | -------------------------------------------------------------------------------- /redux/external/BUILD.libvorbis: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "libvorbis", 3 | srcs = [ 4 | "lib/analysis.c", 5 | "lib/bitrate.c", 6 | "lib/block.c", 7 | "lib/codebook.c", 8 | "lib/envelope.c", 9 | "lib/floor0.c", 10 | "lib/floor1.c", 11 | "lib/info.c", 12 | "lib/lookup.c", 13 | "lib/lpc.c", 14 | "lib/lsp.c", 15 | "lib/mapping0.c", 16 | "lib/mdct.c", 17 | "lib/psy.c", 18 | "lib/registry.c", 19 | "lib/res0.c", 20 | "lib/sharedbook.c", 21 | "lib/smallft.c", 22 | "lib/synthesis.c", 23 | "lib/window.c", 24 | "lib/vorbisenc.c", 25 | "lib/vorbisfile.c", 26 | ] + glob(["lib/**/*.h"]), 27 | hdrs = glob(["include/**/*.h"]), 28 | includes = ["include", "lib"], 29 | deps = ["@libogg//:libogg"], 30 | visibility = ["//visibility:public"], 31 | ) 32 | -------------------------------------------------------------------------------- /redux/external/BUILD.magic_enum: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "magic_enum", 3 | hdrs = glob(["include/*.hpp"]), 4 | includes = ["include"], 5 | visibility = ["//visibility:public"], 6 | ) 7 | -------------------------------------------------------------------------------- /redux/external/BUILD.pffft: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "pffft", 3 | srcs = ["pffft.c"], 4 | hdrs = ["pffft.h"], 5 | includes = ["."], 6 | visibility = ["//visibility:public"], 7 | ) 8 | -------------------------------------------------------------------------------- /redux/external/BUILD.rapidjson: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "rapidjson", 3 | hdrs = glob(["include/rapidjson/**/*.h"]), 4 | includes = ["include"], 5 | visibility = ["//visibility:public"], 6 | defines = ["RAPIDJSON_HAS_STDSTRING"], 7 | ) 8 | -------------------------------------------------------------------------------- /redux/external/BUILD.resonance: -------------------------------------------------------------------------------- 1 | RESONANCE_SRCS = glob( 2 | ["resonance_audio/**/*.cc"], 3 | exclude = [ 4 | "**/*_test.cc", 5 | "**/geometrical_acoustics/**", 6 | "**/test_util.cc", 7 | ]) 8 | 9 | RESONANCE_HDRS = glob(["resonance_audio/**/*.h"]) 10 | 11 | PLATFORM_SRCS = glob(["platforms/common/**/*.cc"], exclude=["**/*_test.cc"]) 12 | 13 | PLATFORM_HDRS = glob(["platforms/common/**/*.h"]) 14 | 15 | SADIE_SRCS = ["third_party/SADIE_hrtf_database/generated/hrtf_assets.cc"] 16 | 17 | SADIE_HDRS = ["third_party/SADIE_hrtf_database/generated/hrtf_assets.h"] 18 | 19 | cc_library( 20 | name = "resonance", 21 | srcs = RESONANCE_SRCS + PLATFORM_SRCS + SADIE_SRCS, 22 | hdrs = RESONANCE_HDRS + PLATFORM_HDRS + SADIE_HDRS, 23 | deps = [ 24 | "@eigen//:eigen", 25 | "@libogg//:libogg", 26 | "@libvorbis//:libvorbis", 27 | "@pffft//:pffft", 28 | ], 29 | includes = [".", "resonance_audio"], 30 | visibility = ["//visibility:public"], 31 | ) 32 | -------------------------------------------------------------------------------- /redux/external/BUILD.stblib: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "stblib", 3 | srcs = glob(["*.c"]), 4 | hdrs = glob(["*.h"]), 5 | includes = ["."], 6 | visibility = ["//visibility:public"], 7 | ) 8 | -------------------------------------------------------------------------------- /redux/external/BUILD.utfcpp: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "utfcpp", 3 | includes = ["source"], 4 | hdrs = glob(["source/**/*.h"]), 5 | visibility = ["//visibility:public"], 6 | ) 7 | -------------------------------------------------------------------------------- /redux/external/BUILD.vectorial: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "vectorial", 3 | includes = ["include"], 4 | hdrs = glob(["include/vectorial/*.h"]), 5 | visibility = ["//visibility:public"], 6 | ) 7 | -------------------------------------------------------------------------------- /redux/external/BUILD.zlib: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "zlib", 3 | srcs = glob(["*.c"]), 4 | hdrs = glob(["*.h"]), 5 | includes = ["."], 6 | copts = select({ 7 | "@platforms//os:macos": ["-Wno-implicit-function-declaration"], 8 | "//conditions:default": [], 9 | }), 10 | visibility = ["//visibility:public"], 11 | ) 12 | -------------------------------------------------------------------------------- /redux/external/libogg.patch: -------------------------------------------------------------------------------- 1 | diff --git a/include/ogg/config_types.h b/include/ogg/config_types.h 2 | new file mode 100644 3 | index 0000000..8920d04 4 | --- /dev/null 5 | +++ b/include/ogg/config_types.h 6 | @@ -0,0 +1,13 @@ 7 | +#ifndef __CONFIG_TYPES_H__ 8 | +#define __CONFIG_TYPES_H__ 9 | + 10 | +#include 11 | + 12 | +typedef int16_t ogg_int16_t; 13 | +typedef uint16_t ogg_uint16_t; 14 | +typedef int32_t ogg_int32_t; 15 | +typedef uint32_t ogg_uint32_t; 16 | +typedef int64_t ogg_int64_t; 17 | +typedef uint64_t ogg_uint64_t; 18 | + 19 | +#endif 20 | -------------------------------------------------------------------------------- /redux/external/stblib.patch: -------------------------------------------------------------------------------- 1 | diff --git a/stb_image.c b/stb_image.c 2 | new file mode 100644 3 | index 0000000..8ddfd1f 4 | --- /dev/null 5 | +++ b/stb_image.c 6 | @@ -0,0 +1,2 @@ 7 | +#define STB_IMAGE_IMPLEMENTATION 8 | +#include "stb_image.h" 9 | -------------------------------------------------------------------------------- /redux/redux/BUILD: -------------------------------------------------------------------------------- 1 | licenses(["notice"]) 2 | 3 | # Visibility group that specifies which projects can use the redux libraries. 4 | package_group( 5 | name = "visibility", 6 | packages = [ 7 | "//redux/...", 8 | ], 9 | ) 10 | -------------------------------------------------------------------------------- /redux/redux/engines/animation/README.md: -------------------------------------------------------------------------------- 1 | At its most basic, the AnimationEngine is responsible for updating floating 2 | point values over time using splines. The AnimationEngine builds upon this core 3 | functionality to implement skeletal animations using rxanim files (which can be 4 | created using the anim_pipeline). 5 | 6 | This engine is a heavily modified version of the Motive animation engine 7 | (www.github.com/google/motive). 8 | -------------------------------------------------------------------------------- /redux/redux/engines/audio/BUILD: -------------------------------------------------------------------------------- 1 | # Audio Engine. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "audio", 11 | srcs = [ 12 | ], 13 | hdrs = [ 14 | "audio_asset.h", 15 | "audio_engine.h", 16 | "sound.h", 17 | "sound_room.h", 18 | ], 19 | deps = [ 20 | "//redux/modules/audio:enums", 21 | "//redux/modules/base:registry", 22 | "//redux/modules/base:resource_manager", 23 | "//redux/modules/base:typeid", 24 | "//redux/modules/math:quaternion", 25 | "//redux/modules/math:transform", 26 | "//redux/modules/math:vector", 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /redux/redux/engines/physics/physics_enums.fbs: -------------------------------------------------------------------------------- 1 | namespace redux; 2 | 3 | enum RigidBodyMotionType : ubyte { 4 | // Moving, controlled by physics engine. 5 | Dynamic, 6 | // Moving, controller by user. 7 | Kinematic, 8 | // Non-moving. 9 | Static, 10 | } 11 | -------------------------------------------------------------------------------- /redux/redux/engines/physics/thunks/BUILD: -------------------------------------------------------------------------------- 1 | # PhysicsEngine thunks implementations. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "thunks", 11 | textual_hdrs = [ 12 | "physics_engine.h", 13 | "rigid_body.h", 14 | "trigger_volume.h", 15 | ], 16 | deps = [ 17 | "//redux/engines/physics", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /redux/redux/engines/platform/sdl2/get_native_window_osx.mm: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | void* GetNativeWindowOsx(void* window) { 21 | NSWindow* ns_window = (__bridge NSWindow*)window; 22 | NSView* ns_view = [ns_window contentView]; 23 | return (__bridge void*)ns_view; 24 | } 25 | -------------------------------------------------------------------------------- /redux/redux/engines/render/thunks/BUILD: -------------------------------------------------------------------------------- 1 | # RenderEngine thunks implementations. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "thunks", 11 | textual_hdrs = [ 12 | "indirect_light.h", 13 | "light.h", 14 | "mesh.h", 15 | "render_engine.h", 16 | "render_layer.h", 17 | "render_scene.h", 18 | "render_target.h", 19 | "renderable.h", 20 | "texture.h", 21 | ], 22 | deps = [ 23 | "//redux/engines/render", 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /redux/redux/engines/text/freetype2/BUILD: -------------------------------------------------------------------------------- 1 | # Freetype2 based implementation for glyph rasterization. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "rasterizer", 11 | srcs = [ 12 | "rasterizer.cc", 13 | ], 14 | deps = [ 15 | "@freetype//:freetype", 16 | "//redux/engines/text", 17 | "//redux/modules/graphics:color", 18 | "//redux/modules/graphics:enums", 19 | "//redux/modules/graphics:image_data", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /redux/redux/engines/text/harfbuzz/BUILD: -------------------------------------------------------------------------------- 1 | # Harfbuzz based implementation for glyph sequencing. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "sequencer", 11 | srcs = [ 12 | "sequencer.cc", 13 | ], 14 | deps = [ 15 | "@harfbuzz//:harfbuzz", 16 | "//redux/engines/text", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /redux/redux/engines/text/stub/BUILD: -------------------------------------------------------------------------------- 1 | # Stub implementations for optional components. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "breaking", 11 | srcs = [ 12 | "breaking.cc", 13 | ], 14 | deps = [ 15 | "//redux/engines/text", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /redux/redux/engines/text/unibreak/BUILD: -------------------------------------------------------------------------------- 1 | # Line breaking implementation using libunibreak. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "breaking", 11 | srcs = [ 12 | "breaking.cc", 13 | ], 14 | deps = [ 15 | "@libunibreak//:libunibreak", 16 | "//redux/engines/text", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /redux/redux/modules/audio/audio_enums.fbs: -------------------------------------------------------------------------------- 1 | namespace redux; 2 | 3 | enum SoundType : ubyte { 4 | // Sound is not spatialized. 5 | Stereo, 6 | // Sound has 3D position and rotation. 7 | Point, 8 | // Sound has 3D rotation. 9 | Field, 10 | } 11 | 12 | // The surface material of an object that can be used to attenuate sounds. 13 | enum AudioSurfaceMaterial : ubyte { 14 | AcousticCeilingTiles, 15 | BrickBare, 16 | BrickPainted, 17 | ConcreteBlockCoarse, 18 | ConcreteBlockPainted, 19 | CurtainHeavy, 20 | FiberGlassInsulation, 21 | GlassThick, 22 | GlassThin, 23 | Grass, 24 | LinoleumOnConcrete, 25 | Marble, 26 | Metal, 27 | ParquetOnConcrete, 28 | PlasterRough, 29 | PlasterSmooth, 30 | PlywoodPanel, 31 | PolishedConcreteOrTile, 32 | Sheetrock, 33 | WaterOrIceSurface, 34 | WoodCeiling, 35 | WoodPanel, 36 | Transparent, 37 | 38 | Invalid = 255, 39 | } 40 | -------------------------------------------------------------------------------- /redux/redux/modules/audio/test_data/ambisonic.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/redux/redux/modules/audio/test_data/ambisonic.wav -------------------------------------------------------------------------------- /redux/redux/modules/audio/test_data/small.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/redux/redux/modules/audio/test_data/small.ogg -------------------------------------------------------------------------------- /redux/redux/modules/audio/test_data/small.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/redux/redux/modules/audio/test_data/small.opus -------------------------------------------------------------------------------- /redux/redux/modules/audio/test_data/speech.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/redux/redux/modules/audio/test_data/speech.ogg -------------------------------------------------------------------------------- /redux/redux/modules/audio/test_data/speech.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/redux/redux/modules/audio/test_data/speech.opus -------------------------------------------------------------------------------- /redux/redux/modules/audio/test_data/speech.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/redux/redux/modules/audio/test_data/speech.wav -------------------------------------------------------------------------------- /redux/redux/modules/base/logging.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef REDUX_MODULES_BASE_LOGGING_H_ 18 | #define REDUX_MODULES_BASE_LOGGING_H_ 19 | 20 | #include "absl/log/check.h" 21 | #include "absl/log/log.h" 22 | 23 | #endif // REDUX_MODULES_BASE_LOGGING_H_ 24 | -------------------------------------------------------------------------------- /redux/redux/modules/flatbuffers/common.fbs: -------------------------------------------------------------------------------- 1 | namespace redux.fbs; 2 | 3 | // A trivial wrapper around an integral hash value. We use this wrapper in case 4 | // we ever need to change the underlying type for our hashes. 5 | struct HashVal { 6 | value: uint; 7 | } 8 | 9 | // A string with its hash, mainly used to encode both a string and its hash into 10 | // our pipelines so we're not hashing strings on load. 11 | table HashString { 12 | name: string; 13 | hash: uint; 14 | } 15 | -------------------------------------------------------------------------------- /redux/redux/modules/testing/BUILD: -------------------------------------------------------------------------------- 1 | # Test-only utilities. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "testing", 11 | testonly = True, 12 | srcs = ["testing.cc"], 13 | hdrs = ["testing.h"], 14 | deps = [ 15 | "@gtest//:gtest", 16 | "//redux/modules/base:filepath", 17 | "//redux/modules/base:logging", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /redux/redux/systems/animation/BUILD: -------------------------------------------------------------------------------- 1 | # ECS System for playing animation files to update Entity poses. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "animation", 11 | srcs = ["animation_system.cc"], 12 | hdrs = ["animation_system.h"], 13 | deps = [ 14 | "@absl//absl/container:flat_hash_map", 15 | "//redux/engines/animation", 16 | "//redux/engines/animation/spline:compact_spline", 17 | "//redux/modules/base:choreographer", 18 | "//redux/modules/base:typeid", 19 | "//redux/modules/ecs", 20 | "//redux/modules/math:interpolation", 21 | "//redux/systems/rig", 22 | ], 23 | ) 24 | 25 | cc_library( 26 | name = "static", 27 | srcs = ["static_register.cc"], 28 | deps = [ 29 | ":animation", 30 | "//redux/modules/ecs", 31 | ], 32 | alwayslink = 1, 33 | ) 34 | -------------------------------------------------------------------------------- /redux/redux/systems/animation/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/animation/animation_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::AnimationSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/audio/sound_def.def: -------------------------------------------------------------------------------- 1 | include redux/modules/audio/enums.h 2 | 3 | namespace redux 4 | 5 | # Defines a sound to be played. 6 | struct SoundDef { 7 | # The URI to the sound file to be played. 8 | uri: string 9 | 10 | # The volume of the sound, in the range [0.0, 1.0]. 11 | volume: float 12 | 13 | # Whether or not the sound should be looped. 14 | looping: bool 15 | } 16 | -------------------------------------------------------------------------------- /redux/redux/systems/audio/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/audio/audio_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::AudioSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/camera/camera_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | # Camera properties that will be used for rendering. 4 | struct CameraDef { 5 | # Near clipping plane distance for the camera view frustum 6 | near_plane_distance: float = 0.01 7 | 8 | # Far clipping plane distance for the camera view frustum 9 | far_plane_distance: float = 1000.0 10 | 11 | # The horizontal view angle for the camera view frustum (in degrees). 12 | horizontal_field_of_view_angle: float = DegreesToRadians(45.0) 13 | 14 | # The screen-space bounds for the viewport with (0,0) for the bottom-left and 15 | # (1,1) for the top-right. 16 | viewport: Bounds2f 17 | } 18 | -------------------------------------------------------------------------------- /redux/redux/systems/camera/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/camera/camera_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::CameraSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/constraint/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/constraint/constraint_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::ConstraintSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/datastore/datastore_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | # Stores key/value pairs with an Entity. 4 | struct DatastoreDef { 5 | # The data table of key/value pairs to be stored with an Entity. 6 | data: VarTable 7 | } 8 | -------------------------------------------------------------------------------- /redux/redux/systems/datastore/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/datastore/datastore_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::DatastoreSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/dispatcher/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/dispatcher/dispatcher_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::DispatcherSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/light/BUILD: -------------------------------------------------------------------------------- 1 | # ECS System for managing lights. 2 | 3 | load( 4 | "//redux/tools:def_cc_library.bzl", 5 | "def_cc_library", 6 | ) 7 | 8 | licenses(["notice"]) 9 | 10 | package( 11 | default_visibility = ["//redux:visibility"], 12 | ) 13 | 14 | def_cc_library( 15 | name = "light_def", 16 | src = "light_def.def", 17 | ) 18 | 19 | cc_library( 20 | name = "light", 21 | srcs = ["light_system.cc"], 22 | hdrs = ["light_system.h"], 23 | deps = [ 24 | ":light_def", 25 | "//redux/engines/render", 26 | "//redux/modules/base:choreographer", 27 | "//redux/modules/base:hash", 28 | "//redux/modules/base:typeid", 29 | "//redux/modules/ecs", 30 | "//redux/modules/math", 31 | "//redux/modules/math:vector", 32 | "//redux/systems/transform", 33 | ], 34 | ) 35 | 36 | cc_library( 37 | name = "static", 38 | srcs = ["static_register.cc"], 39 | deps = [":light"], 40 | alwayslink = 1, 41 | ) 42 | -------------------------------------------------------------------------------- /redux/redux/systems/light/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/systems/light/light_system.h" 18 | REDUX_STATIC_REGISTER_SYSTEM(redux::LightSystem); 19 | -------------------------------------------------------------------------------- /redux/redux/systems/model/model_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | struct ModelDef { 4 | # The URI for the model asset to load. 5 | uri: string 6 | } 7 | -------------------------------------------------------------------------------- /redux/redux/systems/model/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/systems/model/model_system.h" 18 | REDUX_STATIC_REGISTER_SYSTEM(redux::ModelSystem); 19 | -------------------------------------------------------------------------------- /redux/redux/systems/name/name_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | # Associates a string name with an Entity. 4 | struct NameDef { 5 | # The name of the Entity. 6 | name: string 7 | } 8 | -------------------------------------------------------------------------------- /redux/redux/systems/name/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/name/name_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::NameSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/physics/rigid_body_def.def: -------------------------------------------------------------------------------- 1 | include redux/engines/physics/enums.h 2 | 3 | namespace redux 4 | 5 | # Provides an Entity with a physical rigid body that participates in the 6 | # Physics (dynamics) simulation. 7 | struct RigidBodyDef { 8 | # The mass of the rigid body. 9 | mass: float 10 | 11 | # The coefficient of friction of the surface of the rigid body. 12 | friction: float 13 | 14 | # The coefficient of restitution (i.e. bounciness) of the rigid body. 15 | restitution: float 16 | 17 | # The method by which the rigid body's motion is controlled. 18 | motion_type: RigidBodyMotionType = RigidBodyMotionType::Dynamic 19 | } 20 | -------------------------------------------------------------------------------- /redux/redux/systems/physics/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/physics/physics_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::PhysicsSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/physics/trigger_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | # A box-shaped volume in space that can be used to trigger events. 4 | struct BoxTriggerDef { 5 | # The half size of the box. 6 | half_extents: vec3 7 | } 8 | 9 | # A spherical volume in space that can be used to trigger events. 10 | struct SphereTriggerDef { 11 | # The radius of the sphere. 12 | radius: float 13 | } 14 | -------------------------------------------------------------------------------- /redux/redux/systems/render/BUILD: -------------------------------------------------------------------------------- 1 | # ECS System for rendering Entities. 2 | 3 | load( 4 | "//redux/tools:def_cc_library.bzl", 5 | "def_cc_library", 6 | ) 7 | 8 | licenses(["notice"]) 9 | 10 | package( 11 | default_visibility = ["//redux:visibility"], 12 | ) 13 | 14 | def_cc_library( 15 | name = "render_def", 16 | src = "render_def.def", 17 | ) 18 | 19 | cc_library( 20 | name = "render", 21 | srcs = ["render_system.cc"], 22 | hdrs = ["render_system.h"], 23 | deps = [ 24 | ":render_def", 25 | "//redux/engines/render", 26 | "//redux/modules/base:choreographer", 27 | "//redux/modules/base:hash", 28 | "//redux/modules/base:typeid", 29 | "//redux/modules/ecs", 30 | "//redux/modules/math", 31 | "//redux/modules/math:vector", 32 | "//redux/systems/rig", 33 | "//redux/systems/transform", 34 | ], 35 | ) 36 | 37 | cc_library( 38 | name = "static", 39 | srcs = ["static_register.cc"], 40 | deps = [":render"], 41 | alwayslink = 1, 42 | ) 43 | -------------------------------------------------------------------------------- /redux/redux/systems/render/render_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | struct RenderDef { 4 | # The shading model to apply to the Entity. 5 | shading_model: string 6 | } 7 | -------------------------------------------------------------------------------- /redux/redux/systems/render/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/systems/render/render_system.h" 18 | REDUX_STATIC_REGISTER_SYSTEM(redux::RenderSystem); 19 | -------------------------------------------------------------------------------- /redux/redux/systems/rig/BUILD: -------------------------------------------------------------------------------- 1 | # ECS System that stores rig and pose data. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_library( 10 | name = "rig", 11 | srcs = ["rig_system.cc"], 12 | hdrs = ["rig_system.h"], 13 | deps = [ 14 | "@absl//absl/container:flat_hash_map", 15 | "@absl//absl/types:span", 16 | "//redux/modules/base:logging", 17 | "//redux/modules/base:typeid", 18 | "//redux/modules/ecs", 19 | "//redux/modules/math:matrix", 20 | ], 21 | ) 22 | 23 | cc_library( 24 | name = "static", 25 | srcs = ["static_register.cc"], 26 | deps = [ 27 | ":rig", 28 | "//redux/modules/ecs", 29 | ], 30 | alwayslink = 1, 31 | ) 32 | -------------------------------------------------------------------------------- /redux/redux/systems/rig/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/rig/rig_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::RigSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/script/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/script/script_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::ScriptSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/shape/shape_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | # Generates a box-shaped physics (rigid body) and render mesh for an Entity. 4 | struct BoxShapeDef { 5 | # The half-size of the box. 6 | half_extents: vec3 7 | } 8 | 9 | # Generates a sphere-shaped physics (rigid body) and render mesh for an Entity. 10 | struct SphereShapeDef { 11 | # The radius of the sphere. 12 | radius: float 13 | 14 | # The number of parallels (i.e. latitudinal lines) used to tesselate the 15 | # render mesh. 16 | num_parallels: int 17 | 18 | # The number of meridians (e.g. longitudinals lines) used to tesselate the 19 | # render mesh. 20 | num_meridians: int 21 | } 22 | -------------------------------------------------------------------------------- /redux/redux/systems/shape/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/systems/shape/shape_system.h" 18 | REDUX_STATIC_REGISTER_SYSTEM(redux::ShapeSystem); 19 | -------------------------------------------------------------------------------- /redux/redux/systems/text/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/systems/text/text_system.h" 18 | REDUX_STATIC_REGISTER_SYSTEM(redux::TextSystem); 19 | -------------------------------------------------------------------------------- /redux/redux/systems/transform/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/transform/transform_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::TransformSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/systems/transform/transform_def.def: -------------------------------------------------------------------------------- 1 | namespace redux 2 | 3 | # The position, rotation, and scale of an Entity. 4 | struct TransformDef { 5 | # The position of the Entity in 3D space. 6 | translation: vec3 7 | 8 | # The rotation of the Entity in 3D space. 9 | rotation: quat 10 | 11 | # The scale of the Entity relative to its 'default' size. 12 | scale: vec3 = vec3::One() 13 | 14 | # The (local, untransformed) bounding box of the Entity. 15 | box: Box 16 | } 17 | -------------------------------------------------------------------------------- /redux/redux/systems/tween/static_register.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017-2022 Google Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS-IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "redux/modules/ecs/system.h" 18 | #include "redux/systems/tween/tween_system.h" 19 | 20 | REDUX_STATIC_REGISTER_SYSTEM(redux::TweenSystem); 21 | -------------------------------------------------------------------------------- /redux/redux/tools/BUILD: -------------------------------------------------------------------------------- 1 | """BUILD file for bzl targets.""" 2 | 3 | -------------------------------------------------------------------------------- /redux/redux/tools/anim_pipeline/README.md: -------------------------------------------------------------------------------- 1 | The anim_pipeline is a tool for building redux animation files. 2 | 3 | Animation files contains a series of curve definitions that describe the 4 | movement of values over time. Each curve is applied to a single dimension of 5 | a bone in a skeleton which, combined, is used for skeletal animation. 6 | 7 | The pipeline converts data created from digitial content creation (dcc) tools 8 | such as Maya FBX files or Khronos GLTF files into .rxanim files that can be 9 | consumed efficiently by the redux runtime. 10 | -------------------------------------------------------------------------------- /redux/redux/tools/common/README.md: -------------------------------------------------------------------------------- 1 | Common libraries for redux tools. 2 | 3 | A collection of libraries that are intended to be used by redux tools only (and 4 | not the runtime). 5 | -------------------------------------------------------------------------------- /redux/redux/tools/common/axis_system.fbs: -------------------------------------------------------------------------------- 1 | namespace redux.tool; 2 | 3 | // Ways to interpret the orientation axis of an asset when importing it. 4 | enum AxisSystem : int { 5 | Unspecified = -1, 6 | 7 | XUp_YFront_ZLeft, 8 | XUp_YFront_ZRight, 9 | XUp_YBack_ZLeft, 10 | XUp_YBack_ZRight, 11 | XUp_ZFront_YLeft, 12 | XUp_ZFront_YRight, 13 | XUp_ZBack_YLeft, 14 | XUp_ZBack_YRight, 15 | 16 | YUp_XFront_ZLeft, 17 | YUp_XFront_ZRight, 18 | YUp_XBack_ZLeft, 19 | YUp_XBack_ZRight, 20 | YUp_ZFront_XLeft, 21 | YUp_ZFront_XRight, 22 | YUp_ZBack_XLeft, 23 | YUp_ZBack_XRight, 24 | 25 | ZUp_XFront_YLeft, 26 | ZUp_XFront_YRight, 27 | ZUp_XBack_YLeft, 28 | ZUp_XBack_YRight, 29 | ZUp_YFront_XLeft, 30 | ZUp_YFront_XRight, 31 | ZUp_YBack_XLeft, 32 | ZUp_YBack_XRight, 33 | } 34 | -------------------------------------------------------------------------------- /redux/redux/tools/common/test_data/hello.txt: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /redux/redux/tools/common/test_data/schema.fbs: -------------------------------------------------------------------------------- 1 | include "redux/tools/common/test_data/schema_include.fbs"; 2 | 3 | table Person { 4 | first_name: string; 5 | last_name: string; 6 | address: Address; 7 | } 8 | -------------------------------------------------------------------------------- /redux/redux/tools/common/test_data/schema_include.fbs: -------------------------------------------------------------------------------- 1 | table Address { 2 | number: int; 3 | street: string; 4 | postal_code: string; 5 | } 6 | -------------------------------------------------------------------------------- /redux/redux/tools/common/test_data/sum.jsonnet: -------------------------------------------------------------------------------- 1 | { 2 | sum(a_, b_):: a_ + b_, 3 | } 4 | -------------------------------------------------------------------------------- /redux/redux/tools/env_repository.bzl: -------------------------------------------------------------------------------- 1 | """Creates a bazel repository from a path stored in an environment variable.""" 2 | 3 | def _env_repository(ctx): 4 | src_dir = ctx.os.environ[ctx.attr.env] 5 | target_dir = ctx.attr.env 6 | ctx.symlink(src_dir, target_dir) 7 | 8 | if ctx.attr.build_file: 9 | build_file_contents = ctx.read(ctx.attr.build_file) 10 | ctx.file("BUILD", build_file_contents) 11 | 12 | return None 13 | 14 | env_repository = repository_rule( 15 | implementation = _env_repository, 16 | local = True, 17 | attrs = { 18 | "env": attr.string(mandatory = True), 19 | "build_file": attr.label(), 20 | }, 21 | ) 22 | -------------------------------------------------------------------------------- /redux/redux/tools/model_pipeline/README.md: -------------------------------------------------------------------------------- 1 | The model_pipeline is a tool for building redux model files. 2 | 3 | A model file contains two main pieces of data: shape and material. This data can 4 | then by used at runtime to provide physical and visual elements for an Entity. 5 | 6 | The pipeline converts data created from digitial content creation (dcc) tools 7 | such as Maya FBX files or Khronos GLTF files into .rxmodel files that can be 8 | consumed efficiently by the redux runtime. 9 | -------------------------------------------------------------------------------- /redux/redux/tools/shader_pipeline/README.md: -------------------------------------------------------------------------------- 1 | The shader_pipeline is a tool for building redux shader files. 2 | 3 | Redux shaders are precompiled vertex and fragment shaders that are used for 4 | rendering. Each .rxshader binary contains multiple variants of the individual 5 | shaders as well as metadata about the properties, features, and conditions 6 | under which each variant will be applied. 7 | -------------------------------------------------------------------------------- /redux/redux/tools/texture_pipeline/BUILD: -------------------------------------------------------------------------------- 1 | # Tool for building texture files. 2 | 3 | licenses(["notice"]) 4 | 5 | package( 6 | default_visibility = ["//redux:visibility"], 7 | ) 8 | 9 | cc_binary( 10 | name = "texture_pipeline", 11 | srcs = ["main.cc"], 12 | deps = [ 13 | ":generate_mipmaps", 14 | "@absl//absl/flags:flag", 15 | "@absl//absl/flags:parse", 16 | "//redux/modules/base:filepath", 17 | "//redux/modules/base:logging", 18 | "//redux/modules/codecs:decode_image", 19 | "//redux/modules/codecs:encode_png", 20 | "//redux/modules/codecs:encode_webp", 21 | "//redux/modules/graphics:image_data", 22 | "//redux/tools/common:file_utils", 23 | ], 24 | ) 25 | 26 | cc_library( 27 | name = "generate_mipmaps", 28 | srcs = ["generate_mipmaps.cc"], 29 | hdrs = ["generate_mipmaps.h"], 30 | deps = [ 31 | "//redux/modules/base:logging", 32 | "//redux/modules/graphics:image_data", 33 | "//redux/modules/graphics:image_utils", 34 | ], 35 | ) 36 | -------------------------------------------------------------------------------- /redux/redux/tools/texture_pipeline/README.md: -------------------------------------------------------------------------------- 1 | The texture_pipeline is a tool for building texture files. 2 | 3 | The texture pipeline can be used to convert images into formats that are 4 | supported by the redux runtime: PNG, WEBP, ETC2 and ASTC. Note that ETC2 and 5 | ASTC are hardware formats, so only runtimes for specific platforms can use these 6 | formats. 7 | 8 | Images can also be packed into KTX container formats. This is useful for 9 | bundling multiple images (eg. mipmaps or cubemaps) into a single file. 10 | -------------------------------------------------------------------------------- /redux/third_party/filament/BUILD: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "resgen_licenses", 3 | textual_hdrs = ["licenses/licenses.inc"], 4 | includes = ["."], 5 | visibility = ["//visibility:public"], 6 | ) 7 | -------------------------------------------------------------------------------- /redux/third_party/filament/generate_shaders.bzl: -------------------------------------------------------------------------------- 1 | 2 | def generate_shaders(name): 3 | gendir = "generated" 4 | 5 | native.genrule( 6 | name = name + "_" + gendir, 7 | srcs = native.glob([ 8 | "shaders/src/*.cs", 9 | "shaders/src/*.vs", 10 | "shaders/src/*.fs", 11 | "shaders/src/*.glsl", 12 | ]), 13 | outs = [ 14 | gendir + "/shaders.bin", 15 | gendir + "/shaders.h", 16 | gendir + "/shaders.c", 17 | gendir + "/shaders.S", 18 | gendir + "/shaders.apple.S", 19 | ], 20 | tools = [":resgen"], 21 | cmd = "DEPLOY=`dirname $(location " + gendir + "/shaders.bin)` && " + 22 | "$(location :resgen) -kcp shaders --text --deploy=$$DEPLOY $(SRCS)", 23 | ) 24 | 25 | native.cc_library( 26 | name = name, 27 | srcs = [gendir + "/shaders.c"], 28 | includes = [gendir], 29 | textual_hdrs = [gendir + "/shaders.h"], 30 | ) 31 | -------------------------------------------------------------------------------- /redux/third_party/gl/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) 6 | 7 | cc_library( 8 | name = "gl", 9 | linkopts = ["-lGL"], 10 | ) 11 | -------------------------------------------------------------------------------- /schemas/lull/animation_response_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/animation_def.fbs"; 2 | include "lull/dispatcher_def.fbs"; 3 | 4 | namespace lull; 5 | 6 | /// A response that plays an animation based on an input event. (For example, 7 | /// moving an Entity when it is hovered.) 8 | table AnimationResponseDef { 9 | /// One or more inputs that trigger the response. See dispatcher_def.fbs for 10 | /// more information about the EventDef table. 11 | inputs: [EventDef]; 12 | 13 | /// Animations to play based on the input. 14 | animation: AnimationDef; 15 | } 16 | -------------------------------------------------------------------------------- /schemas/lull/audio_listener_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | table AudioListenerDef { 6 | /// The initial master volume level, in the range [0,1.0]. 7 | initial_volume: float = 1.0; 8 | } 9 | 10 | root_type AudioListenerDef; 11 | -------------------------------------------------------------------------------- /schemas/lull/axis_system.fbs: -------------------------------------------------------------------------------- 1 | namespace lull; 2 | 3 | /// List of different ways to interpret the orientation axis of an asset when 4 | /// importing it. 5 | enum AxisSystem : int { 6 | Unspecified = -1, 7 | 8 | XUp_YFront_ZLeft, 9 | XUp_YFront_ZRight, 10 | XUp_YBack_ZLeft, 11 | XUp_YBack_ZRight, 12 | XUp_ZFront_YLeft, 13 | XUp_ZFront_YRight, 14 | XUp_ZBack_YLeft, 15 | XUp_ZBack_YRight, 16 | 17 | YUp_XFront_ZLeft, 18 | YUp_XFront_ZRight, 19 | YUp_XBack_ZLeft, 20 | YUp_XBack_ZRight, 21 | YUp_ZFront_XLeft, 22 | YUp_ZFront_XRight, 23 | YUp_ZBack_XLeft, 24 | YUp_ZBack_XRight, 25 | 26 | ZUp_XFront_YLeft, 27 | ZUp_XFront_YRight, 28 | ZUp_XBack_YLeft, 29 | ZUp_XBack_YRight, 30 | ZUp_YFront_XLeft, 31 | ZUp_YFront_XRight, 32 | ZUp_YBack_XLeft, 33 | ZUp_YBack_XRight, 34 | } 35 | -------------------------------------------------------------------------------- /schemas/lull/blend_shape_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/model_asset_def.fbs"; 2 | 3 | namespace lull; 4 | 5 | table BlendShapeDef { 6 | // Contains the model and all of the blend shapes. 7 | model: ModelAssetDef; 8 | } 9 | 10 | root_type BlendShapeDef; 11 | file_extension "lullmodel"; -------------------------------------------------------------------------------- /schemas/lull/blueprint_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// These should not be written by hand in JSON, but are instead output by tools 6 | /// such as compile_blueprint_from_json.bzl or BlueprintBuilder. 7 | 8 | /// Opaquely holds the data for any generic component, so Lullaby can manage 9 | /// this data without knowing the schema of the components. 10 | table BlueprintComponentDef { 11 | /// The HashValue type of the component name without namespaces, e.g. 12 | /// Hash("TransformDef"). 13 | type: uint (hashvalue); 14 | 15 | /// The compiled flatbuffer binary data of the component def. 16 | def: [uint8]; 17 | } 18 | 19 | /// A blueprint that can be used to initialize an Entity. 20 | table BlueprintDef { 21 | /// A list of components that will each be passed to the System associated 22 | /// with the type. 23 | components: [BlueprintComponentDef]; 24 | 25 | /// A list of nested Blueprints to create as new Entity children of this 26 | /// Entity. 27 | children: [BlueprintDef]; 28 | } 29 | -------------------------------------------------------------------------------- /schemas/lull/common.fbs: -------------------------------------------------------------------------------- 1 | // Unfortunately, in some situations, this file conflicts with the common.fbs 2 | // in fplbase. This is because the flatbuffer codegen does not use full path. 3 | // In such situations, you want to explicitly depend on lull_common.fbs and not 4 | // common.fbs. 5 | include "lull/lull_common.fbs"; 6 | 7 | -------------------------------------------------------------------------------- /schemas/lull/config_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | include "lull/variant_def.fbs"; 3 | 4 | namespace lull; 5 | 6 | table ConfigDef { 7 | values: [KeyVariantPairDef]; 8 | } 9 | 10 | root_type ConfigDef; 11 | -------------------------------------------------------------------------------- /schemas/lull/controller_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | include "lull/dispatcher_def.fbs"; 3 | 4 | namespace lull; 5 | 6 | /// Configures the controller and laser. Apps should consider reusing 7 | /// lullaby/data/blueprints/controller.json and 8 | /// lullaby/data/blueprints/laser.json 9 | 10 | /// ControllerType designates which DeviceType this controller is. Controller1 11 | /// corresponds to InputManager's kController type and Controller2 corresponds 12 | /// to InputManager's kController2 type. 13 | 14 | enum ControllerType : int { 15 | Controller1, 16 | Controller2, 17 | } 18 | 19 | table ControllerDef { 20 | controller_type: ControllerType = Controller1; 21 | 22 | enable_events: [EventDef]; 23 | disable_events: [EventDef]; 24 | 25 | deprecated1: int = 0; 26 | deprecated2: bool = false; 27 | } 28 | 29 | table LaserDef { 30 | controller_type: ControllerType = Controller1; 31 | 32 | deprecated1: int = 0; 33 | } 34 | 35 | root_type ControllerDef; 36 | -------------------------------------------------------------------------------- /schemas/lull/cursor_trail_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Configures the cursor trail. 6 | /// In case of changing any of these values, please update cursor_template.fbs. 7 | table CursorTrailDef { 8 | 9 | /// The number of cursors to draw in the trail by default 10 | average_trail_length: int = 14; 11 | /// The size of the cursor quad 12 | quad_size: float = 0.05; 13 | /// The number of samples from which to create the interpolating curve 14 | curve_samples: int = 4; 15 | /// Speed of the cursor at which the number of cursors drawn = trail_length 16 | average_speed: float = 0.2; 17 | /// Default cursor color 18 | default_color: Color; 19 | /// Max number of cursors to draw. If this limit is reached the cursor trail 20 | /// will become sparser. 21 | max_trail_length: int = 32; 22 | } 23 | 24 | root_type CursorTrailDef; 25 | -------------------------------------------------------------------------------- /schemas/lull/datastore_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | include "lull/variant_def.fbs"; 3 | 4 | namespace lull; 5 | 6 | table DatastoreDef { 7 | key_value_pairs: [KeyVariantPairDef]; 8 | } 9 | 10 | root_type DatastoreDef; 11 | -------------------------------------------------------------------------------- /schemas/lull/fpl_mesh_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Specifies the FPLMesh to use for the model of an entity. 6 | table FplMeshDef { 7 | /// The render pass to use for rendering the model. A value of 0 uses the 8 | /// default render pass. 9 | pass: uint = 0 (hashvalue); 10 | 11 | /// The filename/path to the fplmesh file. 12 | filename: string; 13 | } 14 | -------------------------------------------------------------------------------- /schemas/lull/gltf_asset_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Specifies the model of an entity. 6 | table GltfAssetDef { 7 | /// The filename/path to the gltf asset file. 8 | filename: string; 9 | } 10 | -------------------------------------------------------------------------------- /schemas/lull/linear_grabbable_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Constrains the translation of the entity to a line defined in either world 6 | /// or object-local coordinates. The position of the line is defined at runtime 7 | /// as the point of initial grab. 8 | table LinearGrabbableDef { 9 | /// Direction of the line constraint. Origin will be defined at runtime by 10 | /// where the object is grabbed. 11 | direction: Vec3 (native_default:"{1.0f, 0.0f, 0.0f}"); 12 | /// Whether the direction is defined in the entity's local space. 13 | local_orientation: bool = false; 14 | } 15 | 16 | root_type LinearGrabbableDef; 17 | -------------------------------------------------------------------------------- /schemas/lull/mutator_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// If the mutation needs a reference, use one of these spaces. 6 | enum MutateSpace: int { 7 | /// The entity's current local space, including any lower order mutations. 8 | Mutated, 9 | 10 | /// The entity's parent's space, or world space if the entity has no parent. 11 | Parent, 12 | 13 | /// World space. 14 | World 15 | } 16 | -------------------------------------------------------------------------------- /schemas/lull/name_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Specifies the name of an entity, so the entity can be retrieved by that name 6 | /// from the NameSystem. 7 | table NameDef { 8 | name: string; 9 | } 10 | 11 | root_type NameDef; 12 | -------------------------------------------------------------------------------- /schemas/lull/pano_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Defines a stereo panorama to render. 6 | table PanoDef { 7 | /// DEPRECATED. Left here for backwards compatibility. 8 | deprecated: [string]; 9 | /// The radius to the sphere that the pano is rendered on. This only applies 10 | /// to the Ion render system backend. 11 | radius: float; 12 | /// An optional adjustment to the viewer's starting orientation. Corresponds 13 | /// to a right-handed rotation of the pano about the viewer's up axis. 14 | heading_offset_deg: float; 15 | /// A pano file represented as over-under stereo images. Webp is supported for 16 | /// both the Ion and FPL render system backends. When using FPL however, a 17 | /// non-progressive JPEG will provide better performance. 18 | filename: string; 19 | } 20 | 21 | root_type PanoDef; 22 | -------------------------------------------------------------------------------- /schemas/lull/physics_shape_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | include "lull/physics_shapes.fbs"; 3 | 4 | namespace lull; 5 | 6 | /// Attaches shapes to this entity that can be raycast or used for physics. 7 | table PhysicsShapeDef { 8 | shapes: [PhysicsShapePart]; 9 | } -------------------------------------------------------------------------------- /schemas/lull/planar_grab_input_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Collide the reticle ray with the provided plane and place the grabbed 6 | /// entity at the collision point. 7 | table PlanarGrabInputDef { 8 | /// Orientation of the plane. Position will be defined at runtime by where 9 | /// the object is grabbed. 10 | normal: Vec3 (native_default:"{0.0f, 0.0f, -1.0f}"); 11 | 12 | /// Angle in degrees that the controller can diverge from the actual entity 13 | /// before the grab is canceled 14 | break_angle: float = 30; 15 | } 16 | 17 | root_type PlanarGrabInputDef; 18 | -------------------------------------------------------------------------------- /schemas/lull/planar_grabbable_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Constrains the translation of the entity to a plane defined in either world 6 | /// or object-local coordinates. The position of the plane is defined at runtime 7 | /// as the point of initial grab. 8 | table PlanarGrabbableDef { 9 | /// Orientation of the plane. Position will be defined at runtime by where 10 | /// the object is grabbed. 11 | normal: Vec3 (native_default:"{0.0f, 0.0f, -1.0f}"); 12 | /// Whether the orientation is defined in the entity's local space. 13 | local_orientation: bool = false; 14 | } 15 | 16 | root_type PlanarGrabbableDef; 17 | -------------------------------------------------------------------------------- /schemas/lull/render_pass_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | include "lull/render_state_def.fbs"; 3 | include "lull/sort_mode.fbs"; 4 | 5 | namespace lull; 6 | 7 | // Properties of a render pass object. Render passes contain entities to be 8 | // renderered. 9 | table RenderPassDef { 10 | // Name of the render pass. 11 | name: string; 12 | 13 | // Default render state to be used when materials do not define an explicit 14 | // state. 15 | render_state: RenderState; 16 | 17 | // Sort mode to be used for determining the order in which to render objects 18 | // contained within this pass. 19 | sort_mode: SortMode = None; 20 | 21 | // Name of render target to be used when rendering this pass. Not specifying a 22 | // target will draw directly to the display. 23 | render_target_ref: string; 24 | } 25 | -------------------------------------------------------------------------------- /schemas/lull/render_target_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | // Format options for texture render targets. 6 | enum TextureFormat : ushort { 7 | None, 8 | A8, 9 | R8, 10 | RGB8, 11 | RGBA8, 12 | Depth16, 13 | Depth32F 14 | } 15 | 16 | // Format options for the depth/stencil buffer. 17 | enum DepthStencilFormat : ushort { 18 | None, 19 | Depth16, 20 | Depth24, 21 | Depth32F, 22 | Depth24Stencil8, 23 | Depth32FStencil8, 24 | Stencil8, 25 | } 26 | 27 | // Definition of a render target texture. 28 | table RenderTargetDef { 29 | // Name of the render target, to be used when attaching to a pass or binding 30 | // as a texture. 31 | name: string; 32 | 33 | // Resolution of the render target. 34 | size: Vec2i; 35 | 36 | // Format for the render target texture. 37 | texture_format: TextureFormat = RGBA8; 38 | 39 | // Format for the depth stencil buffer, if used (None = unused). 40 | depth_stencil_format: DepthStencilFormat = None; 41 | } 42 | -------------------------------------------------------------------------------- /schemas/lull/reticle_boundary_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// The reticle boundary is defined in vertical and horizontal direction 6 | /// separately. The bounded reticle movement will not exceed 7 | /// [horizontal.x, horizontal.y] in x axis, and [vertical.x, vertical.y] 8 | /// in y axis. If the vertical boundary is not defined, then the vertical 9 | /// movement will not be bounded and use absolution pitch orientation. 10 | /// Otherwise, both horizontal and vertical movement will be relatvie and 11 | /// bounded. The horizontal boundary should always be defined. Note this 12 | /// boundary is defined on z = 0 plane, and any transformation on the entity 13 | /// will be applied and might affect the actual boundary in world space. 14 | table ReticleBoundaryDef { 15 | /// Define the boundary (min, max) with (vec2.x, vec2.y). 16 | vertical: Vec2; 17 | horizontal: Vec2; 18 | } 19 | -------------------------------------------------------------------------------- /schemas/lull/reticle_trail_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Configures the reticle trail. 6 | /// In case of changing any of these values, please update reticle_template.fbs. 7 | table ReticleTrailDef { 8 | 9 | /// The number of reticles to draw in the trail by default 10 | average_trail_length: int = 14; 11 | /// The size of the reticle quad 12 | quad_size: float = 0.05; 13 | /// The number of samples from which to create the interpolating curve 14 | curve_samples: int = 4; 15 | /// Speed of the cursor at which the number of reticles drawn = trail_length 16 | average_speed: float = 0.2; 17 | /// Default reticle color 18 | default_color: Color; 19 | /// Max number of reticles to draw. If this limit is reached the reticle trail 20 | /// will become sparser. 21 | max_trail_length: int = 32; 22 | } 23 | 24 | root_type ReticleTrailDef; 25 | -------------------------------------------------------------------------------- /schemas/lull/skeleton_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Describes the skeleton used by the RigSystem to handle skinned animations. 6 | table SkeletonDef { 7 | /// The names of each bone in the skeleton. Each bone in the skeleton can 8 | /// be uniquely identified by an index into this array. 9 | bone_names: [string]; 10 | 11 | /// Effectively a map of a bone to its parent bone. 12 | bone_parents: [ubyte]; 13 | 14 | /// For information on how the matrices below are used for skinning, see 15 | /// RigSystem::UpdateShaderTransforms(). 16 | 17 | /// The "inverse bind matrices" for each bone. Transforms from mesh space to 18 | /// bone space so that skinning may be applied. 19 | bone_transforms: [Mat4x3]; 20 | 21 | root_transforms: [Mat4x3] (deprecated); 22 | object_from_mesh: Mat4x3 (deprecated); 23 | } 24 | -------------------------------------------------------------------------------- /schemas/lull/slideshow_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | include "lull/dispatcher_def.fbs"; 3 | 4 | namespace lull; 5 | 6 | /// A slideshow entity holds onto multiple children that it will take turns 7 | /// showing one at a time. It will animate its Aabb to match the size of the 8 | /// shown child. The first child will automatically be shown at the start. 9 | table SlideshowDef { 10 | /// Events that will cause a "ShowSlideshow" event to be sent to the next 11 | /// child and a "HideSlideshow" event to be send to the current shown child. 12 | show_next_events: [EventDef]; 13 | /// Time to play the Aabb transition animation in milliseconds. 14 | show_next_transition_ms: int; 15 | } 16 | 17 | root_type SlideshowDef; 18 | -------------------------------------------------------------------------------- /schemas/lull/snap_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Any entity can be handed off to the snap system to be animated to the 6 | /// nearest snap target. However, a SnappableDef component can optionally be 7 | /// added to an entity to further configure the snapping behavior of a given 8 | table SnappableDef { 9 | /// Time (in milliseconds) taken to animate to snap position. 10 | time_ms: int = -1; 11 | 12 | /// Name of the target group to snap to. The closest snap target in the group 13 | /// will be chosen at runtime. 14 | target_group: string; 15 | } 16 | 17 | /// Marks an entity as a snap target. Other entities can be animated to this 18 | /// entity's position. 19 | table SnapTargetDef { 20 | /// Name of the group this target belongs to. 21 | group: string; 22 | } 23 | 24 | root_type SnapTargetDef; 25 | -------------------------------------------------------------------------------- /schemas/lull/spatial_grab_input_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Transform the grabbed entity with a device, with a fixed sqt offset from the 6 | /// device's sqt. 7 | table SpatialGrabInputDef { 8 | /// Angle in degrees that the controller can diverge from the actual entity 9 | /// before the grab is canceled. 10 | break_angle: float = 30; 11 | 12 | /// Indicates whether the sqt offset between the device and the entity should 13 | /// be set to the actual sqt offset on grab start, i.e. so that the grabbed 14 | /// entity does not jump when grabbed. 15 | set_grab_offset_on_start: bool = true; 16 | 17 | /// The sqt offset of the entity from the device during grab. Overridden on 18 | /// grab start unless |set_grab_offset_on_start| set to false. See 19 | /// TransformDef for mathematical definitions of these fields. 20 | position: Vec3; 21 | rotation: Vec3; 22 | scale: Vec3 (native_default:"{1.f, 1.f, 1.f}"); 23 | 24 | } 25 | 26 | root_type SpatialGrabInputDef; 27 | -------------------------------------------------------------------------------- /schemas/lull/spherical_grab_input_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Translate the grabbed entity with a device, with a fixed distance from 6 | /// entity's origin to the grabbing sphere center. 7 | table SphericalGrabInputDef { 8 | /// The grabbing sphere center in world space. This value will be overridden 9 | /// by actual HMD position if |move_with_hmd| is set true. 10 | sphere_center: Vec3 (native_default:"{0.f, 0.f, 0.f}"); 11 | 12 | /// Indicates whether to keep the grabbing offset. If it is false, an entity 13 | /// will be grabbed by its origin. If it is true, it will be grabbed by the 14 | /// cursor position when the grabbing is started. 15 | keep_grab_offset: bool = true; 16 | 17 | /// Indicates whether the grab sphere moves with HMD. 18 | move_with_hmd: bool = false; 19 | 20 | /// Indicates whether to hide cursor during grabbing. 21 | hide_cursor: bool = false; 22 | 23 | /// Indicates whether to hide laser during grabbing. 24 | hide_laser: bool = false; 25 | } 26 | -------------------------------------------------------------------------------- /schemas/lull/stategraph_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// The StategraphSystem is responsible for advancing and tracking the progress 6 | /// of an entity within a stategraph. 7 | /// 8 | /// A stategraph is a collection of states and transitions that allows entity 9 | /// animations to be played and transitioned at a higher level. Instead of 10 | /// focusing on the specific animation to play at a given time, the logic of 11 | /// playing and transitioning animations is encoded in a graph. Users of the 12 | /// StategraphSystem can then issue requests to transition to a target state 13 | /// (eg. idle, walk, jump, etc.), and all the logic of how to reach that target 14 | /// state will be handled by the StategraphSystem. 15 | table StategraphDef { 16 | /// The path to the stategraph to use for this entity. 17 | animation_stategraph: string; 18 | 19 | /// The first state within the stategraph at which to start. 20 | initial_state: uint (hashvalue); 21 | } 22 | -------------------------------------------------------------------------------- /schemas/lull/texture_atlas_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | table TextureAtlasDef { 6 | /// Textures in different groups won't be atlased together. Required. 7 | group: string; 8 | /// Filename of texture to load. Optional. 9 | texture: string; 10 | /// Atlas size. Must match size across all defs in group. Required. 11 | size: Vec2i; 12 | /// Max number of textures. Must match across all defs in group. Optional. 13 | max_slices: int = 1; 14 | } 15 | -------------------------------------------------------------------------------- /schemas/lull/vertex_attribute_def.fbs: -------------------------------------------------------------------------------- 1 | include "lull/lull_common.fbs"; 2 | 3 | namespace lull; 4 | 5 | /// Defines how data in a vertex is interpreted by the shader. 6 | enum VertexAttributeUsage : int { 7 | Invalid, 8 | Position, 9 | Color, 10 | TexCoord, 11 | Normal, 12 | Tangent, 13 | Orientation, 14 | BoneIndices, 15 | BoneWeights, 16 | } 17 | 18 | /// Defines the data structure of a single attribute in a vertex. Each type is 19 | /// assumed to be 4-byte aligned. 20 | enum VertexAttributeType : int { 21 | Empty, 22 | Scalar1f, 23 | Vec2f, 24 | Vec3f, 25 | Vec4f, 26 | Vec2us, 27 | Vec4us, 28 | Vec4ub, 29 | } 30 | 31 | /// Describes a single attribute in vertex format. 32 | struct VertexAttribute { 33 | usage: VertexAttributeUsage = Invalid; 34 | type: VertexAttributeType = Empty; 35 | } 36 | -------------------------------------------------------------------------------- /third_party/assimp/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "assimp_config", 9 | hdrs = [ 10 | "config.h", 11 | "revision.h", 12 | ], 13 | includes = [ 14 | ".", 15 | "..", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /third_party/assimp/revision.h: -------------------------------------------------------------------------------- 1 | #ifndef ASSIMP_REVISION_H_INC 2 | #define ASSIMP_REVISION_H_INC 3 | 4 | #define GitVersion 0xe89c811b 5 | #define GitBranch "4.1.0" 6 | 7 | #endif // ASSIMP_REVISION_H_INC 8 | -------------------------------------------------------------------------------- /third_party/flatbuffers/BUILD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/lullaby/18d76bee62014057d5f5547d7e87f9508a90bcb9/third_party/flatbuffers/BUILD -------------------------------------------------------------------------------- /third_party/freetype2/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "config", 9 | hdrs = [ 10 | "ftconfig.h", 11 | "ftmodule.h", 12 | ], 13 | includes = ["."], 14 | ) 15 | -------------------------------------------------------------------------------- /third_party/gl/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "gl", 9 | linkopts = ["-lGL"], 10 | ) 11 | -------------------------------------------------------------------------------- /third_party/harfbuzz/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "config", 9 | hdrs = [ 10 | "config.h", 11 | "hb-buffer-deserialize-json.hh", 12 | "hb-buffer-deserialize-text.hh", 13 | "hb-ot-shape-complex-indic-machine.hh", 14 | "hb-ot-shape-complex-myanmar-machine.hh", 15 | "hb-ot-shape-complex-use-machine.hh", 16 | "hb-version.h", 17 | "unicodedata_db.h", 18 | ], 19 | includes = ["."], 20 | ) 21 | -------------------------------------------------------------------------------- /third_party/libfbx/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "libfbx", 7 | srcs = select({ 8 | "@bazel_tools//src/conditions:darwin": [ 9 | "FBX_SDK_ROOT/lib/clang/release/libfbxsdk.a", 10 | ], 11 | "//conditions:default": [ 12 | "FBX_SDK_ROOT/lib/gcc4/release/libfbxsdk.a", 13 | ], 14 | }), 15 | hdrs = [ 16 | "FBX_SDK_ROOT/include/fbxsdk.h", 17 | ] + glob([ 18 | "FBX_SDK_ROOT/include/fbxsdk/**/*.h", 19 | ]), 20 | includes = [ 21 | ".", 22 | "FBX_SDK_ROOT/include", 23 | ], 24 | linkopts = [ 25 | "-ldl", 26 | "-pthread", 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /third_party/libfbx/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Contents of libfbx BUILD file used by local_repository_env rule.""" 2 | 3 | FBX_BUILD_FILE_CONTENTS = """ 4 | package( 5 | default_visibility = ["//visibility:public"], 6 | ) 7 | 8 | cc_library( 9 | name = "libfbx", 10 | srcs = select({ 11 | "@bazel_tools//src/conditions:darwin": [ 12 | "FBX_SDK_ROOT/lib/clang/release/libfbxsdk.a" 13 | ], 14 | "//conditions:default": [ 15 | "FBX_SDK_ROOT/lib/gcc4/release/libfbxsdk.a" 16 | ] 17 | }), 18 | hdrs = [ 19 | "FBX_SDK_ROOT/include/fbxsdk.h" 20 | ] + glob([ 21 | "FBX_SDK_ROOT/include/fbxsdk/**/*.h" 22 | ]), 23 | includes = [ 24 | "FBX_SDK_ROOT/include", 25 | "." 26 | ], 27 | linkopts = [ 28 | "-ldl", 29 | "-pthread", 30 | ] 31 | ) 32 | """ 33 | -------------------------------------------------------------------------------- /third_party/libjpeg_turbo/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "config", 9 | hdrs = [ 10 | "jconfig.h", 11 | "jconfigint.h", 12 | ], 13 | includes = [ 14 | ".", 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /third_party/libjpeg_turbo/jconfigint.h: -------------------------------------------------------------------------------- 1 | /* jconfigint.h. Generated from jconfigint.h.in by configure. */ 2 | /* libjpeg-turbo build number */ 3 | #define BUILD "20171114" 4 | 5 | /* Compiler's inline keyword */ 6 | /* #undef inline */ 7 | 8 | /* How to obtain function inlining. */ 9 | #define INLINE __inline 10 | 11 | /* Define to the full name of this package. */ 12 | #define PACKAGE_NAME "libjpeg-turbo" 13 | 14 | /* Version number of package */ 15 | #define VERSION "1.5.2" 16 | 17 | /* The size of `size_t', as computed by sizeof. */ 18 | #define SIZEOF_SIZE_T 8 19 | -------------------------------------------------------------------------------- /third_party/libpng/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "config", 9 | hdrs = [ 10 | "config.h", 11 | "pnglibconf.h", 12 | ], 13 | includes = ["."], 14 | ) 15 | -------------------------------------------------------------------------------- /third_party/stb_image_resize/BUILD: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | cc_library( 8 | name = "stb_image_resize", 9 | srcs = [ 10 | "stb_image_resize.c", 11 | ], 12 | includes = ["."], 13 | deps = [ 14 | "@stb", 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /third_party/stb_image_resize/stb_image_resize.c: -------------------------------------------------------------------------------- 1 | #define STB_IMAGE_RESIZE_IMPLEMENTATION 2 | #include "stb_image_resize.h" 3 | --------------------------------------------------------------------------------