Skip to content

App crashes at uniforms.fogColor.value.copy( fog.color ); when uniforms.fogColor.value is null  #58

@lorikou

Description

@lorikou

Description:
I have written an web game-application with a-frame and I'm using -among others - the aframe particle system component along with the aframe environment component .
When rendering an entity that includes the aframe particle system component my app crashes and I get the following error:
Capture

This issue is resolved if I change the following line in aframe-master.js (line 32470)
uniforms.fogColor.value.copy( fog.color );
with this
if ( uniforms.fogColor.value ) uniforms.fogColor.value.copy( fog.color );
But that way the error will not be fixed permanently since it will be reproduced everytime someone reinstalls the npm packages.

I actually did manage to reproduce the error here (glitch). However this time the error is thrown directly from three.js. The app works just fine after I remove the component from the environment entity.
Capture
I quickly found that a newer version of the component called aframe-particle-system-component-fog-fix has been released, which supposedly exposes only a subset of the ShaderParticleEngine API. I had not made the switch, but after uninstalling the old one and installing the new, nothing changed.

Can somebody help me fix this?

  • A-Frame Version: 1.0.4
  • Platform / Device: Google Chrome on Windows 10 Desktop
  • Reproducible Code Snippet or URL: (glitch).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions