scenejs
scenejs copied to clipboard
Can't initialise empty scene?
My use case is that I have a simple scene that I'm initialising as my app load. The scene is to contain a number of meshes constructed from data that is loaded asynchronously, and added to the scene in whatever order they become available (which is likely to be a good few seconds after the rest of the app has finished loading).
The problem is that it seems I can't initialise the scene with a camera, translations etc but not meshes, and add the meshes later. No errors show up in the console, but the canvas stays black (besides the notices showing that the downloaded meshes are being added), even after everything is loaded.
Including a teapot or something in the original scene and immediately removing it seems to solve the problem, but this doesn't really seems like correct behaviour, unless I'm thinking about it wrong?
hey, this does look like a bug, I'll squish it. Could you reproduce it with a minimal scene in an HTML page? cheers LK
sure, http://jsfiddle.net/Yd2SA/ if you remove the teapot node the and rerun it then the canvas stays black.
Actually, I just realised that example doesn't seem to reproduce the error, in that when I add another teapot after a 5 second delay it still works. I'll try isolate it or get my project deployed accessibly.
OK, here's a copy of my whole dev stack running in debug mode in a tmux session with the suspected bug manifesting. http://141.138.194.237:9000/
The relevant code can be inspected in scripts/controllers/main.js (or corresponding coffee source map).