Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mods
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
mods
Commits
9cf8b037
Commit
9cf8b037
authored
7 years ago
by
Neil Gershenfeld
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
9ffc4885
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mesh/slice raster
+11
-19
11 additions, 19 deletions
modules/mesh/slice raster
with
11 additions
and
19 deletions
modules/mesh/slice raster
+
11
−
19
View file @
9cf8b037
...
...
@@ -435,24 +435,6 @@ function worker() {
return([x3,y3,z3])
}
//
// function to draw line
//
function line(x0,y0,x1,y1) {
var x = x0
var y = y0
var dx = (x1-x0)/100
var dy = (y1-y0)/100
for (var i = 0; i < 100; ++i) {
x += dx
y += dy
ix = Math.round(w*(x-xmin)/(xmax-xmin))
iy = Math.round(h*(y-ymin)/(ymax-ymin))
buf[(h-1-iy)*w*4+ix*4+0] = 255
buf[(h-1-iy)*w*4+ix*4+1] = 255
buf[(h-1-iy)*w*4+ix*4+2] = 255
}
}
//
// get vars from buffer
//
var endian = true
...
...
@@ -538,9 +520,19 @@ function worker() {
var y1 = v[1][1]+(v[0][1]-v[1][1])
*(v[1][2]-(zmax-depth))/(v[1][2]-v[0][2])
}
line(x0,y0,x1,y1)
if (y0 < y1)
segs.push([x0,y0,x1,y1])
else
segs.push([x1,y1,x0,y0])
}
}
//
// sort segments
// map reduce filter foreach sort summon heroes
//
segs.map(
//
// fill interior
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment