Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sky.material.uniforms property do not exist on type Material #18249

Closed
tonyshare opened this issue Dec 27, 2019 · 0 comments · Fixed by #18250
Closed

sky.material.uniforms property do not exist on type Material #18249

tonyshare opened this issue Dec 27, 2019 · 0 comments · Fixed by #18250

Comments

@tonyshare
Copy link

I am using angular9 and threejs with it's Sky model in itself example.

import { Sky } from "three/examples/jsm/objects/Sky";
...
        var sky = new Sky();
        var uniforms = sky.material.uniforms;

when I compplie the code with ng server

the compiler gave the complain:

_
: Compiled successfully.

ERROR in src/app/app.component.ts:108:37 - error TS2339: Property 'uniforms' does not exist on type 'Material | Material[]'.
  Property 'uniforms' does not exist on type 'Material'.

108         var uniforms = sky.material.uniforms;
                                        ~~~~~~~~
src/app/app.component.ts:137:26 - error TS2339: Property 'uniforms' does not exist on type 'Material | Material[]'.
  Property 'uniforms' does not exist on type 'Material'.

137             sky.material.uniforms[ 'sunPosition' ].value = light.position.copy( light.position );

_

Three.js version

"[email protected]"

Node version

v13.5.0

Angular version

Package Version

@angular-devkit/architect 0.900.0-rc.7
@angular-devkit/build-angular 0.900.0-rc.7
@angular-devkit/build-optimizer 0.900.0-rc.7
@angular-devkit/build-webpack 0.900.0-rc.7
@angular-devkit/core 9.0.0-rc.7
@angular-devkit/schematics 9.0.0-rc.7
@ngtools/webpack 9.0.0-rc.7
@schematics/angular 9.0.0-rc.7
@schematics/update 0.900.0-rc.7
rxjs 6.5.3
typescript 3.6.4
webpack 4.41.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant