[X3D-Ecosystem] [x3dom-users] Donation of STL and PLY output

John Carlson yottzumm at gmail.com
Sun Jul 6 15:58:23 PDT 2025


Apologies, the link behind the text was wrong.  I confirmed that Y-axis
extrusions works.

Here’s the full file:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/pp3.json

I will make changes, and hopefully I won’t run into trouble.

I realize this example has Scripts, AFAIK, and won’t interact properly in
X3DOM.  That wasn’t why I created another example so the issue could be
focused on.

There’s no need to work on this version, please apply any work to x3dom.

(Full text)

{ "X3D": {
"encoding":"UTF-8",
"@profile":"Immersive",
"@version":"4.0",
"@xsd:noNamespaceSchemaLocation":"
https://www.web3d.org/specifications/x3d-4.0.xsd",
"JSON schema":"
https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
"head": {
"meta": [
{
"@name":"title",
"@content":"pp3.x3d"
},
{
"@name":"creator",
"@content":"John Carlson"
},
{
"@name":"translator",
"@content":"John Carlson"
},
{
"@name":"created",
"@content":"5 May 2015"
},
{
"@name":"modified",
"@content":"23 Dec 2022"
},
{
"@name":"description",
"@content":"A process pipeline between three spheres (try typing on spheres
and blue"
},
{
"@name":"identifier",
"@content":"https://coderextreme.net/x3d/pp3.x3d"
},
{
"@name":"generator",
"@content":"manual"
},
{
"@name":"translated",
"@content":"26 June 2025"
},
{
"@name":"generator",
"@content":"X3dToJson.xslt,
https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
},
{
"@name":"reference",
"@content":"X3D JSON encoding:
https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
}
]
},
"Scene": {
"-children":[
{ "ProtoDeclare":
{
"@name":"Process",
"ProtoBody": {
"-children":[
{ "Group":
{
"-children":[
{
"#comment":"left"
},
{ "Transform":
{
"@scale":[0.5,0.5,0.5],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@diffuseColor":[0.7,1,0],
"@transparency":0.5
}
}
}
},
"-geometry":
{ "Extrusion":
{
"@creaseAngle":0.785,
"@crossSection":[1,0,0.92,-0.38,0.71,-0.71,0.38,-0.92,0,-1,-0.38,-0.92,-0.71,-0.71,-0.92,-0.38,-1,0,-0.92,0.38,-0.71,0.71,-0.38,0.92,0,1,0.38,0.92,0.71,0.71,0.92,0.38,1,0],
"@spine":[-2.5,0,0,-1.5,0,0]
}
}
}
},
{
"#comment":"<Transform translation=\"-2.5 0 0\"> <Shape> <Text
DEF=\"LeftString\" string='\"l\"'/> </Shape> </Transform> <StringSensor
DEF=\"LeftSensor\" enabled=\"false\"/> <TouchSensor DEF=\"LeftTouch\"
enabled=\"true\"/>"
}
]
}
},
{
"#comment":"right"
},
{ "Transform":
{
"@scale":[0.5,0.5,0.5],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@diffuseColor":[0,0.7,1],
"@transparency":0.5
}
}
}
},
"-geometry":
{ "Extrusion":
{
"@creaseAngle":0.785,
"@crossSection":[1,0,0.92,-0.38,0.71,-0.71,0.38,-0.92,0,-1,-0.38,-0.92,-0.71,-0.71,-0.92,-0.38,-1,0,-0.92,0.38,-0.71,0.71,-0.38,0.92,0,1,0.38,0.92,0.71,0.71,0.92,0.38,1,0],
"@spine":[1.5,0,0,2.5,0,0]
}
}
}
},
{ "Transform":
{
"@translation":[2,0,0],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@DEF":"MaterialLightBlue",
"@diffuseColor":[1,1,1]
}
}
}
},
"-geometry":
{ "Text":
{
"@DEF":"RightString",
"@string":["r"]
}
}
}
}
]
}
},
{ "StringSensor":
{
"@DEF":"RightSensor",
"@enabled":false
}
},
{ "TouchSensor":
{
"@description":"touch to activate",
"@DEF":"RightTouch"
}
}
]
}
},
{
"#comment":"up"
},
{ "Transform":
{
"@scale":[0.5,0.5,0.5],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@diffuseColor":[0,0.7,1],
"@transparency":0.5
}
}
}
},
"-geometry":
{ "Extrusion":
{
"@creaseAngle":0.785,
"@crossSection":[1,0,0.92,-0.38,0.71,-0.71,0.38,-0.92,0,-1,-0.38,-0.92,-0.71,-0.71,-0.92,-0.38,-1,0,-0.92,0.38,-0.71,0.71,-0.38,0.92,0,1,0.38,0.92,0.71,0.71,0.92,0.38,1,0],
"@spine":[0,1.5,0,0,2.5,0]
}
}
}
},
{ "Transform":
{
"@translation":[-0.5,2,0],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@USE":"MaterialLightBlue"
}
}
}
},
"-geometry":
{ "Text":
{
"@DEF":"UpString",
"@string":["u"]
}
}
}
}
]
}
},
{ "StringSensor":
{
"@DEF":"UpSensor",
"@enabled":false
}
},
{ "TouchSensor":
{
"@description":"touch to activate",
"@DEF":"UpTouch"
}
}
]
}
},
{
"#comment":"down"
},
{ "Transform":
{
"@scale":[0.5,0.5,0.5],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@diffuseColor":[0.7,1,0],
"@transparency":0.5
}
}
}
},
"-geometry":
{ "Extrusion":
{
"@creaseAngle":0.785,
"@crossSection":[1,0,0.92,-0.38,0.71,-0.71,0.38,-0.92,0,-1,-0.38,-0.92,-0.71,-0.71,-0.92,-0.38,-1,0,-0.92,0.38,-0.71,0.71,-0.38,0.92,0,1,0.38,0.92,0.71,0.71,0.92,0.38,1,0],
"@spine":[0,-2.5,0,0,-1.5,0]
}
}
}
},
{
"#comment":"<Transform translation=\"-0.5 -2.5 0\"> <Shape> <Text
DEF=\"DownString\" string='\"d\"'/> </Shape> </Transform> <StringSensor
DEF=\"DownSensor\" enabled=\"false\"/> <TouchSensor description='touch to
activate' DEF=\"DownTouch\" enabled=\"true\"/>"
}
]
}
},
{
"#comment":"center"
},
{ "Transform":
{
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@diffuseColor":[1,0,0.7]
}
}
}
},
"-geometry":
{ "Sphere":
{
}
}
}
},
{ "Transform":
{
"@scale":[0.5,0.5,0.5],
"@translation":[-0.5,0,1],
"-children":[
{ "Shape":
{
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@USE":"MaterialLightBlue"
}
}
}
},
"-geometry":
{ "Text":
{
"@DEF":"CenterString"
}
}
}
}
]
}
},
{ "StringSensor":
{
"@DEF":"CenterSensor",
"@enabled":false
}
},
{ "TouchSensor":
{
"@description":"touch to activate",
"@DEF":"CenterTouch"
}
}
]
}
}
]
}
},
{ "Script":
{
"@DEF":"RightSingleToMultiString",
"field": [
{
"@name":"set_rightstring",
"@accessType":"inputOnly",
"@type":"SFString"
},
{
"@name":"rightlines",
"@accessType":"outputOnly",
"@type":"MFString"
}
],
"#sourceCode":[
"",
"ecmascript:",
"",
"function initialize() {",
"\trightlines = new MFString(\"\");",
"}",
"",
"function set_rightstring(rightstr) {",
"\trightlines = new MFString(rightstr);",
"}",
""
]
}
},
{ "Script":
{
"@DEF":"UpSingleToMultiString",
"field": [
{
"@name":"set_upstring",
"@accessType":"inputOnly",
"@type":"SFString"
},
{
"@name":"uplines",
"@accessType":"outputOnly",
"@type":"MFString"
}
],
"#sourceCode":[
"",
"ecmascript:",
"",
"function initialize() {",
"\tuplines = new MFString(\"\");",
"}",
"",
"function set_upstring(upstr) {",
"\tuplines = new MFString(upstr);",
"}",
""
]
}
},
{ "Script":
{
"@DEF":"CenterSingleToMultiString",
"field": [
{
"@name":"set_centerstring",
"@accessType":"inputOnly",
"@type":"SFString"
},
{
"@name":"centerlines",
"@accessType":"outputOnly",
"@type":"MFString"
}
],
"#sourceCode":[
"",
"ecmascript:",
"",
"function initialize() {",
"\tcenterlines = new MFString(\"\");",
"}",
"",
"function set_centerstring(centerstr) {",
"\tcenterlines = new MFString(centerstr);",
"}",
""
]
}
},
{ "ROUTE":
{
"@fromField":"enteredText",
"@fromNode":"CenterSensor",
"@toField":"set_centerstring",
"@toNode":"CenterSingleToMultiString"
}
},
{ "ROUTE":
{
"@fromField":"centerlines",
"@fromNode":"CenterSingleToMultiString",
"@toField":"set_string",
"@toNode":"CenterString"
}
},
{ "ROUTE":
{
"@fromField":"isOver",
"@fromNode":"CenterTouch",
"@toField":"set_enabled",
"@toNode":"CenterSensor"
}
},
{ "ROUTE":
{
"@fromField":"enteredText",
"@fromNode":"RightSensor",
"@toField":"set_rightstring",
"@toNode":"RightSingleToMultiString"
}
},
{ "ROUTE":
{
"@fromField":"rightlines",
"@fromNode":"RightSingleToMultiString",
"@toField":"set_string",
"@toNode":"RightString"
}
},
{ "ROUTE":
{
"@fromField":"isOver",
"@fromNode":"RightTouch",
"@toField":"set_enabled",
"@toNode":"RightSensor"
}
},
{ "ROUTE":
{
"@fromField":"enteredText",
"@fromNode":"UpSensor",
"@toField":"set_upstring",
"@toNode":"UpSingleToMultiString"
}
},
{ "ROUTE":
{
"@fromField":"uplines",
"@fromNode":"UpSingleToMultiString",
"@toField":"set_string",
"@toNode":"UpString"
}
},
{ "ROUTE":
{
"@fromField":"isOver",
"@fromNode":"UpTouch",
"@toField":"set_enabled",
"@toNode":"UpSensor"
}
}
]
}
}
},
{ "NavigationInfo":
{
}
},
{ "Viewpoint":
{
"@description":"Process pipes",
"@orientation":[1,0,0,-0.4],
"@position":[0,5,12]
}
},
{ "Transform":
{
"@translation":[0,-2.5,0],
"-children":[
{ "ProtoInstance":
{
"@name":"Process"
}
}
]
}
},
{ "Transform":
{
"-children":[
{ "ProtoInstance":
{
"@name":"Process"
}
}
]
}
},
{ "Transform":
{
"@translation":[0,2.5,0],
"-children":[
{ "ProtoInstance":
{
"@name":"Process"
}
}
]
}
}
]
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20250706/8774762b/attachment-0001.html>


More information about the X3D-Ecosystem mailing list