Jump to content

Search the Community

Showing results for tags 'exported scene'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello, i tried to create a skybox in my exported scene .babylon, but i couldn't see the skybox, it was just the imported scene here's the code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Using babylon.js - How to load a scene</title> <script src="http://www.babylonjs.com/hand.minified-1.2.js"></script> <script src="http://www.babylonjs.com/cannon.js"></script> <script src="http://www.babylonjs.com/oimo.js"></script> <script src="http://www.babylonjs.com/babylon.js"></script> <style> html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } #renderCanvas { width: 100%; height: 100%; } </style> </head> <body> <canvas id="renderCanvas"></canvas> </body> </html> This page is pretty simple because all you need is just a canvas and a reference to babylon.js. Then you will have to use BABYLON.SceneLoader object to load your scene. To do so, just add this script block right after the canvas: <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("Retail/", "Retail.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { var box = new BABYLON.Mesh.CreateBox("box",6100, newScene); // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); } </script> </body> </html>
×
×
  • Create New...