Skip to content

Import only the THREE.js classes that are used #208

@oscarlorentzon

Description

@oscarlorentzon

Currently the complete THREE.js library is imported when building the distribution files with Browserify.

From THREE r80 that library is implemented with ES6 modules. This makes it possible to import only the THREE.js classes that MapillaryJS uses and would decrease the size of MapillaryJS distribution.

This would potentially require switching build tool from Browserify to Rollup or using additional transforms or plugins in Browserify to handle the non supported ES6 modules in THREE.js. The tool must work with Typescript as well.

This issue also requires going through all files importing modules from THREE.js and change the import statements to import only what is needed instead of wildcarding.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions