Jump to content

Explanation of canvas, engine, scene, cameras


Wink
 Share

Recommended Posts

I've determined I could have multiple canvases each with its own scene and engine, but then I wondered if I could have multiple scenes in one canvas. But I couldn't get it to work and I was just shooting in the dark. What I was wondering if it was possible to "fade" between scenes like you can do with video. 

So is there an explanation of canvas, engine, scene, cameras as far as what can have multiple instances? I do see there is a notion of camera "Rigs" which appears to allow multiple cameras for things like stereoscopic effects, is there other uses for a "Rig"?

Link to comment
Share on other sites

Hello,

engine is the controller (the driver) for webgl and it is tied to a canvas.

But then you can have multiple scene per canvas and multiple cameras per scene.

 

Here is an example with two scenes (one fading into another): http://www.babylonjs-playground.com/#1AP18W#2

Two scenes blended in: http://www.babylonjs-playground.com/#UCFKM#9

Link to comment
Share on other sites

@Deltakosh Thanks, my ugly test is working now, after looking at the examples I have a much better idea how canvas, engine, scenes and lights are working, although much much more to learn.

For future reference if anyone reads this thread, I initially missed setting autoClear = false. Not doing so obviously caused only the last scene to be rendered.

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