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

Adopt importmaps in WebGPU examples #21364

Merged
merged 1 commit into from
Feb 26, 2021
Merged

Adopt importmaps in WebGPU examples #21364

merged 1 commit into from
Feb 26, 2021

Conversation

mrdoob
Copy link
Owner

@mrdoob mrdoob commented Feb 26, 2021

Related issue: #20455 (comment)

Description

Next week's Chrome 89 release will ship with import maps and Mozilla has shown positive interest.
The current bundle-less dev experience using modules is broken without them so the sooner we adopt the better.

We'll start by using them in the WebGPU examples.

@mrdoob mrdoob added this to the r127 milestone Feb 26, 2021
@mrdoob mrdoob merged commit d315b4d into dev Feb 26, 2021
@mrdoob mrdoob deleted the importmaps branch February 26, 2021 14:06
@mrdoob
Copy link
Owner Author

mrdoob commented Feb 26, 2021

/fyi @sunag

@sunag
Copy link
Collaborator

sunag commented Feb 27, 2021

Wow... It is great, always been a headache to count the folder hierarchy. The first thing I thought was <script type="importmap" src="./threemaps/three.json"></script> but it seems there yet it still no support. I will do the same thing with the nodes.

@sunag
Copy link
Collaborator

sunag commented Feb 27, 2021

It makes me wonder if we should already adopt private field for WebGPU?

class PrivatePropertyTest { 

	#str = "hello world";
	
	constructor() {
	
		console.log( this.#str ); // hello world
	
	}
	
} 

let test = new PrivatePropertyTest();
console.log( test.#str ); // error

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 27, 2021

The introduction of import maps was the result of some sort of emergency. I think I would wait with adopting other language features (like private class fields) until they are better supported.

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.

3 participants