Jump to content

Search the Community

Showing results for tags 'different images'.

  • 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. For any mesh supporting the parameter sideOrientation, we can now pass two extra parameters frontUVs and backUVs both Vector4. These values are taken in account only for double-sided meshes. They allow to declare what part of the image to crop and stick respectively on the mesh front and back faces. // set the rectangle coordinates (u0,v0) and (u1,v1) from where to crop the image as a Vector4(u0,v0,u1,v1) var f = new BABYLON.Vector4(0,0, 0.5, 1); // front image = half the whole image along the width var b = new BABYLON.Vector4(0.5,0, 1, 1); // back image = second half along the width var options = {sideOrientation: BABYLON.Mesh.DOUBLESIDE, frontUVs: f, backUVs: b}; // this plane has half the image on the front side and the next half on the back side var plane = BABYLON.MeshBuilder.CreatePlane("p", options, scene); // this sphere has half the image on the external side and the next half on the inside side var sphere = BABYLON.MeshBuilder.CreateSphere("s", options, scene); A single texture/material but the ability to display different images on each mesh side. Default values if not passed for both : (0,0, 1,1)
×
×
  • Create New...