npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wonderlandlabs-pixi-ux/resizer

v1.2.5

Published

Resizer component for wonderlandlabs-pixi-ux with interactive handles

Readme

@wonderlandlabs-pixi-ux/resizer

Resize handles for PixiJS containers.

Installation

yarn add @wonderlandlabs-pixi-ux/resizer

Primary API

  • enableHandles(container, rect, config): ResizerStore
  • ResizerStore

Basic Usage

import { Application, Container, Graphics, Rectangle } from 'pixi.js';
import { enableHandles } from '@wonderlandlabs-pixi-ux/resizer';

const app = new Application();
await app.init({ width: 900, height: 600 });

const box = new Container();
const shape = new Graphics();
shape.rect(0, 0, 240, 140).fill(0x4da3ff);
box.addChild(shape);
app.stage.addChild(box);

const handles = enableHandles(box, new Rectangle(80, 80, 240, 140), {
  app,
  mode: 'EDGE_AND_CORNER',
  size: 12,
  color: { r: 0.2, g: 0.6, b: 1 },
  minSize: { x: 200, y: 200 },
  drawRect: (rect) => {
    // rect is reported in the resizer coordinate space (see "Coordinate Model")
    box.position.set(rect.x, rect.y);
    shape.clear().rect(0, 0, rect.width, rect.height).fill(0x4da3ff);
  },
  onRelease: (rect) => {
    console.log('final', rect.width, rect.height);
  },
});

handles.setVisible(true);
handles.setRect(new Rectangle(100, 100, 300, 160));

Coordinate Model

  • resizer treats rectangle values as world/frame coordinates.
  • Handles are assumed to live on a layer that is not offset or scaled relative to global space.
  • resizer does not compensate for handle-layer transforms (position/scale/rotation/skew).
  • Ideally, use the final front-most container on app.stage for handles, or a child of such a container that remains untransformed.
  • If your target lives in a transformed local space, convert in your consumer (drawRect/onRelease).
  • deltaSpace controls which container pointer deltas are measured in.

EnableHandlesConfig

{
  app: Application,
  drawRect?: (rect: Rectangle, container: Container) => void,
  onRelease?: (rect: Rectangle) => void,
  size?: number,
  color?: { r: number, g: number, b: number },
  constrain?: boolean,
  mode?: 'ONLY_EDGE' | 'ONLY_CORNER' | 'EDGE_AND_CORNER',
  deltaSpace?: Container,
  minSize?: { x: number, y: number },
}

mode Behavior

  • ONLY_CORNER: Shows 4 handles at the corners (top-left, top-right, bottom-left, bottom-right).
  • ONLY_EDGE: Shows 4 handles at edge midpoints (top-center, middle-right, bottom-center, middle-left).
  • EDGE_AND_CORNER: Shows all 8 handles.

Hook Notes

  • drawRect(rect, container)

    • Called during resolve after internal rectangle state changes.
    • Use this to redraw your target visuals from current rectangle state.
  • onRelease(rect)

    • Called once when drag ends.

ResizerStore Methods

  • setRect(rect)
  • setVisible(visible)
  • removeHandles()
  • asRect
  • isDragging
  • isRunning
  • getColor()