p5.env 0.0.1 → 0.0.2
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/p5.env.js +2 -2
- package/package.json +1 -1
package/p5.env.js
CHANGED
|
@@ -207,7 +207,7 @@ function envLight(p5, fn) {
|
|
|
207
207
|
rotation = p5.strandsNode(rotation)
|
|
208
208
|
h = p5.strandsNode(h)
|
|
209
209
|
|
|
210
|
-
let up = p5.strandsTernary(this.abs(planeNormal.y).
|
|
210
|
+
let up = p5.strandsTernary(this.abs(planeNormal.y).lessThan(0.99), this.vec3(0, 1, 0), this.vec3(1, 0, 0))
|
|
211
211
|
let xLocal = this.normalize(this.cross(up, planeNormal))
|
|
212
212
|
let yLocal = this.cross(planeNormal, xLocal)
|
|
213
213
|
|
|
@@ -240,7 +240,7 @@ function envLight(p5, fn) {
|
|
|
240
240
|
outerRadius = p5.strandsNode(outerRadius)
|
|
241
241
|
rotation = p5.strandsNode(rotation)
|
|
242
242
|
|
|
243
|
-
let up = p5.strandsTernary(this.abs(center.y).
|
|
243
|
+
let up = p5.strandsTernary(this.abs(center.y).lessThan(0.99), this.vec3(0, 1, 0), this.vec3(1, 0, 0))
|
|
244
244
|
let xLocal = this.normalize(this.cross(up, center))
|
|
245
245
|
let yLocal = this.cross(center, xLocal)
|
|
246
246
|
|