Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const iconTexture = new IconTexture(this.imageItem);
const texture = new THREE.Texture(
iconTexture.image.imageData as any,
THREE.UVMapping,
undefined,
undefined,
bilinear ? THREE.LinearFilter : THREE.NearestFilter,
bilinear ? THREE.LinearFilter : THREE.NearestFilter,
THREE.RGBAFormat
);
texture.needsUpdate = true;
texture.premultiplyAlpha = premultipliedAlpha;
texture.generateMipmaps = false; // not needed, always rendered in full size
this.m_material = new IconMaterial({
map: texture
});
this.boxBuffer = new BoxBuffer(this.m_material, this.renderOrder);
const mesh = this.boxBuffer.mesh;
mesh.frustumCulled = false;
this.scene.add(mesh);
this.mapView.update();
}
}