Replies: 1 comment 4 replies
-
Hi, Sample of similar component: @Component({
selector: 'atft-object-loader',
providers: [provideParent(ObjectLoaderComponent)],
template: '<ng-content></ng-content>'
})
export class ObjectLoaderComponent extends AbstractModelLoader {
private loader = new THREE.ObjectLoader();
constructor(
protected rendererService: RendererService,
@SkipSelf() @Optional() protected parent: AbstractObject3D<any>
) {
super(rendererService, parent);
}
protected async loadLazyObject() {
// console.log('ObjectLoaderComponent.loadLazyObject');
return new Promise<THREE.Object3D>((resolve, reject) => {
this.loader.load(this.model, model => {
// BUG #95: it seems that some textures loaded after last render (and model has black texture instead)
resolve(model);
},
undefined,
reject
);
});
}
} Theoretically, only this should be changed in new component:
If you can create PR, then I would be very appreciated. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I wanted to know if it is possible to be able to view an example stl file https://ozeki.hu/attachments/116/Menger_sponge_sample.stl.
I have downloaded your project and have performed various tests, but, I have not found any solution to load an STL file, not even on the documentation.
I know, that three.js allows loading https://threejs.org/examples/?q=stl#webgl_loader_stl, can you tell me a way to load a grt file?
Tsk
Rocco
Beta Was this translation helpful? Give feedback.
All reactions