Sorry,
Yea ErrorTIME
…
Problem with my Shader(Particle)
Output:
code.html:208 Uncaught TypeError: Cannot read property ‘tick’ of undefined
at animate (code.html:208)
My Url:
https://is.gd/1cNMyf
The error is telling you that fire
is undefined on line 208:
fire.tick(dt);
Earlier in the code, the fire
variable is defined inside the addGoalFire()
function. That function is nearly perfect – the only problem is that it is not called. So, above, in the code outline, you need to call this function. Place it after the addGoalLight()
call:
reset();
addGoalLight();
addGoalFire();
addBackground();
After making that change, there is another error:
Uncaught TypeError: goalFire.disabled is not a function
at addGoalFire (code.html:159)
at code.html:40
at _.html:10
This is caused by a small typo on line 159:
goalFire.disabled();
That should be “disable” instead of “disabled”:
goalFire.disable();
That fixes almost everything. Except when you are able to get the ball into the goal. When that happens, you’ll get the following error (the line number may be slightly different for you):
code.html:167 Uncaught ReferenceError: goalLight is not defined
at window.Physijs.Physijs.BoxMesh.win (VM70 code.html:167)
I’ll let you fix that one, though. I think you can spot the error there. If not, let me know and I’ll tell you
-Chris
Yea i found the mistake…
I wrote at Line 165-167
I deleted:
goalLight1.material.visible = !goalLight1.material.visible;
goalLight2.material.visible = !goalLight.material.visible;
These two Lines now it work perfectly