| 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 position - The world origin to calculate from. * @param from - The DisplayObject to calculate the global position from. * @param point - A Point object in which to store the value, optional * (otherwise will create a new Point). * @param skipUpdate - Should we skip the update transform * @returns - 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 container - The Container to add this DisplayObject to. * @returns - 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 x - The X position * @param y - The Y position * @param scaleX - The X scale value * @param scaleY - The Y scale value * @param rotation - The rotation * @param skewX - The X skew value * @param skewY - The Y skew value * @param pivotX - The X pivot value * @param pivotY - The Y pivot value * @returns - 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()`. * @param _options */ 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 - current parent */ enableTempParent(): Container; /** * Pair method for `enableTempParent` * @param cacheParent - Actual parent of element */ disableTempParent(cacheParent: Container): void; /** * The position of the displayObject on the x axis relative to the local coordinates of the parent. * An alias to position.x */ 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 */ get y(): number; set y(value: number); /** * Current transform of the object based on world (parent) factors. * @readonly */ get worldTransform(): Matrix; /** * Current transform of the object based on local factors: position, scale, other stuff. * @readonly */ get localTransform(): Matrix; /** * The coordinate of the object relative to the local coordinates of the parent. * @since 4.0.0 */ get position(): ObservablePoint; set position(value: IPointData); /** * The scale factors of this object along the local coordinate axes. * * The default scale is (1, 1). * @since 4.0.0 */ get scale(): ObservablePoint; set scale(value: IPointData); /** * 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 4.0.0 */ get pivot(): ObservablePoint; set pivot(value: IPointData); /** * The skew factor for the object in radians. * @since 4.0.0 */ get skew(): ObservablePoint; set skew(value: IPointData); /** * 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. */ 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. */ 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. * @see PIXI.Container#sortableChildren */ get zIndex(): number; set zIndex(value: number); /** * Indicates if the object is globally visible. * @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. Furthermore, a mask of an object must be in the subtree of its parent. * Otherwise, `getLocalBounds` may calculate incorrect bounds, which makes the container's width and height wrong. * 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. */ get mask(): Container | MaskData | null; set mask(value: Container | MaskData | null); } export declare interface IDestroyOptions { children?: boolean; texture?: boolean; baseTexture?: boolean; } /** * @private */ export declare class TemporaryDisplayObject extends DisplayObject { calculateBounds: () => null; removeChild: (child: DisplayObject) => null; render: (renderer: Renderer) => null; sortDirty: boolean; } export { }