@needle-tools/materialx 1.4.6 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,18 +4,60 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.5.0] – 2026-03-20
8
+
9
+ ### Added
10
+ - Vertex displacement support (GLSL and ESSL/WebGL 2)
11
+ - Normal recomputation via screen-space derivatives (dFdx/dFdy) for displaced surfaces
12
+ - Procedural noise displacement (fractal3d, position, math nodes)
13
+ - Texture-based displacement (image node sampling in vertex shader)
14
+ - Displacement animation support via Three.js PropertyBinding
15
+ - Three.js shadow support for lit MaterialX shaders (directional, spot, point)
16
+ - Alpha mode detection via `getAlphaMode` for mask/blend transparency
17
+
18
+ ### Fixed
19
+ - Unlit shaders no longer emit shadow uniforms that cause compilation errors
20
+ - UV vec2/vec3 patching for displacement vertex shaders
21
+ - Skip MaterialX shader closure types (surfaceshader, displacementshader, etc.) in uniform handling
22
+
23
+ ### Changed
24
+ - WASM rebuilt with displacement support (MaterialX 1.39.4, Emscripten 3.1.74)
25
+ - Environment map intensity now combines per-material and scene intensity
26
+
27
+ ## [1.4.6] – 2026-03-17
28
+ - Fix: Compatibility with older Rollup/Vite 4 by replacing `import ... with` syntax
29
+
30
+ ## [1.4.5] – 2026-03-17
31
+ - Fix: Improved error log formatting with package version
32
+
33
+ ## [1.4.4] – 2026-03-17
34
+ - Fix: Minor type fixes and improved debug logging
35
+
7
36
  ## [1.4.3] – 2026-02-20
8
- - Feat: Add `globalThis.NEEDLE_MATERIALX_LOCATION` to override WASM location. Use `"package"` for package-local files, or a custom path for self-hosted/CDN.
37
+ - Add: `globalThis.NEEDLE_MATERIALX_LOCATION` to override WASM location. Use `"package"` for package-local files, or a custom path for self-hosted/CDN.
9
38
 
10
39
  ## [1.4.2] – 2026-02-10
11
40
  - Fix: Improve error handling when MaterialX renderable element is not found
12
41
 
13
42
  ## [1.4.1] – 2026-02-10
14
- - Feat: Use MaterialX from CDN by default
43
+ - Change: Use CDN as default WASM source
44
+
45
+ ## [1.4.0] – 2026-02-10
46
+ - Change: Load WASM binaries from Needle CDN by default instead of bundling locally
47
+
48
+ ## [1.3.4] – 2026-02-09
49
+ - Fix: Matrix update for AR sessions
50
+
51
+ ## [1.3.3] – 2026-02-09
52
+ - Add: Support for loading `.mtlx` files by index
53
+ - Fix: Type fixes in loader
15
54
 
16
55
  ## [1.3.2] - 2025-08-12
17
56
  - Fix: Error when MaterialX extension is not present
18
57
 
58
+ ## [1.3.1] - 2025-08-12
59
+ - Docs: README improvements
60
+
19
61
  ## [1.3.0] - 2025-08-12
20
62
  - Change: Refactor extension to use a documents array instead of a single document, backwards compatibility is maintained
21
63
 
@@ -23,7 +65,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
23
65
  - Add: `preloadWasm` function with support to wait for network idle. This is automatically done for Needle Engine projects.
24
66
 
25
67
  ## [1.2.1] - 2025-07-23
26
- - Fix: error caused by scene.environment being null
68
+ - Fix: Error caused by scene.environment being null
27
69
 
28
70
  ## [1.2.0] - 2025-07-23
29
71
  - Add: Support to load raw MaterialX materials (from mtlx as XML)
@@ -35,12 +77,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
35
77
  - Add: `useNeedleMaterialX` hooks for vanilla three.js and Needle Engine
36
78
 
37
79
  ## [1.0.6] - 2025-07-15
38
- - Fix: texture/environment sampling on some Android devices
80
+ - Fix: Texture/environment sampling on some Android devices
81
+
82
+ ## [1.0.3] - 2025-07-10
83
+ - Fix: Version bump for npm publish
39
84
 
40
85
  ## [1.0.2] - 2025-07-10
41
86
  - Add: Material extension `doubleSided` support
42
- - Improved lighting support
43
- - Improved texture loading and fix bug where glTF texture index was not resolved properly
87
+ - Fix: Improved lighting support
88
+ - Fix: Texture loading and glTF texture index resolution
44
89
 
45
90
  ## [1.0.1] - 2025-07-08
46
91
  - Initial release
package/README.md CHANGED
@@ -3,6 +3,9 @@
3
3
  Web runtime for [MaterialX](https://materialx.org/) materials in [Needle Engine](https://needle.tools) and [three.js](https://threejs.org/). Renders physically based MaterialX shaders in the browser using WebAssembly — load `.mtlx` files or glTF assets with the `NEEDLE_materials_mtlx` extension.
4
4
 
5
5
  - MaterialX to WebGL/WebGPU shader generation via WASM
6
+ - Vertex displacement support (procedural noise, texture-based, animatable)
7
+ - Three.js shadow support (directional, spot, point lights)
8
+ - Alpha mask and blend transparency modes
6
9
  - glTF extension for embedding MaterialX materials in `.glb`/`.gltf` files
7
10
  - Experimental support for loading raw MaterialX XML (`.mtlx`) files
8
11
  - Works standalone with three.js or as a Needle Engine module