Commit graph

405 commits

Author SHA1 Message Date
Carter Anderson
cb6638ba06 props: add support for tuple structs 2020-05-25 16:35:46 -07:00
Carter Anderson
f0f0e3c1a8 move component registry to its own crate. automatically register asset handles 2020-05-25 14:51:38 -07:00
Carter Anderson
0826d74163 props: remove specialization, ignore fields, impl for Handle, fix world round tripping 2020-05-25 12:03:50 -07:00
Carter Anderson
1cd3b4c987 props: add type peeking to ron, support arbitrary property types 2020-05-24 19:36:01 -07:00
Carter Anderson
b7305046cf remove SerializableProperties wrapper struct 2020-05-23 22:39:23 -07:00
Carter Anderson
4c306e6d48 props: migrate scenes to props. loading / saving worlds from / to props. 2020-05-23 22:07:17 -07:00
Carter Anderson
f36a67ee96 props: support nesting 2020-05-23 12:26:13 -07:00
Carter Anderson
284afd4f94 props: deserialize (no nesting yet) 2020-05-22 19:01:48 -07:00
Carter Anderson
6e31b90ec3 upgrade ron and use decimal fork 2020-05-22 18:07:26 -07:00
Carter Anderson
f1d58609d5 add text label to ui example. fix 0x0 label textures 2020-05-22 17:07:14 -07:00
Carter Anderson
159acf52af props: rename prop/props to property/properties
its longer but a bit clearer
2020-05-22 15:36:48 -07:00
Carter Anderson
e514bd14fe props: dynamic casting. reorganize 2020-05-22 15:25:31 -07:00
Carter Anderson
da8daa051b props: derive, get/set, example 2020-05-21 23:58:11 -07:00
Carter Anderson
9368242013 scene: require clone for registered components 2020-05-21 18:51:03 -07:00
Carter Anderson
38669107c9 upgrade legion 2020-05-21 17:59:33 -07:00
Carter Anderson
d920100d35 scenes: deserialization and refactor 2020-05-21 17:21:33 -07:00
Carter Anderson
553b754492 scenes: datatype and serialization 2020-05-20 10:40:23 -07:00
Carter Anderson
fb140ce4b0 remove tag serialization. round trip ron example 2020-05-19 13:22:14 -07:00
Carter Anderson
3710196fdb remove type_uuid from serialization 2020-05-19 12:55:58 -07:00
Carter Anderson
dcdd552365 pull in ron. use static strings for types 2020-05-19 12:20:37 -07:00
Carter Anderson
8bc0eb45ee print average fps and smooth out average a little bit 2020-05-18 14:53:57 -07:00
Carter Anderson
33d4d5f562 Add asset removal. Clean up old/removed meshes 2020-05-17 18:48:14 -07:00
Carter Anderson
86c18edbfd Label component 2020-05-17 18:09:29 -07:00
Carter Anderson
e093a3243b phrasing tweaks 2020-05-17 10:30:52 -07:00
Carter Anderson
870f715df3 Hot asset reloading 2020-05-16 20:18:30 -07:00
Carter Anderson
b1f07e3749 cargo fmt 2020-05-16 00:27:30 -07:00
Carter Anderson
fcc0a6303b update mesh on gpu when it changes 2020-05-16 00:21:04 -07:00
Carter Anderson
5d0d3d28c7 TextPlugin + FontLoader 2020-05-15 19:46:09 -07:00
Carter Anderson
bf7f222318 Support async texture loading 2020-05-15 19:30:02 -07:00
Carter Anderson
35adad6556 Async mesh loading works 2020-05-15 17:22:45 -07:00
Carter Anderson
4e1abea161 AssetServer: multithreaded sync/async asset loading 2020-05-15 16:55:44 -07:00
Carter Anderson
8a61ef48d3 use relative paths for assets 2020-05-14 15:25:43 -07:00
Carter Anderson
2bcb8a2a41 cargo fmt 2020-05-13 18:05:18 -07:00
Carter Anderson
6381611e89 Resource -> Res, Ref->Com 2020-05-13 17:57:08 -07:00
Carter Anderson
fb8f9e8636 RenderGraph::add_node now requires a name 2020-05-13 17:35:48 -07:00
Carter Anderson
06f3a4efb9 Use system fns for all setup code 2020-05-13 17:31:56 -07:00
Carter Anderson
70f122b92a Rename AssetStorage to Assets 2020-05-13 16:45:18 -07:00
Carter Anderson
b58db0749e use init_resource everywhere 2020-05-13 16:35:38 -07:00
Carter Anderson
16b568e00e Asset events and AddAsset builder 2020-05-13 16:17:44 -07:00
Carter Anderson
c18ecf2a55 initial text rendering 2020-05-13 13:22:12 -07:00
Carter Anderson
73cc20768c remove pathfinder code
its not ready yet so it shouldnt be on master :)
2020-05-12 16:35:49 -07:00
Carter Anderson
35e1d8b498 pathfinder: more backend work. it now renders the clear color without crashing 2020-05-11 09:01:31 -07:00
Carter Anderson
75614f5084 Ui depth from parent (falls back to insertion order for orphans), do ui rect size offsets before rendering, 2020-05-06 13:49:07 -07:00
Carter Anderson
c5ca59dc4d cargo fmt 2020-05-05 18:44:32 -07:00
Carter Anderson
7560ecf9d8 correct "its" 2020-05-04 14:18:46 -07:00
Carter Anderson
4735c68ab4 add diagnostic examples 2020-05-04 14:14:49 -07:00
Carter Anderson
704a742661 Print diagnostics plugin 2020-05-04 13:42:49 -07:00
Carter Anderson
ea16f6fc56 frame time diagnostic plugin 2020-05-04 13:21:14 -07:00
Carter Anderson
6f32d18dc5 diagnostic filtering 2020-05-04 11:43:21 -07:00
Carter Anderson
ba795fdfb5 "fix" ui_bench 2020-05-04 11:06:02 -07:00
Carter Anderson
916978307b fix anchor descriptions 2020-05-04 11:03:52 -07:00
Carter Anderson
076fef873a Anchor constants 2020-05-04 11:02:04 -07:00
Carter Anderson
dcc34473e5 sprites 2020-05-04 01:23:40 -07:00
Carter Anderson
1056b79abf ui textures 2020-05-03 23:49:45 -07:00
Carter Anderson
291b948b61 fix "ui_bench" 2020-05-03 19:32:27 -07:00
Carter Anderson
d50313c285 ui is back! 2020-05-03 19:30:31 -07:00
Carter Anderson
a4fe37add1 add plugin example 2020-05-03 01:30:10 -07:00
Carter Anderson
ff0db0df14 quality pass on ecs_guide 2020-05-03 00:48:36 -07:00
Carter Anderson
2fb9e115ff Make ecs_guide a "real game" 2020-05-03 00:21:32 -07:00
Carter Anderson
71a4503df1 Move ecs_guide main function to the end of the file 2020-05-02 18:32:23 -07:00
Carter Anderson
355e219608 begin porting ui to new render graph 2020-05-02 17:56:30 -07:00
Carter Anderson
fd97bb7bc7 fix showcase script 2020-05-01 13:55:07 -07:00
Carter Anderson
7b79b3de8d organize examples and add ecs guide 2020-05-01 13:12:47 -07:00
Carter Anderson
5458c6daf4 port a few more systems to functions and add some name clarity 2020-05-01 01:37:20 -07:00
Carter Anderson
3e3ab92ff5 cargo fmt 2020-04-30 22:30:51 -07:00
Carter Anderson
2447672c63 adapt examples to use system functions and state pattern 2020-04-30 13:52:11 -07:00
Carter Anderson
98f9639050 FromResource and derive macro 2020-04-30 13:26:01 -07:00
Carter Anderson
4923ac02de remove entity builder example 2020-04-30 12:28:41 -07:00
Carter Anderson
3cdee1b8ad system_fn named/id/anon. add "more-system-fn" cargo feature 2020-04-30 12:22:35 -07:00
Carter Anderson
2047f9c0d9 Add command encoder system variants 2020-04-30 10:42:22 -07:00
Carter Anderson
03e8c1caf7 flat system functions w/ arbitary resource inputs 2020-04-29 20:05:13 -07:00
Carter Anderson
45a710fe6a cargo fmt 2020-04-29 01:37:54 -07:00
Carter Anderson
9230c370ba Implement IntoSystem trait for flat functions using macros 2020-04-28 23:02:21 -07:00
Carter Anderson
f1a03a7a3a some system_fn renaming and add system examples 2020-04-28 13:46:07 -07:00
Carter Anderson
713c4a6056 move system function constructors to System 2020-04-28 11:25:24 -07:00
Carter Anderson
9a3700d8f1 Change events.iter(&mut reader) to reader.iter(&events) 2020-04-28 10:59:42 -07:00
Carter Anderson
92182060a9 add app builder shorthand for system function 2020-04-28 02:52:26 -07:00
Carter Anderson
092f3888ca Resource system functions 2020-04-28 02:31:01 -07:00
Carter Anderson
d5dcc96c39 "functions as systems" 2020-04-28 01:00:30 -07:00
Carter Anderson
57109f8726 remove broken instancing example 2020-04-24 18:58:54 -07:00
Carter Anderson
115a009c16 cargo fmt 2020-04-24 18:55:15 -07:00
Carter Anderson
057ad97a46 fix dynamic plugin example 2020-04-24 18:23:37 -07:00
Carter Anderson
791c475354 RenderGraph2: Finish porting, refactor, cleanup 2020-04-24 17:46:54 -07:00
Carter Anderson
3c83e34cc1 re-enable opt=3 for debug 2020-04-19 22:31:14 -07:00
Carter Anderson
1143f16743 model loading works! 2020-04-19 19:29:33 -07:00
Carter Anderson
7fe2288814 pipeline specialization (support different primitive topologies within the same pipeline) 2020-04-19 19:06:41 -07:00
Carter Anderson
e59693fe67 exit events and systems 2020-04-19 12:13:04 -07:00
Carter Anderson
649ffebb7f New Mesh implementation (adapts to arbitrary vertex descriptors). Initial gltf model loading. 2020-04-19 10:08:47 -07:00
Carter Anderson
dcd71d1b72 Rework AppBuilder system interfaces. Remove setup() in favor of startup_system 2020-04-15 19:42:17 -07:00
Carter Anderson
837e1dc139 Port remaining functionality to RenderContext and remove Renderer 2020-04-12 14:47:41 -07:00
Carter Anderson
1d44b4034f asset handle batcher system 2020-04-12 00:54:51 -07:00
Carter Anderson
b9f4c0a53b move shader defs updates to their own systems. make UniformResourceProvider::update World read-only 2020-04-11 20:27:46 -07:00
Carter Anderson
394b7ce940 RenderContext, RenderResourceContext and wgpu implementations 2020-04-11 18:40:30 -07:00
Carter Anderson
f2b2065fbe make CommandBufferBuilder non-consuming 2020-04-07 13:29:11 -07:00
Carter Anderson
2565a69230 make WorldBuilder non-consuming 2020-04-07 13:25:01 -07:00
Carter Anderson
bd97da3a51 Add comments to examples and fix example_showcase script timing 2020-04-06 21:33:18 -07:00
Carter Anderson
574bc93e4f expand top level crate docs slightly and add hello world example 2020-04-06 17:39:06 -07:00
Carter Anderson
0af36cfaed make every bevy dependency optional in bevy crate 2020-04-06 17:03:21 -07:00
Carter Anderson
b5d78477cf cargo fmt 2020-04-06 16:15:59 -07:00
Carter Anderson
683a70d8e7 add SchedulePlans 2020-04-06 01:57:00 -07:00
Carter Anderson
686e1422db Crate-ify (almost) everything 2020-04-05 20:19:02 -07:00
Carter Anderson
0202dcb009 Use type_name as plugin name default 2020-04-05 14:12:14 -07:00
Carter Anderson
6d53100ff3 mouse motion 2020-04-05 00:32:53 -07:00
Carter Anderson
ec65cfef4a Add mouse input 2020-04-04 23:42:39 -07:00
Carter Anderson
f089df3a49 keyboard input events 2020-04-04 14:59:49 -07:00
Carter Anderson
4c3af427e9 dont force static lifetime on appplugin string 2020-04-04 13:00:52 -07:00
Carter Anderson
ef8c85f0c7 cargo fmt 2020-04-04 12:43:16 -07:00
Carter Anderson
5cbf606ef7 make window its own plugin and rename add_defaults to add_default_plugins 2020-04-04 12:40:32 -07:00
Carter Anderson
f6f8ba2cb6 Document and test Events. Rename EventHandle to EventReader. Fix buffer indexing. Customizable bevy path for proc macros 2020-03-31 18:04:54 -07:00
Carter Anderson
70b4100132 using consistent system naming conventions 2020-03-30 15:51:41 -07:00
Carter Anderson
dcb292e00a quad uses size. polish examples 2020-03-30 15:44:29 -07:00
Carter Anderson
29bbc05eae add support for multiple windows 2020-03-30 14:53:32 -07:00
Carter Anderson
7c121563db headless apps 2020-03-30 11:52:33 -07:00
Carter Anderson
13da707aee add event example 2020-03-29 23:51:13 -07:00
Carter Anderson
d8e7a3dcca fix material shader example 2020-03-29 01:34:08 -07:00
Carter Anderson
3d261f72de move plugin to app module 2020-03-29 01:15:47 -07:00
Carter Anderson
ec84a33b43 everything is a plugin
... well almost everything
2020-03-28 23:18:33 -07:00
Carter Anderson
ed9eb88835 only create wgpu swap chain when surface is ready 2020-03-28 13:57:41 -07:00
Carter Anderson
26ff878469 add default diagnostics wait time 2020-03-28 13:55:55 -07:00
Carter Anderson
92c421b5e1 add empty_defaults example 2020-03-27 18:00:21 -07:00
Carter Anderson
93bf728475 new Diagnostics system 2020-03-27 15:03:47 -07:00
Carter Anderson
e523dc92d8 shader_def: use to_upper instead of to_screaming_snake 2020-03-25 13:24:17 -07:00
Carter Anderson
a0fa4d2d79 cargo fmt 2020-03-22 11:06:08 -07:00
Carter Anderson
eaff311a80 simplify render graph builder interface 2020-03-22 03:06:08 -07:00
Carter Anderson
c6d7402318 add bevy_derive to prelude 2020-03-22 01:33:53 -07:00
Carter Anderson
5d893a83f2 remove unneeded light rotation 2020-03-22 01:16:29 -07:00
Carter Anderson
c9aec26f88 CommandBufferBuilder and setup systems 2020-03-21 22:35:57 -07:00
Carter Anderson
d2e160d44a refactor cameras. add defaults 2020-03-21 21:55:33 -07:00
Carter Anderson
fb496a6172 validate VertexBufferDescriptors and fill in blanks when possible 2020-03-21 21:10:58 -07:00
Carter Anderson
a4eed18800 RenderGraph is now a Resource. RenderGraph owns vertex buffer descriptors. Assorted cleanup 2020-03-21 19:57:59 -07:00
Carter Anderson
7660b8bf3f batched resource creation, vertex buffer macro 2020-03-21 18:12:30 -07:00
Carter Anderson
ae0d5abf45 use RenderResourceAssignments in place of Entity 2020-03-20 17:49:29 -07:00
Carter Anderson
71d091e10c entities with renderable.is_instanced are now removed from normal rendering 2020-03-20 16:58:21 -07:00
Carter Anderson
cbba656f16 replace appbuilder::new() with app::build() 2020-03-20 16:35:19 -07:00
Carter Anderson
9881f64715 cargo fmt 2020-03-20 12:47:33 -07:00
Carter Anderson
04590de678 separate albedo color and make it required
I worked really hard to make ColorSource work, but sadly we need color to be instanceable and making it optional would add too much complexity. Maybe at some point in the future we can add it back. On the plus side, albedo color now modulates the albedo texture
2020-03-17 22:02:01 -07:00
Carter Anderson
28fb0fdfc8 Reflect Vertex Buffer Attributes
Must follow VertexBufferDescriptorName_AttributeName format

I_VertexBufferDescriptorName_AttributeName indicates that an attribute is instanced

Currently all attributes must be defined in shaders or offsets will be incorrect.
2020-03-17 13:20:54 -07:00
Carter Anderson
5d99f3a7e8 Add Handle<T> support to uniform resource provider. Use Handle<StandardMaterial> instead of StandardMaterial 2020-03-16 00:45:28 -07:00
Carter Anderson
63f40589e3 begin instancing work 2020-03-14 12:58:22 -07:00
Carter Anderson
56e79d5225 reorganize texture and mesh 2020-03-14 12:56:37 -07:00
Carter Anderson
ad654a3c25 add fps printer system to diagnostics mod 2020-03-11 01:44:46 -07:00
Carter Anderson
7342f96174 named pipelines (makes custom shaders easier) 2020-03-10 02:46:27 -07:00
Carter Anderson
fb4752532b rename pipelinebuilder.build() to finish() 2020-03-10 02:16:01 -07:00
Carter Anderson
807929f9e3 fix plugin example 2020-03-09 23:50:17 -07:00
Carter Anderson
99cdf56e7d add Color type 2020-03-09 23:43:40 -07:00
Carter Anderson
aa09e93980 reorganize render modules 2020-03-09 23:08:09 -07:00
Carter Anderson
440d883322 use static dispatch in add_resource_provider 2020-03-09 12:07:16 -07:00
Carter Anderson
e4550aaab2 tweak add_children 2020-03-09 02:08:27 -07:00
Carter Anderson
8eec5653b6 rename add_archetype to add_entity 2020-03-09 02:02:17 -07:00
Carter Anderson
a790332505 better parenting ergonomics in world builder 2020-03-09 02:00:59 -07:00
Carter Anderson
91a6c0d9db remove "asset scopes" now that resources are separate from world 2020-03-09 01:40:04 -07:00
Carter Anderson
f6dd6a5ca9 fix parenting example, add missing transform components, add parenting to world builder 2020-03-09 01:31:15 -07:00
Carter Anderson
9355a53980 upgrade legion (breaks plugins) 2020-03-08 23:19:07 -07:00
Carter Anderson
9d2909b43e cleanup 2020-03-08 20:29:21 -07:00
Carter Anderson
e0a1a83bc9 create entities as a separate step before starting a render pass 2020-03-08 20:06:59 -07:00
Carter Anderson
cadea8deb0 Break up wgpu renderer 2020-03-08 19:26:50 -07:00
Carter Anderson
baac7ff296 add png image loading and enable transparency 2020-03-02 20:33:46 -08:00
Carter Anderson
9d71d0d3fc clean up examples 2020-03-02 08:33:52 -08:00
Carter Anderson
22be0b3366 reset uniform count on each update (oops) 2020-03-02 08:32:15 -08:00
Carter Anderson
ca563ea1b3 fix uniform providers with different field sets 2020-03-02 00:19:28 -08:00
Carter Anderson
5154320f70 textures work! 2020-03-01 17:48:37 -08:00
Carter Anderson
9e5f4aeefc implement Copy for Handle 2020-02-23 23:50:44 -08:00
Carter Anderson
1a4bd98434 more texture work 2020-02-23 23:41:48 -08:00
Carter Anderson
f84e71d051 cargo fmt 2020-02-22 15:02:01 -08:00
Carter Anderson
2f1a0cb4a4 macros are now fully screaming snake 2020-02-18 22:59:33 -08:00
Carter Anderson
8a10c06ad5 add texture to frag shader. fix weird macro name collision bug 2020-02-18 20:26:02 -08:00
Carter Anderson
b809b22589 add ColorSource and remove test macro from StandardMaterial 2020-02-18 09:16:34 -08:00
Carter Anderson
f820e4207c add macro example to custom_shader 2020-02-18 09:06:24 -08:00
Carter Anderson
e0e0e41c33 Add "standard config" to pipeline builder 2020-02-17 20:43:50 -08:00
Carter Anderson
ad7acb111a fix custom_shader example 2020-02-17 20:23:00 -08:00
Carter Anderson
6cf981c610 use full path in macro references 2020-02-17 19:53:48 -08:00
Carter Anderson
a76b40bbb4 Fix pipeline name 2020-02-17 19:15:28 -08:00
Carter Anderson
57f798c0bd cleanup 2020-02-17 19:06:12 -08:00
Carter Anderson
6f376b5f3f remove old render graph 2020-02-17 18:36:31 -08:00
Carter Anderson
acebeb924c shader reflection for dynamic uniforms 2020-02-17 16:33:46 -08:00
Carter Anderson
c208945833 add assigned meshes render target
dynamic compiling w/ entity-specifc macros works!
2020-02-15 22:17:24 -08:00
Carter Anderson
56e5414b63 only update pipelines when macros change. better handle debug print 2020-02-15 19:00:30 -08:00
Carter Anderson
cd6ccc45b1 resolve warnings 2020-02-11 19:10:38 -08:00
Carter Anderson
f24a274a2a add renderable to render related queries 2020-02-11 19:09:05 -08:00
Carter Anderson
d58c5e7f5c tweak simple new 2020-02-11 18:54:04 -08:00
Carter Anderson
7cdc2351ba add default to MeshEntity 2020-02-11 18:29:39 -08:00
Carter Anderson
eedec80e89 add shader def fields / proc macro 2020-02-10 19:26:04 -08:00
Carter Anderson
9078b67677 add texture_new example (not working) 2020-02-09 13:53:43 -08:00
Carter Anderson
76d5f6057c add rustfmt.toml and set merge_imports to true 2020-02-09 11:42:26 -08:00
Carter Anderson
3b0b40a79d cargo fmt 2020-02-07 23:17:51 -08:00
Carter Anderson
88ecc9ed43 port ui over to new render graph 2020-02-07 22:42:30 -08:00
Carter Anderson
6d0661d299 fix lights 2020-02-05 11:02:53 -08:00
Carter Anderson
489580f688 port forward lighting and add struct + array uniforms 2020-02-05 09:59:36 -08:00
Carter Anderson
c4b10ea4f7 Continue moving uniform buffers to ResourceProviders 2020-02-03 22:13:13 -08:00
Carter Anderson
45dbe90d85 simple legacy comparison example 2020-01-29 12:49:32 -08:00
Carter Anderson
cd1fb92a7a cache bind group hashes 2020-01-28 01:53:28 -08:00
Carter Anderson
599d30d861 remove unused indices 2020-01-28 01:08:57 -08:00
Carter Anderson
0eb6c6fa74 dynamic uniform buffer info 2020-01-28 00:36:51 -08:00
Carter Anderson
6ba659049d cleanup 2020-01-27 19:36:06 -08:00
Carter Anderson
0b49557237 cleanup 2020-01-27 19:07:05 -08:00
Carter Anderson
07ba56c6cf add plane to example 2020-01-27 01:44:02 -08:00
Carter Anderson
be2a3659c7 dynamic uniforms now actually work! 2020-01-27 01:40:53 -08:00
Carter Anderson
36568d91d2 use buffers + dynamic offsets for shaderuniforms 2020-01-27 01:13:38 -08:00
Carter Anderson
d76b2b032e entity uniforms kind of work in the new render graph
but only the last entity because they all use the same buffer
2020-01-26 21:44:01 -08:00
Carter Anderson
5ca84dbde0 add new materials to example 2020-01-26 00:24:50 -08:00