{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import jnius_config\n", "jnius_config.set_classpath('.', './X3DJSAIL.3.3.full.jar')\n", "from jnius import autoclass\n", "CommentsBlock = autoclass('org.web3d.x3d.jsail.Core.CommentsBlock')\n", "Anchor = autoclass('org.web3d.x3d.jsail.Networking.AnchorObject')\n", "Appearance = autoclass('org.web3d.x3d.jsail.Shape.AppearanceObject')\n", "Arc2D = autoclass('org.web3d.x3d.jsail.Geometry2D.Arc2DObject')\n", "ArcClose2D = autoclass('org.web3d.x3d.jsail.Geometry2D.ArcClose2DObject')\n", "AudioClip = autoclass('org.web3d.x3d.jsail.Sound.AudioClipObject')\n", "Background = autoclass('org.web3d.x3d.jsail.EnvironmentalEffects.BackgroundObject')\n", "BallJoint = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.BallJointObject')\n", "Billboard = autoclass('org.web3d.x3d.jsail.Navigation.BillboardObject')\n", "BlendedVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.BlendedVolumeStyleObject')\n", "BooleanFilter = autoclass('org.web3d.x3d.jsail.EventUtilities.BooleanFilterObject')\n", "BooleanSequencer = autoclass('org.web3d.x3d.jsail.EventUtilities.BooleanSequencerObject')\n", "BooleanToggle = autoclass('org.web3d.x3d.jsail.EventUtilities.BooleanToggleObject')\n", "BooleanTrigger = autoclass('org.web3d.x3d.jsail.EventUtilities.BooleanTriggerObject')\n", "BoundaryEnhancementVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.BoundaryEnhancementVolumeStyleObject')\n", "BoundedPhysicsModel = autoclass('org.web3d.x3d.jsail.ParticleSystems.BoundedPhysicsModelObject')\n", "Box = autoclass('org.web3d.x3d.jsail.Geometry3D.BoxObject')\n", "CADAssembly = autoclass('org.web3d.x3d.jsail.CADGeometry.CADAssemblyObject')\n", "CADFace = autoclass('org.web3d.x3d.jsail.CADGeometry.CADFaceObject')\n", "CADLayer = autoclass('org.web3d.x3d.jsail.CADGeometry.CADLayerObject')\n", "CADPart = autoclass('org.web3d.x3d.jsail.CADGeometry.CADPartObject')\n", "CartoonVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.CartoonVolumeStyleObject')\n", "Circle2D = autoclass('org.web3d.x3d.jsail.Geometry2D.Circle2DObject')\n", "ClipPlane = autoclass('org.web3d.x3d.jsail.Rendering.ClipPlaneObject')\n", "CollidableOffset = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.CollidableOffsetObject')\n", "CollidableShape = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.CollidableShapeObject')\n", "Collision = autoclass('org.web3d.x3d.jsail.Navigation.CollisionObject')\n", "CollisionCollection = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.CollisionCollectionObject')\n", "CollisionSensor = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.CollisionSensorObject')\n", "CollisionSpace = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.CollisionSpaceObject')\n", "Color = autoclass('org.web3d.x3d.jsail.Rendering.ColorObject')\n", "ColorChaser = autoclass('org.web3d.x3d.jsail.Followers.ColorChaserObject')\n", "ColorDamper = autoclass('org.web3d.x3d.jsail.Followers.ColorDamperObject')\n", "ColorInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.ColorInterpolatorObject')\n", "ColorRGBA = autoclass('org.web3d.x3d.jsail.Rendering.ColorRGBAObject')\n", "ComposedCubeMapTexture = autoclass('org.web3d.x3d.jsail.CubeMapTexturing.ComposedCubeMapTextureObject')\n", "ComposedShader = autoclass('org.web3d.x3d.jsail.Shaders.ComposedShaderObject')\n", "ComposedTexture3D = autoclass('org.web3d.x3d.jsail.Texturing3D.ComposedTexture3DObject')\n", "ComposedVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.ComposedVolumeStyleObject')\n", "Cone = autoclass('org.web3d.x3d.jsail.Geometry3D.ConeObject')\n", "ConeEmitter = autoclass('org.web3d.x3d.jsail.ParticleSystems.ConeEmitterObject')\n", "Contact = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.ContactObject')\n", "Contour2D = autoclass('org.web3d.x3d.jsail.NURBS.Contour2DObject')\n", "ContourPolyline2D = autoclass('org.web3d.x3d.jsail.NURBS.ContourPolyline2DObject')\n", "Coordinate = autoclass('org.web3d.x3d.jsail.Rendering.CoordinateObject')\n", "CoordinateChaser = autoclass('org.web3d.x3d.jsail.Followers.CoordinateChaserObject')\n", "CoordinateDamper = autoclass('org.web3d.x3d.jsail.Followers.CoordinateDamperObject')\n", "CoordinateDouble = autoclass('org.web3d.x3d.jsail.NURBS.CoordinateDoubleObject')\n", "CoordinateInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.CoordinateInterpolatorObject')\n", "CoordinateInterpolator2D = autoclass('org.web3d.x3d.jsail.Interpolation.CoordinateInterpolator2DObject')\n", "Cylinder = autoclass('org.web3d.x3d.jsail.Geometry3D.CylinderObject')\n", "CylinderSensor = autoclass('org.web3d.x3d.jsail.PointingDeviceSensor.CylinderSensorObject')\n", "DirectionalLight = autoclass('org.web3d.x3d.jsail.Lighting.DirectionalLightObject')\n", "DISEntityManager = autoclass('org.web3d.x3d.jsail.DIS.DISEntityManagerObject')\n", "DISEntityTypeMapping = autoclass('org.web3d.x3d.jsail.DIS.DISEntityTypeMappingObject')\n", "Disk2D = autoclass('org.web3d.x3d.jsail.Geometry2D.Disk2DObject')\n", "DoubleAxisHingeJoint = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.DoubleAxisHingeJointObject')\n", "EaseInEaseOut = autoclass('org.web3d.x3d.jsail.Interpolation.EaseInEaseOutObject')\n", "EdgeEnhancementVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.EdgeEnhancementVolumeStyleObject')\n", "ElevationGrid = autoclass('org.web3d.x3d.jsail.Geometry3D.ElevationGridObject')\n", "EspduTransform = autoclass('org.web3d.x3d.jsail.DIS.EspduTransformObject')\n", "ExplosionEmitter = autoclass('org.web3d.x3d.jsail.ParticleSystems.ExplosionEmitterObject')\n", "Extrusion = autoclass('org.web3d.x3d.jsail.Geometry3D.ExtrusionObject')\n", "FillProperties = autoclass('org.web3d.x3d.jsail.Shape.FillPropertiesObject')\n", "FloatVertexAttribute = autoclass('org.web3d.x3d.jsail.Shaders.FloatVertexAttributeObject')\n", "Fog = autoclass('org.web3d.x3d.jsail.EnvironmentalEffects.FogObject')\n", "FogCoordinate = autoclass('org.web3d.x3d.jsail.EnvironmentalEffects.FogCoordinateObject')\n", "FontStyle = autoclass('org.web3d.x3d.jsail.Text.FontStyleObject')\n", "ForcePhysicsModel = autoclass('org.web3d.x3d.jsail.ParticleSystems.ForcePhysicsModelObject')\n", "GeneratedCubeMapTexture = autoclass('org.web3d.x3d.jsail.CubeMapTexturing.GeneratedCubeMapTextureObject')\n", "GeoCoordinate = autoclass('org.web3d.x3d.jsail.Geospatial.GeoCoordinateObject')\n", "GeoElevationGrid = autoclass('org.web3d.x3d.jsail.Geospatial.GeoElevationGridObject')\n", "GeoLocation = autoclass('org.web3d.x3d.jsail.Geospatial.GeoLocationObject')\n", "GeoLOD = autoclass('org.web3d.x3d.jsail.Geospatial.GeoLODObject')\n", "GeoMetadata = autoclass('org.web3d.x3d.jsail.Geospatial.GeoMetadataObject')\n", "GeoOrigin = autoclass('org.web3d.x3d.jsail.Geospatial.GeoOriginObject')\n", "GeoPositionInterpolator = autoclass('org.web3d.x3d.jsail.Geospatial.GeoPositionInterpolatorObject')\n", "GeoProximitySensor = autoclass('org.web3d.x3d.jsail.Geospatial.GeoProximitySensorObject')\n", "GeoTouchSensor = autoclass('org.web3d.x3d.jsail.Geospatial.GeoTouchSensorObject')\n", "GeoTransform = autoclass('org.web3d.x3d.jsail.Geospatial.GeoTransformObject')\n", "GeoViewpoint = autoclass('org.web3d.x3d.jsail.Geospatial.GeoViewpointObject')\n", "Group = autoclass('org.web3d.x3d.jsail.Grouping.GroupObject')\n", "HAnimDisplacer = autoclass('org.web3d.x3d.jsail.HAnim.HAnimDisplacerObject')\n", "HAnimHumanoid = autoclass('org.web3d.x3d.jsail.HAnim.HAnimHumanoidObject')\n", "HAnimJoint = autoclass('org.web3d.x3d.jsail.HAnim.HAnimJointObject')\n", "HAnimMotion = autoclass('org.web3d.x3d.jsail.HAnim.HAnimMotionObject')\n", "HAnimSegment = autoclass('org.web3d.x3d.jsail.HAnim.HAnimSegmentObject')\n", "HAnimSite = autoclass('org.web3d.x3d.jsail.HAnim.HAnimSiteObject')\n", "ImageCubeMapTexture = autoclass('org.web3d.x3d.jsail.CubeMapTexturing.ImageCubeMapTextureObject')\n", "ImageTexture = autoclass('org.web3d.x3d.jsail.Texturing.ImageTextureObject')\n", "ImageTexture3D = autoclass('org.web3d.x3d.jsail.Texturing3D.ImageTexture3DObject')\n", "IndexedFaceSet = autoclass('org.web3d.x3d.jsail.Geometry3D.IndexedFaceSetObject')\n", "IndexedLineSet = autoclass('org.web3d.x3d.jsail.Rendering.IndexedLineSetObject')\n", "IndexedQuadSet = autoclass('org.web3d.x3d.jsail.CADGeometry.IndexedQuadSetObject')\n", "IndexedTriangleFanSet = autoclass('org.web3d.x3d.jsail.Rendering.IndexedTriangleFanSetObject')\n", "IndexedTriangleSet = autoclass('org.web3d.x3d.jsail.Rendering.IndexedTriangleSetObject')\n", "IndexedTriangleStripSet = autoclass('org.web3d.x3d.jsail.Rendering.IndexedTriangleStripSetObject')\n", "Inline = autoclass('org.web3d.x3d.jsail.Networking.InlineObject')\n", "IntegerSequencer = autoclass('org.web3d.x3d.jsail.EventUtilities.IntegerSequencerObject')\n", "IntegerTrigger = autoclass('org.web3d.x3d.jsail.EventUtilities.IntegerTriggerObject')\n", "IsoSurfaceVolumeData = autoclass('org.web3d.x3d.jsail.VolumeRendering.IsoSurfaceVolumeDataObject')\n", "KeySensor = autoclass('org.web3d.x3d.jsail.KeyDeviceSensor.KeySensorObject')\n", "Layer = autoclass('org.web3d.x3d.jsail.Layering.LayerObject')\n", "LayerSet = autoclass('org.web3d.x3d.jsail.Layering.LayerSetObject')\n", "Layout = autoclass('org.web3d.x3d.jsail.Layout.LayoutObject')\n", "LayoutGroup = autoclass('org.web3d.x3d.jsail.Layout.LayoutGroupObject')\n", "LayoutLayer = autoclass('org.web3d.x3d.jsail.Layout.LayoutLayerObject')\n", "LinePickSensor = autoclass('org.web3d.x3d.jsail.Picking.LinePickSensorObject')\n", "LineProperties = autoclass('org.web3d.x3d.jsail.Shape.LinePropertiesObject')\n", "LineSet = autoclass('org.web3d.x3d.jsail.Rendering.LineSetObject')\n", "LoadSensor = autoclass('org.web3d.x3d.jsail.Networking.LoadSensorObject')\n", "LocalFog = autoclass('org.web3d.x3d.jsail.EnvironmentalEffects.LocalFogObject')\n", "LOD = autoclass('org.web3d.x3d.jsail.Navigation.LODObject')\n", "Material = autoclass('org.web3d.x3d.jsail.Shape.MaterialObject')\n", "Matrix3VertexAttribute = autoclass('org.web3d.x3d.jsail.Shaders.Matrix3VertexAttributeObject')\n", "Matrix4VertexAttribute = autoclass('org.web3d.x3d.jsail.Shaders.Matrix4VertexAttributeObject')\n", "MetadataBoolean = autoclass('org.web3d.x3d.jsail.Core.MetadataBooleanObject')\n", "MetadataDouble = autoclass('org.web3d.x3d.jsail.Core.MetadataDoubleObject')\n", "MetadataFloat = autoclass('org.web3d.x3d.jsail.Core.MetadataFloatObject')\n", "MetadataInteger = autoclass('org.web3d.x3d.jsail.Core.MetadataIntegerObject')\n", "MetadataSet = autoclass('org.web3d.x3d.jsail.Core.MetadataSetObject')\n", "MetadataString = autoclass('org.web3d.x3d.jsail.Core.MetadataStringObject')\n", "MotorJoint = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.MotorJointObject')\n", "MovieTexture = autoclass('org.web3d.x3d.jsail.Texturing.MovieTextureObject')\n", "MultiTexture = autoclass('org.web3d.x3d.jsail.Texturing.MultiTextureObject')\n", "MultiTextureCoordinate = autoclass('org.web3d.x3d.jsail.Texturing.MultiTextureCoordinateObject')\n", "MultiTextureTransform = autoclass('org.web3d.x3d.jsail.Texturing.MultiTextureTransformObject')\n", "NavigationInfo = autoclass('org.web3d.x3d.jsail.Navigation.NavigationInfoObject')\n", "Normal = autoclass('org.web3d.x3d.jsail.Rendering.NormalObject')\n", "NormalInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.NormalInterpolatorObject')\n", "NurbsCurve = autoclass('org.web3d.x3d.jsail.NURBS.NurbsCurveObject')\n", "NurbsCurve2D = autoclass('org.web3d.x3d.jsail.NURBS.NurbsCurve2DObject')\n", "NurbsOrientationInterpolator = autoclass('org.web3d.x3d.jsail.NURBS.NurbsOrientationInterpolatorObject')\n", "NurbsPatchSurface = autoclass('org.web3d.x3d.jsail.NURBS.NurbsPatchSurfaceObject')\n", "NurbsPositionInterpolator = autoclass('org.web3d.x3d.jsail.NURBS.NurbsPositionInterpolatorObject')\n", "NurbsSet = autoclass('org.web3d.x3d.jsail.NURBS.NurbsSetObject')\n", "NurbsSurfaceInterpolator = autoclass('org.web3d.x3d.jsail.NURBS.NurbsSurfaceInterpolatorObject')\n", "NurbsSweptSurface = autoclass('org.web3d.x3d.jsail.NURBS.NurbsSweptSurfaceObject')\n", "NurbsSwungSurface = autoclass('org.web3d.x3d.jsail.NURBS.NurbsSwungSurfaceObject')\n", "NurbsTextureCoordinate = autoclass('org.web3d.x3d.jsail.NURBS.NurbsTextureCoordinateObject')\n", "NurbsTrimmedSurface = autoclass('org.web3d.x3d.jsail.NURBS.NurbsTrimmedSurfaceObject')\n", "OpacityMapVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.OpacityMapVolumeStyleObject')\n", "OrientationChaser = autoclass('org.web3d.x3d.jsail.Followers.OrientationChaserObject')\n", "OrientationDamper = autoclass('org.web3d.x3d.jsail.Followers.OrientationDamperObject')\n", "OrientationInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.OrientationInterpolatorObject')\n", "OrthoViewpoint = autoclass('org.web3d.x3d.jsail.Navigation.OrthoViewpointObject')\n", "PackagedShader = autoclass('org.web3d.x3d.jsail.Shaders.PackagedShaderObject')\n", "ParticleSystem = autoclass('org.web3d.x3d.jsail.ParticleSystems.ParticleSystemObject')\n", "PickableGroup = autoclass('org.web3d.x3d.jsail.Picking.PickableGroupObject')\n", "PixelTexture = autoclass('org.web3d.x3d.jsail.Texturing.PixelTextureObject')\n", "PixelTexture3D = autoclass('org.web3d.x3d.jsail.Texturing3D.PixelTexture3DObject')\n", "PlaneSensor = autoclass('org.web3d.x3d.jsail.PointingDeviceSensor.PlaneSensorObject')\n", "PointEmitter = autoclass('org.web3d.x3d.jsail.ParticleSystems.PointEmitterObject')\n", "PointLight = autoclass('org.web3d.x3d.jsail.Lighting.PointLightObject')\n", "PointPickSensor = autoclass('org.web3d.x3d.jsail.Picking.PointPickSensorObject')\n", "PointProperties = autoclass('org.web3d.x3d.jsail.Shape.PointPropertiesObject')\n", "PointSet = autoclass('org.web3d.x3d.jsail.Rendering.PointSetObject')\n", "Polyline2D = autoclass('org.web3d.x3d.jsail.Geometry2D.Polyline2DObject')\n", "PolylineEmitter = autoclass('org.web3d.x3d.jsail.ParticleSystems.PolylineEmitterObject')\n", "Polypoint2D = autoclass('org.web3d.x3d.jsail.Geometry2D.Polypoint2DObject')\n", "PositionChaser = autoclass('org.web3d.x3d.jsail.Followers.PositionChaserObject')\n", "PositionChaser2D = autoclass('org.web3d.x3d.jsail.Followers.PositionChaser2DObject')\n", "PositionDamper = autoclass('org.web3d.x3d.jsail.Followers.PositionDamperObject')\n", "PositionDamper2D = autoclass('org.web3d.x3d.jsail.Followers.PositionDamper2DObject')\n", "PositionInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.PositionInterpolatorObject')\n", "PositionInterpolator2D = autoclass('org.web3d.x3d.jsail.Interpolation.PositionInterpolator2DObject')\n", "PrimitivePickSensor = autoclass('org.web3d.x3d.jsail.Picking.PrimitivePickSensorObject')\n", "ProgramShader = autoclass('org.web3d.x3d.jsail.Shaders.ProgramShaderObject')\n", "ProjectionVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.ProjectionVolumeStyleObject')\n", "ProtoInstance = autoclass('org.web3d.x3d.jsail.Core.ProtoInstanceObject')\n", "ProximitySensor = autoclass('org.web3d.x3d.jsail.EnvironmentalSensor.ProximitySensorObject')\n", "QuadSet = autoclass('org.web3d.x3d.jsail.CADGeometry.QuadSetObject')\n", "ReceiverPdu = autoclass('org.web3d.x3d.jsail.DIS.ReceiverPduObject')\n", "Rectangle2D = autoclass('org.web3d.x3d.jsail.Geometry2D.Rectangle2DObject')\n", "RigidBody = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.RigidBodyObject')\n", "RigidBodyCollection = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.RigidBodyCollectionObject')\n", "ScalarChaser = autoclass('org.web3d.x3d.jsail.Followers.ScalarChaserObject')\n", "ScalarDamper = autoclass('org.web3d.x3d.jsail.Followers.ScalarDamperObject')\n", "ScalarInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.ScalarInterpolatorObject')\n", "ScreenFontStyle = autoclass('org.web3d.x3d.jsail.Layout.ScreenFontStyleObject')\n", "ScreenGroup = autoclass('org.web3d.x3d.jsail.Layout.ScreenGroupObject')\n", "Script = autoclass('org.web3d.x3d.jsail.Scripting.ScriptObject')\n", "SegmentedVolumeData = autoclass('org.web3d.x3d.jsail.VolumeRendering.SegmentedVolumeDataObject')\n", "ShadedVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.ShadedVolumeStyleObject')\n", "ShaderPart = autoclass('org.web3d.x3d.jsail.Shaders.ShaderPartObject')\n", "ShaderProgram = autoclass('org.web3d.x3d.jsail.Shaders.ShaderProgramObject')\n", "Shape = autoclass('org.web3d.x3d.jsail.Shape.ShapeObject')\n", "SignalPdu = autoclass('org.web3d.x3d.jsail.DIS.SignalPduObject')\n", "SilhouetteEnhancementVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.SilhouetteEnhancementVolumeStyleObject')\n", "SingleAxisHingeJoint = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.SingleAxisHingeJointObject')\n", "SliderJoint = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.SliderJointObject')\n", "Sound = autoclass('org.web3d.x3d.jsail.Sound.SoundObject')\n", "Sphere = autoclass('org.web3d.x3d.jsail.Geometry3D.SphereObject')\n", "SphereSensor = autoclass('org.web3d.x3d.jsail.PointingDeviceSensor.SphereSensorObject')\n", "SplinePositionInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.SplinePositionInterpolatorObject')\n", "SplinePositionInterpolator2D = autoclass('org.web3d.x3d.jsail.Interpolation.SplinePositionInterpolator2DObject')\n", "SplineScalarInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.SplineScalarInterpolatorObject')\n", "SpotLight = autoclass('org.web3d.x3d.jsail.Lighting.SpotLightObject')\n", "SquadOrientationInterpolator = autoclass('org.web3d.x3d.jsail.Interpolation.SquadOrientationInterpolatorObject')\n", "StaticGroup = autoclass('org.web3d.x3d.jsail.Grouping.StaticGroupObject')\n", "StringSensor = autoclass('org.web3d.x3d.jsail.KeyDeviceSensor.StringSensorObject')\n", "SurfaceEmitter = autoclass('org.web3d.x3d.jsail.ParticleSystems.SurfaceEmitterObject')\n", "Switch = autoclass('org.web3d.x3d.jsail.Grouping.SwitchObject')\n", "TexCoordChaser2D = autoclass('org.web3d.x3d.jsail.Followers.TexCoordChaser2DObject')\n", "TexCoordDamper2D = autoclass('org.web3d.x3d.jsail.Followers.TexCoordDamper2DObject')\n", "Text = autoclass('org.web3d.x3d.jsail.Text.TextObject')\n", "TextureBackground = autoclass('org.web3d.x3d.jsail.EnvironmentalEffects.TextureBackgroundObject')\n", "TextureCoordinate = autoclass('org.web3d.x3d.jsail.Texturing.TextureCoordinateObject')\n", "TextureCoordinate3D = autoclass('org.web3d.x3d.jsail.Texturing3D.TextureCoordinate3DObject')\n", "TextureCoordinate4D = autoclass('org.web3d.x3d.jsail.Texturing3D.TextureCoordinate4DObject')\n", "TextureCoordinateGenerator = autoclass('org.web3d.x3d.jsail.Texturing.TextureCoordinateGeneratorObject')\n", "TextureProperties = autoclass('org.web3d.x3d.jsail.Texturing.TexturePropertiesObject')\n", "TextureTransform = autoclass('org.web3d.x3d.jsail.Texturing.TextureTransformObject')\n", "TextureTransform3D = autoclass('org.web3d.x3d.jsail.Texturing3D.TextureTransform3DObject')\n", "TextureTransformMatrix3D = autoclass('org.web3d.x3d.jsail.Texturing3D.TextureTransformMatrix3DObject')\n", "TimeSensor = autoclass('org.web3d.x3d.jsail.Time.TimeSensorObject')\n", "TimeTrigger = autoclass('org.web3d.x3d.jsail.EventUtilities.TimeTriggerObject')\n", "ToneMappedVolumeStyle = autoclass('org.web3d.x3d.jsail.VolumeRendering.ToneMappedVolumeStyleObject')\n", "TouchSensor = autoclass('org.web3d.x3d.jsail.PointingDeviceSensor.TouchSensorObject')\n", "Transform = autoclass('org.web3d.x3d.jsail.Grouping.TransformObject')\n", "TransformSensor = autoclass('org.web3d.x3d.jsail.EnvironmentalSensor.TransformSensorObject')\n", "TransmitterPdu = autoclass('org.web3d.x3d.jsail.DIS.TransmitterPduObject')\n", "TriangleFanSet = autoclass('org.web3d.x3d.jsail.Rendering.TriangleFanSetObject')\n", "TriangleSet = autoclass('org.web3d.x3d.jsail.Rendering.TriangleSetObject')\n", "TriangleSet2D = autoclass('org.web3d.x3d.jsail.Geometry2D.TriangleSet2DObject')\n", "TriangleStripSet = autoclass('org.web3d.x3d.jsail.Rendering.TriangleStripSetObject')\n", "TwoSidedMaterial = autoclass('org.web3d.x3d.jsail.Shape.TwoSidedMaterialObject')\n", "UniversalJoint = autoclass('org.web3d.x3d.jsail.RigidBodyPhysics.UniversalJointObject')\n", "Viewpoint = autoclass('org.web3d.x3d.jsail.Navigation.ViewpointObject')\n", "ViewpointGroup = autoclass('org.web3d.x3d.jsail.Navigation.ViewpointGroupObject')\n", "Viewport = autoclass('org.web3d.x3d.jsail.Layering.ViewportObject')\n", "VisibilitySensor = autoclass('org.web3d.x3d.jsail.EnvironmentalSensor.VisibilitySensorObject')\n", "VolumeData = autoclass('org.web3d.x3d.jsail.VolumeRendering.VolumeDataObject')\n", "VolumeEmitter = autoclass('org.web3d.x3d.jsail.ParticleSystems.VolumeEmitterObject')\n", "VolumePickSensor = autoclass('org.web3d.x3d.jsail.Picking.VolumePickSensorObject')\n", "WindPhysicsModel = autoclass('org.web3d.x3d.jsail.ParticleSystems.WindPhysicsModelObject')\n", "WorldInfo = autoclass('org.web3d.x3d.jsail.Core.WorldInfoObject')\n", "component = autoclass('org.web3d.x3d.jsail.Core.componentObject')\n", "connect = autoclass('org.web3d.x3d.jsail.Core.connectObject')\n", "EXPORT = autoclass('org.web3d.x3d.jsail.Networking.EXPORTObject')\n", "ExternProtoDeclare = autoclass('org.web3d.x3d.jsail.Core.ExternProtoDeclareObject')\n", "field = autoclass('org.web3d.x3d.jsail.Core.fieldObject')\n", "fieldValue = autoclass('org.web3d.x3d.jsail.Core.fieldValueObject')\n", "head = autoclass('org.web3d.x3d.jsail.Core.headObject')\n", "IMPORT = autoclass('org.web3d.x3d.jsail.Networking.IMPORTObject')\n", "IS = autoclass('org.web3d.x3d.jsail.Core.ISObject')\n", "meta = autoclass('org.web3d.x3d.jsail.Core.metaObject')\n", "ProtoBody = autoclass('org.web3d.x3d.jsail.Core.ProtoBodyObject')\n", "ProtoDeclare = autoclass('org.web3d.x3d.jsail.Core.ProtoDeclareObject')\n", "ProtoInterface = autoclass('org.web3d.x3d.jsail.Core.ProtoInterfaceObject')\n", "ROUTE = autoclass('org.web3d.x3d.jsail.Core.ROUTEObject')\n", "Scene = autoclass('org.web3d.x3d.jsail.Core.SceneObject')\n", "unit = autoclass('org.web3d.x3d.jsail.Core.unitObject')\n", "X3D = autoclass('org.web3d.x3d.jsail.Core.X3DObject')\n", "SFBool = autoclass('org.web3d.x3d.jsail.fields.SFBoolObject')\n", "MFBool = autoclass('org.web3d.x3d.jsail.fields.MFBoolObject')\n", "SFColor = autoclass('org.web3d.x3d.jsail.fields.SFColorObject')\n", "MFColor = autoclass('org.web3d.x3d.jsail.fields.MFColorObject')\n", "SFColorRGBA = autoclass('org.web3d.x3d.jsail.fields.SFColorRGBAObject')\n", "MFColorRGBA = autoclass('org.web3d.x3d.jsail.fields.MFColorRGBAObject')\n", "SFDouble = autoclass('org.web3d.x3d.jsail.fields.SFDoubleObject')\n", "MFDouble = autoclass('org.web3d.x3d.jsail.fields.MFDoubleObject')\n", "SFFloat = autoclass('org.web3d.x3d.jsail.fields.SFFloatObject')\n", "MFFloat = autoclass('org.web3d.x3d.jsail.fields.MFFloatObject')\n", "SFImage = autoclass('org.web3d.x3d.jsail.fields.SFImageObject')\n", "MFImage = autoclass('org.web3d.x3d.jsail.fields.MFImageObject')\n", "SFInt32 = autoclass('org.web3d.x3d.jsail.fields.SFInt32Object')\n", "MFInt32 = autoclass('org.web3d.x3d.jsail.fields.MFInt32Object')\n", "SFMatrix3d = autoclass('org.web3d.x3d.jsail.fields.SFMatrix3dObject')\n", "MFMatrix3d = autoclass('org.web3d.x3d.jsail.fields.MFMatrix3dObject')\n", "SFMatrix3f = autoclass('org.web3d.x3d.jsail.fields.SFMatrix3fObject')\n", "MFMatrix3f = autoclass('org.web3d.x3d.jsail.fields.MFMatrix3fObject')\n", "SFMatrix4d = autoclass('org.web3d.x3d.jsail.fields.SFMatrix4dObject')\n", "MFMatrix4d = autoclass('org.web3d.x3d.jsail.fields.MFMatrix4dObject')\n", "SFMatrix4f = autoclass('org.web3d.x3d.jsail.fields.SFMatrix4fObject')\n", "MFMatrix4f = autoclass('org.web3d.x3d.jsail.fields.MFMatrix4fObject')\n", "SFString = autoclass('org.web3d.x3d.jsail.fields.SFStringObject')\n", "SFNode = autoclass('org.web3d.x3d.jsail.fields.SFNodeObject')\n", "MFNode = autoclass('org.web3d.x3d.jsail.fields.MFNodeObject')\n", "SFRotation = autoclass('org.web3d.x3d.jsail.fields.SFRotationObject')\n", "MFRotation = autoclass('org.web3d.x3d.jsail.fields.MFRotationObject')\n", "MFString = autoclass('org.web3d.x3d.jsail.fields.MFStringObject')\n", "SFTime = autoclass('org.web3d.x3d.jsail.fields.SFTimeObject')\n", "MFTime = autoclass('org.web3d.x3d.jsail.fields.MFTimeObject')\n", "SFVec2d = autoclass('org.web3d.x3d.jsail.fields.SFVec2dObject')\n", "MFVec2d = autoclass('org.web3d.x3d.jsail.fields.MFVec2dObject')\n", "SFVec2f = autoclass('org.web3d.x3d.jsail.fields.SFVec2fObject')\n", "MFVec2f = autoclass('org.web3d.x3d.jsail.fields.MFVec2fObject')\n", "SFVec3d = autoclass('org.web3d.x3d.jsail.fields.SFVec3dObject')\n", "MFVec3d = autoclass('org.web3d.x3d.jsail.fields.MFVec3dObject')\n", "SFVec3f = autoclass('org.web3d.x3d.jsail.fields.SFVec3fObject')\n", "MFVec3f = autoclass('org.web3d.x3d.jsail.fields.MFVec3fObject')\n", "SFVec4d = autoclass('org.web3d.x3d.jsail.fields.SFVec4dObject')\n", "MFVec4d = autoclass('org.web3d.x3d.jsail.fields.MFVec4dObject')\n", "SFVec4f = autoclass('org.web3d.x3d.jsail.fields.SFVec4fObject')\n", "MFVec4f = autoclass('org.web3d.x3d.jsail.fields.MFVec4fObject')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "colorMaterial = Material().setDiffuseColor(SFColor(1,0,0))" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [], "source": [ "texture = ImageTexture().setUrl('./files/JoeBodyTexture29.png')" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "X3D0 = (X3D().setProfile(SFString(\"Interchange\")).setVersion(SFString(\"3.3\"))\n", " .setHead(head()\n", " .addMeta(meta().setName(SFString(\"title\")).setContent(SFString(\"sphere.x3d\")))\n", " .addMeta(meta().setName(SFString(\"creator\")).setContent(SFString(\"John Carlson\")))\n", " .addMeta(meta().setName(SFString(\"generator\")).setContent(SFString(\"manual\")))\n", " .addMeta(meta().setName(SFString(\"identifier\")).setContent(SFString(\"https://coderextreme.net/X3DJSONLD/sphere.x3d\")))\n", " .addMeta(meta().setName(SFString(\"description\")).setContent(SFString(\"a sphere\"))))\n", " .setScene(Scene()\n", " .addChild(Group()\n", " .addChild(Shape()\n", " .setAppearance(Appearance()\n", " .setMaterial(colorMaterial)\n", " .setTexture(texture))\n", " .setGeometry(Sphere().setRadius(SFFloat(1)))))))\n" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "x3domHTML = ''' \n", "'''" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [], "source": [ "xml = X3D0.toStringX3D().replace(\"ImageTexture\", \"ImageTexture crossOrigin='anonymous'\")" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "import xml.etree.ElementTree as ET" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [], "source": [ "x3domXML = ET.tostring(ET.XML(xml), encoding=\"unicode\", short_empty_elements=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Switch from non-trusted to trusted to allow javascript" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "from IPython.display import HTML" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ ">" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colorMaterial.setDiffuseColor(SFColor(0,1,0))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Render X3D with x3dom" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "" ], "text/plain": [ "" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "HTML(x3domHTML + x3domXML)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "x3dfile = 'sphere.x3d'" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [], "source": [ "texture = ImageTexture().setUrl('./JoeBodyTexture29.png')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Rerun X3D0 cell above" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [], "source": [ "javax3dfilehandle = X3D0.toFileX3D(x3dfile)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Try Inline with x3dom" ] }, { "cell_type": "code", "execution_count": 49, "metadata": {}, "outputs": [], "source": [ "inlineScene = f'''\n", "\n", " \n", " \n", " \n", "\n", "'''" ] }, { "cell_type": "code", "execution_count": 50, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", "\n", "\n", " \n", " \n", " \n", "\n" ], "text/plain": [ "" ] }, "execution_count": 50, "metadata": {}, "output_type": "execute_result" } ], "source": [ "HTML(x3domHTML+inlineScene)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Try X_ITE" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "x_iteHTML = '''\n", "\n", "\n", " \n", " '''" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "x_iteSphere = f'''\n", "\n", "

Your browser may not support all features required by X_ITE.\n", " For a better experience, keep your browser up to date.\n", " Check here for latest versions.

\n", "
\n", "\n", " \n", " \n", "\n", "

Your browser may not support all features required by X_ITE.\n", " For a better experience, keep your browser up to date.\n", " Check here for latest versions.

\n", "
\n", "