[x3d-public] X3dToPython.xslt This appears to be a common problem. Attaching source and generated python zip

John Carlson yottzumm at gmail.com
Fri Jun 24 13:06:21 PDT 2022


Fire.py
  File
"C:\Users\john\X3DJSONLD\src\main\python\net\x3djsonld\Library\Tests\Components\ParticleSystems\Fire.py",
line 82
    WindPhysicsModel(direction=(1,-1,0),speed=0.15,gustiness=7)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

Here's a piece of the source code that appears in Fire.py:


ParticleSystem(DEF='Fire2',geometryType='SPRITE',particleLifetime=2,lifetimeVariation=0.5,particleSize=(1,1),colorKey=[0],texCoordKey=[0,0.015625,0.03125,0.046875,0.0625,0.078125,0.09375,0.109375,0.125,0.140625,0.15625,0.171875,0.1875,0.203125,0.21875,0.234375,0.25,0.265625,0.28125,0.296875,0.3125,0.328125,0.34375,0.359375,0.375,0.390625,0.40625,0.421875,0.4375,0.453125,0.46875,0.484375,0.5,0.515625,0.53125,0.546875,0.5625,0.578125,0.59375,0.609375,0.625,0.640625,0.65625,0.671875,0.6875,0.703125,0.71875,0.734375,0.75,0.765625,0.78125,0.796875,0.8125,0.828125,0.84375,0.859375,0.875,0.890625,0.90625,0.921875,0.9375,0.953125,0.96875,0.984375,1],

emitter=PointEmitter(direction=(0,0,0),speed=0.2,variation=0,mass=0.1,surfaceArea=0.1),
      physics=WindPhysicsModel(direction=(0,1,0),speed=0.5,gustiness=1.9),
      WindPhysicsModel(direction=(1,-1,0),speed=0.15,gustiness=7)
      color=ColorRGBA(color=[(1,1,1,0.1)]),

Here's the XML:

    <ParticleSystem DEF='Fire2'
        geometryType='SPRITE'
        particleLifetime='2'
        lifetimeVariation='0.5'
        particleSize='1 1'
        colorKey='0'
        texCoordKey='0, 0.015625, 0.03125, 0.046875, 0.0625, 0.078125,
0.09375, 0.109375, 0.125, 0.140625, 0.15625, 0.171875, 0.1875, 0.203125,
0.21875, 0.234375, 0.25, 0.265625, 0.28125, 0.296875, 0.3125, 0.328125,
0.34375, 0.359375, 0.375, 0.390625, 0.40625, 0.421875, 0.4375, 0.453125,
0.46875, 0.484375, 0.5, 0.515625, 0.53125, 0.546875, 0.5625, 0.578125,
0.59375, 0.609375, 0.625, 0.640625, 0.65625, 0.671875, 0.6875, 0.703125,
0.71875, 0.734375, 0.75, 0.765625, 0.78125, 0.796875, 0.8125, 0.828125,
0.84375, 0.859375, 0.875, 0.890625, 0.90625, 0.921875, 0.9375, 0.953125,
0.96875, 0.984375, 1'>
      <PointEmitter
          direction='0 0 0'
          speed='0.2'
          variation='0'
          mass='0.1'
          surfaceArea='0.1'/>
      <WindPhysicsModel
          direction='0 1 0'
          speed='0.5'
          gustiness='1.9'/>
      <WindPhysicsModel
          direction='1 -1 0'
          speed='0.15'
          gustiness='7'/>
      <ColorRGBA containerField='colorRamp'
          color='1 1 1 0.1'/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220624/63259d1e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fire.zip
Type: application/x-zip-compressed
Size: 5930 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220624/63259d1e/attachment.bin>


More information about the x3d-public mailing list