Class: CocosImageManager


new gdjs.CocosImageManager(resources)

CocosImageManager loads and stores textures that can be used by the Cocos2D-JS renderers.

Name Type Description
resources Object

The resources data of the game.


Return a texture which can be used as a placeholder when no suitable texture can be found. TODO: The path to the file is hardcoded and can create crash if not existing, especially when compiled to a native game on iOS/Android/macOS.

Return the texture associated to the specified name. Returns a placeholder texture if not found.

Name Type Description
name string

The name of the resource to get.