You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -304,3 +309,110 @@ or other times you may want to use only a potion of a texture image.
304
309
size:Texture-> ( Int, Int )
305
310
size =
306
311
Elm.Kernel.Texture.size
312
+
313
+
314
+
315
+
{-| Building [`Texture`](#Texture) from bytes
316
+
317
+
- [`Options`](#Options) - same as for [`loadWith`](#loadWith)
318
+
319
+
- `(width, height)` - dimensions of new created texture
320
+
321
+
- [`Format`](#Format) - pixel format in bytes
322
+
323
+
- Bytes - encoded pixels, where `Bytes.width` > `width` \* `height` \* `Bytes per pixe`or you get `SizeError`
324
+
325
+
Do not generate texture in `view`, [read more about this here](https://package.elm-lang.org/packages/elm-explorations/webgl/latest#making-the-most-of-the-gpu).
326
+
327
+
-}
328
+
loadBytesWith:
329
+
Options
330
+
->(Int,Int)
331
+
->Format
332
+
->Bytes
333
+
->ResultErrorTexture
334
+
loadBytesWith ({ magnify, minify, horizontalWrap, verticalWrap, flipY }as opt)( w, h )((Format _ bytesPerPixel)as format) b =
0 commit comments