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

three.meshline

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three.meshline - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "three.meshline",
"version": "1.0.1",
"version": "1.0.2",
"description": "Mesh replacement for THREE.Line",

@@ -5,0 +5,0 @@ "main": "src/THREE.MeshLine.js",

@@ -271,3 +271,2 @@ ;(function() {

'varying vec4 vColor;',
'varying vec3 vPosition;',
'varying float vCounters;',

@@ -330,3 +329,2 @@ '',

'',
' vPosition = ( modelViewMatrix * vec4( position, 1. ) ).xyz;',
' gl_Position = finalPosition;',

@@ -341,3 +339,5 @@ '',

'uniform sampler2D map;',
'uniform sampler2D alphaMap;',
'uniform float useMap;',
'uniform float useAlphaMap;',
'uniform float useDash;',

@@ -347,6 +347,6 @@ 'uniform vec2 dashArray;',

'uniform float alphaTest;',
'uniform vec2 repeat;',
'',
'varying vec2 vUV;',
'varying vec4 vColor;',
'varying vec3 vPosition;',
'varying float vCounters;',

@@ -357,4 +357,5 @@ '',

' vec4 c = vColor;',
' if( useMap == 1. ) c *= texture2D( map, vUV * repeat );',
' if( useAlphaMap == 1. ) c.a *= texture2D( alphaMap, vUV * repeat ).a;',
' if( c.a < alphaTest ) discard;',
' if( useMap == 1. ) c *= texture2D( map, vUV );',
' if( useDash == 1. ){',

@@ -379,2 +380,4 @@ ' ',

this.useMap = check( parameters.useMap, 0 );
this.alphaMap = check( parameters.alphaMap, null );
this.useAlphaMap = check( parameters.useAlphaMap, 0 );
this.color = check( parameters.color, new THREE.Color( 0xffffff ) );

@@ -390,2 +393,3 @@ this.opacity = check( parameters.opacity, 1 );

this.alphaTest = check( parameters.alphaTest, 0 );
this.repeat = check( parameters.repeat, new THREE.Vector2( 1, 1 ) );

@@ -397,2 +401,4 @@ var material = new THREE.RawShaderMaterial( {

useMap: { type: 'f', value: this.useMap },
alphaMap: { type: 't', value: this.alphaMap },
useAlphaMap: { type: 'f', value: this.useAlphaMap },
color: { type: 'c', value: this.color },

@@ -407,3 +413,4 @@ opacity: { type: 'f', value: this.opacity },

visibility: {type: 'f', value: this.visibility},
alphaTest: {type: 'f', value: this.alphaTest}
alphaTest: {type: 'f', value: this.alphaTest},
repeat: { type: 'v2', value: this.repeat }
},

@@ -417,2 +424,4 @@ vertexShader: vertexShaderSource.join( '\r\n' ),

delete parameters.useMap;
delete parameters.alphaMap;
delete parameters.useAlphaMap;
delete parameters.color;

@@ -427,2 +436,3 @@ delete parameters.opacity;

delete parameters.alphaTest;
delete parameters.repeat;

@@ -447,2 +457,4 @@ material.type = 'MeshLineMaterial';

this.useMap = source.useMap;
this.alphaMap = source.alphaMap;
this.useAlphaMap = source.useAlphaMap;
this.color.copy( source.color );

@@ -454,2 +466,7 @@ this.opacity = source.opacity;

this.far = source.far;
this.dashArray.copy( source.dashArray );
this.useDash = source.useDash;
this.visibility = source.visibility;
this.alphaTest = source.alphaTest;
this.repeat.copy( source.repeat );

@@ -456,0 +473,0 @@ return this;

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