Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
fix module import (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Crane authored Oct 9, 2019
1 parent d3d6258 commit 90d3dcb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { EnvironmentLight } from './EnvironmentLight';
import { RayTracingMaterial } from './RayTracingMaterial';
import { RayTracingRenderer } from './RayTracingRenderer';

/* global THREE */
if (THREE) {
if (window.THREE) {
/* global THREE */
THREE.LensCamera = LensCamera;
THREE.SoftDirectionalLight = SoftDirectionalLight;
THREE.EnvironmentLight = EnvironmentLight;
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/RayTracingShader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as THREE from 'three';
import fragString from './glsl/rayTrace.frag';
import { EnvironmentLight } from '../EnvironmentLight';
import { createShader, createProgram, getUniforms } from './glUtil';
import { mergeMeshesToGeometry } from './mergeMeshesToGeometry';
import { bvhAccel, flattenBvh } from './bvhAccel';
Expand Down Expand Up @@ -266,7 +267,7 @@ function decomposeScene(scene) {
if (child instanceof THREE.DirectionalLight) {
directionalLights.push(child);
}
if (child instanceof THREE.EnvironmentLight) {
if (child instanceof EnvironmentLight) {
if (environmentLights.length > 1) {
console.warn(environmentLights, 'only one environment light can be used per scene');
}
Expand Down

0 comments on commit 90d3dcb

Please sign in to comment.