chandlerprall / ThreeCSG

CSG plugin for Three.js
MIT License
453 stars 152 forks source link

minor changes - fixed depreciated calls in example.html, fixed ES6 version #31

Closed tom-berend closed 7 years ago

tom-berend commented 7 years ago

Hi, sorry i think this request is a mess. First time I am using Git and I'm just learning JS. Sorry to waste your time.

For some reason my editor (Atom) changes empty lines in your files, I think it is truncating tabs. But whatever, it makes a mess of source compare, I didn't make that many changes. I tried to clean up by copying from your repository and manually making changes in Github web editor, but that only helped a bit.

And I lost the description of one of the files, don't know where it went or how to fix it.

tom-berend commented 7 years ago

Hi Chandler,

I restored 'export default' in Github. But the ES6 version of ThreeCSG will not run with it, at least not on Chrome and Firefox.

for my own purpose, I am using:

/ export default / class ThreeBSP {

Tom

On 2017-04-21 05:28 PM, Chandler wrote:

@chandlerprall requested changes on this pull request.


In threeCSG.es6 https://github.com/chandlerprall/ThreeCSG/pull/31#discussion_r112780107:

@@ -4,7 +4,7 @@ const EPSILON = 1e-5, FRONT = 1, BACK = 2, SPANNING = 3; -export default class ThreeBSP { +class ThreeBSP {

need to keep the |export default| on this class

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chandlerprall/ThreeCSG/pull/31#pullrequestreview-34126822, or mute the thread https://github.com/notifications/unsubscribe-auth/AKj42f8iHmmKHEXXJzu6bRL5xLqgAwiuks5ryR97gaJpZM4NEkMy.

chandlerprall commented 7 years ago

the ES6 version of ThreeCSG will not run with it

That's true. The ES6 specification defines how module imports and exports should work, but no browser has implemented this feature yet. Today, many developers who use ES6 are using a bundling system such as Webpack to understand these import/export statements.