Created
March 6, 2023 22:50
-
-
Save deltakosh/3c3d9b2581aba450c335903c022a8e3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createScene = function () { | |
var scene = new BABYLON.Scene(engine); | |
// Let's create our potato | |
var potato = BABYLON.MeshBuilder.CreateSphere("potato", | |
{ diameterX: 0.8, diameterY: 0.9, diameterZ: 0.8 }, | |
scene); | |
// Environment | |
scene.createDefaultCamera(true, true, true); | |
scene.createDefaultEnvironment({ | |
enableGroundMirror: true, | |
createSkybox: false, | |
}); | |
// Prevent camera from going below the ground | |
scene.activeCamera.upperBetaLimit = 1.5; | |
return scene; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment