Skip to content

Not exhaustive API of strokes in RoomVisual #379

Open
@xilexio

Description

@xilexio

In JS, it is possible to supply to, e.g., RoomVisual.circle options with

{
    stroke: undefined
}

It means that there should be no stroke and is different from empty options {} which mean that the stroke should be default (rather thick and light).

Currently in the API it is impossible to supply an undefined stroke. The stroke can either be None meaning default or Some(x) meaning width x, there is no undefined option that means no stroke. A working workaround is supplying transparent stroke color or extremely small (but positive or else it will not work) stroke width. However, this approach requires the stroke data to be sent to the client which needlessly uses up more of the already small (when visualizing something in the whole room) 500kB limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-unimplementedFeature that exists in Screeps, but that is yet unavailable in our API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions