diff --git a/src/components/skybox.js b/src/components/skybox.js index e5f26b12fe93d006fa15920378223dc1d566243b..08566b88c0388b99d1d4de4db8c79ea9f85e1863 100644 --- a/src/components/skybox.js +++ b/src/components/skybox.js @@ -271,6 +271,8 @@ AFRAME.registerComponent("skybox", { const z = distance * Math.sin(phi) * Math.cos(theta); uniforms.sunPosition.value.set(x, y, z).normalize(); + + this.sky.scale.set(distance, distance, distance); } }, diff --git a/src/gltf-component-mappings.js b/src/gltf-component-mappings.js index cb016f74a6289ed238792d19803ca32bbe80cf95..71b9cbff5b20df5eb8935664f1ae45f5b28bb478 100644 --- a/src/gltf-component-mappings.js +++ b/src/gltf-component-mappings.js @@ -4,6 +4,9 @@ AFRAME.GLTFModelPlus.registerComponent("quack", "quack"); AFRAME.GLTFModelPlus.registerComponent("sound", "sound"); AFRAME.GLTFModelPlus.registerComponent("collision-filter", "collision-filter"); AFRAME.GLTFModelPlus.registerComponent("css-class", "css-class"); +AFRAME.GLTFModelPlus.registerComponent("interactable", "css-class", (el, componentName) => { + el.setAttribute(componentName, "interactable"); +}); AFRAME.GLTFModelPlus.registerComponent("scene-shadow", "scene-shadow"); AFRAME.GLTFModelPlus.registerComponent("super-spawner", "super-spawner"); AFRAME.GLTFModelPlus.registerComponent("gltf-model-plus", "gltf-model-plus"); @@ -43,7 +46,13 @@ AFRAME.GLTFModelPlus.registerComponent( }; })() ); -AFRAME.GLTFModelPlus.registerComponent("visible", "visible"); +AFRAME.GLTFModelPlus.registerComponent("visible", "visible", (el, componentName, componentData) => { + if (typeof componentData === "object") { + el.setAttribute(componentName, componentData.visible); + } else { + el.setAttribute(componentName, componentData); + } +}); AFRAME.GLTFModelPlus.registerComponent("spawn-point", "spawn-point"); AFRAME.GLTFModelPlus.registerComponent("hoverable", "hoverable"); AFRAME.GLTFModelPlus.registerComponent("sticky-zone", "sticky-zone");