Comments (6)
but nothing inside, for instance, examples/jsm/libs can even be used
This claim is incorrect. Static resources cannot be fetched from node_modules in most cases, but JavaScript modules certainly can. Any use of KTX2Loader is getting dependencies this way:
three.js/examples/jsm/loaders/KTX2Loader.js
Lines 61 to 62 in ed2bfb2
If I create a new react+next.js-based project with three.js, my dependencies could easily look something like this:
That's obviously not great, but three.js is not a particularly bad offender on the list either. Is this such a major issue that we'd need to throw all of examples/jsm/libs out?
I understand the R3F community is using three-stdlib
rather than these files, and perhaps a more complete proposal could be made to change how we're structuring the project, but I don't feel this issue currently describes motivating reasons for such a change.
from three.js.
I believe we can do something similar to the webgl_geometry_csg example, for the examples on the website we can use import maps pointing to unpkg.com, whereas on npm we could declare the packages as optional peerDependencies.
However this comes with the burden of having to tell the user to install a specific version of fflate
when using the FBXLoader
for example. What's your view on this?
from three.js.
Does anyone want to do a treemap to illustrate what contributes to these 23mb?
from three.js.
However this comes with the burden of having to tell the user to install a specific version of fflate when using the FBXLoader for example. What's your view on this?
I think that users already do something like this for packages like react-three-fiber, so it shouldn't be too much of an issue?
from three.js.
the javascript files can, but what's the point when each and every one of them is on npm, a package should avoid inlining dependencies. but the binaries cannot be used in a meaningful way, they are there for nothing.
as for stdlib, three + jsm/examples is being present always, and in larger projects it contributes to install times and slow tooling.
std declares all dependencies properly
https://github.com/pmndrs/three-stdlib/blob/main/package.json#L36-L48 but it can't help the weight that is caused by three.
from three.js.
Is this such a major issue that we'd need to throw all of examples/jsm/libs out?
Definitely no.
perhaps a more complete proposal could be made to change how we're structuring the project, but I don't feel this issue currently describes motivating reasons for such a change.
Agreed.
from three.js.
Related Issues (20)
- Modifying the position of the scene can cause misalignment of the SpotLight and SpotLightHelper positions HOT 2
- anisotropy effect looks not that correct HOT 4
- Is it possible to add a setColorAt method for BatchedMesh? HOT 3
- OrbitControls: Infinite Return of getZoomScale When window.devicePixelRatio < 1 HOT 2
- MaterialX: Default input values not being specified results in errors every frame HOT 1
- SVGLoader pointsToStroke incorrect UV mapping when texture applied HOT 2
- Use `Object.keys(…)` to iterate over "own" properties? HOT 3
- WebGPURenderer: Resize breaks post FX setup in `webgpu_rtt` example HOT 1
- Addons.js is incomplete
- Points rendering glitch in iOS Safari HOT 5
- bug in Audio.js setDetune HOT 3
- THREE.BufferGeometryUtils.mergeAttributes fails to merge LineGeometry HOT 1
- Does three.js currently provide adjustment hubs similar to babylon.js: when dragging the model, the current option is used to determine the hub position of the model. HOT 2
- Can we have a material to be transparent if it receives no light ? (From spotlight ideally) HOT 2
- Add concept of bounding box and raycast to Object3D HOT 3
- MaterialX: Unlit materials (single-output nodegraphs) don't work HOT 3
- MaterialX: `viewdirection` node HOT 1
- GroundedSkybox zenit/nadir visual artifacts HOT 6
- Using a texture as `scene.background` is blurrier than it should HOT 13
- DepthTexture and CubeTexture result in errors and warnings when assigned to a wgslFn HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js.