Skip to content

Commit

Permalink
mach-model3d is no longer an official project; see hexops/mach#969
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Jun 2, 2024
1 parent 77e099e commit b059b09
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 85 deletions.
6 changes: 0 additions & 6 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@ unsafe = true
name = 'dxcompiler'
url = '/pkg/mach-dxcompiler'
weight = 3400
[[menu.pkg]]
identifier = 'pkg-bind-model3d'
parent = 'pkg-bind'
name = 'model3d'
url = '/pkg/mach-model3d'
weight = 3500
[[menu.pkg]]
identifier = 'pkg-bind-opus'
parent = 'pkg-bind'
Expand Down
6 changes: 0 additions & 6 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,6 @@ $ zig build -Dtarget=aarch64-macos
<img alt="mach-basisu" src="/assets/mach/basisu-light.svg" style="height: 3rem; margin-right: 1rem; margin-top: 0.5rem;">
</picture>
</a>
<a href="/pkg/mach-model3d" class="img-link">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/assets/mach/model3d-dark.svg">
<img alt="mach-model3d" src="/assets/mach/model3d-light.svg" style="height: 3rem; margin-right: 1rem; margin-top: 0.5rem;">
</picture>
</a>
<a href="/pkg/mach-sysgpu" class="img-link">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/assets/mach/sysgpu-dark.svg">
Expand Down
6 changes: 0 additions & 6 deletions content/pkg/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ Mach provides an ecosystem of 100% standalone, high-quality Zig gamedev packages
<img alt="mach-basisu" src="/assets/mach/basisu-light.svg" style="height: 3rem; margin-right: 1rem; margin-top: 0.5rem;">
</picture>
</a>
<a href="/pkg/mach-model3d" class="img-link">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/assets/mach/model3d-dark.svg">
<img alt="mach-model3d" src="/assets/mach/model3d-light.svg" style="height: 3rem; margin-right: 1rem; margin-top: 0.5rem;">
</picture>
</a>
<a href="/pkg/mach-sysgpu" class="img-link">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/assets/mach/sysgpu-dark.svg">
Expand Down
70 changes: 3 additions & 67 deletions content/pkg/mach-model3d.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,8 @@ docs_type: "pkg"
rss_ignore: true
---

<div class="centered">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/assets/mach/model3d-full-dark.svg">
<img alt="mach-model3d" src="/assets/mach/model3d-full-light.svg" style="height: 7rem; margin-top: 1rem;">
</picture>
<span>
<a href="https://github.com/hexops/mach-model3d">GitHub repository</a> | <a href="https://github.com/hexops/mach/issues?q=is%3Aissue+is%3Aopen+label%3Amodel3d">Issue tracker</a>
</span>
</div>
No longer supported as an official Mach project. The code has moved to [github.com/slimsag/mach-model3d](https://github.com/slimsag/mach-model3d) and may not be maintained to the same standard as official Mach projects.

Compact, featureful model format & alternative to glTF.
**Additional details:** https://github.com/hexops/mach/issues/969

[Model3D](https://gitlab.com/bztsrc/model3d/) is an up-and-coming compact, featureful, universal model format that tries to address the shortcomings of existing formats (yes, including glTF - see [their rationale](https://gitlab.com/bztsrc/model3d/#rationale).)

## Experimental

This is an **experimental** project according to [our stability guarantees](../../about/stability):

> When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst.
**Tracking issue:** https://github.com/hexops/mach/issues/969

## Getting started

Create a `build.zig.zon` in your project (replace `LATEST_COMMIT` with the latest commit hash):

```zig
.{
.name = "mypkg",
.version = "0.1.0",
.dependencies = .{
.mach_model3d = .{
.url = "https://pkg.machengine.org/mach-model3d/LATEST_COMMIT.tar.gz",
},
},
}
```

Run `zig build` in your project, and the compiler will instruct you to add a `.hash = "..."` field next to `.url`:

```
note: expected .hash = "12209838fcfb7a77d2d6931efdc7448c033a1b7dad11d082c94bbeeba9d1038cd311",
```

Then use the dependency in your `build.zig`:

```zig
pub fn build(b: *std.Build) void {
...
exe.root_module.addImport("mach-model3d", b.dependency("mach_model3d", .{
.target = target,
.optimize = optimize,
}).module("mach-model3d"));
}
```

You can now use it in your `src/main.zig` file:

```zig
const model3d = @import("mach-model3d");
```

For usage examples, you can look at the mach-core [pbr-basic example](https://github.com/hexops/mach-core/blob/main/examples/pbr-basic/main.zig) - note that a `vertex_writer.zig` helper is needed due to the way model3d stores data.

### Ran into trouble?

Triple-check you followed the `build.zig.zon` instructions correctly, it's easy to mess that part up.

Feel free to join the [Mach Discord community](../../discord) for help.
**View the older v0.3 documentation:** https://machengine.org/v0.3/pkg/mach-model3d

0 comments on commit b059b09

Please sign in to comment.