Skip to content

Instantly share code, notes, and snippets.

@ryasmi
Last active December 22, 2015 09:29
Show Gist options
  • Save ryasmi/6452612 to your computer and use it in GitHub Desktop.
Save ryasmi/6452612 to your computer and use it in GitHub Desktop.
A proposed specification for creating/rendering interfaces.

Interface X

A proposed specification for creating/rendering interfaces.

This is simply a proposed specification and is by no means complete.

1 Goal

It's possible that in the future we may have displays that do not use pixels. In addition interfaces are becoming more complex and therefore need to be more modular so that they remain easy to create whilst still allowing customisation. This specification aims to provide the minimal requirements to represent a 3D interface.

2 Proposal

A interface element represented using JSON.

{
    // The points are used to determine the space that the element occupies.
    // All child elements are contained within this space.
    points: [
        {
            "x": 0,
            "y": 0,
            "z": 0
        }
    ],

    // The center point is a reference for the position of the points.
    center: {
        "x": 0,
        "y": 0,
        "z": 0
    },

    // The colour of the element.
    color: {
        "red": 0,
        "blue": 0,
        "green": 0,
        "opacity": 0
    },

    // Child elements.
    children: []
}

The parent of the element cannot be known in order to maintain modularity.

3 Note

It may be better for displays to render from this representation of an interface instead of a binary representation of the interface that is rendered by the client's machine because it could better seperate concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment