Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numerous methods for classes not being generated #67

Open
nickj886 opened this issue Jul 11, 2022 · 0 comments
Open

Numerous methods for classes not being generated #67

nickj886 opened this issue Jul 11, 2022 · 0 comments

Comments

@nickj886
Copy link

nickj886 commented Jul 11, 2022

Hi @canhorn

As a Blazor developer and having an interest in the BabylonJs engine I really like what you have done here bringing the two together.

I have noticed thou that your tool is not generating a number of methods like createDefaultEnvironment and createDefaultXRExperienceAsync which are defined in Scene interfaces instead of the actual Scene class definition. Would it be possible to include the public members of those interfaces as well?

Also I have noticed there are some private properties in the babylon.d.ts, such as TmpVector3, that are not defined properly and so are being generated incorrectly in the C# output. For this issue I did add a quick fix locally (see below) to get past it. Do you think it is reasonable to ignore any child nodes that are private as they are internal to the BabylonJS engine and likely shouldn't be accessible via the interop?

private static bool IsNotPrivate(Node child)
        {
            if (child.Modifiers?.Any(modifier => modifier.Kind == SyntaxKind.PrivateKeyword) ?? false)
                return false;

            return child.Modifiers?.Count(
                modifier => modifier.Kind == SyntaxKind.PrivateKeyword) == 0
            && child.Modifiers?.Count(
                modifier => modifier.Kind == SyntaxKind.ProtectedKeyword) == 0
            && child.IdentifierStr != null && !child.IdentifierStr.StartsWith("_");
        }

If the change is acceptable I can add it via a pull request.

Regards
Nick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant