yes i know, noob question. import { something } from “something” doesnt work right. also require(“something”) doesnt work either. so is there some super secret way of importing a loader? i am running updated node and updated three module
boys, i have scrapped that idea. now i am thinking, can i just copy object geometry that the loader makes, and then just use it as a geometry object in future so i will never have to load thing again. is this possible, and if this is stupid can you just tell me how to load custom models on node?
i have tried: using jsm with babel import, using three-gltf-loadermodule.
with three-gltf-loader module it asks for xmldfasfasdfsdafg and i also installed that module and it gives me undefined error, doing the usual import with babel module also gives me the same undefiner error. so i scraped that.
please help any help is apreci8ed. <3
There is no need to use an third-party module in order to use GLTFLoader
in you project. It’s part of the main repository now and can be included like so:
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
Besides, GLTFLoader
does not support node.js
environments since it relies on certain Web APIs like URL.createObjectURL()
.
Related topics: Using GLTFLoader on node and [Solved] GLTFLoader DRACOLoader in nodejs