tsl-textures 0.20.0 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsl-textures",
3
- "version": "0.20.0",
3
+ "version": "1.0.0",
4
4
  "description": "A collection of Three.js Shading Language (TSL) textures ",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/camouflage.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, If, positionLocal, round, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, If, positionLocal, round, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/cave-art.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, add, exp, float, If, mix, or, positionLocal, pow2, sub, tslFn } from 'three/nodes';
7
+ import { abs, add, exp, float, If, mix, or, positionLocal, pow2, sub, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -12,22 +12,22 @@ var caveArt = tslFn( ( params ) => {
12
12
 
13
13
  var pos = positionLocal.mul( exp( params.scale ) ).add( params.seed ).toVar( );
14
14
 
15
- var k1 = noise( pos ).mul( 4 ).sin().toVar();
16
- var k2 = noise( pos.mul( 1.5 ) ).mul( 4 ).cos().toVar();
15
+ var k1 = noise( pos, 4 ).sin().toVar();
16
+ var k2 = noise( pos.mul( 1.5 ), 4 ).cos().toVar();
17
17
 
18
18
  var thinness = exp( sub( float( 3 ), params.thinness ) );
19
19
  var k = sub( thinness, pow2( abs( add( k1, k2 ) ) ).mul( 20 ) ).toVar();
20
20
 
21
- If( or( k1.greaterThan( k2 ), k.lessThan( 0 ) ), ()=>{
22
-
23
- k.assign( 0 );
24
-
21
+ If( or( k1.greaterThan( k2 ), k.lessThan( 0 ) ), ()=>{
22
+
23
+ k.assign( 0 );
24
+
25
25
  } );
26
26
 
27
- If( k.lessThanEqual( 0 ), ()=>{
28
-
29
- k.assign( params.noise.mul( pow2( noise( pos.mul( 30 ) ) ) ) );
30
-
27
+ If( k.lessThanEqual( 0 ), ()=>{
28
+
29
+ k.assign( params.noise.mul( pow2( noise( pos.mul( 30 ) ) ) ) );
30
+
31
31
  } );
32
32
 
33
33
  return mix( params.background, params.color, k );
package/src/circles.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { acos, clamp, cond, exp, float, positionLocal, sin, tslFn } from 'three/nodes';
7
+ import { acos, clamp, cond, exp, float, positionLocal, sin, tslFn } from 'three';
8
8
  import { hsl, toHsl } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -20,8 +20,12 @@ var circles = tslFn( ( params ) => {
20
20
  var x = angle.div( 3000 ).mul( scale );
21
21
 
22
22
  var k = float( params.seed.sin().mul( 100 ) ).toVar();
23
- for ( var n=0; n<=10; n++ )
23
+
24
+ for ( var n=0; n<=10; n++ ) {
25
+
24
26
  k.addAssign( sin( x.mul( 2**n ).sub( Math.PI*n/2 ) ).mul( -n*( n+1 )/2 ) );
27
+
28
+ }
25
29
 
26
30
  k.assign( k.div( 200 ).clamp( -2, 2 ) );
27
31
 
package/src/clouds.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { clamp, exp, min, mix, mul, positionLocal, tslFn, vec4 } from 'three/nodes';
7
+ import { clamp, exp, min, mix, mul, positionLocal, tslFn, vec4 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/concrete.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- import { abs, cos, cross, exp, modelNormalMatrix, normalLocal, positionLocal, pow, remap, sin, sub, tangentLocal, tslFn, vec3 } from 'three/nodes';
6
+ import { abs, cos, cross, exp, modelNormalMatrix, normalLocal, positionLocal, pow, remap, sin, sub, tangentLocal, tslFn, vec3 } from 'three';
7
7
  import { noise } from 'tsl-textures/tsl-utils.js';
8
8
 
9
9
 
package/src/cork.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, float, If, loop, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, float, If, loop, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
  import { noise, vnoise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -0,0 +1,51 @@
1
+ 
2
+ // TSL-Textures: Dalmatian coat
3
+
4
+
5
+
6
+ import { Color } from "three";
7
+ import { exp, float, loop, mix, positionLocal, tslFn } from 'three';
8
+ import { noise } from 'tsl-textures/tsl-utils.js';
9
+
10
+
11
+ var dalmatianSpots = tslFn( ( params )=>{
12
+
13
+ var pos = positionLocal.mul( exp( params.scale ) ).add( params.seed ).sub( 1000 ).toVar( );
14
+
15
+ var k = float( 1 ).toVar();
16
+
17
+ var d = float( 1.5 ).sub( params.density ).mul( 2 ).toVar();
18
+ var count = params.density.mul( 5 ).add( 5 ).toVar();
19
+
20
+ loop( count, ()=> {
21
+
22
+ k.mulAssign( noise( pos ).abs().pow( d ).mul( 100 ).sub( 50 ).clamp( 0, 1 ).oneMinus() );
23
+ pos.assign( pos.mul( 1.01 ) );
24
+ k.mulAssign( noise( pos.yzx ).abs().pow( d ).mul( 100 ).sub( 50 ).clamp( 0, 1 ).oneMinus() );
25
+ pos.assign( pos.mul( 1.01 ) );
26
+ k.mulAssign( noise( pos.zxy ).abs().pow( d ).mul( 100 ).sub( 50 ).clamp( 0, 1 ).oneMinus() );
27
+ pos.assign( pos.mul( 1.01 ) );
28
+
29
+ } );
30
+
31
+ return mix( params.background, params.color, k.clamp( 0, 1 ) );
32
+
33
+ } );
34
+
35
+
36
+ dalmatianSpots.defaults = {
37
+ $name: 'Dalmatian spots',
38
+ $width: 260,
39
+
40
+ scale: 2,
41
+ density: 0.6,
42
+
43
+ color: new Color( 0xFFFFFF ),
44
+ background: new Color( 0x000000 ),
45
+
46
+ seed: 0,
47
+ };
48
+
49
+
50
+
51
+ export { dalmatianSpots };
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, float, loop, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, float, loop, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
 
9
9
 
10
10
 
package/src/entangled.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, exp, float, floor, loop, max, mix, mul, oneMinus, positionLocal, pow, sin, tslFn } from 'three/nodes';
7
+ import { abs, exp, float, floor, loop, max, mix, mul, oneMinus, positionLocal, pow, sin, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/fordite.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, mul, positionLocal, sin, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, mul, positionLocal, sin, tslFn, vec3 } from 'three';
8
8
  import { hsl, noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/gas-giant.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { exp, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
  import { hsl, noise, toHsl } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/grid.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, add, div, equirectUV, min, mix, mul, oneMinus, positionLocal, pow, remapClamp, round, sin, smoothstep, sub, tslFn } from 'three/nodes';
7
+ import { abs, add, div, equirectUV, min, mix, mul, oneMinus, positionLocal, pow, remapClamp, round, sin, smoothstep, sub, tslFn } from 'three';
8
8
 
9
9
 
10
10
 
package/src/isolines.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { add, exp, mix, oneMinus, positionLocal, sin, smoothstep, sub, tslFn } from 'three/nodes';
7
+ import { add, exp, mix, oneMinus, positionLocal, sin, smoothstep, sub, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/karst-rock.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { exp, mix, positionLocal, tslFn } from 'three/nodes';
7
+ import { exp, mix, positionLocal, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/marble.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { add, div, exp, If, mix, mul, oneMinus, positionLocal, pow, tslFn } from 'three/nodes';
7
+ import { add, div, exp, If, mix, mul, oneMinus, positionLocal, pow, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -19,7 +19,7 @@ var marble = tslFn( ( params ) => {
19
19
  noise( pos.mul( 6 ) ).mul( 0.1 )
20
20
  );
21
21
 
22
- var k = oneMinus( k.abs().pow( 2.5 ) );
22
+ var k = oneMinus( k.abs().pow( 2.5 ) ).toVar();
23
23
 
24
24
  var maxSmooth = oneMinus( pow( 0.5, params.thinness.add( 7 ) ) ).toVar(),
25
25
  minSmooth = oneMinus( pow( 0.5, params.thinness.add( 7 ).mul( 0.5 ) ) ).toVar();
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, cond, exp, oneMinus, positionLocal, sqrt, tslFn, vec3 } from 'three/nodes';
7
+ import { abs, cond, exp, oneMinus, positionLocal, sqrt, tslFn, vec3 } from 'three';
8
8
  import { hsl, noise, toHsl } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { exp, loop, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, loop, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
  import { applyEuler, noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/planet.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, float, If, loop, mix, mul, positionLocal, remap, smoothstep, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, float, If, loop, mix, mul, positionLocal, remap, smoothstep, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/polka-dots.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { acos, add, distance, exp, float, loop, max, min, mix, mod, mul, oneMinus, positionLocal, pow, smoothstep, tslFn, } from 'three/nodes';
7
+ import { acos, add, distance, exp, float, loop, max, min, mix, mod, mul, oneMinus, positionLocal, pow, smoothstep, tslFn, } from 'three';
8
8
  import { spherical } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { add, cos, exp, mix, positionLocal, radians, sin, sub, tslFn, vec3 } from 'three/nodes';
7
+ import { add, cos, exp, mix, positionLocal, radians, sin, sub, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/protozoa.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { exp, float, loop, matcapUV, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, float, loop, matcapUV, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/rust.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, loop, mix, positionLocal, tslFn } from 'three/nodes';
7
+ import { exp, loop, mix, positionLocal, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/satin.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, exp, mix, positionLocal, pow, tslFn, vec3 } from 'three/nodes';
7
+ import { abs, exp, mix, positionLocal, pow, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, add, cos, floor, max, mix, mod, mul, positionLocal, remapClamp, sign, tan, tslFn, vec3 } from 'three/nodes';
7
+ import { abs, add, cos, floor, max, mix, mod, mul, positionLocal, remapClamp, sign, tan, tslFn, vec3 } from 'three';
8
8
  import { hsl, noise, remapExp, toHsl } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/scream.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { add, cos, exp, mix, positionLocal, sin, tslFn } from 'three/nodes';
7
+ import { add, cos, exp, mix, positionLocal, sin, tslFn } from 'three';
8
8
  import { hsl, noise, toHsl } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { clamp, exp, mix, positionLocal, tslFn } from 'three/nodes';
7
+ import { clamp, exp, mix, positionLocal, tslFn } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/stars.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { abs, add, cond, exp, mix, positionLocal, tslFn } from 'three/nodes';
7
+ import { abs, add, cond, exp, mix, positionLocal, tslFn } from 'three';
8
8
  import { hsl, noise, toHsl } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/tiger-fur.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { exp, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
package/src/tsl-utils.js CHANGED
@@ -8,19 +8,19 @@
8
8
 
9
9
 
10
10
 
11
- import { add, cond, cos, cross, float, If, log2, max, min, mul, pow, remap, sin, sub, tslFn, uniform, vec3, vec4 } from 'three/nodes';
12
- import { mx_perlin_noise_float as noise } from 'three/addons/nodes/materialx/lib/mx_noise.js';
11
+ import { add, cond, cos, cross, float, If, log2, max, min, mul, pow, remap, sin, sub, tslFn, uniform, vec3, vec4 } from 'three';
12
+ //import { mx_perlin_noise_float as noise } from 'https://cdn.jsdelivr.net/npm/three@0.167.0/src/nodes/materialx/lib/mx_noise.js';
13
13
 
14
14
 
15
15
  // helper function - convert hsl to rgb, ported to TSL from:
16
16
  // https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative
17
17
 
18
- const hslHelper = tslFn( ([ h, s, l, n ])=>{
18
+ const hslHelper = tslFn( ([ h, s, l, n ])=>{
19
19
 
20
20
  var k = n.add( h.mul( 12 ) ).mod( 12 );
21
21
  var a = s.mul( min( l, sub( 1, l ) ) );
22
22
  return l.sub( a.mul( max( -1, min( min( k.sub( 3 ), sub( 9, k ) ), 1 ) ) ) );
23
-
23
+
24
24
  } );
25
25
 
26
26
  hslHelper.setLayout( {
@@ -48,7 +48,7 @@ const hsl = tslFn( ([ h, s, l ]) => {
48
48
  var b = hslHelper( h, s, l, 4 );
49
49
 
50
50
  return vec3( r, g, b );
51
-
51
+
52
52
  } );
53
53
 
54
54
  hsl.setLayout( {
@@ -63,7 +63,7 @@ hsl.setLayout( {
63
63
 
64
64
 
65
65
  // convert from rgb to hsl
66
- const toHsl = tslFn( ([ rgb ]) => {
66
+ const toHsl = tslFn( ([ rgb ]) => {
67
67
 
68
68
  var R = float( rgb.x ).toVar(),
69
69
  G = float( rgb.y ).toVar(),
@@ -81,26 +81,26 @@ const toHsl = tslFn( ([ rgb ]) => {
81
81
  const delta = sub( mx, mn ).toVar();
82
82
 
83
83
  S.assign( cond( L.lessThanEqual( 0.5 ), delta.div( add( mn, mx ) ), delta.div( sub( 2, add( mn, mx ) ) ) ) );
84
- If( mx.equal( R ), ()=>{
85
-
86
- H.assign( sub( G, B ).div( delta ).add( cond( G.lessThanEqual( B ), 6, 0 ) ) );
87
-
84
+ If( mx.equal( R ), ()=>{
85
+
86
+ H.assign( sub( G, B ).div( delta ).add( cond( G.lessThanEqual( B ), 6, 0 ) ) );
87
+
88
88
  } )
89
- .elseif( mx.equal( G ), ()=>{
90
-
91
- H.assign( sub( B, R ).div( delta ).add( 2 ) );
92
-
89
+ .elseif( mx.equal( G ), ()=>{
90
+
91
+ H.assign( sub( B, R ).div( delta ).add( 2 ) );
92
+
93
93
  } )
94
- .else( ()=>{
95
-
96
- H.assign( sub( R, G ).div( delta ).add( 4 ) );
97
-
94
+ .else( ()=>{
95
+
96
+ H.assign( sub( R, G ).div( delta ).add( 4 ) );
97
+
98
98
  } );
99
99
  H.divAssign( 6 );
100
100
 
101
101
  } );
102
102
  return vec3( H, S, L );
103
-
103
+
104
104
  } );
105
105
 
106
106
 
@@ -108,7 +108,7 @@ const toHsl = tslFn( ([ rgb ]) => {
108
108
 
109
109
 
110
110
  // make all elements dynamic (i.e. uniform)
111
- function dynamic( params ) {
111
+ function dynamic( params ) {
112
112
 
113
113
  var result = {};
114
114
 
@@ -120,20 +120,20 @@ function dynamic( params ) {
120
120
  }
121
121
 
122
122
  return result;
123
-
123
+
124
124
  }
125
125
 
126
126
 
127
127
 
128
128
  // convert phi-theta angles to position on unit sphere
129
- const spherical = tslFn( ([ phi, theta ]) => {
129
+ const spherical = tslFn( ([ phi, theta ]) => {
130
130
 
131
131
  return vec3(
132
132
  sin( theta ).mul( sin( phi ) ),
133
133
  cos( phi ),
134
134
  cos( theta ).mul( sin( phi ) )
135
135
  );
136
-
136
+
137
137
  } );
138
138
 
139
139
  spherical.setLayout( {
@@ -148,11 +148,11 @@ spherical.setLayout( {
148
148
 
149
149
 
150
150
  // apply Euler rotation to a vector
151
- const applyEuler = tslFn( ([ vec, eu ]) => {
151
+ const applyEuler = tslFn( ([ vec, eu ]) => {
152
152
 
153
153
  var quat = quaternionFromEuler( eu );
154
154
  return applyQuaternion( vec, quat );
155
-
155
+
156
156
  } );
157
157
 
158
158
 
@@ -183,7 +183,7 @@ const applyQuaternion = tslFn( ([ vec, quat ]) => {
183
183
  var t = cross( quat, vec ).mul( 2 ).toVar( );
184
184
 
185
185
  return add( vec, t.mul( quat.w ), cross( quat.xyz, t ) );
186
-
186
+
187
187
  } );
188
188
 
189
189
 
@@ -205,7 +205,7 @@ function mapExp( x, toMin, toMax, fromMin=0, fromMax=100 ) {
205
205
 
206
206
  }
207
207
  */
208
-
208
+
209
209
  } );
210
210
 
211
211
 
@@ -220,7 +220,11 @@ const vnoise = tslFn( ([ v ])=>{
220
220
 
221
221
  export
222
222
  {
223
- noise,
223
+ mx_noise_float as noise
224
+ } from 'three';
225
+
226
+ export
227
+ {
224
228
  vnoise,
225
229
  hsl,
226
230
  toHsl,
@@ -228,4 +232,4 @@ export
228
232
  spherical,
229
233
  applyEuler,
230
234
  remapExp
231
- };
235
+ };
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { exp, float, If, loop, mix, positionLocal, tslFn, vec3 } from 'three/nodes';
7
+ import { exp, float, If, loop, mix, positionLocal, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- import { cos, cross, exp, modelNormalMatrix, normalLocal, positionLocal, remap, sin, sub, tangentLocal, tslFn, vec3 } from 'three/nodes';
6
+ import { cos, cross, exp, modelNormalMatrix, normalLocal, positionLocal, remap, sin, sub, tangentLocal, tslFn, vec3 } from 'three';
7
7
  import { noise } from 'tsl-textures/tsl-utils.js';
8
8
 
9
9
 
package/src/wood.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from 'three';
7
- import { add, cos, exp, float, loop, mix, mul, positionLocal, radians, reciprocal, sin, sub, tslFn, vec3 } from 'three/nodes';
7
+ import { add, cos, exp, float, loop, mix, mul, positionLocal, radians, reciprocal, sin, sub, tslFn, vec3 } from 'three';
8
8
  import { noise } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  import { Color } from "three";
7
- import { acos, clamp, exp, mix, positionLocal, sin, tslFn } from 'three/nodes';
7
+ import { acos, clamp, exp, mix, positionLocal, sin, tslFn } from 'three';
8
8
  import { spherical } from 'tsl-textures/tsl-utils.js';
9
9
 
10
10