Don't mind the mess!
We're currently in the process of migrating the Panda3D Manual to a new service. This is a temporary layout in the meantime.
Note: This article describes a deprecated feature as of Panda3D 1.10.0.
<object> elements is a straightforward way to embed your
p3d file, but it does have two disadvantages. Specifically, (1) it
requires you to specify all of the options twice, which promotes
errors; and (2) it doesn't work if you need to specify an "id"
because you can't specify the same "id" attribute to two different
That is, you must include a reference to RunPanda3D.js within the
<head> part of your web page; and you include a call to the function
P3D_RunContent() within the <body> part of your web page.
P3D_RunContent() will generate the appropriate form of the
element for whichever browser the user is currently running: either
the Internet Explorer form, or the non-Internet Explorer form. The
object element is generated via document.write(), wherever the call to
P3D_RunContent() appears within your web page.
The parameters to
P3D_RunContent() must be given in pairs: of each two
parameters, the first parameter is the keyword, and the second
parameter is the value. This is equivalent to a
appearing in the
<object> element. For instance, the above call would
<object> element something like this:
<object data="myapp.p3d" id="myapp_id" width="640" height="480"> </object>
(though it will also add either
type, according to the type of browser the user is running.)
P3D_RunContent() also adds two additional Splash window tags, noplugin_img and noplugin_href. These tags are not available if you embed using the
<object> syntax directly.