Skip to content

v3.2.0

Choose a tag to compare

@graphieros graphieros released this 05 Jun 16:37
· 17 commits to main since this release

Add support for textures

Optional textures (image files) can be set on items.

const types = ref([
    {
        color: "#71a4a8",
        description: "monitor",
        icon: 'deviceDesktop',
        typeId: 1,
        iconColor: '#1A1A1A',
        depth: 1,
        texture: {
            src: '/textures/monitor.png'
        }
    },
    {
        color: "#CCCCCC",
        description: "patch panel",
        icon: 'plugConnected',
        typeId: 2,
        iconColor: '#1A1A1A',
        texture: {
            src: '/textures/patch-panel.png'
        }
    },
]);

The type of the texture attribute:

type GridPlanTexture = {
        src: string; 
        repeatX?: number; 
        repeatY?: number; 
        rotation?: number; 
        metalness?: number; 
        roughness?: number;
}
image image

The docs are up to date.