Make README talk about "demos" instead of "examples" #209
ci.yml
on: push
Matrix: Tests
Update Docs and Demos in GitHub Pages
12m 2s
Rustfmt
10s
CI
2s
deploy-ghpages
1m 7s
Annotations
103 warnings
Rustfmt
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
associated function `make_system` is never used:
demos/src/moving_platform.rs#L62
warning: associated function `make_system` is never used
--> demos/src/moving_platform.rs:62:8
|
53 | impl MovingPlatform {
| ------------------- associated function in this implementation
...
62 | fn make_system<V: Component>(
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `setting_from_ui`:
demos/src/ui/mod.rs#L192
warning: unused variable: `setting_from_ui`
--> demos/src/ui/mod.rs:192:5
|
192 | setting_from_ui: Res<DemoUiPhysicsBackendActive>,
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_setting_from_ui`
|
unused variable: `app`:
demos/src/moving_platform.rs#L6
warning: unused variable: `app`
--> demos/src/moving_platform.rs:6:21
|
6 | fn build(&self, app: &mut App) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_app`
|
= note: `#[warn(unused_variables)]` on by default
|
returning the result of a `let` binding from a block:
demos/examples/shooter_like.rs#L295
warning: returning the result of a `let` binding from a block
--> demos/examples/shooter_like.rs:295:9
|
178 | / let command_altering_selectors = CommandAlteringSelectors::default()
179 | | // By default Tnua uses a raycast, but this could be a problem if the character stands
180 | | // just past the edge while part of its body is above the platform. To solve this, we
181 | | // need to cast a shape - which is physics-engine specific. We set the shape using a
... |
275 | | },
276 | | );
| |______________- unnecessary `let` binding
...
295 | command_altering_selectors
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
178 ~
179 | #[cfg(feature = "rapier3d")]
...
196 | );
197 ~ CommandAlteringSelectors::default()
198 + // By default Tnua uses a raycast, but this could be a problem if the character stands
199 + // just past the edge while part of its body is above the platform. To solve this, we
200 + // need to cast a shape - which is physics-engine specific. We set the shape using a
201 + // component.
202 + .with_combo(
203 + "Sensor Shape",
204 + 1,
205 + &[
206 + ("no", |mut cmd| {
207 + #[cfg(feature = "rapier3d")]
208 + cmd.remove::<TnuaRapier3dSensorShape>();
209 + #[cfg(feature = "xpbd3d")]
210 + cmd.remove::<TnuaXpbd3dSensorShape>();
211 + }),
212 + ("flat (underfit)", |mut cmd| {
213 + #[cfg(feature = "rapier3d")]
214 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
215 + 0.0, 0.49,
216 + )));
217 + #[cfg(feature = "xpbd3d")]
218 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
219 + }),
220 + ("flat (exact)", |mut cmd| {
221 + #[cfg(feature = "rapier3d")]
222 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
223 + 0.0, 0.5,
224 + )));
225 + #[cfg(feature = "xpbd3d")]
226 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
227 + }),
228 + ("flat (overfit)", |mut cmd| {
229 + #[cfg(feature = "rapier3d")]
230 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
231 + 0.0, 0.51,
232 + )));
233 + #[cfg(feature = "xpbd3d")]
234 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
235 + }),
236 + ("ball (underfit)", |mut cmd| {
237 + #[cfg(feature = "rapier3d")]
238 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
239 + #[cfg(feature = "xpbd3d")]
240 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::ball(0.49)));
241 + }),
242 + ("ball (exact)", |mut cmd| {
243 + #[cfg(feature = "rapier3d")]
244 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
245 + #[cfg(feature = "xpbd3d")]
246 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::ball(0.5)));
247 + }),
248 + ],
249 + )
250 + .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
251 + // Tnua will automatically apply angular impulses/forces to fix the tilt and make
252 + // the character stand upward, but it is also possible to just let the physics
253 + // engine prevent rotation (other than around the Y axis, for turning)
254 + if lock_tilt {
255 + #[cfg(feature = "rapier3d")]
256 + cmd.insert(
257 + rapier::LockedAxes::ROTATION_LOCKED_X
258 + | rapier::LockedAxes::ROTATION_LOCKED_Z,
259 + );
260 + #[cfg(feature = "xpbd3d")]
261 + cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
262 + } else {
263 + #[cfg(feature = "rapier3d")]
264 + cmd.insert(rapier::LockedAxes::empty());
265 + #[cfg(feature = "xpbd3d")]
266 + cmd.insert(xpbd::LockedAxes::new());
267 + }
268 + })
269 + .with_checkbox(
270 + "Phase Through Collision Groups",
271 + true,
272 + |mut cmd, use_collision_groups| {
273 + #[cfg(feature = "rapier3d")]
274 + if use_collision_groups {
275 + cmd.insert(CollisionGroups {
276 + memberships: Group::GROUP_2,
277 + filters: Group::GROUP_2,
278 + });
279 + } else {
280 + cmd.insert(CollisionGroups {
281 + memberships: Group::ALL,
282 + filters: Group::ALL,
283 + });
284 + }
285 + #[cfg(feature = "xpbd3d")]
286 + {
287 + let player_layers: &[LayerNames] = if use_collision_groups {
288 + &[LayerNames::Player]
289 + } else {
290 + &[LayerNames::Player, LayerNames::PhaseThrough]
291 + };
292 + cmd.insert(CollisionLayers::new(player_layers, player_layers));
293 + }
294 + },
295 + )
|
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L253
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:253:18
|
253 | |mut cmd, use_collision_groups| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L231
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:231:48
|
231 | .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L223
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:223:39
|
223 | ("ball (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L217
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:217:42
|
217 | ("ball (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L209
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:209:41
|
209 | ("flat (overfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L201
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:201:39
|
201 | ("flat (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L193
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:193:42
|
193 | ("flat (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/shooter_like.rs#L187
warning: variable does not need to be mutable
--> demos/examples/shooter_like.rs:187:29
|
187 | ("no", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L299
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:299:56
|
299 | cmd.insert(TnuaCrouchEnforcer::new(0.5 * Vec3::Y, |cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `use_collision_groups`:
demos/examples/shooter_like.rs#L253
warning: unused variable: `use_collision_groups`
--> demos/examples/shooter_like.rs:253:27
|
253 | |mut cmd, use_collision_groups| {
| ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_use_collision_groups`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L253
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:253:22
|
253 | |mut cmd, use_collision_groups| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L231
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:231:52
|
231 | .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L223
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:223:43
|
223 | ("ball (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L217
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:217:46
|
217 | ("ball (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L209
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:209:45
|
209 | ("flat (overfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L201
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:201:43
|
201 | ("flat (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L193
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:193:46
|
193 | ("flat (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/shooter_like.rs#L187
warning: unused variable: `cmd`
--> demos/examples/shooter_like.rs:187:33
|
187 | ("no", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
= note: `#[warn(unused_variables)]` on by default
|
returning the result of a `let` binding from a block:
demos/examples/platformer_3d.rs#L288
warning: returning the result of a `let` binding from a block
--> demos/examples/platformer_3d.rs:288:9
|
171 | / let command_altering_selectors = CommandAlteringSelectors::default()
172 | | // By default Tnua uses a raycast, but this could be a problem if the character stands
173 | | // just past the edge while part of its body is above the platform. To solve this, we
174 | | // need to cast a shape - which is physics-engine specific. We set the shape using a
... |
268 | | },
269 | | );
| |______________- unnecessary `let` binding
...
288 | command_altering_selectors
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
171 ~
172 | #[cfg(feature = "rapier3d")]
...
189 | );
190 ~ CommandAlteringSelectors::default()
191 + // By default Tnua uses a raycast, but this could be a problem if the character stands
192 + // just past the edge while part of its body is above the platform. To solve this, we
193 + // need to cast a shape - which is physics-engine specific. We set the shape using a
194 + // component.
195 + .with_combo(
196 + "Sensor Shape",
197 + 1,
198 + &[
199 + ("no", |mut cmd| {
200 + #[cfg(feature = "rapier3d")]
201 + cmd.remove::<TnuaRapier3dSensorShape>();
202 + #[cfg(feature = "xpbd3d")]
203 + cmd.remove::<TnuaXpbd3dSensorShape>();
204 + }),
205 + ("flat (underfit)", |mut cmd| {
206 + #[cfg(feature = "rapier3d")]
207 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
208 + 0.0, 0.49,
209 + )));
210 + #[cfg(feature = "xpbd3d")]
211 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
212 + }),
213 + ("flat (exact)", |mut cmd| {
214 + #[cfg(feature = "rapier3d")]
215 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
216 + 0.0, 0.5,
217 + )));
218 + #[cfg(feature = "xpbd3d")]
219 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
220 + }),
221 + ("flat (overfit)", |mut cmd| {
222 + #[cfg(feature = "rapier3d")]
223 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
224 + 0.0, 0.51,
225 + )));
226 + #[cfg(feature = "xpbd3d")]
227 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
228 + }),
229 + ("ball (underfit)", |mut cmd| {
230 + #[cfg(feature = "rapier3d")]
231 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
232 + #[cfg(feature = "xpbd3d")]
233 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::ball(0.49)));
234 + }),
235 + ("ball (exact)", |mut cmd| {
236 + #[cfg(feature = "rapier3d")]
237 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
238 + #[cfg(feature = "xpbd3d")]
239 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::ball(0.5)));
240 + }),
241 + ],
242 + )
243 + .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
244 + // Tnua will automatically apply angular impulses/forces to fix the tilt and make
245 + // the character stand upward, but it is also possible to just let the physics
246 + // engine prevent rotation (other than around the Y axis, for turning)
247 + if lock_tilt {
248 + #[cfg(feature = "rapier3d")]
249 + cmd.insert(
250 + rapier::LockedAxes::ROTATION_LOCKED_X
251 + | rapier::LockedAxes::ROTATION_LOCKED_Z,
252 + );
253 + #[cfg(feature = "xpbd3d")]
254 + cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
255 + } else {
256 + #[cfg(feature = "rapier3d")]
257 + cmd.insert(rapier::LockedAxes::empty());
258 + #[cfg(feature = "xpbd3d")]
259 + cmd.insert(xpbd::LockedAxes::new());
260 + }
261 + })
262 + .with_checkbox(
263 + "Phase Through Collision Groups",
264 + true,
265 + |mut cmd, use_collision_groups| {
266 + #[cfg(feature = "rapier3d")]
267 + if use_collision_groups {
268 + cmd.insert(CollisionGroups {
269 + memberships: Group::GROUP_2,
270 + filters: Group::GROUP_2,
271 + });
272 + } else {
273 + cmd.insert(CollisionGroups {
274 + memberships: Group::ALL,
275 + filters: Group::ALL,
276 + });
277 + }
278 + #[cfg(feature = "xpbd3d")]
279 + {
280 + let player_layers: &[LayerNames] = if use_collision_groups {
281 + &[LayerNames::Player]
282 + } else {
283 + &[LayerNames::Player, LayerNames::PhaseThrough]
284 + };
285 + cmd.insert(CollisionLayers::new(player_layers, player_layers));
286 + }
287 + },
288 + )
|
|
unused import: `make_update_plot_data_system`:
demos/src/ui/mod.rs#L14
warning: unused import: `make_update_plot_data_system`
--> demos/src/ui/mod.rs:14:22
|
14 | use self::plotting::{make_update_plot_data_system, plot_source_rolling_update};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L246
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:246:18
|
246 | |mut cmd, use_collision_groups| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L224
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:224:48
|
224 | .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L216
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:216:39
|
216 | ("ball (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L210
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:210:42
|
210 | ("ball (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L202
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:202:41
|
202 | ("flat (overfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L194
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:194:39
|
194 | ("flat (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L186
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:186:42
|
186 | ("flat (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_3d.rs#L180
warning: variable does not need to be mutable
--> demos/examples/platformer_3d.rs:180:29
|
180 | ("no", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L292
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:292:56
|
292 | cmd.insert(TnuaCrouchEnforcer::new(0.5 * Vec3::Y, |cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `use_collision_groups`:
demos/examples/platformer_3d.rs#L246
warning: unused variable: `use_collision_groups`
--> demos/examples/platformer_3d.rs:246:27
|
246 | |mut cmd, use_collision_groups| {
| ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_use_collision_groups`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L246
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:246:22
|
246 | |mut cmd, use_collision_groups| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L224
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:224:52
|
224 | .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L216
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:216:43
|
216 | ("ball (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L210
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:210:46
|
210 | ("ball (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L202
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:202:45
|
202 | ("flat (overfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L194
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:194:43
|
194 | ("flat (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L186
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:186:46
|
186 | ("flat (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_3d.rs#L180
warning: unused variable: `cmd`
--> demos/examples/platformer_3d.rs:180:33
|
180 | ("no", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
= note: `#[warn(unused_variables)]` on by default
|
returning the result of a `let` binding from a block:
demos/examples/platformer_2d.rs#L262
warning: returning the result of a `let` binding from a block
--> demos/examples/platformer_2d.rs:262:9
|
152 | / let command_altering_selectors = CommandAlteringSelectors::default()
153 | | // By default Tnua uses a raycast, but this could be a problem if the character stands
154 | | // just past the edge while part of its body is above the platform. To solve this, we
155 | | // need to cast a shape - which is physics-engine specific. We set the shape using a
... |
240 | | },
241 | | );
| |______________- unnecessary `let` binding
...
262 | command_altering_selectors
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
152 ~
153 | #[cfg(feature = "rapier2d")]
...
172 | );
173 ~ CommandAlteringSelectors::default()
174 + // By default Tnua uses a raycast, but this could be a problem if the character stands
175 + // just past the edge while part of its body is above the platform. To solve this, we
176 + // need to cast a shape - which is physics-engine specific. We set the shape using a
177 + // component.
178 + .with_combo(
179 + "Sensor Shape",
180 + 1,
181 + &[
182 + ("Point", |mut cmd| {
183 + #[cfg(feature = "rapier2d")]
184 + cmd.remove::<TnuaRapier2dSensorShape>();
185 + #[cfg(feature = "xpbd2d")]
186 + cmd.remove::<TnuaXpbd2dSensorShape>();
187 + }),
188 + ("Flat (underfit)", |mut cmd| {
189 + #[cfg(feature = "rapier2d")]
190 + cmd.insert(TnuaRapier2dSensorShape(rapier::Collider::cuboid(0.49, 0.0)));
191 + #[cfg(feature = "xpbd2d")]
192 + cmd.insert(TnuaXpbd2dSensorShape(xpbd::Collider::cuboid(0.99, 0.0)));
193 + }),
194 + ("Flat (exact)", |mut cmd| {
195 + #[cfg(feature = "rapier2d")]
196 + cmd.insert(TnuaRapier2dSensorShape(rapier::Collider::cuboid(0.5, 0.0)));
197 + #[cfg(feature = "xpbd2d")]
198 + cmd.insert(TnuaXpbd2dSensorShape(xpbd::Collider::cuboid(1.0, 0.0)));
199 + }),
200 + ("flat (overfit)", |mut cmd| {
201 + #[cfg(feature = "rapier2d")]
202 + cmd.insert(TnuaRapier2dSensorShape(rapier::Collider::cuboid(0.51, 0.0)));
203 + #[cfg(feature = "xpbd2d")]
204 + cmd.insert(TnuaXpbd2dSensorShape(xpbd::Collider::cuboid(1.01, 0.0)));
205 + }),
206 + ("Ball (underfit)", |mut cmd| {
207 + #[cfg(feature = "rapier2d")]
208 + cmd.insert(TnuaRapier2dSensorShape(rapier::Collider::ball(0.49)));
209 + #[cfg(feature = "xpbd2d")]
210 + cmd.insert(TnuaXpbd2dSensorShape(xpbd::Collider::ball(0.49)));
211 + }),
212 + ("Ball (exact)", |mut cmd| {
213 + #[cfg(feature = "rapier2d")]
214 + cmd.insert(TnuaRapier2dSensorShape(rapier::Collider::ball(0.5)));
215 + #[cfg(feature = "xpbd2d")]
216 + cmd.insert(TnuaXpbd2dSensorShape(xpbd::Collider::ball(0.5)));
217 + }),
218 + ],
219 + )
220 + .with_checkbox("Lock Tilt", false, |mut cmd, lock_tilt| {
221 + // Tnua will automatically apply angular impulses/forces to fix the tilt and make
222 + // the character stand upward, but it is also possible to just let the physics
223 + // engine prevent rotation (other than around the Y axis, for turning)
224 + if lock_tilt {
225 + #[cfg(feature = "rapier2d")]
226 + cmd.insert(rapier::LockedAxes::ROTATION_LOCKED);
227 + #[cfg(feature = "xpbd2d")]
228 + cmd.insert(xpbd::LockedAxes::new().lock_rotation());
229 + } else {
230 + #[cfg(feature = "rapier2d")]
231 + cmd.insert(rapier::LockedAxes::empty());
232 + #[cfg(feature = "xpbd2d")]
233 + cmd.insert(xpbd::LockedAxes::new());
234 + }
235 + })
236 + .with_checkbox(
237 + "Phase Through Collision Groups",
238 + true,
239 + |mut cmd, use_collision_groups| {
240 + #[cfg(feature = "rapier2d")]
241 + if use_collision_groups {
242 + cmd.insert(CollisionGroups {
243 + memberships: Group::GROUP_2,
244 + filters: Group::GROUP_2,
245 + });
246 + } else {
247 + cmd.insert(CollisionGroups {
248 + memberships: Group::ALL,
249 + filters: Group::ALL,
250 + });
251 + }
252 + #[cfg(feature = "xpbd2d")]
253 + {
254 + let player_layers: &[LayerNames] = if use_collision_groups {
255 + &[LayerNames::Player]
256 + } else {
257 + &[LayerNames::Player, LayerNames::PhaseThrough]
258 + };
259 + cmd.insert(CollisionLayers::new(player_layers, player_layers));
260 + }
261 + },
262 + )
|
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L218
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:218:18
|
218 | |mut cmd, use_collision_groups| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L199
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:199:49
|
199 | .with_checkbox("Lock Tilt", false, |mut cmd, lock_tilt| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L191
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:191:39
|
191 | ("Ball (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L185
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:185:42
|
185 | ("Ball (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L179
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:179:41
|
179 | ("flat (overfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L173
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:173:39
|
173 | ("Flat (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L167
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:167:42
|
167 | ("Flat (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
demos/examples/platformer_2d.rs#L161
warning: variable does not need to be mutable
--> demos/examples/platformer_2d.rs:161:32
|
161 | ("Point", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L266
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:266:56
|
266 | cmd.insert(TnuaCrouchEnforcer::new(0.5 * Vec3::Y, |cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `use_collision_groups`:
demos/examples/platformer_2d.rs#L218
warning: unused variable: `use_collision_groups`
--> demos/examples/platformer_2d.rs:218:27
|
218 | |mut cmd, use_collision_groups| {
| ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_use_collision_groups`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L218
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:218:22
|
218 | |mut cmd, use_collision_groups| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L199
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:199:53
|
199 | .with_checkbox("Lock Tilt", false, |mut cmd, lock_tilt| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L191
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:191:43
|
191 | ("Ball (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L185
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:185:46
|
185 | ("Ball (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L179
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:179:45
|
179 | ("flat (overfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L173
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:173:43
|
173 | ("Flat (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L167
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:167:46
|
167 | ("Flat (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
unused variable: `cmd`:
demos/examples/platformer_2d.rs#L161
warning: unused variable: `cmd`
--> demos/examples/platformer_2d.rs:161:36
|
161 | ("Point", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
= note: `#[warn(unused_variables)]` on by default
|
associated function `make_system` is never used:
demos/src/moving_platform.rs#L62
warning: associated function `make_system` is never used
--> demos/src/moving_platform.rs:62:8
|
53 | impl MovingPlatform {
| ------------------- associated function in this implementation
...
62 | fn make_system<V: Component>(
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `setting_from_ui`:
demos/src/ui/mod.rs#L192
warning: unused variable: `setting_from_ui`
--> demos/src/ui/mod.rs:192:5
|
192 | setting_from_ui: Res<DemoUiPhysicsBackendActive>,
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_setting_from_ui`
|
unused variable: `app`:
demos/src/moving_platform.rs#L6
warning: unused variable: `app`
--> demos/src/moving_platform.rs:6:21
|
6 | fn build(&self, app: &mut App) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_app`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `make_update_plot_data_system`:
demos/src/ui/mod.rs#L14
warning: unused import: `make_update_plot_data_system`
--> demos/src/ui/mod.rs:14:22
|
14 | use self::plotting::{make_update_plot_data_system, plot_source_rolling_update};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
Clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, 1.76.0)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests (ubuntu-latest, 1.76.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests (ubuntu-latest, 1.76.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, 1.76.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, 1.76.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, 1.76.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, nightly)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests (ubuntu-latest, nightly)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests (ubuntu-latest, nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests (ubuntu-latest, nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Docs
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Docs
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Update Docs and Demos in GitHub Pages
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, jetli/wasm-bindgen-action@v0.1.0, actions-rs/toolchain@v1, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Update Docs and Demos in GitHub Pages
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, jetli/wasm-bindgen-action@v0.1.0, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Update Docs and Demos in GitHub Pages
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Update Docs and Demos in GitHub Pages
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Update Docs and Demos in GitHub Pages
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Update Docs and Demos in GitHub Pages
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
deploy-ghpages
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/deploy-pages@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
deploy-ghpages
Uploaded artifact size of 1559152640 bytes exceeds the allowed size of 1 GB. Deployment might fail.
|