Bläddra i källkod

bugfix in mapper, added receiveShadow per default

Raanan Weber 7 år sedan
förälder
incheckning
45f78d1980

+ 1 - 1
Viewer/dist/ufoExample.html

@@ -27,7 +27,7 @@
             </model>
             <lights>
                 <light2 shadow-ortho-scale="0.5">
-
+                    <position y="1.8"></position>
                 </light2>
             </lights>
         </babylon>

+ 1 - 1
Viewer/src/configuration/mappers.ts

@@ -53,7 +53,7 @@ class HTMLMapper implements IMapper {
                     } else if (val === "false") {
                         val = false;
                     } else {
-                        var isnum = /^\d+$/.test(val);
+                        var isnum = !isNaN(parseFloat(val)) && isFinite(val);///^\d+$/.test(val);
                         if (isnum) {
                             let number = parseFloat(val);
                             if (!isNaN(number)) {

+ 2 - 1
Viewer/src/configuration/types/extended.ts

@@ -95,7 +95,8 @@ export let extendedConfiguration: ViewerConfiguration = {
             environmentIntensity: 0.268
         },
         normalize: true,
-        castShadow: true
+        castShadow: true,
+        receiveShadows: true
     },
     lab: {
         environmentAssetsRootURL: '/assets/environment/',