Skip to content

Enum constants not evaluated #12

@marklundin

Description

@marklundin

The following ambient member is not parsed as an attribute, nor is an error raised

import { Script } from 'playcanvas'

/** @enum {number} */
const Lights = {
    ON: 1,
    OFF: 0,
    UNKNOWN: 0.5
}

class Hack extends Script {
    /**
     * @attribute
     * @type {Lights}
     */
    ambient = Lights.OFF
}

export { Hack };

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions