How to import these libraries?


I have these libraries on a basic index.html

  <script src=''></script>
  <script src=''></script>
  <script src=''></script>
  <script src=''></script>
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>

When i want to use them with the import function, that doesn’t works

import {ShaderPass} from ''

What must i do ?

Has to be jsm not js in this path
See here: three.js/webgl_postprocessing_unreal_bloom_selective.html at efbfc67edc7f65cfcc61a389ffc5fd43ea702bc6 · mrdoob/three.js · GitHub

1 Like

hi @prisoner849

yes you are true about the path but on my test it works and i don’t know why…

But this is not the most important question, when i put the correct path with import my code don’t works… And i would like to work with modules

I keep one of your codepen to inspire me and reproduce the same scheme but in a simpler way because I suck with shader :frowning:

You’re missing a closing </script> tag for the fragment shader.

1 Like

Thank you so much

looeee already told you, whilst I was fixing :smile:


Hi again,

I take one of your codepens @prisoner849, this:

I transform this codepen into this :

My question is how to work with the instance to reproduce the same effect as before:

Is it not possible to group a dummy from one instance to another dummy?

I tried this:

for (let i = 0; i < conf_master.count; i++) {
} ;

But this does nothing…

Is there a way to solve this probem ?

I think, in this case, you need to have a look at this post: Displaying 500 Basic Textured Models Performantly? (InstancedMesh or another method) - #13 by prisoner849

Yes thank you it’ exactly what i need.
Just a last question, why in my codepen

When i set

renderer.setClearColor(0x01010d, 1);

it is not the same background color as in this codepen?

However, it’s the same setting ?

I think it’s better that i open a new post