Texture Store
Holds up to ten pictures under names you pick, so other parts of the Lens can find each one. It shows nothing on the screen by itself.
Asset stores, saved data, and the core building blocks behind bigger experiences.
Made with this blockInputs
assetName0stringName identifier for texture slot 0
assetTexture0textureTexture for slot 0 (paired with assetName0)
assetName1stringName identifier for texture slot 1
assetTexture1textureTexture for slot 1 (paired with assetName1)
assetName2stringName identifier for texture slot 2
assetTexture2textureTexture for slot 2 (paired with assetName2)
assetName3stringName identifier for texture slot 3
assetTexture3textureTexture for slot 3 (paired with assetName3)
assetName4stringName identifier for texture slot 4
assetTexture4textureTexture for slot 4 (paired with assetName4)
assetName5stringName identifier for texture slot 5
assetTexture5textureTexture for slot 5 (paired with assetName5)
assetName6stringName identifier for texture slot 6
assetTexture6textureTexture for slot 6 (paired with assetName6)
assetName7stringName identifier for texture slot 7
assetTexture7textureTexture for slot 7 (paired with assetName7)
assetName8stringName identifier for texture slot 8
assetTexture8textureTexture for slot 8 (paired with assetName8)
assetName9stringName identifier for texture slot 9
assetTexture9textureTexture for slot 9 (paired with assetName9)
Functions
getTextureByNameTextureReturns the texture associated with the given name, or null if not found
getTextureByIndexTextureReturns the texture at the given index in the loaded list, or null if out of range
getAllTexturesObjectReturns an object mapping all loaded names to their textures
getTextureCountintReturns the number of successfully loaded texture slots
More in Utilities & Storage
- Canvas APIDraws the 2D graphics a game needs, such as a game board, a health bar or puzzle pieces. Ask for a 2D game or a sliding puzzle.
- Core3DBuilds the 3D scene for a game, with objects that move, collide and fall. Ask for a 3D game, for example bowling or a maze you roll a ball through.
- Model StoreHolds up to ten 3D models under names you pick, so other parts of the Lens can find each one. It shows nothing on the screen by itself.
- Persistent StorageSaves small amounts of information on your device, so the Lens remembers it next time you open it. Use it for your settings, your progress or your own best score.
- SortingAdds a game where you drag your friends into roles, for example BFF or Nemesis. Name two to six roles, or sort up to six pictures of your own instead.
- Sprite StoreHolds up to ten pictures that a 2D game uses, such as characters, cars or enemies. It also holds a photo or video you add yourself.
