This library provides an extended implementation of the Pixi Application and Containers that provide drag/drop ability together with grouping blocks.
- Drag blocks
- Drag blocks together to create groups
- Drag groups by their name
- Drag groups together to merge
- Separate blocks from groups
- Overlay blocks, to combine/fuse for example
- Events
To use this library, your blocks, whatever they may be, must extend the Block class from this library. You can customize the look of the blocks by overriding the createBlockGraphic
method.
Groups are currently not customizable, please open an issue if you would like that specifying what you would like to customize.
This library adds some extra events to Blocks, Groups and the Application stage.
This events can be accessed through application.stage.on('<event>')
.
new-group
join-group
leave-group
no-drag-click
- when clicking on a block and not dragging itoverlay
- when overlaying another block, contains the other block in the eventdrag
block-add
block-remove
name-change
disbandon
- this event is emitted when the last two risks in a group are separatedno-drag-click
- when clicking on the name of a group and not dragging it
git clone [email protected]:RiskChallenger/pixi-grouping.git &&
cd pixi-grouping &&
npm install &&
npm run dev