@woosh/meep-engine 2.119.51 → 2.119.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.119.51",
8
+ "version": "2.119.52",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"populate_path_traced_scene_from_ecd.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/path_tracer/populate_path_traced_scene_from_ecd.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,+GAqCC"}
1
+ {"version":3,"file":"populate_path_traced_scene_from_ecd.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/path_tracer/populate_path_traced_scene_from_ecd.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,+GAkDC"}
@@ -4,6 +4,7 @@ import { Light } from "../../ecs/light/Light.js";
4
4
  import { LightType } from "../../ecs/light/LightType.js";
5
5
  import { ShadedGeometry } from "../../ecs/mesh-v2/ShadedGeometry.js";
6
6
  import { DirectionalLight } from "../../render/forward_plus/model/DirectionalLight.js";
7
+ import { PointLight } from "../../render/forward_plus/model/PointLight.js";
7
8
 
8
9
  /**
9
10
  *
@@ -35,7 +36,8 @@ export function populate_path_traced_scene_from_ecd(ecd, scene) {
35
36
  */
36
37
  (light, transform) => {
37
38
 
38
- if (light.type.getValue() === LightType.DIRECTION) {
39
+ const type = light.type.getValue();
40
+ if (type === LightType.DIRECTION) {
39
41
 
40
42
  const l = new DirectionalLight();
41
43
 
@@ -44,6 +46,18 @@ export function populate_path_traced_scene_from_ecd(ecd, scene) {
44
46
  l.intensity.copy(light.intensity);
45
47
 
46
48
  scene.addLight(l);
49
+
50
+ }else if(type === LightType.POINT){
51
+
52
+ const l = new PointLight();
53
+
54
+ l.color.copy(light.color);
55
+ l.position.copy(transform.position);
56
+ l.intensity.copy(light.intensity);
57
+ l.radius.copy(light.distance);
58
+
59
+ scene.addLight(l);
60
+
47
61
  }
48
62
 
49
63
  });