raviranjankumarsinha Posted December 7, 2014 Share Posted December 7, 2014 Hi Friend, How to display/create image in babylonjs without using spritemanager because i have to check for collision and other things. This can be easy for someone who knows very well babylonjs. I want to display any image(like man, bird,..) so please share lines of code to display the image. ThanksRaviranjan Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 7, 2014 Share Posted December 7, 2014 Used with sprites:https://github.com/BabylonJS/Babylon.js/wiki/08-Sprites Otherwise you can add a plane and apply a material with a texture:var plane = BABYLON.Mesh.CreatePlane("plane", 10.0, scene);var material = new BABYLON.StandardMaterial("texture1", scene);material.diffuseTexture = new BABYLON.Texture("texture.png", scene);material.diffuseTexture.uScale = 1.0;material.diffuseTexture.vScale = 1.0;plane.material = material; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.