hair products brands sock bun with hair extensions hair wigs crochet braids with straight human hair 26 inch hair extensions human hair clip hair mini stick tip hair extensions slicked back ponytail natural hair human hair wigs double drawn remy hair extensions uk how to curl a heat resistant synthetic wig remy hair


Welcome to the provisional home of BrickJax.

This is a work-in-progress proof-of-concept to show how we might provide some script to replace some tags on with pictures sourced from LUGNet Parts Guide.

When it's complete, the aim is that you would be able to take a reference to the BrickJax script and then where ever it finds matching tags, it replaces them with an image.

Simple proof of concept call:

To reduce calls and roundtrips, if the request results in an image, the returned object contains the Alt Text and the image data that can be added directly to an <img src="[data.Src]" alt="[data.AltText]" /> element.

Web Response

The JSON object returned contains the following properties:

A pre-build alt text containing the English name and colour in the form "Brick 2x4 - Yellow"
The English name of the brick, as defined by common consensus and sites like LUGNet Parts Guide.
The ID of the colour as defined by the LDraw Colour Definitions File
The English name of the colour as defined by the LDraw Colour Definitions File
The Part Id (where known this is the LEGO Element ID), otherwise it's the LUGNet Parts Reference Id.
The Base64 encoded image data as lifted from LUGNet.

Examples/Test cases

Unchanged Parts

The following should not be replaced because it is inside a <code> element:
[part:6260c01:21] [bs:5509] [bl:5509]


These codes should be replaced by images:
[PART:3001:14] [parT:2337] [part:777p06] [part:6260c01:21] [part:884]

Part in a nested div: [part:32181c02:0]

PartLink examples: [Partlink:2552], [partlink:32181c02:0]

Broken Parts

Example of broken code: [pARt:3712c01:7] (code should work, but LUGNET Partsref is out of date vs LDRAW)

Example of broken image on link: [pARtlink:3712c01:7]

Set Links