1.0.2 • Published 4 years ago

@blackpaw/second-life-http-headers v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@blackpaw/second-life-http-headers

Simple support for your Express programs to parse headers that come from LSL scripts in SecondLife.

None of this is endorsed by LindenLabs.

parseSecondLifeHeaders

Typescript Declaration

function parseSecondLifeHeaders(req: any, allowIncomplete = true): SecondLifeHttpHeaders | null

This function receives an Express Request object in req.

allowIncomplete is an optional parameter. By default this is true, which will fill in the headers and not bother checking if any are missing.

If false is passed in, the parser will return null in the case that any of the expected headers are missing.

SecondLifeHeaders

This contains the following definition:

class SecondLifeHttpHeaders {
    localPosition: Vector
    localRotation: Rotation
    localVelocity: Vector

    objectKey: string
    objectName: string

    ownerKey: string
    ownerName: string

    region: string
    shard: string
}

where Vector represents an LSL Vector as

class Vector {
    x: number;
    y: number;
    z: number;
}

and Rotation represents LSL Rotation as

class Rotation {
    x: number;
    y: number;
    z: number;
    s: number;
}

Versions

1.0.2

Fix package.json problems.

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago