diff --git a/index.html b/index.html index a6fee76..f372fad 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@ - + @@ -83,13 +83,13 @@ - - - - - - - + + + + + + + @@ -98,14 +98,14 @@ - + - + diff --git a/js/ocean-plane.js b/js/ocean-plane.js new file mode 100644 index 0000000..9a8ea3c --- /dev/null +++ b/js/ocean-plane.js @@ -0,0 +1,35 @@ +/* global AFRAME, THREE */ + +AFRAME.registerComponent('wobble-normal', { + schema: {}, + tick: function (t) { + if (!this.el.components.material.material.normalMap) return; + this.el.components.material.material.normalMap.offset.x += 0.0001 * Math.sin(t/10000); + this.el.components.material.material.normalMap.offset.y += 0.0001 * Math.cos(t/8000); + this.el.components.material.material.normalScale.x = 0.5 + 0.5 * Math.cos(t/1000); + this.el.components.material.material.normalScale.x = 0.5 + 0.5 * Math.sin(t/1200); + } +}) + +AFRAME.registerPrimitive('a-ocean-plane', { + defaultComponents: { + geometry: { + primitive: 'plane', + height: 10000, + width: 10000 + }, + rotation: '-90 0 0', + material: { + shader: 'standard', + color: '#8ab39f', + metalness: 1, + roughness: 0.2, + normalMap: 'url(https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/waternormals.jpg)', + normalTextureRepeat: '50 50', + normalTextureOffset: '0 0', + normalScale: '0.5 0.5', + opacity: 0.8 + }, + 'wobble-normal': {} + }, +}); \ No newline at end of file diff --git a/models/chairs.glb b/models/chairs.glb new file mode 100644 index 0000000..8ce34a3 Binary files /dev/null and b/models/chairs.glb differ diff --git a/models/deck.glb b/models/deck.glb new file mode 100644 index 0000000..530e4f0 Binary files /dev/null and b/models/deck.glb differ diff --git a/models/office.glb b/models/office.glb new file mode 100644 index 0000000..ef5b39b Binary files /dev/null and b/models/office.glb differ diff --git a/models/steps.glb b/models/steps.glb new file mode 100644 index 0000000..ed8332c Binary files /dev/null and b/models/steps.glb differ diff --git a/models/table.glb b/models/table.glb new file mode 100644 index 0000000..0eef4f7 Binary files /dev/null and b/models/table.glb differ diff --git a/models/water.glb b/models/water.glb new file mode 100644 index 0000000..3ba912c Binary files /dev/null and b/models/water.glb differ