nanogl-gltf
Version:
17 lines (16 loc) • 573 B
JavaScript
import GltfTypes from '../types/GltfTypes';
import { BaseTextureInfo } from './TextureInfo';
/**
* The NormalTextureInfo element is a BaseTextureInfo but with scale attribute to manage the normal vectors scale.
*/
export default class NormalTextureInfo extends BaseTextureInfo {
constructor() {
super(...arguments);
this.gltftype = GltfTypes.NORMAL_TEXTURE_INFO;
}
async parse(gltfLoader, data) {
var _a;
await super.parse(gltfLoader, data);
this.scale = (_a = data.scale) !== null && _a !== void 0 ? _a : 1.0;
}
}