Angular 17+ Three.js 3D Model Cropper Library - GLB/FBX input with cheap geometry cropping
npm install ng-three-model-cropperbash
npm install ng-three-model-cropper three
npm install -D @types/three
`
Usage
`typescript
import { ModelCropperComponent } from 'ng-three-model-cropper';
@Component({
standalone: true,
imports: [ModelCropperComponent],
template: \
})
export class MyComponent {
modelUrl = 'assets/model.glb';
onCropApplied(result: CropResult) {
console.log('Crop applied:', result);
}
onFileReady(buffer: ArrayBuffer) {
// Handle exported GLB
}
}
`
API
See the main README for complete API documentation.
Build
`bash
From the repo root
npm run build:lib
Or directly
ng build model-cropper --configuration production
`
Watch (Library Development)
`bash
Rebuild the library on changes
npm run watch:lib
`
Publishing
`bash
From the repo root
npm run publish:lib
Or manually
cd dist/model-cropper
npm publish
``