* Render the mesh at its current state to an ImageBitmap. * Useful for creating textures or sprites from the rendered mesh. * @returns {Promise } a promise that resolves to an ImageBitmap of the rendered mesh * @example * const bitmap = await mesh.toImageBitmap(); * const sprit
()
| 1024 | * const sprite = new me.Sprite(100, 100, { image: bitmap }); |
| 1025 | */ |
| 1026 | toImageBitmap() { |
| 1027 | return createImageBitmap(this.toCanvas()); |
| 1028 | } |
| 1029 | } |