@@ -18,10 +18,11 @@ import {
1818 Color3 ,
1919 SceneLoader
2020} from '@babylonjs/core' ;
21- import { GameConstants } from '../constants ';
21+ import '@babylonjs/loaders/glTF ';
2222//@ts -ignore
2323import * as CANNON from 'cannon' ;
2424import { WaterMaterial } from '@babylonjs/materials' ;
25+ import { GameConstants } from '../constants' ;
2526import { notRepeatedRandomFreeSpacePositionGenerator } from '../utils' ;
2627
2728export class GameSceneService {
@@ -135,15 +136,13 @@ export class GameSceneService {
135136 private configureCamera ( ) : Camera {
136137 const camera = new FreeCamera ( 'camera' , new Vector3 ( - 2 , 5 , - 10 ) , this . scene ) ;
137138 camera . setTarget ( GameConstants . ZeroVector ) ;
138- ///camera.attachControl(this.canvas)
139139
140140 return camera ;
141141 }
142142
143143 private updateCameraAndLight ( ) : void {
144144 this . camera . position . z = this . _ball . getAbsolutePosition ( ) . z - 12 ;
145145 this . camera . position . y = this . _ball . getAbsolutePosition ( ) . y + 6 ;
146- //this.camera.setTarget(this.ball.getAbsolutePosition());
147146
148147 this . light . position . z = this . _ball . getAbsolutePosition ( ) . z + 10 ;
149148 this . light . position . y = this . _ball . getAbsolutePosition ( ) . y + 10 ;
@@ -153,10 +152,7 @@ export class GameSceneService {
153152 private configureSky ( ) {
154153 const skyBox = MeshBuilder . CreateBox ( 'skyBox' , { size : 1000 } , this . scene ) ;
155154 const skyBoxMaterial = new StandardMaterial ( 'skyBox' , this . scene ) ;
156- skyBoxMaterial . reflectionTexture = new CubeTexture (
157- '/assets/environments/TropicalSunnyDay/TropicalSunnyDay' ,
158- this . scene
159- ) ;
155+ skyBoxMaterial . reflectionTexture = new CubeTexture ( '/assets/environments/TropicalSunnyDay/TropicalSunnyDay' , this . scene ) ;
160156 skyBoxMaterial . reflectionTexture . coordinatesMode = Texture . SKYBOX_MODE ;
161157 skyBoxMaterial . backFaceCulling = false ;
162158 skyBox . material = skyBoxMaterial ;
0 commit comments