thelonious / kld-intersections

A library of intersection algorithms covering all SVG shape types
BSD 3-Clause "New" or "Revised" License
343 stars 55 forks source link

Intersection: this.init is not a function #9

Closed arichiardi closed 7 years ago

arichiardi commented 7 years ago

Thank you for this wonderful libray!

I am trying to use the library but I get this error:

VM564:2 Uncaught TypeError: this.init is not a function
    at Intersection (<anonymous>:2:10)
    at <anonymous>:1:1

It looks like this is window here and init of course is not there. I checked and this happens on http://www.quazistax.com/testIntersection.html as well.

Do you have any hint for me on how to solve?

EDIT: I am using the release version 0.1.1.

Quazistax commented 7 years ago

Which browser are you using? I encountered other type of problem in Chrome, but that is solved now by adding pathseg.js polyfill to page. I was not able to recreate your type of problem.

arichiardi commented 7 years ago

Yes I am using Chrome Version 55.0.2883.87 (64-bit), did you try Intersection("tets") in the console?

Quazistax commented 7 years ago

try like this test = new Intersection("test")

arichiardi commented 7 years ago

Ops Sorry for some reason I was thinking that would work but of course it cannot. Closing!

Quazistax commented 7 years ago

No problem :)