Using PHP to dynamically generate virtual reality VRML Web page _php Tutorial

Source: Internet
Author: User
Years ago I began to engage in three-dimensional animation learning, after learning PHP, found that can be dynamically generated by PHP VRML documents, a bit similar to the generator dynamic generation of flash mode.
Because of the broad and profound VRML, here only a simple example, you can also put a variety of VRML nodes into the database, such a virtual reality Web page will ..., cool!
The following is the source program. Note: On the server, you will have PHP handle documents in the WRL format, otherwise the consequences will be no virtual reality. Source program directly into the WRL file, in the browser to install plug-ins, you can go to my other homepage download: http://go.163.com/~sjtucaocao/


DEF Leftbox Transform
{
Translation-5 0 0
Children
[
Shape
{
Appearance appearance
{
Material material
{
Diffusecolor 1 0 0
}
}
Geometry box{}
}
DEF Spherechild Shape
{
Appearance appearance
{
Material material
{
Diffusecolor 1 0 1
}
}
Geometry Sphere
{
RADIUS 1.2
}
}
]
}

DEF Rightbox Transform
{
Translation 5 0 0
Children
[
Shape
{
Appearance appearance
{
Material material
{
Diffusecolor 0 0 1
}
}
Geometry box{}
}
]
}

DEF OnOff Transform
{
Translation 0-1 0
Children
[
Shape
{
Appearance appearance
{
Material material
{
Diffusecolor 0 1 0
}
}
Geometry box{}
}
DEF TS touchsensor{}
]
}

DEF S Script
{
Eventin Sfbool isActive
Eventout Mfnode Child
Field Mfnode Testnode use Spherechild
Url
"JavaScript:
function IsActive (value)
{
if (value)
{
Child=testnode;
}
}
"
}

ROUTE ts.isactive to S.isactive
ROUTE S.child to Leftbox.removechildren
ROUTE s.child to Rightbox.addchildren "; Echo $txt;
?>



http://www.bkjia.com/PHPjc/316801.html www.bkjia.com true http://www.bkjia.com/PHPjc/316801.html techarticle years ago I began to engage in three-dimensional animation learning, after learning PHP, found that can be dynamically generated by PHP VRML documents, a bit similar to the generator dynamic generation of flash mode. As a result of ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.