mascot-vis 3.0.0 → 3.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.
Files changed (156) hide show
  1. package/dist/mascot-esm.js +186 -0
  2. package/package.json +3 -6
  3. package/dist/mascot-es.js +0 -27745
  4. package/dist/mascot-min.js +0 -186
  5. package/dist/mascot-umd.js +0 -27781
  6. package/js/depGraphVis.js +0 -66
  7. package/src-new-ts/action/createElement.ts +0 -91
  8. package/src-new-ts/action/encode.js +0 -20
  9. package/src-new-ts/action/repeat.js +0 -128
  10. package/src-new-ts/action/traverseScene.js +0 -41
  11. package/src-new-ts/data/Network.js +0 -2
  12. package/src-new-ts/data/Scope.js +0 -135
  13. package/src-new-ts/data/Table.js +0 -263
  14. package/src-new-ts/data/Tree.js +0 -3
  15. package/src-new-ts/data/field.ts +0 -115
  16. package/src-new-ts/data/import.ts +0 -96
  17. package/src-new-ts/data/predicate.ts +0 -82
  18. package/src-new-ts/depgraph/DepGraph.js +0 -178
  19. package/src-new-ts/depgraph/Edge.js +0 -9
  20. package/src-new-ts/depgraph/SceneGraph2DepGraph.js +0 -110
  21. package/src-new-ts/depgraph/Signal.js +0 -12
  22. package/src-new-ts/depgraph/operator/BoundsEvaluator.js +0 -30
  23. package/src-new-ts/depgraph/operator/Dataflow.js +0 -41
  24. package/src-new-ts/depgraph/operator/DomainBuilder.js +0 -50
  25. package/src-new-ts/depgraph/updateDepGraph.js +0 -45
  26. package/src-new-ts/depgraph/variable/BoundsVar.js +0 -81
  27. package/src-new-ts/depgraph/variable/ChannelVar.js +0 -17
  28. package/src-new-ts/depgraph/variable/DataScopeVar.js +0 -12
  29. package/src-new-ts/depgraph/variable/DomainVar.js +0 -15
  30. package/src-new-ts/depgraph/variable/FieldVar.js +0 -17
  31. package/src-new-ts/depgraph/variable/LayoutParameter.js +0 -8
  32. package/src-new-ts/depgraph/variable/ScaleVar.js +0 -13
  33. package/src-new-ts/depgraph/variable/Variable.js +0 -39
  34. package/src-new-ts/element/gradient/LinearGradient.js +0 -37
  35. package/src-new-ts/element/group/Collection.js +0 -109
  36. package/src-new-ts/element/group/Group.js +0 -307
  37. package/src-new-ts/element/group/Scene.js +0 -98
  38. package/src-new-ts/element/mark/CircleMark.ts +0 -85
  39. package/src-new-ts/element/mark/Mark.ts +0 -233
  40. package/src-new-ts/element/mark/PathMark.js +0 -483
  41. package/src-new-ts/element/mark/Segment.js +0 -29
  42. package/src-new-ts/element/mark/Vertex.js +0 -118
  43. package/src-new-ts/encode/Scale.ts +0 -115
  44. package/src-new-ts/index.ts +0 -19
  45. package/src-new-ts/layout/Layout.ts +0 -3
  46. package/src-new-ts/render/CanvasRenderer.ts +0 -24
  47. package/src-new-ts/render/SVGRenderer.js +0 -316
  48. package/src-new-ts/util.ts +0 -3
  49. package/src-old/action/Classify.js +0 -53
  50. package/src-old/action/Densify.js +0 -199
  51. package/src-old/action/Partition.js +0 -531
  52. package/src-old/action/Repeat.js +0 -106
  53. package/src-old/action/Repopulate.js +0 -44
  54. package/src-old/action/Stratify.js +0 -156
  55. package/src-old/basic/Gradient.js +0 -37
  56. package/src-old/basic/Point.js +0 -51
  57. package/src-old/basic/Rectangle.js +0 -63
  58. package/src-old/bind/bindToAngle.js +0 -56
  59. package/src-old/bind/bindToAreaMark.js +0 -360
  60. package/src-old/bind/bindToColor.js +0 -114
  61. package/src-old/bind/bindToLink.js +0 -81
  62. package/src-old/bind/bindToPosition.js +0 -283
  63. package/src-old/bind/bindToRadialDistance.js +0 -62
  64. package/src-old/bind/bindToSize.js +0 -235
  65. package/src-old/bind/bindToText.js +0 -60
  66. package/src-old/bind/bindToThickness.js +0 -100
  67. package/src-old/constraint/AffixConstraint.js +0 -129
  68. package/src-old/constraint/AlignConstraint.js +0 -58
  69. package/src-old/core/Encoding.js +0 -336
  70. package/src-old/core/Scale.js +0 -322
  71. package/src-old/core/SceneLoader.js +0 -290
  72. package/src-old/core/SceneValidator.js +0 -232
  73. package/src-old/core/SpecExecutor.js +0 -113
  74. package/src-old/core/SpecGenerator.js +0 -350
  75. package/src-old/data/DataImporter.js +0 -64
  76. package/src-old/data/DataScope.js +0 -124
  77. package/src-old/data/DataTable.js +0 -338
  78. package/src-old/data/Network.js +0 -106
  79. package/src-old/data/Tree.js +0 -251
  80. package/src-old/data/transform/Bin.js +0 -46
  81. package/src-old/data/transform/Filter.js +0 -48
  82. package/src-old/data/transform/Groupby.js +0 -18
  83. package/src-old/data/transform/KDE.js +0 -58
  84. package/src-old/data/transform/Sort.js +0 -14
  85. package/src-old/data/transform/Split.js +0 -5
  86. package/src-old/data/transform/partition.js +0 -46
  87. package/src-old/history/UndoRedoStack +0 -0
  88. package/src-old/index.js +0 -271
  89. package/src-old/indexSVG.js +0 -259
  90. package/src-old/interaction/Interaction.js +0 -91
  91. package/src-old/interaction/MouseEvent.js +0 -8
  92. package/src-old/interaction/Selection.js +0 -9
  93. package/src-old/interaction/brush.js +0 -362
  94. package/src-old/item/Segment.js +0 -29
  95. package/src-old/item/Vertex.js +0 -118
  96. package/src-old/item/composite/Collection.js +0 -106
  97. package/src-old/item/composite/Glyph.js +0 -19
  98. package/src-old/item/composite/Group.js +0 -310
  99. package/src-old/item/composite/Scene.js +0 -1251
  100. package/src-old/item/mark/ArcPath.js +0 -181
  101. package/src-old/item/mark/AreaPath.js +0 -78
  102. package/src-old/item/mark/CirclePath.js +0 -102
  103. package/src-old/item/mark/EllipsePath.js +0 -5
  104. package/src-old/item/mark/Image.js +0 -101
  105. package/src-old/item/mark/LinkPath.js +0 -118
  106. package/src-old/item/mark/Mark.js +0 -163
  107. package/src-old/item/mark/Path.js +0 -494
  108. package/src-old/item/mark/PointText.js +0 -201
  109. package/src-old/item/mark/PolygonPath.js +0 -64
  110. package/src-old/item/mark/RectPath.js +0 -88
  111. package/src-old/item/mark/RingPath.js +0 -92
  112. package/src-old/item/refs/Axis.js +0 -362
  113. package/src-old/item/refs/EncodingAxis.js +0 -515
  114. package/src-old/item/refs/Gridlines.js +0 -144
  115. package/src-old/item/refs/LayoutAxis.js +0 -316
  116. package/src-old/item/refs/Legend.js +0 -273
  117. package/src-old/layout/Circular.js +0 -95
  118. package/src-old/layout/Force.js +0 -52
  119. package/src-old/layout/Grid.js +0 -423
  120. package/src-old/layout/Layout.js +0 -13
  121. package/src-old/layout/Packing.js +0 -56
  122. package/src-old/layout/Stack.js +0 -264
  123. package/src-old/layout/Strata.js +0 -88
  124. package/src-old/layout/Sugiyama.js +0 -59
  125. package/src-old/layout/TidyTree.js +0 -105
  126. package/src-old/layout/Treemap.js +0 -87
  127. package/src-old/renderer/SVGInteractionHandler.js +0 -241
  128. package/src-old/renderer/SVGRenderer.js +0 -325
  129. package/src-old/renderer/WebGLRenderer.js +0 -1097
  130. package/src-old/renderer/WebGLRenderer2.js +0 -249
  131. package/src-old/renderer/threejs/Line2.js +0 -18
  132. package/src-old/renderer/threejs/LineGeometry.js +0 -77
  133. package/src-old/renderer/threejs/LineMaterial.js +0 -605
  134. package/src-old/renderer/threejs/LineSegments2.js +0 -281
  135. package/src-old/renderer/threejs/LineSegmentsGeometry.js +0 -226
  136. package/src-old/renderer/threejs/Wireframe.js +0 -51
  137. package/src-old/renderer/threejs/WireframeGeometry2.js +0 -16
  138. package/src-old/scale/areaSize.js +0 -0
  139. package/src-old/scale/domain.js +0 -38
  140. package/src-old/util/Constants.js +0 -180
  141. package/src-old/util/DataUtil.js +0 -35
  142. package/src-old/util/ItemUtil.js +0 -586
  143. package/src-old/util/Numerical.js +0 -33
  144. package/tests/demo-tests/README.md +0 -80
  145. package/tests/demo-tests/SVG2PNG.js +0 -56
  146. package/tests/demo-tests/demos2CanvasPNGs.js +0 -69
  147. package/tests/demo-tests/demos2ScenesSVGs.js +0 -100
  148. package/tests/demo-tests/pathElementWorker.js +0 -91
  149. package/tests/demo-tests/pixelTest.js +0 -62
  150. package/tests/demo-tests/renderDemos.html +0 -132
  151. package/tests/demo-tests/serializationTest.js +0 -36
  152. package/tests/demo-tests/serializeDemos.html +0 -134
  153. package/tests/unit-tests/README.md +0 -4
  154. package/tests/unit-tests/jasmine-browser.json +0 -21
  155. package/tests/unit-tests/jasmine.json +0 -14
  156. package/tests/unit-tests/testSpec.js +0 -274
@@ -1,605 +0,0 @@
1
- import * as THREE from 'three';
2
-
3
-
4
- /**
5
- * parameters = {
6
- * color: <hex>,
7
- * linewidth: <float>,
8
- * dashed: <boolean>,
9
- * dashScale: <float>,
10
- * dashSize: <float>,
11
- * gapSize: <float>,
12
- * resolution: <Vector2>, // to be set by renderer
13
- * }
14
- */
15
- THREE.UniformsLib.line = {
16
- worldUnits: {
17
- value: 1
18
- },
19
- linewidth: {
20
- value: 1
21
- },
22
- resolution: {
23
- value: new THREE.Vector2( 1, 1 )
24
- },
25
- dashScale: {
26
- value: 1
27
- },
28
- dashSize: {
29
- value: 1
30
- },
31
- gapSize: {
32
- value: 1
33
- } // todo FIX - maybe change to totalSize
34
-
35
- };
36
-
37
- THREE.ShaderLib[ 'line' ] = {
38
- uniforms: THREE.UniformsUtils.merge( [ THREE.UniformsLib.common, THREE.UniformsLib.fog, THREE.UniformsLib.line ] ),
39
- vertexShader:
40
- /* glsl */
41
- `
42
- #include <common>
43
- #include <color_pars_vertex>
44
- #include <fog_pars_vertex>
45
- #include <logdepthbuf_pars_vertex>
46
- #include <clipping_planes_pars_vertex>
47
-
48
- uniform float linewidth;
49
- uniform vec2 resolution;
50
-
51
- attribute vec3 instanceStart;
52
- attribute vec3 instanceEnd;
53
-
54
- attribute vec3 instanceColorStart;
55
- attribute vec3 instanceColorEnd;
56
-
57
- varying vec2 vUv;
58
- varying vec4 worldPos;
59
- varying vec3 worldStart;
60
- varying vec3 worldEnd;
61
-
62
- #ifdef USE_DASH
63
-
64
- uniform float dashScale;
65
- attribute float instanceDistanceStart;
66
- attribute float instanceDistanceEnd;
67
- varying float vLineDistance;
68
-
69
- #endif
70
-
71
- void trimSegment( const in vec4 start, inout vec4 end ) {
72
-
73
- // trim end segment so it terminates between the camera plane and the near plane
74
-
75
- // conservative estimate of the near plane
76
- float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
77
- float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
78
- float nearEstimate = - 0.5 * b / a;
79
-
80
- float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
81
-
82
- end.xyz = mix( start.xyz, end.xyz, alpha );
83
-
84
- }
85
-
86
- void main() {
87
-
88
- #ifdef USE_COLOR
89
-
90
- vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
91
-
92
- #endif
93
-
94
- #ifdef USE_DASH
95
-
96
- vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
97
-
98
- #endif
99
-
100
- float aspect = resolution.x / resolution.y;
101
-
102
- vUv = uv;
103
-
104
- // camera space
105
- vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
106
- vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
107
-
108
- worldStart = start.xyz;
109
- worldEnd = end.xyz;
110
-
111
- // special case for perspective projection, and segments that terminate either in, or behind, the camera plane
112
- // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
113
- // but we need to perform ndc-space calculations in the shader, so we must address this issue directly
114
- // perhaps there is a more elegant solution -- WestLangley
115
-
116
- bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
117
-
118
- if ( perspective ) {
119
-
120
- if ( start.z < 0.0 && end.z >= 0.0 ) {
121
-
122
- trimSegment( start, end );
123
-
124
- } else if ( end.z < 0.0 && start.z >= 0.0 ) {
125
-
126
- trimSegment( end, start );
127
-
128
- }
129
-
130
- }
131
-
132
- // clip space
133
- vec4 clipStart = projectionMatrix * start;
134
- vec4 clipEnd = projectionMatrix * end;
135
-
136
- // ndc space
137
- vec3 ndcStart = clipStart.xyz / clipStart.w;
138
- vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
139
-
140
- // direction
141
- vec2 dir = ndcEnd.xy - ndcStart.xy;
142
-
143
- // account for clip-space aspect ratio
144
- dir.x *= aspect;
145
- dir = normalize( dir );
146
-
147
- #ifdef WORLD_UNITS
148
-
149
- // get the offset direction as perpendicular to the view vector
150
- vec3 worldDir = normalize( end.xyz - start.xyz );
151
- vec3 offset;
152
- if ( position.y < 0.5 ) {
153
-
154
- offset = normalize( cross( start.xyz, worldDir ) );
155
-
156
- } else {
157
-
158
- offset = normalize( cross( end.xyz, worldDir ) );
159
-
160
- }
161
-
162
- // sign flip
163
- if ( position.x < 0.0 ) offset *= - 1.0;
164
-
165
- float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );
166
-
167
- // don't extend the line if we're rendering dashes because we
168
- // won't be rendering the endcaps
169
- #ifndef USE_DASH
170
-
171
- // extend the line bounds to encompass endcaps
172
- start.xyz += - worldDir * linewidth * 0.5;
173
- end.xyz += worldDir * linewidth * 0.5;
174
-
175
- // shift the position of the quad so it hugs the forward edge of the line
176
- offset.xy -= dir * forwardOffset;
177
- offset.z += 0.5;
178
-
179
- #endif
180
-
181
- // endcaps
182
- if ( position.y > 1.0 || position.y < 0.0 ) {
183
-
184
- offset.xy += dir * 2.0 * forwardOffset;
185
-
186
- }
187
-
188
- // adjust for linewidth
189
- offset *= linewidth * 0.5;
190
-
191
- // set the world position
192
- worldPos = ( position.y < 0.5 ) ? start : end;
193
- worldPos.xyz += offset;
194
-
195
- // project the worldpos
196
- vec4 clip = projectionMatrix * worldPos;
197
-
198
- // shift the depth of the projected points so the line
199
- // segements overlap neatly
200
- vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
201
- clip.z = clipPose.z * clip.w;
202
-
203
- #else
204
-
205
- vec2 offset = vec2( dir.y, - dir.x );
206
- // undo aspect ratio adjustment
207
- dir.x /= aspect;
208
- offset.x /= aspect;
209
-
210
- // sign flip
211
- if ( position.x < 0.0 ) offset *= - 1.0;
212
-
213
- // endcaps
214
- if ( position.y < 0.0 ) {
215
-
216
- offset += - dir;
217
-
218
- } else if ( position.y > 1.0 ) {
219
-
220
- offset += dir;
221
-
222
- }
223
-
224
- // adjust for linewidth
225
- offset *= linewidth;
226
-
227
- // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
228
- offset /= resolution.y;
229
-
230
- // select end
231
- vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
232
-
233
- // back to clip space
234
- offset *= clip.w;
235
-
236
- clip.xy += offset;
237
-
238
- #endif
239
-
240
- gl_Position = clip;
241
-
242
- vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
243
-
244
- #include <logdepthbuf_vertex>
245
- #include <clipping_planes_vertex>
246
- #include <fog_vertex>
247
-
248
- }
249
- `,
250
- fragmentShader:
251
- /* glsl */
252
- `
253
- uniform vec3 diffuse;
254
- uniform float opacity;
255
- uniform float linewidth;
256
-
257
- #ifdef USE_DASH
258
-
259
- uniform float dashSize;
260
- uniform float gapSize;
261
-
262
- #endif
263
-
264
- varying float vLineDistance;
265
- varying vec4 worldPos;
266
- varying vec3 worldStart;
267
- varying vec3 worldEnd;
268
-
269
- #include <common>
270
- #include <color_pars_fragment>
271
- #include <fog_pars_fragment>
272
- #include <logdepthbuf_pars_fragment>
273
- #include <clipping_planes_pars_fragment>
274
-
275
- varying vec2 vUv;
276
-
277
- vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
278
-
279
- float mua;
280
- float mub;
281
-
282
- vec3 p13 = p1 - p3;
283
- vec3 p43 = p4 - p3;
284
-
285
- vec3 p21 = p2 - p1;
286
-
287
- float d1343 = dot( p13, p43 );
288
- float d4321 = dot( p43, p21 );
289
- float d1321 = dot( p13, p21 );
290
- float d4343 = dot( p43, p43 );
291
- float d2121 = dot( p21, p21 );
292
-
293
- float denom = d2121 * d4343 - d4321 * d4321;
294
-
295
- float numer = d1343 * d4321 - d1321 * d4343;
296
-
297
- mua = numer / denom;
298
- mua = clamp( mua, 0.0, 1.0 );
299
- mub = ( d1343 + d4321 * ( mua ) ) / d4343;
300
- mub = clamp( mub, 0.0, 1.0 );
301
-
302
- return vec2( mua, mub );
303
-
304
- }
305
-
306
- void main() {
307
-
308
- #include <clipping_planes_fragment>
309
-
310
- #ifdef USE_DASH
311
-
312
- if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
313
-
314
- if ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
315
-
316
- #endif
317
-
318
- float alpha = opacity;
319
-
320
- #ifdef WORLD_UNITS
321
-
322
- // Find the closest points on the view ray and the line segment
323
- vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
324
- vec3 lineDir = worldEnd - worldStart;
325
- vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
326
-
327
- vec3 p1 = worldStart + lineDir * params.x;
328
- vec3 p2 = rayEnd * params.y;
329
- vec3 delta = p1 - p2;
330
- float len = length( delta );
331
- float norm = len / linewidth;
332
-
333
- #ifndef USE_DASH
334
-
335
- #ifdef ALPHA_TO_COVERAGE
336
-
337
- float dnorm = fwidth( norm );
338
- alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
339
-
340
- #else
341
-
342
- if ( norm > 0.5 ) {
343
-
344
- discard;
345
-
346
- }
347
-
348
- #endif
349
-
350
- #endif
351
-
352
- #else
353
-
354
- #ifdef ALPHA_TO_COVERAGE
355
-
356
- // artifacts appear on some hardware if a derivative is taken within a conditional
357
- float a = vUv.x;
358
- float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
359
- float len2 = a * a + b * b;
360
- float dlen = fwidth( len2 );
361
-
362
- if ( abs( vUv.y ) > 1.0 ) {
363
-
364
- alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
365
-
366
- }
367
-
368
- #else
369
-
370
- if ( abs( vUv.y ) > 1.0 ) {
371
-
372
- float a = vUv.x;
373
- float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
374
- float len2 = a * a + b * b;
375
-
376
- if ( len2 > 1.0 ) discard;
377
-
378
- }
379
-
380
- #endif
381
-
382
- #endif
383
-
384
- vec4 diffuseColor = vec4( diffuse, alpha );
385
-
386
- #include <logdepthbuf_fragment>
387
- #include <color_fragment>
388
-
389
- gl_FragColor = vec4( diffuseColor.rgb, alpha );
390
-
391
- #include <tonemapping_fragment>
392
- #include <encodings_fragment>
393
- #include <fog_fragment>
394
- #include <premultiplied_alpha_fragment>
395
-
396
- }
397
- `
398
- };
399
-
400
- export default class LineMaterial extends THREE.ShaderMaterial {
401
-
402
- constructor( parameters ) {
403
-
404
- super( {
405
- type: 'LineMaterial',
406
- uniforms: THREE.UniformsUtils.clone( THREE.ShaderLib[ 'line' ].uniforms ),
407
- vertexShader: THREE.ShaderLib[ 'line' ].vertexShader,
408
- fragmentShader: THREE.ShaderLib[ 'line' ].fragmentShader,
409
- clipping: true // required for clipping support
410
-
411
- } );
412
- Object.defineProperties( this, {
413
- color: {
414
- enumerable: true,
415
- get: function () {
416
-
417
- return this.uniforms.diffuse.value;
418
-
419
- },
420
- set: function ( value ) {
421
-
422
- this.uniforms.diffuse.value = value;
423
-
424
- }
425
- },
426
- worldUnits: {
427
- enumerable: true,
428
- get: function () {
429
-
430
- return 'WORLD_UNITS' in this.defines;
431
-
432
- },
433
- set: function ( value ) {
434
-
435
- if ( value === true ) {
436
-
437
- this.defines.WORLD_UNITS = '';
438
-
439
- } else {
440
-
441
- delete this.defines.WORLD_UNITS;
442
-
443
- }
444
-
445
- }
446
- },
447
- linewidth: {
448
- enumerable: true,
449
- get: function () {
450
-
451
- return this.uniforms.linewidth.value;
452
-
453
- },
454
- set: function ( value ) {
455
-
456
- this.uniforms.linewidth.value = value;
457
-
458
- }
459
- },
460
- dashed: {
461
- enumerable: true,
462
- get: function () {
463
-
464
- return Boolean( 'USE_DASH' in this.defines );
465
-
466
- },
467
-
468
- set( value ) {
469
-
470
- if ( Boolean( value ) !== Boolean( 'USE_DASH' in this.defines ) ) {
471
-
472
- this.needsUpdate = true;
473
-
474
- }
475
-
476
- if ( value === true ) {
477
-
478
- this.defines.USE_DASH = '';
479
-
480
- } else {
481
-
482
- delete this.defines.USE_DASH;
483
-
484
- }
485
-
486
- }
487
-
488
- },
489
- dashScale: {
490
- enumerable: true,
491
- get: function () {
492
-
493
- return this.uniforms.dashScale.value;
494
-
495
- },
496
- set: function ( value ) {
497
-
498
- this.uniforms.dashScale.value = value;
499
-
500
- }
501
- },
502
- dashSize: {
503
- enumerable: true,
504
- get: function () {
505
-
506
- return this.uniforms.dashSize.value;
507
-
508
- },
509
- set: function ( value ) {
510
-
511
- this.uniforms.dashSize.value = value;
512
-
513
- }
514
- },
515
- dashOffset: {
516
- enumerable: true,
517
- get: function () {
518
-
519
- return this.uniforms.dashOffset.value;
520
-
521
- },
522
- set: function ( value ) {
523
-
524
- this.uniforms.dashOffset.value = value;
525
-
526
- }
527
- },
528
- gapSize: {
529
- enumerable: true,
530
- get: function () {
531
-
532
- return this.uniforms.gapSize.value;
533
-
534
- },
535
- set: function ( value ) {
536
-
537
- this.uniforms.gapSize.value = value;
538
-
539
- }
540
- },
541
- opacity: {
542
- enumerable: true,
543
- get: function () {
544
-
545
- return this.uniforms.opacity.value;
546
-
547
- },
548
- set: function ( value ) {
549
-
550
- this.uniforms.opacity.value = value;
551
-
552
- }
553
- },
554
- resolution: {
555
- enumerable: true,
556
- get: function () {
557
-
558
- return this.uniforms.resolution.value;
559
-
560
- },
561
- set: function ( value ) {
562
-
563
- this.uniforms.resolution.value.copy( value );
564
-
565
- }
566
- },
567
- alphaToCoverage: {
568
- enumerable: true,
569
- get: function () {
570
-
571
- return Boolean( 'ALPHA_TO_COVERAGE' in this.defines );
572
-
573
- },
574
- set: function ( value ) {
575
-
576
- if ( Boolean( value ) !== Boolean( 'ALPHA_TO_COVERAGE' in this.defines ) ) {
577
-
578
- this.needsUpdate = true;
579
-
580
- }
581
-
582
- if ( value === true ) {
583
-
584
- this.defines.ALPHA_TO_COVERAGE = '';
585
- this.extensions.derivatives = true;
586
-
587
- } else {
588
-
589
- delete this.defines.ALPHA_TO_COVERAGE;
590
- this.extensions.derivatives = false;
591
-
592
- }
593
-
594
- }
595
- }
596
- } );
597
- this.setValues( parameters );
598
-
599
- }
600
-
601
- }
602
-
603
- LineMaterial.prototype.isLineMaterial = true;
604
-
605
-