[Development] Adding new third party component three.js to Qt?

Thiago Macieira thiago.macieira at intel.com
Wed Jan 14 08:03:11 CET 2015


On Wednesday 14 January 2015 05:14:10 Keränen Pasi wrote:
> Hi Thiago (and Lars),
> 
> Surely we can include a minified version that gets bundled with your app
> when you e.g. use a new project wizard to create a Canvas3D project with
> three.js? No need to have any larger than necessary files there? Already
> the new project wizard freezes up to around 20-40 seconds (beachballing Qt
> Creator on my Mac while it does it) when you create a new project as it¹s
> copying the 800k three.js file, I¹d like to cut down that time as much as
> possible.

You can include a minified version in your application's binary package. In 
fact, the binary versions of Qt will probably include the minified version 
somewhere, like a resource.

However, in the source code, the non-minified version needs to be present with 
instructions on how to regenerate the minified version.

What's optional: minifying during build. It's ok to commit the minified version 
to Git, so long as the non-minified version is easily available.

> But if people really want to hack around with the three.js port I¹d expect
> them to use the original source files (each class in separate .js file) as
> it¹s a bit unwieldy to edit that ~800k sourcefile (trust me, been there
> done that bunch of times when trying to figure out a bug in it). It¹s a
> lot nicer to edit the separate files for each class and then build the big
> source file after you¹ve done the modifications..

Again: what's important is that the we ship form in which people prefer to 
make modifications. If that's the separate files, that's what we need to ship.

> So I¹m thinking we then should actually include the separate source files
> and the build script for that as well? And offer the minified version
> (once it builds and works with V4VM that is) as ³pre built binary² version
> as well.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list