@needle-tools/materialx 1.1.1-next.714bc32 → 1.1.1-next.b7e5e45
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/package.json +5 -5
- package/src/materialx.material.ts +1 -1
- package/src/materialx.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/materialx",
|
|
3
|
-
"version": "1.1.1-next.
|
|
3
|
+
"version": "1.1.1-next.b7e5e45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"import": "./index.ts",
|
|
9
9
|
"require": "./index.js"
|
|
10
10
|
},
|
|
11
|
+
"./needle.js": {
|
|
12
|
+
"import": "./needle.ts",
|
|
13
|
+
"require": "./needle.js"
|
|
14
|
+
},
|
|
11
15
|
"./package.json": "./package.json",
|
|
12
16
|
"./codegen/register_types.ts": {
|
|
13
17
|
"import": "./codegen/register_types.ts",
|
|
14
18
|
"require": "./codegen/register_types.js"
|
|
15
|
-
},
|
|
16
|
-
"./needle": {
|
|
17
|
-
"import": "./needle.ts",
|
|
18
|
-
"require": "./needle.js"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -220,7 +220,7 @@ export class MaterialXMaterial extends ShaderMaterial {
|
|
|
220
220
|
|
|
221
221
|
envMapIntensity: number = 1.0; // Default intensity for environment map
|
|
222
222
|
envMap: Texture | null = null; // Environment map texture, can be set externally
|
|
223
|
-
updateUniforms = (environment: MaterialXEnvironment,
|
|
223
|
+
updateUniforms = (environment: MaterialXEnvironment, _renderer: WebGLRenderer, object: Object3D, camera: Camera, time?: number, frame?: number) => {
|
|
224
224
|
|
|
225
225
|
const uniforms = this.uniforms as Uniforms;
|
|
226
226
|
|
package/src/materialx.ts
CHANGED
|
@@ -181,13 +181,15 @@ export class MaterialXEnvironment {
|
|
|
181
181
|
const radianceCube = new Mesh(planeGeometry, radianceMat);
|
|
182
182
|
const irradianceMat = unlitMat.clone();
|
|
183
183
|
irradianceMat.map = textures.irradianceTexture;
|
|
184
|
-
const irradianceCube = new Mesh(planeGeometry,
|
|
184
|
+
const irradianceCube = new Mesh(planeGeometry, irradianceMat);
|
|
185
185
|
scene.add(radianceCube);
|
|
186
186
|
scene.add(irradianceCube);
|
|
187
187
|
radianceCube.name = "MaterialXRadianceCube";
|
|
188
|
-
radianceCube.position.set(.
|
|
188
|
+
radianceCube.position.set(.8, 1, .01);
|
|
189
|
+
radianceCube.scale.set(1.5, 1, 1);
|
|
189
190
|
irradianceCube.name = "MaterialXIrradianceCube";
|
|
190
|
-
irradianceCube.position.set(-.
|
|
191
|
+
irradianceCube.position.set(-.8, 1, -.01);
|
|
192
|
+
irradianceCube.scale.set(1.5, 0.98, 1);
|
|
191
193
|
console.log("[MaterialX] environment initialized from Needle context", { textures, radianceCube, irradianceCube });
|
|
192
194
|
}
|
|
193
195
|
}
|