Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update markers alignment #4

Merged
merged 4 commits into from
Jun 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ plot.draw()
```

# License
(c) 2015 Mikola Lysenko. MIT License
(c) 2016 Dima Yv. MIT License
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
"scatter",
"plot"
],
"author": "Mikola Lysenko",
"contributors": [
"Étienne Tétreault-Pinard",
"Robert Monfera"
],
"author": "Dima Yv",
"license": "MIT",
"bugs": {
"url": "https://github.com/gl-vis/gl-scatter2d-sdf/issues"
Expand All @@ -32,8 +28,8 @@
"dependencies": {
"binary-search-bounds": "^2.0.3",
"clamp": "^1.0.1",
"color-id": "^1.0.0",
"font-atlas-sdf": "^1.2.0",
"color-id": "^1.1.0",
"font-atlas-sdf": "^1.3.1",
"gl-buffer": "^2.1.2",
"gl-shader": "^4.2.1",
"gl-texture2d": "^2.1.0",
Expand All @@ -42,11 +38,11 @@
"typedarray-pool": "^1.1.0"
},
"devDependencies": {
"gl-spikes2d": "^1.0.1",
"gl-select-box": "^1.0.1",
"canvas-fit": "^1.5.0",
"fps-indicator": "^1.0.2",
"fps-indicator": "^1.1.0",
"gl-plot2d": "^1.2.0",
"gl-select-box": "^1.0.1",
"gl-spikes2d": "^1.0.1",
"mouse-change": "^1.4.0",
"mouse-wheel": "^1.2.0"
}
Expand Down
6 changes: 4 additions & 2 deletions scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var createBuffer = require('gl-buffer')
var pool = require('typedarray-pool')
var shaders = require('./lib/shaders')
var snapPoints = require('snap-points-2d')
var atlas = require('font-atlas-sdf')
var atlas = require('../font-atlas-sdf')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, fixed

var createTexture = require('gl-texture2d')
var colorId = require('color-id')
var ndarray = require('ndarray')
Expand Down Expand Up @@ -48,6 +48,7 @@ function GLScatterFancy(
this.charCanvas = document.createElement('canvas')
this.charTexture = createTexture(this.plot.gl, this.charCanvas)
this.charStep = 400
this.charFit = .255

//snapping loses points sorting, so disable snapping on small number of points
this.snapThreshold = 1e4
Expand Down Expand Up @@ -323,7 +324,8 @@ proto.update = function(options) {
shape: [atlasW, atlasH],
step: [step, step],
chars: chars,
align: true
align: true,
fit: this.charFit
})
this.chars = chars
}
Expand Down