gl-streamtube3d

WebJar for gl-streamtube3d

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

gl-streamtube3d
Last Version

Last Version

1.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

gl-streamtube3d
WebJar for gl-streamtube3d
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/gl-vis/gl-streamtube3d

Download gl-streamtube3d

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/gl-streamtube3d/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>gl-streamtube3d</artifactId>
    <version>1.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/gl-streamtube3d/
implementation 'org.webjars.npm:gl-streamtube3d:1.4.1'
// https://jarcasting.com/artifacts/org.webjars.npm/gl-streamtube3d/
implementation ("org.webjars.npm:gl-streamtube3d:1.4.1")
'org.webjars.npm:gl-streamtube3d:jar:1.4.1'
<dependency org="org.webjars.npm" name="gl-streamtube3d" rev="1.4.1">
  <artifact name="gl-streamtube3d" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='gl-streamtube3d', version='1.4.1')
)
libraryDependencies += "org.webjars.npm" % "gl-streamtube3d" % "1.4.1"
[org.webjars.npm/gl-streamtube3d "1.4.1"]

Dependencies

compile (7)

Group / Artifact Type Version
org.webjars.npm : gl-cone3d jar [1.5.2,2)
org.webjars.npm : glslify jar [7.0.0,8)
org.webjars.npm : glsl-inverse jar [1.0.0,2)
org.webjars.npm : glsl-out-of-range jar [1.0.4,2)
org.webjars.npm : gl-vec4 jar [1.0.1,2)
org.webjars.npm : glsl-specular-cook-torrance jar [2.0.1,3)
org.webjars.npm : gl-vec3 jar [1.1.3,2)

Project Modules

There are no modules declared in this project.

gl-streamtube3d

Visualization module for vector fields.

Example

var createScene    = require('gl-plot3d')
var createMesh     = require('gl-mesh3d')
var createStreamTube = require('gl-streamtube3d')
var wind           = require('dataset-wind')

var scene = createScene()

var bounds = [];

var streamTube = createStreamTube({
    startingPositions: positionsArray,
    maxLength: 1000,
    getVelocity: velocityFunction,
    colormap: 'portland'
}, bounds)

var mesh = createMesh(gl, streamTube)

scene.add(mesh)

Try out the example in your browser

Install

npm i gl-streamtube3d

Basic interface

Constructor

var streamTube = require('gl-streamtube3d')(params, bounds)

Creates a stream tube plot of a vector field.

  • params is an object that has the following properties:

    • startingPositions (Required) An array of starting positions for the vector field, encoded as arrays.
    • getVelocity(point) (Optional) A getter function to get the velocity at a given point.
    • getDivergence(point) (Optional) A getter function to get the divergence at a given point. Used for the width of the streamtube. Defaults to the divergence of the getVelocity function.
    • maxLength (Optional) The maximum number of segments to add to a streamtube. Default is 1000.
    • tubeSize (Optional) The scaling factor for the streamtubes. The default is 1, which avoids two max divergence tubes from touching at adjacent starting positions.
    • absoluteTubeSize (Optional) Absolute scaling factor for the streamtubes. A value of 1 scales divergence of 1 to 1 coordinate system unit. Overrides tubeSize.
    • colormap (Optional) The colormap to use.

Returns A streamtube plot object that can be passed to gl-mesh3d.

Credits

(c) 2013-2017 Mikola Lysenko, Ilmari Heikkinen. MIT License

org.webjars.npm

Versions

Version
1.4.1
1.4.0
1.2.1
1.2.0
1.1.2
1.1.1