tsl-textures 0.9.0 → 0.9.1
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 +1 -1
- package/src/polka-dots.js +2 -2
- package/src/scepter-head.js +2 -2
- package/src/tsl-utils.js +1 -10
package/package.json
CHANGED
package/src/polka-dots.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import { Color } from "three";
|
|
7
|
-
import { acos, add, distance, exp, float, loop, max, min, mix, mul, oneMinus, positionLocal, pow, smoothstep, tslFn, } from 'three/nodes';
|
|
8
|
-
import {
|
|
7
|
+
import { acos, add, distance, exp, float, loop, max, min, mix, mod, mul, oneMinus, positionLocal, pow, smoothstep, tslFn, } from 'three/nodes';
|
|
8
|
+
import { spherical } from 'tsl-textures/tsl-utils.js';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
package/src/scepter-head.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import { Color } from "three";
|
|
7
|
-
import { abs, add, cos, floor, max, mix, mul, positionLocal, remapClamp, sign, tan, tslFn, vec3 } from 'three/nodes';
|
|
8
|
-
import { hsl,
|
|
7
|
+
import { abs, add, cos, floor, max, mix, mod, mul, positionLocal, remapClamp, sign, tan, tslFn, vec3 } from 'three/nodes';
|
|
8
|
+
import { hsl, noise, remapExp, toHsl } from 'tsl-textures/tsl-utils.js';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
package/src/tsl-utils.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
import { add, cond, cos, cross,
|
|
11
|
+
import { add, cond, cos, cross, float, If, log2, max, min, mul, pow, remap, sin, sub, tslFn, uniform, vec3, vec4 } from 'three/nodes';
|
|
12
12
|
import { mx_perlin_noise_float as noise } from 'three/addons/nodes/materialx/lib/mx_noise.js';
|
|
13
13
|
|
|
14
14
|
|
|
@@ -187,14 +187,6 @@ const applyQuaternion = tslFn( ([ vec, quat ]) => {
|
|
|
187
187
|
} );
|
|
188
188
|
|
|
189
189
|
|
|
190
|
-
// calculate modulo (missing in TSL?)
|
|
191
|
-
const mod = tslFn( ([ x, y ]) => {
|
|
192
|
-
|
|
193
|
-
return sub( x, floor( div( x, y ) ).mul( y ) );
|
|
194
|
-
|
|
195
|
-
} );
|
|
196
|
-
|
|
197
|
-
|
|
198
190
|
|
|
199
191
|
// exponential version of remap
|
|
200
192
|
const remapExp = tslFn( ([ x, fromMin, fromMax, toMin, toMax ]) => {
|
|
@@ -227,6 +219,5 @@ export
|
|
|
227
219
|
dynamic,
|
|
228
220
|
spherical,
|
|
229
221
|
applyEuler,
|
|
230
|
-
mod,
|
|
231
222
|
remapExp
|
|
232
223
|
};
|