Skip to content

Commit

Permalink
Merge pull request #37 from martinRenou/update_gany1
Browse files Browse the repository at this point in the history
Update GanyJS 0.6.0
  • Loading branch information
martinRenou authored Aug 31, 2020
2 parents fbb81ac + 8822589 commit c43f000
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ipygany/ipygany.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ class Scene(_GanyDOMWidgetBase):

children = List(Instance(Block)).tag(sync=True, **widget_serialization)

background_color = Color('#fff').tag(sync=True)
background_opacity = CFloat(0.).tag(sync=True)
background_color = Color('white').tag(sync=True)
background_opacity = CFloat(1.).tag(sync=True)

def __init__(self, children=[], **kwargs):
"""Construct a Scene."""
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
12 changes: 10 additions & 2 deletions src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]),
});
}

Expand Down Expand Up @@ -713,8 +721,8 @@ class SceneModel extends _GanyDOMWidgetModel {
return {...super.defaults(),
_model_name: SceneModel.model_name,
_view_name: SceneModel.view_name,
background_color: '#fff',
background_opacity: 0.,
background_color: 'white',
background_opacity: 1.,
children: [],
};
}
Expand Down

0 comments on commit c43f000

Please sign in to comment.