Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .run/decomp (web).run.xml

This file was deleted.

19 changes: 0 additions & 19 deletions .run/decomp.run.xml

This file was deleted.

5 changes: 3 additions & 2 deletions .run/event.run.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="event" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="run --package kiss3d --example event" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<envs />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>
</component>
5 changes: 3 additions & 2 deletions .run/instancing3d (web).run.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="instancing3d (web)" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="run --package kiss3d --example instancing3d --target wasm32-unknown-unknown" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<envs />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>
</component>
2 changes: 1 addition & 1 deletion .run/multi_windows.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="multi_windows" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="release" />
<option name="command" value="run --package kiss3d --example multi_windows --features egui,parry" />
<option name="command" value="run --package kiss3d --example multi_windows --features egui" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
Expand Down
2 changes: 1 addition & 1 deletion .run/test.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="test" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="test" />
<option name="command" value="test --package kiss3d --features parry" />
<option name="command" value="test --package kiss3d" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
Expand Down
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# Unreleased
# v0.41.0

## Breaking Changes

- `CanvasSetup` no longer implements `Copy` (now contains a `String` field).
- `CanvasSetup` has a new required field `canvas_id: String`. Use `..Default::default()` to fill it in.
- Removed the `parry` feature flag and `parry3d` dependency to avoid circular dependencies when publishing.
`SceneNode3d::trimesh`/`add_trimesh` and `MeshManager3d::add_trimesh` now take `(Vec<Vec3>, Vec<[u32; 3]>, ...)` instead of a `parry3d::shape::TriMesh`. The `From<TriMesh> for RenderMesh` conversion and the `parry3d` re-export are removed.
- `CanvasSetup` no longer implements `Copy` (now contains a `String` field) and has a new required field `canvas_id: String`. Use `..Default::default()` to fill it in. ([#372](https://github.com/dimforge/kiss3d/pull/372))
- `FixedView2d::new()` now takes `(CoordinateSystem2d, bool)` parameters instead of no arguments. Use `FixedView2d::default()` for the previous behavior. ([#354](https://github.com/dimforge/kiss3d/pull/354))
- Removed the `decomp` example (depended on `parry`).
- Bumped dependencies: `wgpu` 27 → 29, `glamx` 0.1 → 0.2, `egui`/`egui-wgpu` 0.33 → 0.34, `getrandom` 0.3 → 0.4, `oneshot` 0.1 → 0.2, `rand` (dev) 0.9 → 0.10.

## New Features

- Added `canvas_id` field to `CanvasSetup` to allow configuring the HTML canvas element ID used on WASM targets (defaults to `"canvas"`).
- Implemented `Default` for `CanvasSetup`.
- `FixedView2d`: added `CoordinateSystem2d` enum with `CenterUp` (default, unchanged) and `TopLeftDown` (top-left origin, Y-down) coordinate systems, and a configurable `apply_hidpi` flag. ([#354](https://github.com/dimforge/kiss3d/pull/354))
- Added new `dda_raycast2d` example demonstrating 2D ray casting with the top-left coordinate system. ([#354](https://github.com/dimforge/kiss3d/pull/354))
- `Window::new_with_window_attributes()`: create a window from a `winit::window::WindowAttributes` for fine-grained control. ([#364](https://github.com/dimforge/kiss3d/pull/364))
- `Window::new_hidden_with_size()`: create a hidden window with custom dimensions. ([#365](https://github.com/dimforge/kiss3d/pull/365))
- `Window::rebind_close_key()` / `rebind_close_modifiers()`: customize or disable the window-close keybinding (default: Escape). ([#367](https://github.com/dimforge/kiss3d/pull/367))
- `PanZoomCamera2d`: added `zoom_step()` / `set_zoom_step()` ([#362](https://github.com/dimforge/kiss3d/pull/362)), and `rebind_drag_modifier()` / `rebind_zoom_modifier()` for modifier-gated drag and zoom. ([#360](https://github.com/dimforge/kiss3d/pull/360))
- `OrbitCamera3d`: added `fov()` / `set_fov()`. ([#361](https://github.com/dimforge/kiss3d/pull/361))
- Implemented `Default` for `CanvasSetup`. ([#372](https://github.com/dimforge/kiss3d/pull/372))

# v0.40.0

Expand Down
36 changes: 12 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Sébastien Crozet <developer@crozet.re>"]
name = "kiss3d"
version = "0.40.0"
version = "0.41.0"

autoexamples = true
description = "Keep it simple, stupid, 2D and 3D graphics engine for Rust."
Expand Down Expand Up @@ -31,35 +31,34 @@ path = "src/lib.rs"
[features]
egui = ["dep:egui", "dep:egui-wgpu"]
recording = ["dep:ffmpeg-the-third"]
parry = ["dep:parry3d"]
serde = ["dep:serde", "glamx/serde", "bitflags/serde", "rgb/serde"]

[dependencies]
bitflags = "2"
bytemuck = { version = "1", features = ["derive"] }
egui = { version = "0.33", optional = true, default-features = true }
egui-wgpu = { version = "0.33", optional = true }
either = "1"
image = "0.25"
egui = { version = "0.34", optional = true, default-features = true }
egui-wgpu = { version = "0.34", optional = true }
image = { version = "0.25", default-features = false, features = ["default-formats"] }
web-time = "1"
kiss3d-macro = { version = "0.36.0", path = "kiss3d-macro" }
log = "0.4"
glamx = { version = "0.1", features = ["bytemuck"] }
glamx = { version = "0.2", features = ["bytemuck"] }
ffmpeg-the-third = { version = "4", optional = true }
num-traits = "0.2"
parry3d = { version = "0.26", optional = true }
rgb = "0.8"
rusttype = { version = "0.9", features = ["gpu_cache"] }
serde = { version = "1", features = ["derive"], optional = true }
wgpu = "27"
wgpu = "29"
winit = "0.30"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
pollster = "0.4"

[target.wasm32-unknown-unknown.dependencies]
oneshot = { version = "0.2.0", features = ["async"] }
getrandom = { version = "0.3", features = ["wasm_js"] }
# We depend on getrandom 0.3 only to enable its wasm_js feature.
# And this is needed only because some dependencies still depend on 0.3.
getrandom_03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
getrandom = { version = "0.4", features = ["wasm_js"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.54"
web-sys = { version = "0.3", features = [
Expand All @@ -83,18 +82,7 @@ web-sys = { version = "0.3", features = [

[dev-dependencies]
env_logger = "0.11"
parry2d = "0.26"
rand = "0.9"

[[example]]
name = "decomp"
required-features = ["parry"]

[[example]]
name = "procedural"
required-features = ["parry"]
rand = "0.10"

[patch.crates-io]
#glamx = { path = "../glamx" }
#parry3d = { path = "../parry/crates/parry3d" }
#parry2d = { path = "../parry/crates/parry2d" }
#glamx = { path = "../glamx" }
13 changes: 8 additions & 5 deletions examples/custom_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ impl NormalMaterial {

let pipeline_layout = ctxt.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("custom_material_pipeline_layout"),
bind_group_layouts: &[&frame_bind_group_layout, &object_bind_group_layout],
push_constant_ranges: &[],
bind_group_layouts: &[
Some(&frame_bind_group_layout),
Some(&object_bind_group_layout),
],
immediate_size: 0,
});

// Create shader module from WGSL source
Expand Down Expand Up @@ -196,8 +199,8 @@ impl NormalMaterial {
},
depth_stencil: Some(wgpu::DepthStencilState {
format: Context::depth_format(),
depth_write_enabled: true,
depth_compare: wgpu::CompareFunction::Less,
depth_write_enabled: Some(true),
depth_compare: Some(wgpu::CompareFunction::Less),
stencil: wgpu::StencilState::default(),
bias: wgpu::DepthBiasState::default(),
}),
Expand All @@ -206,7 +209,7 @@ impl NormalMaterial {
mask: !0,
alpha_to_coverage_enabled: false,
},
multiview: None,
multiview_mask: None,
cache: None,
});

Expand Down
106 changes: 0 additions & 106 deletions examples/decomp.rs

This file was deleted.

Loading
Loading