Skip to content

Is there a way to subclass PVector for example? #20

Open
@soswow

Description

@soswow
Point = (function (_super) {
            __extends(Point, _super);
            Point.name = 'Point';
            function Point() {
                return Point.__super__.constructor.apply(this, arguments);
            }
            return Point;
        }) (PVector);

I try to subclass PVector. Resulting class is not what expected, constructor doesn't call PVector's constructor. Looks like Point.super.constructor is general Object constructor, not PVector's one.

I don't know why ProcessingJS has these lines in PVector.js. I think this is A problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions