MCPcopy Index your code
hub / github.com/plotly/plotly.js / createLinePlot

Function createLinePlot

stackgl_modules/index.js:15838–15900  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

15836}
15837
15838function createLinePlot (options) {
15839 var gl = options.gl || (options.scene && options.scene.gl)
15840
15841 var shader = createShader(gl)
15842 shader.attributes.position.location = 0
15843 shader.attributes.nextPosition.location = 1
15844 shader.attributes.arcLength.location = 2
15845 shader.attributes.lineWidth.location = 3
15846 shader.attributes.color.location = 4
15847
15848 var pickShader = createPickShader(gl)
15849 pickShader.attributes.position.location = 0
15850 pickShader.attributes.nextPosition.location = 1
15851 pickShader.attributes.arcLength.location = 2
15852 pickShader.attributes.lineWidth.location = 3
15853 pickShader.attributes.color.location = 4
15854
15855 var buffer = createBuffer(gl)
15856 var vao = createVAO(gl, [
15857 {
15858 'buffer': buffer,
15859 'size': 3,
15860 'offset': 0,
15861 'stride': 48
15862 },
15863 {
15864 'buffer': buffer,
15865 'size': 3,
15866 'offset': 12,
15867 'stride': 48
15868 },
15869 {
15870 'buffer': buffer,
15871 'size': 1,
15872 'offset': 24,
15873 'stride': 48
15874 },
15875 {
15876 'buffer': buffer,
15877 'size': 1,
15878 'offset': 28,
15879 'stride': 48
15880 },
15881 {
15882 'buffer': buffer,
15883 'size': 4,
15884 'offset': 32,
15885 'stride': 48
15886 }
15887 ])
15888
15889 // Create texture for dash pattern
15890 var defaultTexture = ndarray(new Array(256 * 4), [256, 1, 4])
15891 for (var i = 0; i < 256 * 4; ++i) {
15892 defaultTexture.data[i] = 255
15893 }
15894 var texture = createTexture(gl, defaultTexture)
15895 texture.wrap = gl.REPEAT

Callers 1

convert.jsFile · 0.85

Calls 4

createShaderFunction · 0.85
createPickShaderFunction · 0.85
createBufferFunction · 0.85
createVAOFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…