flyover / box2d.ts

A TypeScript port of Box2D
https://flyover.github.io/box2d.ts/testbed
MIT License
405 stars 85 forks source link

about pre-build definitions #53

Closed jcyuan closed 4 years ago

jcyuan commented 5 years ago

// #if B2_ENABLE_PARTICLE

is there some options in Rollup or somewhere to make this take effect? for example defines: { B2_ENABLE_PARTICLE: false } then the code in this section will be ignored when compiling?

thanks.

flyover commented 4 years ago

I agree this would be a nice feature. As of now, these are just placeholders in the code.

jcyuan commented 4 years ago

@flyover what tool are you using for replacing those placeholders?

flyover commented 4 years ago

I had been just manually searching and commenting out the sections. However, it looks like there is now something available for webpack. https://github.com/nippur72/ifdef-loader

jcyuan commented 4 years ago

got it, thanks~