Jump to content

Search the Community

Showing results for tags 'textures render'.

  • 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. I am brand new to babylon.js, and am not able to render textures on simple objects. Most of the script below was taken directly from GitHub to see if it was a syntax mistake, and even when I launch this HTML file into Chrome, a simple sphere won't render - simply a blank canvas. I can assign all other material attributes except textures. If anyone can identify what the issue might be, I would really appreciate it. I've tried placing textures in different folders, and now at the root folder. Thank you. <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Babylon - Basic scene</title> <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } </style> <script src="babylon.js"></script> <script src="hand.js"></script> <script src="cannon.js"></script> <!-- optional physics engine --></head> <body> <canvas id="renderCanvas"></canvas> <script type="text/javascript"> var CreateBumpScene = function (engine) { var scene = new BABYLON.Scene(engine); var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene); var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 100, 2), scene); var sphere = BABYLON.Mesh.CreateSphere("Sphere", 16, 3, scene); var material = new BABYLON.StandardMaterial("kosh", scene); material.bumpTexture = new BABYLON.Texture("/refMap.jpg", scene); material.diffuseColor = new BABYLON.Color3(1, 0, 0); sphere.material = material; camera.setPosition(new BABYLON.Vector3(-5, 5, 0)); scene.registerBeforeRender(function() { sphere.rotation.y += 0.02; }); return scene;}; var scene = createScene(); engine.runRenderLoop(function () { scene.render(); }); window.addEventListener("resize", function () { engine.resize(); }); </script> </body></html>
×
×
  • Create New...