Skip to content

Container ​

Simple wrapper for others component in you scene.

Examples ​

js
import { Container } from "pencil.js";

const container = new Container();
container.add(someComponent);

ContainerOptions ​

NameTypeDefaultComment
shownBooleantrueIs shown
opacityNumbernullOpacity level from 0 to 1 (null mean inherited from parent)
rotationNumber0Rotation ratio from 0 to 1 (clockwise)
rotationCenterPositionnew Position()Center of rotation relative to this position
scalePosition or Number1Scaling ratio or a pair of value for horizontal and vertical scaling
zIndexNumber1Depth ordering
clipComponentnullOther component used to clip the rendering

Released under the MIT License.