Page 1 of 1

WebCard HyperCard clone that runs on Node

Posted: Tue Nov 23, 2021 2:36 am
by OpenXTalkPaul
WebCard is a HyperCard clone that runs in a browser or on the desktop on the Node.js runtime.

Roughly a web equivalent of HyperCard 2.x features so far.

Check out the syntax:
https://webcard.herokuapp.com/documents/

AGPL3 licensed and looking for people to help them.

They have a JSON based stack format:

Code: Select all

{
    "resource": {
        "audios": [],
        "icons": [
            {
                "active": "
                
                I DELETED A BUNCH HERE
                
                                        
                        {
                            "buttons": [
                                {
                                    "properties": {
                                        "autoHilite": false,
                                        "bgColor": "#fff",
                                        "bottom": 440,
                                        "depth": 2,
                                        "enabled": true,
                                        "family": 0,
                                        "hilite": false,
                                        "icon": null,
                                        "id": 32,
                                        "left": 389,
                                        "name": "back",
                                        "number": 1,
                                        "owner": 26,
                                        "partNumber": 2,
                                        "partType": "Button Part Type",
                                        "right": 589,
                                        "script": "on mouseUp\n    go cd \"villageGate\"\nend mouseUp\n",
                                        "showName": true,
                                        "style": "Standard",
                                        "textAttr": {
                                            "_color": "rgba(0,0,0,1.0)",
                                            "_textAlign": "center",
                                            "_textBaseline": "alphabetic",
                                            "font": {
                                                "family": "sans-serif",
                                                "kerning": "auto",
                                                "lineHeight": "18px",
                                                "size": "16px",
                                                "stretch": "normal",
                                                "style": "normal",
                                                "variant": "normal",
                                                "weight": "normal"
                                            }
                                        },
                                        "top": 388,
                                        "visible": true
                                    }
                                }
                            ],
                            "fields": [
                                {
                                    "properties": {
                                        "autoSelect": false,
                                        "autoTab": false,
                                        "bgColor": null,
                                        "bottom": 444,
                                        "depth": 1,
                                        "dontSearch": false,
                                        "dontWrap": false,
                                        "fixedLineHeight": true,
                                        "id": 27,
                                        "left": 70,
                                        "lockText": false,
                                        "multipleLines": false,
                                        "name": "item",
                                        "number": 1,
                                        "owner": 26,
                                        "partNumber": 1,
                                        "partType": "Field Part Type",
                                        "right": 319,
                                        "script": "",
                                        "scroll": 0,
                                        "sharedText": true,
                                        "showLines": false,
                                        "style": "Scrolling",
                                        "text": "axe",
                                        "textAttr": {
                                            "_color": "rgba(0,0,0,1.0)",
                                            "_textAlign": "start",
                                            "_textBaseline": "alphabetic",
                                            "font": {
                                                "family": "sans-serif",
                                                "kerning": "auto",
                                                "lineHeight": "18px",
                                                "size": "16px",
                                                "stretch": "normal",
                                                "style": "normal",
                                                "variant": "normal",
                                                "weight": "normal"
                                            }
                                        },
                                        "top": 154,
                                        "visible": true,
                                        "wideMargines": false
                                    }
                                }
                            ],
                            "picture": "Card ID 26 picture (Reserved)",
                            "properties": {
                                "cantAbort": false,
                                "cantDelete": false,
                                "cantModify": false,
                                "cantPeek": false,
                                "containerType": "Card Container Type",
                                "height": "480",
                                "id": 26,
                                "marked": false,
                                "name": "item",
                                "number": -1,
                                "owner": 10,
                                "script": "",
                                "showPict": true,
                                "width": "640"
                            }
                        }
                    ],
                    "buttons": [],
                    "fields": [],
                    "picture": null,
                    "properties": {
                        "cantAbort": false,
                        "cantDelete": false,
                        "cantModify": false,
                        "cantPeek": false,
                        "containerType": "Background Container Type",
                        "height": "480",
                        "id": 10,
                        "name": "",
                        "number": -1,
                        "owner": 9,
                        "script": "",
                        "showPict": true,
                        "width": "640"
                    }
                }
            ],
            "buttons": [],
            "cards": [
                11,
                13,
                17,
                28,
                26
            ],
            "currentBg": 10,
            "currentCard": 11,
            "fields": [],
            "focusedPart": 31,
            "picture": null,
            "properties": {
                "cantAbort": false,
                "cantDelete": false,
                "cantModify": false,
                "cantPeek": false,
                "containerType": "Stack Container Type",
                "freeSize": 0,
                "height": "480",
                "id": 9,
                "name": "Adventure Sample",
                "number": -1,
                "script": "",
                "showPict": true,
                "size": 0,
                "width": "640"
            }
        }
    ]
}

Re: WebCard HyperCard clone that runs on Node

Posted: Tue Nov 23, 2021 10:35 am
by xAction
This is super cool!
Base64 Image data breaks JSON import, maybe string too long or there's an escape chacter or something in the string.