Skip to content

Instantly share code, notes, and snippets.

@fowlmouth
Created March 18, 2015 23:20
Show Gist options
  • Save fowlmouth/d6711a76e37dd660d607 to your computer and use it in GitHub Desktop.
Save fowlmouth/d6711a76e37dd660d607 to your computer and use it in GitHub Desktop.
type
jsobj {.importc.} = object
update*: proc(){.nimcall.}
d3_obj {.importc.} = object
linear* : proc(): jsobj{.nimcall.}
# this might work, to make it callable, i doubt it though
proc `()` (obj:jsobj; scale:float): float {.importc.}
var d3test {.importc,nodecl.}: d3_obj
var s = d3test.linear()
s.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment