Skip to content

nannoda/cubism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cubism

Cubism is an HTML Canvas based UI framework. It provides more consistency across different broswers.

You can try the online demo here.

Example

Basic Layout

image

Code:

/**
 * Demo of a simple layout
 */
let app = Cubism.createFromId("mainCanvas");

app.init(
  new PointerHandlerParentElement(
    "PointerHandlerParentElement",
    new Background()
        .setColor(Colors.blue700),
    new VerticalLayout(
      "Outer Vertical Layout",
      new RectElement()
          .setWidth(100)
          .setHeight(100),
      new CircleElement()
          .setWidth(100)
          .setHeight(100),
      new HorizontalLayout(
        "Inner Horizontal Layout",
        new RectElement()
            .setWidth(100)
            .setHeight(100),
        new RectElement()
            .setWidth(100)
            .setHeight(100),
        new CircleElement()
            .setWidth(100)
            .setHeight(100)
      )
    )
        .setPosFromXY(50, 50)
  )
);

About

HTML Canvas based UI lib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published