Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meshline

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meshline - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

0

dist/index.d.ts
export * from './MeshLineGeometry';
export * from './MeshLineMaterial';
export * from './raycast';

57

dist/index.js

@@ -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);
}

@@ -232,2 +224,3 @@ this.next.push(v[0], v[1], v[2]);

#include <fog_pars_vertex>
#include <clipping_planes_pars_vertex>

@@ -253,3 +246,2 @@ attribute vec3 previous;

res.x *= aspect;
vCounters = counters;
return res;

@@ -262,2 +254,3 @@ }

vUV = uv;
vCounters = counters;

@@ -275,10 +268,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;

@@ -298,2 +296,3 @@ vec4 normal = vec4(-dir.y, dir.x, 0., 1.);

vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
#include <clipping_planes_vertex>
#include <fog_vertex>

@@ -307,2 +306,3 @@ }

#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>

@@ -329,12 +329,11 @@ uniform sampler2D map;

#include <logdepthbuf_fragment>
vec4 c = vColor;
if (useGradient == 1.) c = vec4(mix(gradient[0], gradient[1], vCounters), 1.0);
if (useMap == 1.) c *= texture2D(map, vUV * repeat);
if (useAlphaMap == 1.) c.a *= texture2D(alphaMap, vUV * repeat).a;
if (c.a < alphaTest) discard;
if (useDash == 1.) {
c.a *= ceil(mod(vCounters + dashOffset, dashArray) - (dashArray * dashRatio));
}
gl_FragColor = c;
gl_FragColor.a *= step(vCounters, visibility);
vec4 diffuseColor = vColor;
if (useGradient == 1.) diffuseColor = vec4(mix(gradient[0], gradient[1], vCounters), 1.0);
if (useMap == 1.) diffuseColor *= texture2D(map, vUV * repeat);
if (useAlphaMap == 1.) diffuseColor.a *= texture2D(alphaMap, vUV * repeat).a;
if (diffuseColor.a < alphaTest) discard;
if (useDash == 1.) diffuseColor.a *= ceil(mod(vCounters + dashOffset, dashArray) - (dashArray * dashRatio));
diffuseColor.a *= step(vCounters, visibility);
#include <clipping_planes_fragment>
gl_FragColor = diffuseColor;
#include <fog_fragment>

@@ -379,3 +378,2 @@ #include <tonemapping_fragment>

__publicField(this, "gradient");
__publicField(this, "opacity", 1);
__publicField(this, "resolution");

@@ -389,3 +387,2 @@ __publicField(this, "sizeAttenuation");

__publicField(this, "visibility");
__publicField(this, "alphaTest", 0);
__publicField(this, "repeat");

@@ -392,0 +389,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.2.0",
"version": "3.2.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc