addTexture method

int addTexture(
  1. int image, {
  2. Map<String, dynamic>? sampler,
})

Adds a texture of image.

Implementation

int addTexture(int image, {Map<String, dynamic>? sampler}) {
  final texture = <String, dynamic>{'source': image};
  if (sampler != null) texture['sampler'] = _add('samplers', sampler);
  return _add('textures', texture);
}