Skip to content

RectAreaLightHelper not working on npm distribution #15579

@david-campos

Description

@david-campos
Description of the problem

RectAreaLightHelper from 'three' package installed via npm is not working, it seems to try to use at some point THREE.BackSide, but THREE is not existent in the file (it has not been imported) so the construction of a RectAreaLightHelper fails.

To recreate the bug simply install the npm version of three as indicated in the documentation
npm install three
and run some code like:

import {RectAreaLight, RectAreaLightHelper} from "three";

var light = new RectAreaLight();
var helper = new RectAreaLightHelper(light);

When reaching the construction of the new helper, the script fails.

Screenshot

Here we can see the error in build/three.module.js inside the node_modules folder, seen from Chrome developer tools:
Imgur

Three.js version

npm distribution, three 0.100.0

Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

Will happen on any

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions