Comparing version 3.3.0 to 3.3.1
export * from './MeshLineGeometry'; | ||
export * from './MeshLineMaterial'; | ||
export * from './raycast'; |
@@ -112,7 +112,3 @@ var __defProp = Object.defineProperty; | ||
} else { | ||
v = [ | ||
this.positions[0] - (this.positions[6] - this.positions[0]), | ||
this.positions[1] - (this.positions[6 + 1] - this.positions[1]), | ||
this.positions[2] - (this.positions[6 + 2] - this.positions[2]) | ||
]; | ||
v = this.copyV3(0); | ||
} | ||
@@ -149,7 +145,3 @@ this.previous.push(v[0], v[1], v[2]); | ||
} else { | ||
v = [ | ||
this.positions[l - 1] + (this.positions[l - 1] - this.positions[l - 1 - 6]), | ||
this.positions[l - 2] + (this.positions[l - 2] - this.positions[l - 2 - 6]), | ||
this.positions[l - 3] + (this.positions[l - 3] - this.positions[l - 3 - 6]) | ||
]; | ||
v = this.copyV3(l - 1); | ||
} | ||
@@ -253,3 +245,2 @@ this.next.push(v[0], v[1], v[2]); | ||
res.x *= aspect; | ||
vCounters = counters; | ||
return res; | ||
@@ -262,2 +253,3 @@ } | ||
vUV = uv; | ||
vCounters = counters; | ||
@@ -275,10 +267,15 @@ mat4 m = projectionMatrix * modelViewMatrix; | ||
vec2 dir1 = normalize(currentP - prevP); | ||
vec2 dir2 = normalize(nextP - currentP); | ||
vec2 dir = normalize(dir1 + dir2); | ||
vec2 perp = vec2(-dir1.y, dir1.x); | ||
vec2 miter = vec2(-dir.y, dir.x); | ||
//w = clamp(w / dot(miter, perp), 0., 4. * lineWidth * width); | ||
vec2 dir; | ||
if (nextP == currentP) dir = normalize(currentP - prevP); | ||
else if (prevP == currentP) dir = normalize(nextP - currentP); | ||
else { | ||
vec2 dir1 = normalize(currentP - prevP); | ||
vec2 dir2 = normalize(nextP - currentP); | ||
dir = normalize(dir1 + dir2); | ||
vec2 perp = vec2(-dir1.y, dir1.x); | ||
vec2 miter = vec2(-dir.y, dir.x); | ||
//w = clamp(w / dot(miter, perp), 0., 4. * lineWidth * width); | ||
} | ||
//vec2 normal = (cross(vec3(dir, 0.), vec3(0., 0., 1.))).xy; | ||
@@ -377,3 +374,2 @@ vec4 normal = vec4(-dir.y, dir.x, 0., 1.); | ||
__publicField(this, "gradient"); | ||
__publicField(this, "opacity", 1); | ||
__publicField(this, "resolution"); | ||
@@ -387,3 +383,2 @@ __publicField(this, "sizeAttenuation"); | ||
__publicField(this, "visibility"); | ||
__publicField(this, "alphaTest", 0); | ||
__publicField(this, "repeat"); | ||
@@ -390,0 +385,0 @@ this.type = "MeshLineMaterial"; |
@@ -0,0 +0,0 @@ import * as THREE from 'three'; |
@@ -30,3 +30,2 @@ import * as THREE from 'three'; | ||
gradient: THREE.Color[]; | ||
opacity: number; | ||
resolution: THREE.Vector2; | ||
@@ -40,3 +39,2 @@ sizeAttenuation: number; | ||
visibility: number; | ||
alphaTest: number; | ||
repeat: THREE.Vector2; | ||
@@ -43,0 +41,0 @@ constructor(parameters: MeshLineMaterialParameters); |
import * as THREE from 'three'; | ||
import type { MeshLineMaterial } from './MeshLineMaterial'; | ||
export declare function raycast(this: THREE.Mesh<THREE.BufferGeometry, MeshLineMaterial>, raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void; |
{ | ||
"name": "meshline", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"author": "Jaume Sanchez <the.spite@gmail.com> (https://www.clicktorelease.com)", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -0,0 +0,0 @@ # MeshLine |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51498
1320