awv3
Version:
⚡ AWV3 embedded CAD
13 lines (11 loc) • 383 B
JavaScript
import * as THREE from 'three';
export default class CubeTexture extends THREE.CubeTexture {
constructor(names, selector) {
super(names.map((item, index) => {
const image = document.createElementNS('http://www.w3.org/1999/xhtml', 'img');
image.src = selector(item);
return image;
}));
this.needsUpdate = true;
}
}