Skip to content

Commit

Permalink
Merge pull request #248 from vimaec/sroberge/sky_box
Browse files Browse the repository at this point in the history
apply initial skybox settings.
  • Loading branch information
vim-sroberge authored Oct 10, 2024
2 parents 9b6fab2 + 0c02fc2 commit 46c57f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vim-webgl-viewer",
"version": "2.0.8",
"version": "2.0.9",
"description": "A high-performance 3D viewer and VIM file loader built on top of Three.JS.",
"files": [
"dist"
Expand Down
5 changes: 5 additions & 0 deletions src/vim-webgl-viewer/environment/skybox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ export class Skybox {
this._plane = new THREE.PlaneGeometry()
this._material = materials.skyBox
this.mesh = new THREE.Mesh(this._plane, materials.skyBox)

// Apply settings
this.enable = settings.skybox.enable
this.skyColor = settings.skybox.skyColor
this.groundColor = settings.skybox.groundColor
this.sharpness = settings.skybox.sharpness

camera.onMoved.subscribe(() => {
this.mesh.position.copy(camera.position).add(camera.forward)
Expand Down

0 comments on commit 46c57f0

Please sign in to comment.