Created
November 14, 2018 07:39
-
-
Save prestomation/19800cb3c5a3b9e9a33d7cf845e5f40f to your computer and use it in GitHub Desktop.
Sumerian: Set texture from a URL
This file contains 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
const material = ctx.entity.getComponent("MeshRendererComponent").materials[0]; | |
new sumerian.TextureCreator().loadTexture2D("https://images-na.ssl-images-amazon.com/images/G/01/support_images/GUID-15BCCE28-8970-45C8-BF29-5F9FBF2293B5_en-US.png").then(texture =>{ | |
material.setTexture("DIFFUSE_MAP", texture); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment