Skip to content

Conversation

@haxiomic
Copy link
Contributor

@haxiomic haxiomic commented Mar 8, 2022

For example:

@:js.import("three/examples/jsm/controls/OrbitControls.js") extern class OrbitControls {

does not work because it tries to import "three_examples_jsm_controls_orbitcontrols_OrbitControls", rather than just OrbitControls. Given the module could export under any name, we need a variant where we specify which import we want

haxiomic added 3 commits March 8, 2022 13:37
For example:

```haxe
@:js.import("three/examples/jsm/controls/OrbitControls.js") extern class OrbitControls {
```

does not work because it tries to import "three_examples_jsm_controls_orbitcontrols_OrbitControls", rather than just OrbitControls. Given the module could export under any name, we need a variant where we specify which import we want
@back2dos back2dos merged commit b75bda1 into back2dos:master Mar 11, 2022
@back2dos
Copy link
Owner

Thanks! I'm merging this , because there's no reason why the user should not be allowed to customize the name (especially if it's something that's not a valid class name in Haxe).

Still, I think that maybe the primary problem with the current implementation is that it uses the fully qualified name. If it only used the class name it self, would that solve your particular issue?

@haxiomic
Copy link
Contributor Author

haxiomic commented Mar 11, 2022

Ty :)

In this case yeah using the haxe class name would solve the issue (but as you say, in general we need to be able to override this for non valid haxe names)

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

Successfully merging this pull request may close these issues.

2 participants