diff --git a/package-lock.json b/package-lock.json index 6fb0bfa..08bc083 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2745,9 +2745,9 @@ "dev": true }, "ganyjs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/ganyjs/-/ganyjs-0.5.0.tgz", - "integrity": "sha512-qAHgYGDxM3AjeL4wFCClecSdxBG7MPMU5l1UCh5Q/Nbea5ooiyb0JUkDRSBTObER3VBT9B6xI4+yWBcmMsPAAA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/ganyjs/-/ganyjs-0.6.0.tgz", + "integrity": "sha512-Ing8lms4AvdOJwS7SIJltJF0qWd8H2BET3wuRizhM9h6EH/RkxQUdLPPpdt3SzbiBeiTdE45YtrDqfetJ2IAdg==", "requires": { "backbone": "^1.4.0", "binary-search-tree": "^0.2.6", diff --git a/package.json b/package.json index 2d15290..e6433ba 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@jupyter-widgets/controls": "^2.0.0", "backbone": "^1.4.0", "binary-search-tree": "^0.2.6", - "ganyjs": "^0.5.0", + "ganyjs": "^0.6.0", "three": "^0.118.0", "uuid": "^3.3.3" }, diff --git a/src/widget.ts b/src/widget.ts index 4a459a3..b67649c 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -680,10 +680,18 @@ class WaterModel extends EffectModel { } createBlock () { + // TODO Add texture to the package + const url = 'https://raw.githubusercontent.com/martinRenou/threejs-caustics/master/assets/TropicalSunnyDay_'; + return new Water(this.parent.block, { underWaterBlocks: this.underWaterBlocks, causticsEnabled: this.causticsEnabled, causticsFactor: this.causticsFactor, + skybox: new THREE.CubeTextureLoader().load([ + url + 'px.jpg', url + 'nx.jpg', + url + 'py.jpg', url + 'ny.jpg', + url + 'pz.jpg', url + 'nz.jpg', + ]), }); }