Jump to content

TypeError in the materials library


saldukoo
 Share

Recommended Posts

Im trying to access the materials library here:

https://github.com/BabylonJS/Babylon.js/tree/master/materialsLibrary/dist

So after placing this script

 <script src="/assets/game/Babylon.js-master/materialsLibrary/dist/babylon.brickProceduralTexture.min.js"></script>

I get this for all materials

TypeError: BABYLON.serializeAsTexture is not a function

The procedural texture library works though. How to fix this one?

Link to comment
Share on other sites

I was using 2.3. After installing 2.4 the error vanished. The materials aren't working though. Im getting weird looking shaders. Here's the error for FireMaterial.

BJS - [00:59:25]: Unable to compile effect:  babylon.2.4.js:3:14480

BJS - [00:59:25]: Vertex shader:fire babylon.2.4.js:3:14480

BJS - [00:59:25]: Fragment shader:fire babylon.2.4.js:3:14480

BJS - [00:59:25]: Defines: #define ALPHATEST
#define BonesPerMesh 0
#define NUM_BONE_INFLUENCERS 0
 babylon.2.4.js:3:14480

BJS - [00:59:25]: Error: ERROR: 0:137: 'uv' : undeclared identifier
ERROR: 0:137: 'x' :  field selection requires structure or vector on left hand side
ERROR: 0:138: 'y' :  field selection requires structure or vector on left hand side
ERROR: 0:139: 'x' :  field selection requires structure or vector on left hand side
ERROR: 0:140: 'y' :  field selection requires structure or vector on left hand side
ERROR: 0:141: 'x' :  field selection requires structure or vector on left hand side
ERROR: 0:142: 'y' :  field selection requires structure or vector on left hand side
 babylon.2.4.js:3:14480

 

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...