Load images or textures from external URLs.

Important methods:

import { ImageReference, serializable } from '@needle-tools/engine';

export class MyComponent extends Behaviour {
@serializable(ImageReference)
myImage?:ImageReference;
async start() {
if(this.myImage) {
const texture = await this.myImage.createTexture();
if(texture) {
// use the texture
}
}
}

Constructors

Methods

  • Returns void