-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Similar to #12, it would be useful to specify default values via references
import { Script, SomeEnum } from 'playcanvas';
class MyScript extends Script {
/**
* @attribute
* @type {Vec3}
*/
up = Vec3.UP
/**
* @attribute
* @type {SomeEnum}
*/
value = SomeEnum.A
}Currently this is not supported and the up needs to be initialised ie. (up = new Vec3(0, 1, 0)).
This should be easy to implement for local constant values defined within the program, however for playcanvas values ie VecX.UP etc, the parser only has the playcanvas types and not the actual values ie static readonly UP: Vec2;.
Any solution would need to account for both constant values within the program, and constant values defined with the engine.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working