x3dpsail.SFRotation(0, 1, 0, 1.57)).setPosition(
             x3dpsail.SFVec3f(10, 0, 0))).addChild(
                 x3dpsail.Viewpoint().setDescription(
                     x3dpsail.SFString("Left View")).setOrientation(
                         x3dpsail.SFRotation(
                             0, 1, 0, -1.57)).setPosition(
                                 x3dpsail.SFVec3f(-10, 0, 0))).addChild(
                                     x3dpsail.NavigationInfo().setType(
                                         x3dpsail.MFString([
                                             "EXAMINE", "WALK", "FLY",
                                             "ANY"
                                         ]))).
 addChild(x3dpsail.Shape().setAppearance(
     x3dpsail.Appearance().setMaterial(x3dpsail.Material()).setTexture(
         x3dpsail.PixelTexture().setImage(
             x3dpsail.SFImage(2, 2, 4, -16776961, 16711935, -1,
                              -65281)))
 ).setGeometry(x3dpsail.IndexedFaceSet().setColorPerVertex(
     x3dpsail.SFBool(False)).setCoordIndex(
         x3dpsail.MFInt32([
             0, 1, 3,
             2, -1, 4, 5, 7, 6, -1, 6, 7, 1, 0, -1, 2, 3, 5, 4, -1, 6,
             0, 2, 4, -1, 1, 7, 5, 3, -1
         ])).setCreaseAngle(x3dpsail.SFFloat(0.5)).setTexCoordIndex(
             x3dpsail.MFInt32([
                 0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1,
                 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2, -1
             ])).setColor(x3dpsail.Color().setColor(
                 x3dpsail.MFColor([
                     0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
                     0
Viewpoint29 = x3dpsail.Viewpoint()
Viewpoint29.setDescription("Left View")
Viewpoint29.setOrientation([0, 1, 0, -1.57])
Viewpoint29.setPosition([-10, 0, 0])

Scene23.addChildren(Viewpoint29)
NavigationInfo30 = x3dpsail.NavigationInfo()
NavigationInfo30.setType(["EXAMINE"])

Scene23.addChildren(NavigationInfo30)
Shape31 = x3dpsail.Shape()
Appearance32 = x3dpsail.Appearance()
Material33 = x3dpsail.Material()

Appearance32.setMaterial(Material33)
PixelTexture34 = x3dpsail.PixelTexture()
PixelTexture34.setImage([2, 2, 4, -16776961, 16711935, -1, -65281])

Appearance32.setTexture(PixelTexture34)

Shape31.setAppearance(Appearance32)
IndexedFaceSet35 = x3dpsail.IndexedFaceSet()
IndexedFaceSet35.setColorPerVertex(False)
IndexedFaceSet35.setCoordIndex([
    0, 1, 3, 2, -1, 4, 5, 7, 6, -1, 6, 7, 1, 0, -1, 2, 3, 5, 4, -1, 6, 0, 2, 4,
    -1, 1, 7, 5, 3, -1
])
IndexedFaceSet35.setCreaseAngle(0.5)
IndexedFaceSet35.setTexCoordIndex([
    0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2,
    -1, 0, 1, 3, 2, -1
Viewpoint28 = x3dpsail.Viewpoint()
Viewpoint28.setDescription("Left View")
Viewpoint28.setOrientation([0, 1, 0, -1.57])
Viewpoint28.setPosition([-10, 0, 0])

Scene22.addChildren(Viewpoint28)
NavigationInfo29 = x3dpsail.NavigationInfo()
NavigationInfo29.setType(["EXAMINE", "WALK", "FLY", "ANY"])

Scene22.addChildren(NavigationInfo29)
Shape30 = x3dpsail.Shape()
Appearance31 = x3dpsail.Appearance()
Material32 = x3dpsail.Material()

Appearance31.setMaterial(Material32)
PixelTexture33 = x3dpsail.PixelTexture()
PixelTexture33.setImage([2, 2, 4, -16776961, 16711935, -1, -65281])

Appearance31.setTexture(PixelTexture33)

Shape30.setAppearance(Appearance31)
IndexedFaceSet34 = x3dpsail.IndexedFaceSet()
IndexedFaceSet34.setColorPerVertex(False)
IndexedFaceSet34.setCoordIndex([
    0, 1, 3, 2, -1, 4, 5, 7, 6, -1, 6, 7, 1, 0, -1, 2, 3, 5, 4, -1, 6, 0, 2, 4,
    -1, 1, 7, 5, 3, -1
])
IndexedFaceSet34.setCreaseAngle(0.5)
IndexedFaceSet34.setTexCoordIndex([
    0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2, -1, 0, 1, 3, 2,
    -1, 0, 1, 3, 2, -1
예제 #4
0
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("created")).setContent(x3dpsail.SFString("18 December 2006")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("modified")).setContent(x3dpsail.SFString("2 April 2017")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("reference")).setContent(x3dpsail.SFString("http://X3dGraphics.com")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("reference")).setContent(x3dpsail.SFString("http://www.web3d.org/x3d/content/examples/X3dResources.html")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("rights")).setContent(x3dpsail.SFString("Copyright 2006, Daly Realism and Don Brutzman")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("subject")).setContent(x3dpsail.SFString("X3D, PixelTexture")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("identifier")).setContent(x3dpsail.SFString("http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter05AppearanceMaterialTextures/Table5_18PixelTexture")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("generator")).setContent(x3dpsail.SFString("X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("license")).setContent(x3dpsail.SFString("../license.html"))))
 .setScene(x3dpsail.Scene()
   .addChild(x3dpsail.Background().setSkyColor(x3dpsail.MFColor([0,0,1])))
   .addChild(x3dpsail.Transform().setDEF(x3dpsail.SFString("Checkerboard")).setTranslation(x3dpsail.SFVec3f(0,0,-10))
     .addChild(x3dpsail.Shape()
       .setAppearance(x3dpsail.Appearance()
         .setTextureTransform(x3dpsail.TextureTransform().setScale(x3dpsail.SFVec2f(500,500)))
         .setTexture(x3dpsail.PixelTexture().setImage(x3dpsail.SFImage(2,2,3,15119869,16767927,16767927,15119869))))
       .setGeometry(x3dpsail.Box().setSize(x3dpsail.SFVec3f(1000,1000,0.01)))))
   .addChild(x3dpsail.Viewpoint().setDescription(x3dpsail.SFString("View All")).setPosition(x3dpsail.SFVec3f(0,0,20)))
   .addChild(x3dpsail.Viewpoint().setDescription(x3dpsail.SFString("Empty Image")).setPosition(x3dpsail.SFVec3f(0,5,5)))
   .addChild(x3dpsail.Transform().setDEF(x3dpsail.SFString("EmptyImage")).setRotation(x3dpsail.SFRotation(1,1,0,1)).setTranslation(x3dpsail.SFVec3f(0,5,0))
     .addChild(x3dpsail.Shape()
       .setAppearance(x3dpsail.Appearance()
         .setTexture(x3dpsail.PixelTexture()))
       .setGeometry(x3dpsail.Box().setDEF(x3dpsail.SFString("StandardBox")))))
   .addChild(x3dpsail.Viewpoint().setDescription(x3dpsail.SFString("Black and white PixelTexture")).setPosition(x3dpsail.SFVec3f(-5,0,5)))
   .addChild(x3dpsail.Transform().setDEF(x3dpsail.SFString("BW")).setRotation(x3dpsail.SFRotation(1,1,0,1)).setTranslation(x3dpsail.SFVec3f(-5,0,0))
     .addChild(x3dpsail.Shape()
       .setAppearance(x3dpsail.Appearance()
         .setTexture(x3dpsail.PixelTexture().setImage(x3dpsail.SFImage(1,2,1,255,0))))
       .setGeometry(x3dpsail.Box().setUSE(x3dpsail.SFString("StandardBox")))))
   .addChild(x3dpsail.Viewpoint().setDescription(x3dpsail.SFString("Black and white with Alpha PixelTexture")).setPosition(x3dpsail.SFVec3f(5,0,5)))
예제 #5
0
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("translator")).setContent(x3dpsail.SFString("Michael Kass NIST, Don Brutzman NPS")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("translated")).setContent(x3dpsail.SFString("21 January 2001")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("modified")).setContent(x3dpsail.SFString("16 January 2011")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("description")).setContent(x3dpsail.SFString("Test browser ability to map a RGB plus alpha opacity to geometry. A checkerboard of four colored squares: lower left (red), lower right (transparent), uppser left (transparent) and upper right (red) map onto the faces of all geometry. For the sphere, the texture should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("identifier")).setContent(x3dpsail.SFString("http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/PixelTexture/rgb_alpha.x3d")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("generator")).setContent(x3dpsail.SFString("Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("generator")).setContent(x3dpsail.SFString("X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit")))
   .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("license")).setContent(x3dpsail.SFString("../../license.html"))))
 .setScene(x3dpsail.Scene()
   .addChild(x3dpsail.NavigationInfo().setType(x3dpsail.MFString(["EXAMINE","WALK","FLY","ANY"])))
   .addChild(x3dpsail.Group()
     .addChild(x3dpsail.Transform().setTranslation(x3dpsail.SFVec3f(6.14221,0.0694613,-0.000999451))
       .addChild(x3dpsail.Shape()
         .setAppearance(x3dpsail.Appearance()
           .setMaterial(x3dpsail.Material())
           .setTexture(x3dpsail.PixelTexture().setDEF(x3dpsail.SFString("RgbOpacityCheckerboard")).setImage(x3dpsail.SFImage(2,2,4,-16776961,-65536,-65536,-16776961))))
         .setGeometry(x3dpsail.Box())))
     .addChild(x3dpsail.Transform().setTranslation(x3dpsail.SFVec3f(-4.85443,0.0694381,-0.00149918))
       .addChild(x3dpsail.Shape()
         .setAppearance(x3dpsail.Appearance()
           .setMaterial(x3dpsail.Material())
           .setTexture(x3dpsail.PixelTexture().setUSE(x3dpsail.SFString("RgbOpacityCheckerboard"))))
         .setGeometry(x3dpsail.Sphere())))
     .addChild(x3dpsail.Transform().setTranslation(x3dpsail.SFVec3f(-1.47341,0.036672,-0.00175095))
       .addChild(x3dpsail.Shape()
         .setAppearance(x3dpsail.Appearance()
           .setMaterial(x3dpsail.Material())
           .setTexture(x3dpsail.PixelTexture().setUSE(x3dpsail.SFString("RgbOpacityCheckerboard"))))
         .setGeometry(x3dpsail.Cone())))
     .addChild(x3dpsail.Transform().setTranslation(x3dpsail.SFVec3f(2.31094,0.0694206,-0.00187683))
       .addChild(x3dpsail.Shape()
예제 #6
0
X3D0.setHead(head1)
Scene20 = x3dpsail.Scene()
NavigationInfo21 = x3dpsail.NavigationInfo()
NavigationInfo21.setType(["EXAMINE","WALK","FLY","ANY"])

Scene20.addChildren(NavigationInfo21)
Group22 = x3dpsail.Group()
Transform23 = x3dpsail.Transform()
Transform23.setTranslation([6.14221,0.0694613,-0.000999451])
Shape24 = x3dpsail.Shape()
Appearance25 = x3dpsail.Appearance()
Material26 = x3dpsail.Material()

Appearance25.setMaterial(Material26)
PixelTexture27 = x3dpsail.PixelTexture()
PixelTexture27.setDEF("RgbOpacityCheckerboard")
PixelTexture27.setImage([2,2,4,-16776961,-65536,-65536,-16776961])

Appearance25.setTexture(PixelTexture27)

Shape24.setAppearance(Appearance25)
Box28 = x3dpsail.Box()

Shape24.setGeometry(Box28)

Transform23.addChildren(Shape24)

Group22.addChildren(Transform23)
Transform29 = x3dpsail.Transform()
Transform29.setTranslation([-4.85443,0.0694381,-0.00149918])
Viewpoint22 = x3dpsail.Viewpoint()
Viewpoint22.setDescription("Left View")
Viewpoint22.setOrientation([0, 1, 0, -1.57])
Viewpoint22.setPosition([-10, 0, 0])

Scene16.addChildren(Viewpoint22)
NavigationInfo23 = x3dpsail.NavigationInfo()
NavigationInfo23.setType(["EXAMINE", "WALK", "FLY", "ANY"])

Scene16.addChildren(NavigationInfo23)
Shape24 = x3dpsail.Shape()
Appearance25 = x3dpsail.Appearance()
Material26 = x3dpsail.Material()

Appearance25.setMaterial(Material26)
PixelTexture27 = x3dpsail.PixelTexture()
PixelTexture27.setImage([2, 2, 4, -16776961, 16711935, -1, -65281])
PixelTexture27.setRepeatS(False)
PixelTexture27.setRepeatT(False)

Appearance25.setTexture(PixelTexture27)

Shape24.setAppearance(Appearance25)
IndexedFaceSet28 = x3dpsail.IndexedFaceSet()
IndexedFaceSet28.setCoordIndex([
    0, 1, 3, 2, -1, 4, 5, 7, 6, -1, 6, 7, 1, 0, -1, 2, 3, 5, 4, -1, 6, 0, 2, 4,
    -1, 1, 7, 5, 3, -1
])
Coordinate29 = x3dpsail.Coordinate()
Coordinate29.setPoint([
    -2, 1.5, 1, -2, -1.5, 1, 2, 1.5, 1, 2, -1.5, 1, 2, 1.5, -1, 2, -1.5, -1,
             x3dpsail.SFVec3f(10, 0, 0))).addChild(
                 x3dpsail.Viewpoint().setDescription(
                     x3dpsail.SFString("Left View")).setOrientation(
                         x3dpsail.SFRotation(
                             0, 1, 0, -1.57)).setPosition(
                                 x3dpsail.SFVec3f(-10, 0, 0))).addChild(
                                     x3dpsail.NavigationInfo().setType(
                                         x3dpsail.MFString([
                                             "EXAMINE", "WALK", "FLY",
                                             "ANY"
                                         ]))).
 addChild(x3dpsail.Shape().setAppearance(
     x3dpsail.Appearance().setMaterial(x3dpsail.Material()).setTexture(
         x3dpsail.PixelTexture().setImage(
             x3dpsail.SFImage(
                 2, 2, 4, -16776961, 16711935, -1,
                 -65281)).setRepeatS(x3dpsail.SFBool(False)).setRepeatT(
                     x3dpsail.SFBool(False)))).setGeometry(
                         x3dpsail.IndexedFaceSet().setCoordIndex(
                             x3dpsail.MFInt32([
                                 0, 1, 3, 2, -1, 4, 5, 7, 6, -1, 6, 7,
                                 1, 0, -1, 2, 3, 5, 4, -1, 6, 0, 2, 4,
                                 -1, 1, 7, 5, 3, -1
                             ])).setCoord(
                                 x3dpsail.Coordinate().setPoint(
                                     x3dpsail.MFVec3f([
                                         -2, 1.5, 1, -2, -1.5, 1, 2,
                                         1.5, 1, 2, -1.5, 1, 2, 1.5, -1,
                                         2, -1.5, -1, -2, 1.5, -1, -2,
                                         -1.5, -1
                                     ])))))))
X3D0.setHead(head1)
Scene15 = x3dpsail.Scene()
Background16 = x3dpsail.Background()
Background16.setSkyColor([0.1, 0.1, 0.4])

Scene15.addChildren(Background16)
Viewpoint17 = x3dpsail.Viewpoint()
Viewpoint17.setDescription("Table 5.18 SFImage component examples")
Viewpoint17.setPosition([0, 0, 14])

Scene15.addChildren(Viewpoint17)
Transform18 = x3dpsail.Transform()
Transform18.setTranslation([-6, 0, 0])
Shape19 = x3dpsail.Shape()
Appearance20 = x3dpsail.Appearance()
PixelTexture21 = x3dpsail.PixelTexture()
PixelTexture21.setDEF("ZeroComponents")

Appearance20.setTexture(PixelTexture21)

Shape19.setAppearance(Appearance20)
Box22 = x3dpsail.Box()

Shape19.setGeometry(Box22)

Transform18.addChildren(Shape19)
Transform23 = x3dpsail.Transform()
Transform23.setTranslation([0, -2, 0])
Shape24 = x3dpsail.Shape()
Text25 = x3dpsail.Text()
Text25.setString(["0"])