Can I use the js/examples within a Typescript/Ionic Project?

I am trying to use it on ionic3 Framework(Typescript).

I import threejs by

import * as THREE from ‘three’;

But when I try to use

this.effect = new THREE.StereoEffect(this.renderer);

The debug says: StereoEffect is not a constructor

How can I use this examples on threejs typescript library?

Crossposting:

And wich is the problem?

Some one knows how to use examples on a typescript project?

Thanks a lot

THREE.StereoEffect is no part of the core. Just instancing StereoEffect does not work. I guess you have to manually convert StereoEffect to a module and then import it.

Unfortunately, I’m not familiar with typescript so i don’t know if there is something special to consider. Maybe @semleti can help here (see TypeScript port of threejs).

@semleti Can you please provide some advices in this thread?

1 Like