Jump to content

[ Solved ] 2.6 Alpha Error when " scene.renderTargetsEnabled = true ; "


Kemal UÇAR
 Share

Recommended Posts

Hello everyone

In my scene 

if i m enabled "  scene.renderTargetsEnabled = true ;  "

black screen on browser and this error message on console

Uncaught TypeError: Cannot read property 'indexOf' of null
    at i.render (babylon.js:15)
    at i._renderForCamera (babylon.js:12)
    at i._processSubCameras (babylon.js:12)
    at i.render (babylon.js:12)
    at uttt.js:5714
    at n._renderLoop (babylon.js:4)

if disabled works well :(

and if use BJS 2.5 works well with rendertargets

pls help

Thanks

Link to comment
Share on other sites

Hello 

this link my test page all scene files here ,  http://www.3dprof.com/test/uttt/index.html

when upgrade 2.6 rendertargets not work 

3-4 days ago i tried 2.6 works well and faster than 2.5 just particules not on mirror but now crashed .

I m sorry for amateur coding this scene my first and not completed yet , all models are my designs 

I m 46 year old and back again coding after 15-20 years :)  trying to learn HTML CSS JS and BJS just in my free times

I hope u can fix

hv nice works 

Link to comment
Share on other sites

Hello 

I searched more my code and find source of fault ;

if  I remove this code block my scene launching and workin well on BJS 2.6

/*
                var psb = new BABYLON.ParticleSystem("psb", 100, scene);
                psb.particleTexture = new BABYLON.Texture("textures/ay-k.png", scene);
                psb.minSize = 0.7;
                psb.maxSize = 0.8;
                psb.minEmitPower = 1;
                psb.maxEmitPower = 1;
                psb.minLifeTime = 1.5;
                psb.maxLifeTime = 1.5;
                psb.emitter = dkure2;
                psb.emitRate = 20;
                psb.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
                psb.minEmitBox = new BABYLON.Vector3(0, 0, 0);
                psb.maxEmitBox = new BABYLON.Vector3(0, 0, 0);
                psb.gravity = new BABYLON.Vector3(0, 0.1, 0);
                psb.direction1 = new BABYLON.Vector3(0, 0, 0);
                psb.direction2 = new BABYLON.Vector3(0, 0, 0);               
                psb.start();

                var psk = new BABYLON.ParticleSystem("psk", 100, scene);
                psk.particleTexture = new BABYLON.Texture("textures/ay-k.png", scene);
                psk.minSize = 0.7;
                psk.maxSize = 0.8;
                psk.minEmitPower = 1;
                psk.maxEmitPower = 1;
                psk.minLifeTime = 1.5;
                psk.maxLifeTime = 1.5;
                psk.emitter = dkure1;
                psk.emitRate = 20;
                psk.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
                psk.minEmitBox = new BABYLON.Vector3(0, 0, 0);
                psk.maxEmitBox = new BABYLON.Vector3(0, 0, 0);
                psk.gravity = new BABYLON.Vector3(0, 0.1, 0);
                psk.direction1 = new BABYLON.Vector3(0, 0, 0);
                psk.direction2 = new BABYLON.Vector3(0, 0, 0);
                psk.start();
*/

anything wrong my particules cretaing code ?

I think fault not in rendertargets code,

maybe in particules code

cause when u fixed particules not on mirrorplane texture and I upgrade fixed version of BJS 2.6 my scene crashed on 2.6

thanks for your works

 

Link to comment
Share on other sites

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...