nartc / angular-three

🧊 THREE.js integration for Angular 🧊
https://angular-three.netlify.app/
MIT License
305 stars 23 forks source link

Export not found in three #10

Closed LauferAlex closed 2 years ago

LauferAlex commented 2 years ago

Hi Team,

So we are trying to use angular-three to make some 3D visualization and we are trying to build a simple Skybox. For this purpose we are trying to import ngt-sphere-geometry and for that we are importing the ThreeSphereBufferGeometryModule and we are getting this error:

image

Code structure as follows:

app.module.ts import {ThreeSphereBufferGeometryModule} from "@angular-three/core/geometries";

@NgModule({
  declarations: [
    AppComponent,
    ModelViewComponent
  ],
    imports: [
        ...
        ThreeSphereBufferGeometryModule,
    ],
  providers: [],
  bootstrap: [AppComponent]
})

model-view-component.html

<ngt-canvas
  [camera]='{position: [1, 1, 3], fov: 90, near: 0.1, far: 1000}'
  [scene]="{ fog: ['000000', 1, 15000] | fog }"
  (created)='$event.gl.setClearColor("gray")'
  [shadows]="true"
>
  <ngt-mesh>
    <ngt-sphere-geometry [args]="[500, 60,40]" #skybox> </ngt-sphere-geometry>
  </ngt-mesh>
  <ngt-grid-helper o3d></ngt-grid-helper>
</ngt-canvas>

We only get this error when trying to import any buffer geometry into the scene. Thanks for the help in advance!

nartc commented 2 years ago

Can you provide THREE version? I'll sync everything back up either today or tomorrow

LauferAlex commented 2 years ago

Thank you for your answer. The THREE version is: "three": "^0.133.1",

nartc commented 2 years ago

@LauferAlex thank you for providing the information. Latest three has moved some symbols from three core module to examples/* which breaks some of the imports. I'll push a fix as soon as EOD tomorrow. Thank you for understanding

nartc commented 2 years ago

@LauferAlex please check out the latest beta release. Thank. you