@s0rt/3dvf
v0.3.0
Published
shadcn-style Three.js function library CLI
Readme
dev
link local cli
bun link
run the cli
bun run dev
run the registry
bun run dev:registry
Using bunx 3dvf <command> will now use the local cli.
troubleshotting
.glsl & vite
Using the create command will already apply this fix.
By default vite won't import .glsl files as we want it to, resulting in parsing errors.
You can either prepend import path with ?raw, or, to avoid touching the 3dvf files, use the following plugin :
function glslPlugin(): Plugin {
return {
name: 'glsl-raw',
load(id) {
if (id.endsWith('.glsl')) {
const source = readFileSync(id, 'utf-8');
return `export default ${JSON.stringify(source)};`;
}
}
};
}And add it
{
plugins: [glslPlugin]
}.dds
{
assetsInclude: ['**/*.dds']
}