| Property | *Description | *
|---|---|
| [pivot]{@link PIXI.DisplayObject#pivot} | ** Invariant under rotation, scaling, and skewing. The projection of into the parent's space of the pivot * is equal to position, regardless of the other three transformations. In other words, It is the center of * rotation, scaling, and skewing. * | *
| [position]{@link PIXI.DisplayObject#position} | ** Translation. This is the position of the [pivot]{@link PIXI.DisplayObject#pivot} in the parent's local * space. The default value of the pivot is the origin (0,0). If the top-left corner of your display object * is (0,0) in its local space, then the position will be its top-left corner in the parent's local space. * | *
| [scale]{@link PIXI.DisplayObject#scale} | ** Scaling. This will stretch (or compress) the display object's projection. The scale factors are along the * local coordinate axes. In other words, the display object is scaled before rotated or skewed. The center * of scaling is the [pivot]{@link PIXI.DisplayObject#pivot}. * | *
| [rotation]{@link PIXI.DisplayObject#rotation} | ** Rotation. This will rotate the display object's projection by this angle (in radians). * | *
| [skew]{@link PIXI.DisplayObject#skew} | *
* Skewing. This can be used to deform a rectangular display object into a parallelogram. ** In PixiJS, skew has a slightly different behaviour than the conventional meaning. It can be * thought of the net rotation applied to the coordinate axes (separately). For example, if "skew.x" is * ⍺ and "skew.y" is β, then the line x = 0 will be rotated by ⍺ (y = -x*cot⍺) and the line y = 0 will be * rotated by β (y = x*tanβ). A line y = x*tanϴ (i.e. a line at angle ϴ to the x-axis in local-space) will * be rotated by an angle between ⍺ and β. * ** It can be observed that if skew is applied equally to both axes, then it will be equivalent to applying * a rotation. Indeed, if "skew.x" = -ϴ and "skew.y" = ϴ, it will produce an equivalent of "rotation" = ϴ. * ** Another quite interesting observation is that "skew.x", "skew.y", rotation are communtative operations. Indeed, * because rotation is essentially a careful combination of the two. * * |
*
| angle | *Rotation. This is an alias for [rotation]{@link PIXI.DisplayObject#rotation}, but in degrees. | *
| x | *Translation. This is an alias for position.x! | *
| y | *Translation. This is an alias for position.y! | *
| width | ** Implemented in [Container]{@link PIXI.Container}. Scaling. The width property calculates scale.x by dividing * the "requested" width by the local bounding box width. It is indirectly an abstraction over scale.x, and there * is no concept of user-defined width. * | *
| height | ** Implemented in [Container]{@link PIXI.Container}. Scaling. The height property calculates scale.y by dividing * the "requested" height by the local bounding box height. It is indirectly an abstraction over scale.y, and there * is no concept of user-defined height. * | *
(position: IPointData, point?: P, skipUpdate?: boolean): P; /** * Calculates the local position of the display object relative to another point. * * @param {PIXI.IPointData} position - The world origin to calculate from. * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from. * @param {PIXI.Point} [point] - A Point object in which to store the value, optional * (otherwise will create a new Point). * @param {boolean} [skipUpdate=false] - Should we skip the update transform * @return {PIXI.Point} A point object representing the position of this object */ toLocal
(position: IPointData, from?: DisplayObject, point?: P, skipUpdate?: boolean): P; /** * Set the parent Container of this DisplayObject. * * @param {PIXI.Container} container - The Container to add this DisplayObject to. * @return {PIXI.Container} The Container that this DisplayObject was added to. */ setParent(container: Container): Container; /** * Convenience function to set the position, scale, skew and pivot at once. * * @param {number} [x=0] - The X position * @param {number} [y=0] - The Y position * @param {number} [scaleX=1] - The X scale value * @param {number} [scaleY=1] - The Y scale value * @param {number} [rotation=0] - The rotation * @param {number} [skewX=0] - The X skew value * @param {number} [skewY=0] - The Y skew value * @param {number} [pivotX=0] - The X pivot value * @param {number} [pivotY=0] - The Y pivot value * @return {PIXI.DisplayObject} The DisplayObject instance */ setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): this; /** * Base destroy method for generic display objects. This will automatically * remove the display object from its parent Container as well as remove * all current event listeners and internal references. Do not use a DisplayObject * after calling `destroy()`. * */ destroy(_options?: IDestroyOptions | boolean): void; /** * @protected * @member {PIXI.Container} */ get _tempDisplayObjectParent(): TemporaryDisplayObject; /** * Used in Renderer, cacheAsBitmap and other places where you call an `updateTransform` on root * * ``` * const cacheParent = elem.enableTempParent(); * elem.updateTransform(); * elem.disableTempParent(cacheParent); * ``` * * @returns {PIXI.DisplayObject} current parent */ enableTempParent(): DisplayObject; /** * Pair method for `enableTempParent` * * @param {PIXI.DisplayObject} cacheParent - Actual parent of element */ disableTempParent(cacheParent: DisplayObject): void; /** * The position of the displayObject on the x axis relative to the local coordinates of the parent. * An alias to position.x * * @member {number} */ get x(): number; set x(value: number); /** * The position of the displayObject on the y axis relative to the local coordinates of the parent. * An alias to position.y * * @member {number} */ get y(): number; set y(value: number); /** * Current transform of the object based on world (parent) factors. * * @member {PIXI.Matrix} * @readonly */ get worldTransform(): Matrix; /** * Current transform of the object based on local factors: position, scale, other stuff. * * @member {PIXI.Matrix} * @readonly */ get localTransform(): Matrix; /** * The coordinate of the object relative to the local coordinates of the parent. * * @since PixiJS 4 * @member {PIXI.ObservablePoint} */ get position(): ObservablePoint; set position(value: ObservablePoint); /** * The scale factors of this object along the local coordinate axes. * * The default scale is (1, 1). * * @since PixiJS 4 * @member {PIXI.ObservablePoint} */ get scale(): ObservablePoint; set scale(value: ObservablePoint); /** * The center of rotation, scaling, and skewing for this display object in its local space. The `position` * is the projection of `pivot` in the parent's local space. * * By default, the pivot is the origin (0, 0). * * @since PixiJS 4 * @member {PIXI.ObservablePoint} */ get pivot(): ObservablePoint; set pivot(value: ObservablePoint); /** * The skew factor for the object in radians. * * @since PixiJS 4 * @member {PIXI.ObservablePoint} */ get skew(): ObservablePoint; set skew(value: ObservablePoint); /** * The rotation of the object in radians. * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees. * * @member {number} */ get rotation(): number; set rotation(value: number); /** * The angle of the object in degrees. * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees. * * @member {number} */ get angle(): number; set angle(value: number); /** * The zIndex of the displayObject. * * If a container has the sortableChildren property set to true, children will be automatically * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array, * and thus rendered on top of other display objects within the same container. * * @member {number} * @see PIXI.Container#sortableChildren */ get zIndex(): number; set zIndex(value: number); /** * Indicates if the object is globally visible. * * @member {boolean} * @readonly */ get worldVisible(): boolean; /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an * object to the shape of the mask applied to it. In PixiJS a regular mask must be a * {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it * utilities shape clipping. To remove a mask, set this property to `null`. * * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask. * * @example * const graphics = new PIXI.Graphics(); * graphics.beginFill(0xFF3300); * graphics.drawRect(50, 250, 100, 100); * graphics.endFill(); * * const sprite = new PIXI.Sprite(texture); * sprite.mask = graphics; * * @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask. * @member {PIXI.Container|PIXI.MaskData|null} */ get mask(): Container | MaskData | null; set mask(value: Container | MaskData | null); } export declare interface IDestroyOptions { children?: boolean; texture?: boolean; baseTexture?: boolean; } export declare class TemporaryDisplayObject extends DisplayObject { calculateBounds: () => null; removeChild: (child: DisplayObject) => null; render: (renderer: Renderer) => null; sortDirty: boolean; } export { }