[x3d-public] good example for ECMAScripting and Protos?

John Carlson yottzumm at gmail.com
Sat Aug 4 12:09:21 PDT 2018


Also, I do not know why the selector "#x3domxml [DEF='DECLDirectedPointSet_INSTANCE_FIELDcoord_cloud-points']" returns null

Here it is very obviously under Scene #x3domxm (copied from Chrome)l:

<field accessType="initializeOnly" name="coord" type="SFNode"><Coordinate DEF="DECLDirectedPointSet_INSTANCE_FIELDcoord_cloud-points" point="0.6106 -0.2307 -0.7576 0.5971 -0.4775 0.6445 -0.4792 -0.6057 0.6352 0.726 -0.6251 0.2866 -0.5579 -0.6976 -0.4496 0.4688 -0.5227 -0.712 0.9707 0.0424 0.2366 -0.317 0.0897 -0.9442 -0.7079 -0.3515 -0.6127 0.3095 0.8718 -0.3798 0.7377 0.659 -0.1469 -0.5227 0.7853 -0.3317 -0.912 -0.2987 0.2812 -0.4988 -0.5776 -0.6462 -0.6477 -0.5843 0.489 0.5684 0.2791 -0.774 -0.7353 -0.1935 -0.6495 -0.9543 0.2203 -0.2019 0.7541 -0.4516 -0.4768 0.2536 -0.462 -0.8499 -0.4512 0.1474 0.8802 0.2417 0.1198 -0.9629 -0.0922 -0.9607 0.2619 -0.9994 -0.0346 0.0015 0.3825 0.7293 -0.5673 0.8534 0.2356 0.465 0.9451 -0.2989 -0.1319 0.5172 0.0892 -0.8512 -0.2252 0.0208 0.9741 -0.8504 0.3842 -0.3595 -0.1484 0.2186 -0.9645 0.8949 0.2518 -0.3683 0.4905 0.7999 0.3457 -0.7347 0.6348 -0.2394 -0.0285 0.8395 0.5427 -0.1934 0.8769 -0.44 -0.764 -0.1324 0.6315 -0.608 0.7908 0.0702 -0.4391 0.6778 -0.5897 0.7519 0.5025 0.4267 -0.2357 -0.6809 0.6934 -0.6642 -0.1184 0.7381 0.945 -0.1497 -0.2908 0.3596 0.2671 0.8941 0.3811 -0.0326 -0.924 -0.8148 -0.5599 -0.1503 -0.6878 0.6542 0.3148 -0.0174 -0.1606 -0.9869 -0.5898 0.807 0.0294 0.6803 -0.6809 -0.2712 -0.6098 -0.7059 -0.3603 0.4437 0.7033 0.5554 0.0693 0.4581 0.8862 0.6887 0.7169 0.1087 -0.5409 -0.7791 -0.317 -0.8591 -0.2172 0.4634 -0.5956 -0.803 0.0208 -0.7658 -0.6356 -0.0983 0.162 -0.9712 0.1746 -0.2877 0.1996 -0.9367 -0.2169 -0.2332 -0.9479 -0.7803 -0.1865 0.597 0.4809 0.8767 0.0115 0.4146 -0.4864 -0.7691 0.794 -0.4551 -0.403 -0.123 -0.4912 0.8623 0.8464 -0.4423 -0.2966 -0.5888 -0.7626 -0.2678 -0.7779 -0.3495 0.5222 0.2652 0.8739 -0.4074 -0.8911 0.3064 -0.3347 -0.8507 -0.2117 0.4811 -0.3052 0.9502 0.0628 0.7297 -0.5675 -0.3814 0.6541 -0.0295 0.7558 0.9078 -0.332 -0.2562 -0.5086 -0.7934 0.3345 0.3444 -0.1703 0.9232 -0.3817 -0.9083 0.1712 -0.6331 -0.6995 -0.3315 -0.8792 -0.4266 -0.2123 -0.9018 0.2015 0.3823 0.992 -0.1262 -0.0039 0.6013 -0.1284 -0.7887 -0.6379 0.3256 0.6979 -0.6774 0.1577 -0.7185 -0.3457 0.8751 0.3385 0.0833 0.9662 -0.2438 0.4646 -0.529 0.7101 -0.1093 -0.986 -0.1258 0.1483 -0.2947 -0.944 0.7521 0.3533 -0.5563 -0.7857 0.2068 0.583 -0.7396 -0.5428 -0.3979 0.4949 0.4291 0.7556 -0.8296 -0.0652 -0.5545 0.1576 -0.3519 0.9227 0.7778 0.4946 0.3877 -0.5006 -0.6303 -0.5933 0.0256 0.2689 -0.9628 0.3902 0.3757 -0.8406 0.2526 0.3255 -0.9112 -0.7247 -0.1263 0.6774 0.4554 -0.3419 0.822 -0.8363 0.321 -0.4444 0.9053 -0.3758 0.1981 -0.0575 0.8979 0.4364 -0.76 -0.0957 0.6429 -0.602 0.2214 0.7672 -0.9254 -0.379 0.0066 -0.6097 -0.4219 0.671 0.0169 0.7661 -0.6425 -0.6971 -0.0219 -0.7167 -0.0331 -0.7039 0.7095 -0.218 -0.9129 -0.345 -0.2127 -0.7557 0.6195 -0.5336 -0.8047 0.2602 0.0444 0.9971 0.061 0.3829 -0.5327 -0.7548 0.6137 -0.4649 -0.6381 0.3497 0.9228 0.1619 0.9912 0.1031 0.0828 0.6303 -0.6648 -0.4008 0.0298 0.8923 0.4504 -0.9762 -0.0924 0.1962 0.5006 -0.7305 -0.4646 0.4306 -0.8278 0.3597 0.3622 -0.1158 0.9249 -0.8392 -0.5047 0.2025 0.3641 0.9288 0.0697 0.2298 -0.5788 0.7824 0.075 0.9537 -0.2911 -0.123 0.9106 -0.3945 0.7219 -0.5711 0.3909 -0.5546 0.8288 -0.0744 -0.2489 -0.9417 -0.2264 -0.9909 -0.1269 -0.0444 0.0609 0.9442 -0.3236 0.2549 -0.672 0.6953 0.5307 -0.6589 -0.5331 0.3932 0.449 -0.8024 0.1282 -0.1597 0.9788 -0.768 -0.0629 0.6374 0.0809 -0.9913 0.1036 0.4317 -0.6728 0.6009 -0.799 -0.3228 -0.5074 -0.5127 -0.2879 0.8089 -0.7683 0.152 0.6218 -0.3046 -0.1692 0.9373 -0.2502 -0.4175 0.8735 -0.6187 -0.5052 0.6016 0.8798 -0.4701 0.0702 0.4339 -0.2725 -0.8588 -0.5082 -0.8238 -0.2511 -0.5555 -0.4741 -0.6831 -0.7329 -0.3366 -0.5913 -0.5456 -0.588 -0.5972 -0.7898 -0.4085 -0.4576 0.4085 0.4406 -0.7994 -0.0529 0.5191 0.8531 -0.4247 0.6783 -0.5996 0.352 0.8861 0.3016 -0.2072 0.4304 0.8786 -0.8386 0.3404 0.4254 0.1858 0.2604 0.9475 0.9936 -0.0921 -0.0657 0.9914 -0.1226 -0.0464 0.4139 -0.6678 0.6186 -0.5363 0.6351 -0.5559 0.0298 -0.0544 -0.9981 -0.5759 0.6487 0.4975 -0.2417 -0.3442 0.9073 -0.2282 -0.7203 -0.655 -0.1885 -0.9785 0.0834 -0.6854 0.182 -0.7051 -0.3716 0.369 0.8519 -0.027 0.6581 0.7525 0.4755 0.4806 -0.7368 0.0359 0.0079 0.9993 -0.6675 -0.261 0.6974 -0.9288 0.3653 0.062 -0.1797 0.0337 0.9831 -0.0914 0.0755 0.993 -0.7066 0.7061 0.0468 -0.7674 -0.6386 0.0582 -0.5103 -0.236 -0.827 -0.3794 -0.3956 -0.8364 -0.2201 0.4852 0.8463 -0.8005 0.2327 0.5523 -0.9585 -0.1499 0.2424 -0.0611 0.9974 -0.039 -0.2911 -0.4054 -0.8666 -0.8371 -0.3427 0.4264 0.9606 0.2704 -0.0648 0.4739 -0.1373 -0.8698 -0.1568 0.5113 0.845 0.3021 -0.7218 0.6226 -0.8912 0.4528 -0.0266 -0.0369 -0.7026 0.7106 -0.2807 -0.7745 -0.5669 0.4359 0.5504 0.712 0.1266 -0.8864 -0.4453 0.0656 0.9966 -0.0501 -0.995 0.0935 -0.0338 0.322 0.7391 0.5917 -0.4966 -0.6796 -0.54 0.8938 -0.1216 -0.4317 0.073 -0.7276 -0.6821 -0.4843 -0.3381 -0.807 -0.2324 -0.705 0.67 0.7273 -0.6743 0.1282 0.308 -0.1536 0.9389 -0.7115 -0.0057 0.7027 -0.0572 0.8383 -0.5422 -0.2902 0.9323 -0.2159 0.3823 -0.9086 0.1681 -0.7953 0.4975 -0.3465 -0.6326 -0.1602 -0.7577 -0.059 0.9174 -0.3936 0.5229 0.845 0.1121 -0.207 -0.9171 -0.3408 0.8333 -0.5249 -0.1735 0.8526 0.4929 -0.1735 0.94 -0.254 0.2277 0.7654 0.204 0.6104 -0.2263 -0.8975 0.3786 -0.7069 -0.407 -0.5784 -0.6496 -0.5389 -0.5362 -0.2283 -0.0451 0.9725 0.9148 -0.2366 -0.3274 -0.0433 -0.9738 0.2234 0.0254 0.868 -0.4959 -0.9502 -0.0634 -0.305 -0.0567 -0.0475 -0.9973 -0.9779 -0.2077 -0.025 0.1233 0.9824 -0.1405 -0.4837 0.7904 0.3758 -0.1292 0.6487 -0.75 0.0137 -0.7502 -0.661 0.2185 -0.7797 -0.5868 0.6515 -0.5201 0.5523 0.9365 0.2699 0.224 0.2526 -0.7709 0.5847 -0.6891 -0.4604 0.5596 -0.4648 0.6068 -0.6449 -0.774 0.4911 0.3997 -0.0887 0.8524 -0.5154 0.0326 0.3001 -0.9534 0.7659 0.2542 0.5906 -0.0465 -0.9191 0.3912 0.2528 0.7463 -0.6158 -0.4329 -0.9014 -0.0095 0.6872 -0.4749 0.5498 0.5738 0.1858 0.7976 0.2515 -0.9564 0.1485 -0.5197 0.1844 -0.8342 0.126 -0.0175 0.9919 -0.193 0.1506 -0.9696 0.8864 0.2858 0.3641 -0.9037 -0.1584 -0.3977 0.0422 0.6659 0.7448 -0.8825 -0.1757 0.4363 0.9268 -0.0665 -0.3695 -0.451 0.4132 -0.7911 -0.1673 0.968 -0.187 0.6934 -0.6695 0.2666 0.2315 0.1836 0.9553 0.4481 -0.3091 -0.8388 -0.7897 -0.0166 -0.6132 -0.6493 0.4941 0.5782 -0.5324 -0.6981 0.4787 0.9072 0.0413 0.4188 0.9564 0.2135 0.1995 0.0556 0.3718 0.9266 -0.3557 0.7145 -0.6025 0.0155 -0.6965 0.7174 -0.8861 0.2797 0.3696 -0.3232 0.9153 -0.2404 0.2258 0.0685 -0.9718 -0.4571 -0.1227 0.8809 0.4435 -0.8172 -0.3681 0.9306 0.3649 -0.0277 0.5022 0.3985 -0.7674 -0.5443 -0.0253 0.8385 -0.0043 0.9215 -0.3884 0.9369 0.2783 0.2117 0.5891 0.7036 -0.3973 -0.8591 0.1143 0.4989 -0.483 -0.6026 0.6353 -0.3264 0.7705 0.5476 -0.1577 -0.122 0.9799 0.0703 -0.0933 0.9932 0.9867 0.1617 0.0194 0.6884 -0.4995 -0.5259 -0.5832 -0.7029 0.4071 -0.1464 0.8863 -0.4393 -0.2282 -0.8096 -0.5408 0.9622 -0.2101 -0.1735 0.9656 0.2467 0.0823 -0.1349 0.9874 0.0823 -0.092 0.2066 0.9741 -0.0319 0.5455 0.8375 0.2252 -0.2786 0.9336 0.381 -0.3269 -0.8649 0.3515 0.6555 0.6684 -0.8322 -0.0465 -0.5525 -0.0994 -0.9923 0.074 -0.8077 -0.3094 -0.502 -0.5016 -0.1871 -0.8446 0.877 0.2172 0.4285 0.0993 -0.2386 -0.966 0.4756 0.7917 0.3835 -0.7201 0.0575 -0.6914 -0.16 -0.2496 -0.955 0.9669 -0.1214 0.2243 -0.5418 0.6284 0.5583 -0.4253 0.8919 -0.1538 0.4861 0.5306 0.6943 0.0697 -0.5179 0.8526 -0.9457 -0.0684 -0.3178 -0.644 -0.5325 -0.5493 -0.6608 0.3844 -0.6447 -0.612 -0.2632 0.7457 -0.6975 0.695 -0.1743 0.0288 -0.4649 0.8849 -0.0353 -0.5554 0.8309 0.6845 -0.7023 -0.1953 0.9503 0.2652 -0.1634 -0.2037 -0.9278 0.3126 0.7399 0.0329 0.672 -0.724 0.3334 -0.6039 -0.7535 0.4605 0.4693 0.4827 -0.5682 0.6664 -0.7632 -0.4353 0.4776 0.2956 0.5713 -0.7656 0.2212 0.0583 -0.9735 0.4603 0.2609 0.8486 -0.6144 -0.5763 0.5388 -0.5894 -0.6457 0.4855 0.6459 -0.5037 0.5737 -0.8073 -0.5415 -0.2346 -0.2559 0.9056 -0.3382 -0.9926 0.0229 -0.1196 0.7398 0.4553 -0.4953 -0.5792 -0.4358 0.6889 -0.2993 -0.7154 -0.6313 0.8939 -0.1146 -0.4334 -0.4299 0.6764 -0.5981 -0.128 -0.8485 0.5135 -0.4027 -0.1538 0.9023 0.7856 0.3173 -0.5312 0.1538 -0.5619 -0.8128 0.8956 -0.3974 -0.2001 -0.9975 0.0478 -0.0516 0.4373 0.1458 0.8874 0.3742 0.8782 0.2978 -0.2303 -0.3442 -0.9102 -0.573 -0.55 0.6076 0.4787 0.8506 -0.2177 -0.611 0.3814 0.6937 0.9026 -0.4057 0.1441 -0.136 0.9778 0.1592 -0.1148 -0.9909 0.0699 0.6627 0.6094 -0.4353 -0.0029 -0.5213 0.8534 0.4897 -0.8208 0.2941 0.7302 -0.5978 -0.3308 -0.6147 0.5191 -0.5939 -0.876 -0.2306 -0.4236 -0.702 0.34 0.6258 -0.0655 0.7298 -0.6805 -0.7475 0.5563 0.3629 0.2236 0.9339 -0.279 -0.8999 -0.4099 -0.1491 -0.1321 -0.8233 -0.552 0.1628 -0.8798 0.4467 0.7576 0.2723 -0.5932 -0.3425 -0.5854 0.7349 -0.1226 -0.3816 -0.9161 -0.6907 0.5885 0.4203 -0.7112 0.4413 -0.5472 -0.0977 0.6275 0.7725 -0.5997 0.3019 -0.7411 0.1841 0.6894 -0.7006 0.9187 -0.0866 0.3854 0.0692 0.9714 0.2271 -0.0508 -0.9751 0.2159 -0.073 0.5156 0.8537 0.6819 0.4683 0.5619 0.25 0.8798 -0.4042 0.4858 -0.1998 -0.8509 0.4835 -0.3772 -0.7899 -0.9192 0.3368 0.2039 0.4244 -0.2264 -0.8767 -0.8786 0.3198 0.3547 0.8337 0.4884 -0.2578 0.0851 0.3029 -0.9492 -0.5242 -0.8426 -0.1232 0.9964 0.005 -0.0851 -0.0711 0.9278 0.3661 -0.8049 0.4355 0.403 0.3901 0.0142 -0.9207 -0.4645 -0.0229 0.8853 -0.061 0.2227 0.973 -0.603 0.6309 0.4883 -0.212 -0.9607 0.179 0.8808 0.4723 -0.0332 -0.3982 -0.7908 0.4648 -0.59 -0.6267 0.5091 0.0727 -0.7085 -0.702 0.1328 -0.3188 -0.9385 -0.0365 -0.2852 -0.9578 0.8689 0.3996 0.2922 0.2046 -0.9066 0.3692 -0.4696 -0.7015 0.5361 0.3863 0.7603 -0.5222 0.9842 0.1686 0.0542 -0.6393 -0.5593 -0.5278 0.1011 0.939 0.3288 -0.4986 -0.3386 0.798 -0.8632 -0.0907 -0.4967 -0.8697 -0.2146 0.4445 0.1553 0.2239 0.9622 -0.0567 0.0401 -0.9976 -0.7342 -0.6069 0.3043 -0.2257 -0.6669 0.7102 0.5721 0.6237 0.5326 0.4266 -0.8836 0.1929 0.2756 -0.7918 -0.545 0.4598 0.8872 -0.0387 -0.9423 -0.3291 0.061 -0.6962 0.0526 -0.7159 0.7601 -0.4512 -0.4677 0.9493 0.2432 0.1993 0.4781 0.2137 -0.8519 -0.579 -0.7469 -0.327 -0.1807 0.9834 -0.0149 0.3911 0.3099 0.8666 0.7775 -0.6068 -0.1654 0.6068 -0.3654 0.7059 -0.9641 0.0634 -0.2579 -0.2732 -0.1819 0.9446 -0.0674 -0.1946 0.9786 -0.7507 -0.6603 0.0202 -0.6201 0.6877 -0.3775 0.213 0.8266 0.521 -0.9867 -0.0406 -0.1574 -0.36 -0.8627 0.3552 -0.071 0.9093 0.4101 0.228 -0.936 0.2682 0.2992 -0.8801 0.3687 0.2755 0.2787 0.92 0.3955 0.7394 -0.5449 -0.5365 0.8144 0.2214 -0.7831 0.563 0.2641 0.3844 -0.923 -0.0159 0.0426 -0.7502 0.6599 0.2555 -0.9374 0.2365 0.4899 -0.5653 0.6637 0.3114 -0.9352 0.1687 0.3954 -0.5247 0.7539 -0.7257 -0.6873 -0.0325 -0.2489 -0.8201 -0.5152 -0.6087 -0.0727 0.79 0.1847 0.6966 -0.6932 -0.305 0.453 0.8377 -0.5305 -0.5784 0.6197 -0.7534 0.5863 -0.2977 -0.0473 -0.777 0.6277 0.1696 0.5539 -0.8151 -0.8972 -0.4287 0.106 0.6057 -0.1721 -0.7769 -0.5575 -0.5429 -0.6281 0.6147 -0.6277 0.4775 0.337 0.2343 -0.9119 -0.0715 0.9338 0.3507 -0.3625 -0.0403 0.9311 0.4875 -0.408 -0.772 -0.9766 -0.1249 -0.1753 -0.5103 0.8582 0.0552 0.9863 0.155 0.0559 0.1873 -0.4966 0.8475 -0.537 -0.5574 -0.6332 -0.0124 -0.9535 0.3013 0.6382 -0.6066 -0.474 -0.6545 -0.5428 0.5263 -0.4528 0.393 -0.8004 0.4839 0.7712 -0.4136 0.1318 -0.5647 0.8147 -0.7573 -0.6409 -0.1255 0.4855 -0.6458 0.5892 0.8349 0.533 0.1373 0.8253 -0.4302 -0.3658 0.5124 -0.2458 0.8228 -0.2323 -0.7374 -0.6343 -0.939 0.1818 -0.292 0.986 -0.0059 0.1664 0.4418 -0.8344 -0.3294 -0.0552 -0.1553 0.9863 0.0078 -0.8549 -0.5187"></Coordinate>
</field>
<field accessType="initializeOnly" name="normal" type="SFNode"><Normal DEF="DECLDirectedPointSet_INSTANCE_FIELDnormal_cloud-normals" vector="0.611 -0.231 -0.758 0.597 -0.478 0.645 -0.479 -0.606 0.635 0.726 -0.625 0.287 -0.558 -0.698 -0.45 0.469 -0.523 -0.712 0.971 0.042 0.237 -0.317 0.09 -0.944 -0.708 -0.351 -0.613 0.309 0.872 -0.38 0.738 0.659 -0.147 -0.523 0.785 -0.332 -0.912 -0.299 0.281 -0.499 -0.578 -0.646 -0.648 -0.584 0.489 0.568 0.279 -0.774 -0.735 -0.193 -0.65 -0.954 0.22 -0.202 0.754 -0.452 -0.477 0.254 -0.462 -0.85 -0.451 0.147 0.88 0.242 0.12 -0.963 -0.092 -0.961 0.262 -0.999 -0.035 0.001 0.383 0.729 -0.567 0.853 0.236 0.465 0.945 -0.299 -0.132 0.517 0.089 -0.851 -0.225 0.021 0.974 -0.85 0.384 -0.359 -0.148 0.219 -0.964 0.895 0.252 -0.368 0.491 0.8 0.346 -0.735 0.635 -0.239 -0.028 0.839 0.543 -0.193 0.877 -0.44 -0.764 -0.132 0.631 -0.608 0.791 0.07 -0.439 0.678 -0.59 0.752 0.502 0.427 -0.236 -0.681 0.693 -0.664 -0.118 0.738 0.945 -0.15 -0.291 0.36 0.267 0.894 0.381 -0.033 -0.924 -0.815 -0.56 -0.15 -0.688 0.654 0.315 -0.017 -0.161 -0.987 -0.59 0.807 0.029 0.68 -0.681 -0.271 -0.61 -0.706 -0.36 0.444 0.703 0.555 0.069 0.458 0.886 0.689 0.717 0.109 -0.541 -0.779 -0.317 -0.859 -0.217 0.463 -0.596 -0.803 0.021 -0.766 -0.636 -0.098 0.162 -0.971 0.175 -0.288 0.2 -0.937 -0.217 -0.233 -0.948 -0.78 -0.186 0.597 0.481 0.877 0.011 0.415 -0.486 -0.769 0.794 -0.455 -0.403 -0.123 -0.491 0.862 0.846 -0.442 -0.297 -0.589 -0.763 -0.268 -0.778 -0.349 0.522 0.265 0.874 -0.407 -0.891 0.306 -0.335 -0.851 -0.212 0.481 -0.305 0.95 0.063 0.73 -0.568 -0.381 0.654 -0.03 0.756 0.908 -0.332 -0.256 -0.509 -0.793 0.334 0.344 -0.17 0.923 -0.382 -0.908 0.171 -0.633 -0.7 -0.331 -0.879 -0.427 -0.212 -0.902 0.201 0.382 0.992 -0.126 -0.004 0.601 -0.128 -0.789 -0.638 0.326 0.698 -0.677 0.158 -0.719 -0.346 0.875 0.339 0.083 0.966 -0.244 0.465 -0.529 0.71 -0.109 -0.986 -0.126 0.148 -0.295 -0.944 0.752 0.353 -0.556 -0.786 0.207 0.583 -0.74 -0.543 -0.398 0.495 0.429 0.756 -0.83 -0.065 -0.554 0.158 -0.352 0.923 0.778 0.495 0.388 -0.501 -0.63 -0.593 0.026 0.269 -0.963 0.39 0.376 -0.841 0.253 0.325 -0.911 -0.725 -0.126 0.677 0.455 -0.342 0.822 -0.836 0.321 -0.444 0.905 -0.376 0.198 -0.058 0.898 0.436 -0.76 -0.096 0.643 -0.602 0.221 0.767 -0.925 -0.379 0.007 -0.61 -0.422 0.671 0.017 0.766 -0.642 -0.697 -0.022 -0.717 -0.033 -0.704 0.709 -0.218 -0.913 -0.345 -0.213 -0.756 0.619 -0.534 -0.805 0.26 0.044 0.997 0.061 0.383 -0.533 -0.755 0.614 -0.465 -0.638 0.35 0.923 0.162 0.991 0.103 0.083 0.63 -0.665 -0.401 0.03 0.892 0.45 -0.976 -0.092 0.196 0.501 -0.73 -0.465 0.431 -0.828 0.36 0.362 -0.116 0.925 -0.839 -0.505 0.202 0.364 0.929 0.07 0.23 -0.579 0.782 0.075 0.954 -0.291 -0.123 0.911 -0.394 0.722 -0.571 0.391 -0.555 0.829 -0.074 -0.249 -0.942 -0.226 -0.991 -0.127 -0.044 0.061 0.944 -0.324 0.255 -0.672 0.695 0.531 -0.659 -0.533 0.393 0.449 -0.802 0.128 -0.16 0.979 -0.768 -0.063 0.637 0.081 -0.991 0.104 0.432 -0.673 0.601 -0.799 -0.323 -0.507 -0.513 -0.288 0.809 -0.768 0.152 0.622 -0.305 -0.169 0.937 -0.25 -0.418 0.874 -0.619 -0.505 0.602 0.88 -0.47 0.07 0.434 -0.273 -0.859 -0.508 -0.824 -0.251 -0.555 -0.474 -0.683 -0.733 -0.337 -0.591 -0.546 -0.588 -0.597 -0.79 -0.408 -0.458 0.409 0.441 -0.799 -0.053 0.519 0.853 -0.425 0.678 -0.6 0.352 0.886 0.302 -0.207 0.43 0.879 -0.839 0.34 0.425 0.186 0.26 0.947 0.994 -0.092 -0.066 0.991 -0.123 -0.046 0.414 -0.668 0.619 -0.536 0.635 -0.556 0.03 -0.054 -0.998 -0.576 0.649 0.497 -0.242 -0.344 0.907 -0.228 -0.72 -0.655 -0.189 -0.979 0.083 -0.685 0.182 -0.705 -0.372 0.369 0.852 -0.027 0.658 0.752 0.476 0.481 -0.737 0.036 0.008 0.999 -0.668 -0.261 0.697 -0.929 0.365 0.062 -0.18 0.034 0.983 -0.091 0.075 0.993 -0.707 0.706 0.047 -0.767 -0.639 0.058 -0.51 -0.236 -0.827 -0.379 -0.396 -0.836 -0.22 0.485 0.846 -0.8 0.233 0.552 -0.959 -0.15 0.242 -0.061 0.997 -0.039 -0.291 -0.405 -0.867 -0.837 -0.343 0.426 0.961 0.27 -0.065 0.474 -0.137 -0.87 -0.157 0.511 0.845 0.302 -0.722 0.623 -0.891 0.453 -0.027 -0.037 -0.703 0.711 -0.281 -0.775 -0.567 0.436 0.55 0.712 0.127 -0.886 -0.445 0.066 0.997 -0.05 -0.995 0.094 -0.034 0.322 0.739 0.592 -0.497 -0.68 -0.54 0.894 -0.122 -0.432 0.073 -0.728 -0.682 -0.484 -0.338 -0.807 -0.232 -0.705 0.67 0.727 -0.674 0.128 0.308 -0.154 0.939 -0.711 -0.006 0.703 -0.057 0.838 -0.542 -0.29 0.932 -0.216 0.382 -0.909 0.168 -0.795 0.497 -0.346 -0.633 -0.16 -0.758 -0.059 0.917 -0.394 0.523 0.845 0.112 -0.207 -0.917 -0.341 0.833 -0.525 -0.173 0.853 0.493 -0.174 0.94 -0.254 0.228 0.765 0.204 0.61 -0.226 -0.897 0.379 -0.707 -0.407 -0.578 -0.65 -0.539 -0.536 -0.228 -0.045 0.973 0.915 -0.237 -0.327 -0.043 -0.974 0.223 0.025 0.868 -0.496 -0.95 -0.063 -0.305 -0.057 -0.048 -0.997 -0.978 -0.208 -0.025 0.123 0.982 -0.141 -0.484 0.79 0.376 -0.129 0.649 -0.75 0.014 -0.75 -0.661 0.218 -0.78 -0.587 0.652 -0.52 0.552 0.936 0.27 0.224 0.253 -0.771 0.585 -0.689 -0.46 0.56 -0.465 0.607 -0.645 -0.774 0.491 0.4 -0.089 0.852 -0.515 0.033 0.3 -0.953 0.766 0.254 0.591 -0.046 -0.919 0.391 0.253 0.746 -0.616 -0.433 -0.901 -0.01 0.687 -0.475 0.55 0.574 0.186 0.798 0.251 -0.956 0.149 -0.52 0.184 -0.834 0.126 -0.017 0.992 -0.193 0.151 -0.97 0.886 0.286 0.364 -0.904 -0.158 -0.398 0.042 0.666 0.745 -0.883 -0.176 0.436 0.927 -0.066 -0.37 -0.451 0.413 -0.791 -0.167 0.968 -0.187 0.693 -0.669 0.267 0.232 0.184 0.955 0.448 -0.309 -0.839 -0.79 -0.017 -0.613 -0.649 0.494 0.578 -0.532 -0.698 0.479 0.907 0.041 0.419 0.956 0.213 0.2 0.056 0.372 0.927 -0.356 0.714 -0.602 0.015 -0.697 0.717 -0.886 0.28 0.37 -0.323 0.915 -0.24 0.226 0.068 -0.972 -0.457 -0.123 0.881 0.443 -0.817 -0.368 0.931 0.365 -0.028 0.502 0.399 -0.767 -0.544 -0.025 0.839 -0.004 0.921 -0.388 0.937 0.278 0.212 0.589 0.704 -0.397 -0.859 0.114 0.499 -0.483 -0.603 0.635 -0.326 0.77 0.548 -0.158 -0.122 0.98 0.07 -0.093 0.993 0.987 0.162 0.019 0.688 -0.5 -0.526 -0.583 -0.703 0.407 -0.146 0.886 -0.439 -0.228 -0.81 -0.541 0.962 -0.21 -0.174 0.966 0.247 0.082 -0.135 0.987 0.082 -0.092 0.207 0.974 -0.032 0.545 0.838 0.225 -0.279 0.934 0.381 -0.327 -0.865 0.352 0.656 0.668 -0.832 -0.047 -0.552 -0.099 -0.992 0.074 -0.808 -0.309 -0.502 -0.502 -0.187 -0.845 0.877 0.217 0.429 0.099 -0.239 -0.966 0.476 0.792 0.383 -0.72 0.058 -0.691 -0.16 -0.25 -0.955 0.967 -0.121 0.224 -0.542 0.628 0.558 -0.425 0.892 -0.154 0.486 0.531 0.694 0.07 -0.518 0.853 -0.946 -0.068 -0.318 -0.644 -0.533 -0.549 -0.661 0.384 -0.645 -0.612 -0.263 0.746 -0.698 0.695 -0.174 0.029 -0.465 0.885 -0.035 -0.555 0.831 0.685 -0.702 -0.195 0.95 0.265 -0.163 -0.204 -0.928 0.313 0.74 0.033 0.672 -0.724 0.333 -0.604 -0.753 0.46 0.469 0.483 -0.568 0.666 -0.763 -0.435 0.478 0.296 0.571 -0.766 0.221 0.058 -0.973 0.46 0.261 0.849 -0.614 -0.576 0.539 -0.589 -0.646 0.486 0.646 -0.504 0.574 -0.807 -0.541 -0.235 -0.256 0.906 -0.338 -0.993 0.023 -0.12 0.74 0.455 -0.495 -0.579 -0.436 0.689 -0.299 -0.715 -0.631 0.894 -0.115 -0.433 -0.43 0.676 -0.598 -0.128 -0.848 0.514 -0.403 -0.154 0.902 0.786 0.317 -0.531 0.154 -0.562 -0.813 0.896 -0.397 -0.2 -0.998 0.048 -0.052 0.437 0.146 0.887 0.374 0.878 0.298 -0.23 -0.344 -0.91 -0.573 -0.55 0.608 0.479 0.851 -0.218 -0.611 0.381 0.694 0.903 -0.406 0.144 -0.136 0.978 0.159 -0.115 -0.991 0.07 0.663 0.609 -0.435 -0.003 -0.521 0.853 0.49 -0.821 0.294 0.73 -0.598 -0.331 -0.615 0.519 -0.594 -0.876 -0.231 -0.424 -0.702 0.34 0.626 -0.065 0.73 -0.681 -0.748 0.556 0.363 0.224 0.934 -0.279 -0.9 -0.41 -0.149 -0.132 -0.823 -0.552 0.163 -0.88 0.447 0.758 0.272 -0.593 -0.342 -0.585 0.735 -0.123 -0.382 -0.916 -0.691 0.588 0.42 -0.711 0.441 -0.547 -0.098 0.628 0.772 -0.6 0.302 -0.741 0.184 0.689 -0.701 0.919 -0.087 0.385 0.069 0.971 0.227 -0.051 -0.975 0.216 -0.073 0.516 0.854 0.682 0.468 0.562 0.25 0.88 -0.404 0.486 -0.2 -0.851 0.483 -0.377 -0.79 -0.919 0.337 0.204 0.424 -0.226 -0.877 -0.879 0.32 0.355 0.834 0.488 -0.258 0.085 0.303 -0.949 -0.524 -0.843 -0.123 0.996 0.005 -0.085 -0.071 0.928 0.366 -0.805 0.436 0.403 0.39 0.014 -0.921 -0.465 -0.023 0.885 -0.061 0.223 0.973 -0.603 0.631 0.488 -0.212 -0.961 0.179 0.881 0.472 -0.033 -0.398 -0.791 0.465 -0.59 -0.627 0.509 0.073 -0.708 -0.702 0.133 -0.319 -0.938 -0.037 -0.285 -0.958 0.869 0.4 0.292 0.205 -0.907 0.369 -0.47 -0.701 0.536 0.386 0.76 -0.522 0.984 0.169 0.054 -0.639 -0.559 -0.528 0.101 0.939 0.329 -0.499 -0.339 0.798 -0.863 -0.091 -0.497 -0.87 -0.215 0.444 0.155 0.224 0.962 -0.057 0.04 -0.998 -0.734 -0.607 0.304 -0.226 -0.667 0.71 0.572 0.624 0.533 0.427 -0.884 0.193 0.276 -0.792 -0.545 0.46 0.887 -0.039 -0.942 -0.329 0.061 -0.696 0.053 -0.716 0.76 -0.451 -0.468 0.949 0.243 0.199 0.478 0.214 -0.852 -0.579 -0.747 -0.327 -0.181 0.983 -0.015 0.391 0.31 0.867 0.777 -0.607 -0.165 0.607 -0.365 0.706 -0.964 0.063 -0.258 -0.273 -0.182 0.945 -0.067 -0.195 0.979 -0.751 -0.66 0.02 -0.62 0.688 -0.378 0.213 0.827 0.521 -0.987 -0.041 -0.157 -0.36 -0.863 0.355 -0.071 0.909 0.41 0.228 -0.936 0.268 0.299 -0.88 0.369 0.275 0.279 0.92 0.395 0.739 -0.545 -0.536 0.814 0.221 -0.783 0.563 0.264 0.384 -0.923 -0.016 0.043 -0.75 0.66 0.256 -0.937 0.237 0.49 -0.565 0.664 0.311 -0.935 0.169 0.395 -0.525 0.754 -0.726 -0.687 -0.033 -0.249 -0.82 -0.515 -0.609 -0.073 0.79 0.185 0.697 -0.693 -0.305 0.453 0.838 -0.53 -0.578 0.62 -0.753 0.586 -0.298 -0.047 -0.777 0.628 0.17 0.554 -0.815 -0.897 -0.429 0.106 0.606 -0.172 -0.777 -0.557 -0.543 -0.628 0.615 -0.628 0.478 0.337 0.234 -0.912 -0.071 0.934 0.351 -0.362 -0.04 0.931 0.487 -0.408 -0.772 -0.977 -0.125 -0.175 -0.51 0.858 0.055 0.986 0.155 0.056 0.187 -0.497 0.848 -0.537 -0.557 -0.633 -0.012 -0.953 0.301 0.638 -0.607 -0.474 -0.654 -0.543 0.526 -0.453 0.393 -0.8 0.484 0.771 -0.414 0.132 -0.565 0.815 -0.757 -0.641 -0.125 0.486 -0.646 0.589 0.835 0.533 0.137 0.825 -0.43 -0.366 0.512 -0.246 0.823 -0.232 -0.737 -0.634 -0.939 0.182 -0.292 0.986 -0.006 0.166 0.442 -0.834 -0.329 -0.055 -0.155 0.986 0.008 -0.855 -0.519"></Normal>
</field>
                 
Sent from Mail for Windows 10

From: John Carlson
Sent: Saturday, August 4, 2018 2:47 PM
To: Andreas Plesch
Cc: Vincent Marchetti; X3D Graphics public mailing list; x3dom mlist
Subject: Re: [x3d-public] good example for ECMAScripting and Protos?

I would give you instructions on how to follow along with me, but they are a bit complex.  Basically you need a most recent version of X3DJSONLD, you need to put the file in a searchable place see /files in app.js or put it in src/main/data and src/main/html/index.html select options. Select or search for the file from http://localhost:3000 (start server with node app.js). That will throw some errors to the web console.   Select the loadScripts line error and set a breakpoint at eval(scripts.text);   Rerun the file (select another file, then select below file again). Then step into the eval.   Set a breakpoint in the initialize method following “ecmascript” step into the nodeUtil method and see that element is right and getFieldValue is not a function.

I will try some of your ideas below.  getAttribute does return something.   I think it’s just that X3DOM has not recognized the node because it’s inside a non-processed script field.

Not really sure though.


John
On Sat, Aug 4, 2018 at 1:47 PM John Carlson <yottzumm at gmail.com> wrote:
I belive in this case, it’s the node and not the field we are trying to get the point field value from.   The problem is that getFieldValue is not defined because I am pretty sure that the node wasn’t processed by X3DOM????

To change X3DOM, we would probably need a script tag and a way to handle the script fields. I believe these particular nodes are USEd elsewhere, so they should be active as nodes.  Hmm.

Probably requires more investigation on my part.

In this case, the nodes are coordinate and normal nodes.

On Sat, Aug 4, 2018 at 8:53 AM Andreas Plesch <andreasplesch at gmail.com> wrote:
On Sat, Aug 4, 2018 at 4:56 AM John Carlson <yottzumm at gmail.com> wrote:
>
> I have a problem with this file in X3DOM, because as far as I can tell, the SFNode fields (the node, not the field) do not have getFieldValue for point etc. as a function, for example (but one can double check me).  In other words, I don’t think this node is an X3DOM node.

I think you are referring to X3DOM's dom element method getFieldValue
and that it does not work for SFNode type fields. For example:

shapeDomNode.getFieldValue('Appearance')

does not return anything.

I do not think this will be fixed soon.

You can try this instead

shapeDomNode._x3domNode._cf.appearance

with something like

dom._x3domNode._cf[field.toLowerCase]

which gives you an x3domNode object.

>
> Thus I cannot take a reasonable length in the script.  One would have to parse the string.
>
>
> That’s as clear as I can get.  I think this might be because x3dom does not process scripts correctly. We would need a script tag handler, and a field handler inside that.
>
>
>
> Can you help Andreas?  I’ve created a script tag before, but that code is lost. It might be in my GitHub repository somewhere, not sure.
>
>
>
> We just need a script tag that has fields, but doesn’t execute its CDATA section.  I am pretty sure

If you add a type='text/x3dscript' (or anything) attribute, the
browser will not try to execute the script.

>
> How is V4.0 handling this?
>
>
>
> Alternatively, I can change my nodeUtil code to look at the type and do the right thing converting a string to the correct type.   Suggestions are welcome.
>
>
>
> Thanks for the great example, Vince,
>
>
>
> Should I adapt my code to deal with this failing in X3DOM, or should we change X3DOM?

What needs to be changed in x3dom ? The getFieldValue method ?

-Andreas
>
>
>
> John
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: vmarchetti at kshell.com
> Sent: Wednesday, August 1, 2018 9:04 PM
> To: John Carlson; X3D-Public
> Subject: Re: [x3d-public] good example for ECMAScripting and Protos?
>
>
>
> See
>
> http://www.kshell.com/pages/pointcloudvisualization/SphereDirectedPointSet.x3d
>
>
>
> It is a X3D file with with a Prototype + ecmascript definition of a point cloud, with a vector attached to each point of the cloud.
>
> Example used is just points randomly distributed on sphere with directs pointed radially outward.
>
>
>
> Potential uses would be to implement the scanning design pattern at http://x3dgraphics.com/examples/X3dForAdvancedModeling/Scanning/X3dMeshDesignPatternIndex.html , or
>
> visualizing fluid flow or  electromagnetic field
>
>
>
> On Jul 31, 2018, at 10:30 PM, John Carlson <yottzumm at gmail.com> wrote:
>
>
>
> Is there a good example of ECMAScripting in X3D that I can use to test my X3D JSON ECMAScript preprocessor?  Preferably with Protos
>
>
>
>
>
> Thanks!
>
>
>
> John
>
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
>
>



-- 
Andreas Plesch
Waltham, MA 02453

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180804/6d27bd5e/attachment-0001.html>


More information about the x3d-public mailing list