Module BaseRenderTexture-PIXI

class type _t = { ... }
type t = Js.t(_t);

A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it. Hint: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded otherwise black rectangles will be drawn instead.

module Impl: { ... };
include PIXI.BaseTexture.Impl;
let _create: ?⁠resource:[ `HTMLCanvasElement(Webapi.Dom.Element.t) | `HTMLImageElement(Webapi.Dom.HtmlImageElement.t) | `HTMLVideoElement(Webapi.Dom.Element.t) | `Resource(PIXI.Resource.t) | `String(string) ] => ?⁠options:'a => unit => PIXI.BaseTexture.t;
let create: resource:[ `HTMLCanvasElement(Webapi.Dom.Element.t) | `HTMLImageElement(Webapi.Dom.HtmlImageElement.t) | `HTMLVideoElement(Webapi.Dom.Element.t) | `Resource(PIXI.Resource.t) | `String(string) ] => ?⁠options:Js.t({. _type: Js.undefined(int), alphaMode: Js.undefined(int), anisotropicLevel: Js.undefined(int), format: Js.undefined(int), height: Js.undefined(float), mipmap: Js.undefined(int), resolution: Js.undefined(float), resourceOptions: Js.undefined(Js.t({. })), scaleMode: Js.undefined(int), target: Js.undefined(int), width: Js.undefined(float), wrapMode: Js.undefined(int), }) => unit => PIXI.BaseTexture.t;
let get_BatchEnabled: Js.t(PIXI.C1.baseTexture) => int;
let set_BatchEnabled: Js.t(PIXI.C1.baseTexture) => int => unit;
let get_BatchLocation: Js.t(PIXI.C1.baseTexture) => int;
let set_BatchLocation: Js.t(PIXI.C1.baseTexture) => int => unit;
let _getAlphaMode: Js.t(PIXI.C1.baseTexture) => int;
let getAlphaMode: Js.t(PIXI.C1.baseTexture) => PIXI.ALPHA_MODES.t;
let _setAlphaMode: Js.t(PIXI.C1.baseTexture) => int => unit;
let setAlphaMode: Js.t(PIXI.C1.baseTexture) => PIXI.ALPHA_MODES.t => unit;
let getAnisotropicLevel: Js.t(PIXI.C1.baseTexture) => float;
let setAnisotropicLevel: Js.t(PIXI.C1.baseTexture) => float => unit;
let getCacheId: Js.t(PIXI.C1.baseTexture) => string;
let setCacheId: Js.t(PIXI.C1.baseTexture) => string => unit;
let getDestroyed: Js.t(PIXI.C1.baseTexture) => bool;
let getDirtyId: Js.t(PIXI.C1.baseTexture) => int;
let getFormat: Js.t(PIXI.C1.baseTexture) => int;
let getHeight: Js.t(PIXI.C1.baseTexture) => int;
let getIsPowerOfTwo: Js.t(PIXI.C1.baseTexture) => bool;
let _getMipmap: Js.t(PIXI.C1.baseTexture) => int;
let getMipmap: Js.t(PIXI.C1.baseTexture) => PIXI.MIPMAP_MODES.t;
let _setMipmap: Js.t(PIXI.C1.baseTexture) => int => unit;
let setMipmap: Js.t(PIXI.C1.baseTexture) => PIXI.MIPMAP_MODES.t => unit;
let getRealHeight: Js.t(PIXI.C1.baseTexture) => float;
let getRealWeight: Js.t(PIXI.C1.baseTexture) => float;
let getResolution: Js.t(PIXI.C1.baseTexture) => float;
let getScaleMode: Js.t(PIXI.C1.baseTexture) => int;
let setScaleMode: Js.t(PIXI.C1.baseTexture) => int => unit;
let _getTarget: Js.t(PIXI.C1.baseTexture) => int;
let getTarget: Js.t(PIXI.C1.baseTexture) => PIXI.TARGETS.t;
let _setTarget: Js.t(PIXI.C1.baseTexture) => int => unit;
let setTarget: Js.t(PIXI.C1.baseTexture) => PIXI.TARGETS.t => unit;
let getTextureCacheIds: Js.t(PIXI.C1.baseTexture) => array(string);
let getUid: Js.t(PIXI.C1.baseTexture) => string;
let getValid: Js.t(PIXI.C1.baseTexture) => bool;
let getWidth: Js.t(PIXI.C1.baseTexture) => bool;
let _getWrapMode: Js.t(PIXI.C1.baseTexture) => int;
let getWrapMode: Js.t(PIXI.C1.baseTexture) => PIXI.WRAP_MODES.t;
let _setWrapMode: Js.t(PIXI.C1.baseTexture) => int => unit;
let setWrapMode: Js.t(PIXI.C1.baseTexture) => PIXI.WRAP_MODES.t => unit;
let destroy: Js.t(PIXI.C1.baseTexture) => unit;
let dispose: Js.t(PIXI.C1.baseTexture) => unit;
let _getDrawableSource: Js.t(PIXI.C1.baseTexture) => Webapi.Dom.HtmlElement.t;
let getDrawableSource: Js.t(PIXI.C1.baseTexture) => PIXI.ICanvasImageSource.t;
let setRealSize: Js.t(PIXI.C1.baseTexture) => realWidth:float => realHeight:float => ?⁠resolution:float => unit => Js.t(PIXI.C1.baseTexture);
let setResolution: Js.t(PIXI.C1.baseTexture) => resolution:float => Js.t(PIXI.C1.baseTexture);
let setResource: Js.t(PIXI.C1.baseTexture) => resource:Js.t(PIXI.C1.resource) => Js.t(PIXI.C1.baseTexture);
let setSize: Js.t(PIXI.C1.baseTexture) => width:float => height:float => ?⁠resolution:float => unit => Js.t(PIXI.C1.baseTexture);
let _setStyle: Js.t(PIXI.C1.baseTexture) => ?⁠scaleMode:int => ?⁠mipmap:int => unit => Js.t(PIXI.C1.baseTexture);
let setStyle: Js.t(PIXI.C1.baseTexture) => scaleMode:option(PIXI.SCALE_MODES.t) => mipmap:option(PIXI.MIPMAP_MODES.t) => unit => Js.t(PIXI.C1.baseTexture);
let update: Js.t(PIXI.C1.baseTexture) => unit;
include Impl;
let _createOptions: ?⁠width:float => ?⁠height:float => ?⁠scaleMode:int => ?⁠resolution:float => unit => Js.t({. width: Js.undefined(float), height: Js.undefined(float), scaleMode: Js.undefined(int), resolution: Js.undefined(float), });
let createOptions: ?⁠width:float => ?⁠height:float => ?⁠scaleMode:PIXI.SCALE_MODES.t => ?⁠resolution:float => unit => Js.t({. height: Js.undefined(float), resolution: Js.undefined(float), scaleMode: Js.undefined(int), width: Js.undefined(float), });

create collection of options for base render texture creation

parameter width

The width of the render texture

parameter height

The height of the render texture

parameter scaleMode
parameter resolution

The resolution / device pixel ratio of the texture being generated

let _create: ?⁠options:'a => unit => t;
let create: ?⁠options:Js.t({. height: Js.undefined(float), resolution: Js.undefined(float), scaleMode: Js.undefined(int), width: Js.undefined(float), }) => unit => t;

creates a new base render texture

see /bs-pixi/PIXI/BaseRenderTexture-PIXI/#val-createOptions

for options BaseRenderTexture.createOptions

parameter options

collection of options

let getFilterStack: Js.t(_t) => array(Js.t({.. }));

The data structure for the filters

let setFilterStack: Js.t(_t) => array(Js.t({.. })) => unit;

The data structure for the filters

let getMaskStack: Js.t(_t) => array(Js.t(PIXI.MaskData.#_t));

The data structure for the stencil masks.

let setMaskStack: Js.t(_t) => array(Js.t(PIXI.MaskData.#_t)) => unit;

The data structure for the stencil masks.

let destroy: Js.t(_t) => unit;

Destroys the texture

let dispose: Js.t(_t) => unit;

Frees the texture and framebuffer from WebGL memory without destroying this texture object. This means you can still use the texture later which will upload it to GPU memory again.

let resize: Js.t(_t) => width:float => height:float => unit;

Resizes the BaseRenderTexture

parameter width

The width to resize to

parameter height

The height to resize to