From 03e905cc4d1408bcbd8417bc738b2367d284690a Mon Sep 17 00:00:00 2001 From: disdamoe Date: Sun, 17 Apr 2022 21:08:44 +0300 Subject: [PATCH] Fixed accidental indentation change --- docs/beginner/tutorial1-window/README.md | 22 +++++++------- docs/beginner/tutorial2-surface/README.md | 2 +- docs/beginner/tutorial3-pipeline/README.md | 2 +- docs/beginner/tutorial4-buffer/README.md | 2 +- docs/beginner/tutorial5-textures/README.md | 2 +- docs/beginner/tutorial6-uniforms/README.md | 2 +- docs/beginner/tutorial7-instancing/README.md | 32 ++++++++++---------- docs/beginner/tutorial8-depth/README.md | 20 ++++++------ docs/beginner/tutorial9-models/README.md | 4 +-- 9 files changed, 44 insertions(+), 44 deletions(-) diff --git a/docs/beginner/tutorial1-window/README.md b/docs/beginner/tutorial1-window/README.md index 2c4907aa..762c1569 100644 --- a/docs/beginner/tutorial1-window/README.md +++ b/docs/beginner/tutorial1-window/README.md @@ -234,17 +234,17 @@ You'll then need to run the WASM code in an ES6 Module: - - + + diff --git a/docs/beginner/tutorial2-surface/README.md b/docs/beginner/tutorial2-surface/README.md index 8a1c7651..85fcf07d 100644 --- a/docs/beginner/tutorial2-surface/README.md +++ b/docs/beginner/tutorial2-surface/README.md @@ -487,4 +487,4 @@ Modify the `input()` method to capture mouse events, and update the clear color - \ No newline at end of file + diff --git a/docs/beginner/tutorial3-pipeline/README.md b/docs/beginner/tutorial3-pipeline/README.md index ab245e1f..911f6e41 100644 --- a/docs/beginner/tutorial3-pipeline/README.md +++ b/docs/beginner/tutorial3-pipeline/README.md @@ -313,4 +313,4 @@ Create a second pipeline that uses the triangle's position data to create a colo - \ No newline at end of file + diff --git a/docs/beginner/tutorial4-buffer/README.md b/docs/beginner/tutorial4-buffer/README.md index 3adcaa1f..6bcc7ce3 100644 --- a/docs/beginner/tutorial4-buffer/README.md +++ b/docs/beginner/tutorial4-buffer/README.md @@ -444,4 +444,4 @@ Create a more complex shape than the one we made (aka. more than three triangles - \ No newline at end of file + diff --git a/docs/beginner/tutorial5-textures/README.md b/docs/beginner/tutorial5-textures/README.md index 6736488b..8fc5ff9a 100644 --- a/docs/beginner/tutorial5-textures/README.md +++ b/docs/beginner/tutorial5-textures/README.md @@ -607,4 +607,4 @@ Create another texture and swap it out when you press the space key. - \ No newline at end of file + diff --git a/docs/beginner/tutorial6-uniforms/README.md b/docs/beginner/tutorial6-uniforms/README.md index 5522a3ff..76f876e5 100644 --- a/docs/beginner/tutorial6-uniforms/README.md +++ b/docs/beginner/tutorial6-uniforms/README.md @@ -421,4 +421,4 @@ Have our model rotate on its own independently of the camera. *Hint: you'll need - \ No newline at end of file + diff --git a/docs/beginner/tutorial7-instancing/README.md b/docs/beginner/tutorial7-instancing/README.md index f71aaba8..c5280cf8 100644 --- a/docs/beginner/tutorial7-instancing/README.md +++ b/docs/beginner/tutorial7-instancing/README.md @@ -127,11 +127,11 @@ Now that we have our data, we can create the actual `instance_buffer`. ```rust let instance_data = instances.iter().map(Instance::to_raw).collect::>(); let instance_buffer = device.create_buffer_init( -&wgpu::util::BufferInitDescriptor { -label: Some("Instance Buffer"), -contents: bytemuck::cast_slice(&instance_data), -usage: wgpu::BufferUsages::VERTEX, -} + &wgpu::util::BufferInitDescriptor { + label: Some("Instance Buffer"), + contents: bytemuck::cast_slice(&instance_data), + usage: wgpu::BufferUsages::VERTEX, + } ); ``` @@ -183,13 +183,13 @@ We need to add this descriptor to the render pipeline so that we can use it when ```rust let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { -// ... -vertex: wgpu::VertexState { -// ... -// UPDATED! -buffers: &[Vertex::desc(), InstanceRaw::desc()], -}, -// ... + // ... + vertex: wgpu::VertexState { + // ... + // UPDATED! + buffers: &[Vertex::desc(), InstanceRaw::desc()], + }, + // ... }); ``` @@ -197,10 +197,10 @@ Don't forget to return our new variables! ```rust Self { -// ... -// NEW! -instances, -instance_buffer, + // ... + // NEW! + instances, + instance_buffer, } ``` diff --git a/docs/beginner/tutorial8-depth/README.md b/docs/beginner/tutorial8-depth/README.md index dcb5a43c..3ee5c043 100644 --- a/docs/beginner/tutorial8-depth/README.md +++ b/docs/beginner/tutorial8-depth/README.md @@ -141,15 +141,15 @@ The last change we need to make is in the `render()` function. We've created the ```rust let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { -// ... -depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { -view: &self.depth_texture.view, -depth_ops: Some(wgpu::Operations { -load: wgpu::LoadOp::Clear(1.0), -store: true, -}), -stencil_ops: None, -}), + // ... + depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { + view: &self.depth_texture.view, + depth_ops: Some(wgpu::Operations { + load: wgpu::LoadOp::Clear(1.0), + store: true, + }), + stencil_ops: None, + }), }); ``` @@ -163,4 +163,4 @@ Since the depth buffer is a texture, we can sample it in the shader. Because it' - \ No newline at end of file + diff --git a/docs/beginner/tutorial9-models/README.md b/docs/beginner/tutorial9-models/README.md index fdb7eac6..a7c2ec4d 100644 --- a/docs/beginner/tutorial9-models/README.md +++ b/docs/beginner/tutorial9-models/README.md @@ -549,8 +549,8 @@ pub trait DrawModel<'a> { } impl<'a, 'b> DrawModel<'b> for wgpu::RenderPass<'a> - where - 'b: 'a, { +where + 'b: 'a, { // ... fn draw_model(&mut self, model: &'b Model, camera_bind_group: &'b wgpu::BindGroup) { self.draw_model_instanced(model, 0..1, camera_bind_group);