Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Missing props for pointsMaterial #138

Closed
khiner opened this issue Dec 31, 2016 · 4 comments
Closed

Missing props for pointsMaterial #138

khiner opened this issue Dec 31, 2016 · 4 comments
Milestone

Comments

@khiner
Copy link

khiner commented Dec 31, 2016

When trying to create a textured point, I get the following errors:

Warning: Foreign prop map found in pointsMaterial
Warning: Foreign prop blending found in pointsMaterial.
Warning: Foreign prop depthTest found in pointsMaterial.

preventing me from using a texture on a point.

My usage:

  this.circleSprite = new THREE.TextureLoader().load(require('../textures/sprites/circle.png'));
  ...

  render() {
    return (<points>
      ...
      <pointsMaterial
        color={0x888888}
        size={50}
        map={this.circleSprite}
        blending={THREE.AdditiveBlending}
        depthTest={false}
        transparent={true}
      />

It looks like PointsMaterialDescriptor is indeed missing all of these possible attributes, although Three does have them as options

@toxicFork
Copy link
Collaborator

toxicFork commented Dec 31, 2016 via email

toxicFork added a commit that referenced this issue Jan 3, 2017
@toxicFork toxicFork added this to the 3.0.1 milestone Jan 3, 2017
@khiner
Copy link
Author

khiner commented Jan 6, 2017

Thanks for getting on this so quickly! I tried to take it on myself but ran into weird issues locally after doing an npm link to my copy, where it was saying things along the lines of Invalid prop: ...Material expected blah to be of type Vertex but found type Vertex and others like that. Like its comparison between object types would fail if it found my local reference to THREE.Blah when it expected a different THREE.blah.

Anyway, thanks again :)

@toxicFork
Copy link
Collaborator

toxicFork commented Jan 6, 2017 via email

@khiner
Copy link
Author

khiner commented Jan 6, 2017

Ah, that's exactly what I assumed was happening, couldn't think of another way the class comparison would fail. Good tip on npm install-ing the directory path.

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

No branches or pull requests

2 participants