-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added HAnim containerFields #1141
base: master
Are you sure you want to change the base?
Conversation
When the JSON is converted to DOM, we need to check to see if we should add a containerField to the DOM. |
This breaks the JSON parser for HAnim, even though it was supposed to support it. Hmm. |
I must be sleepy, looking at production instead of dev. I think this patch is needed when converting JSON to XML or DOM, to add containerFields. |
Let's keep x3dscript separate since it needs extra testing and is not quite ready to be included in a release. Please remove here. Do we have a small test for HAnim json ? |
https://coderextreme.net/X3DJSONLD/src/main/html/joeandjin.html I think is related. The HAnim json there requires the changes to JSONParser. Which examples require the Proto related changes, eg. the guards in addChild() ? |
else | ||
{ | ||
this.ConvertObject( key, object, element ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cherry picked in #1142
I think you may be missing the first line? Or did I mess up?
John
…On Sun, Nov 22, 2020 at 2:23 PM Andreas Plesch ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/util/json/JSONParser.js
<#1141 (comment)>:
> + {
+ firstNode[ skv ][ ***@***.***" ] = key.substr( 1 );
+ console.log( firstNode[ skv ] );
+ this.ConvertObject( key, object, element, firstNode[ skv ][ ***@***.***" ] );
+ }
+ }
+ else if ( key.indexOf( "HAnim" ) === 0 && key !== "HAnimHumanoid" && typeof object[ key ][ ***@***.***" ] != "undefined" )
+
+ {
+ object[ key ][ ***@***.***" ] = key.substr( 5 ).toLowerCase() + "s";
+ this.ConvertObject( key, object, element, object[ key ][ ***@***.***" ] );
+ }
+ else
+ {
+ this.ConvertObject( key, object, element );
+ }
cherry picked in #1142 <#1142>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1141 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMJ5ZGQNBCZL77SRZRRU3SRFXLDANCNFSM4T47LLZQ>
.
|
Here is the complete change: |
Yeah, looks good! Thanks!
John
…On Sun, Nov 22, 2020 at 4:32 PM Andreas Plesch ***@***.***> wrote:
Here is the complete change:
https://github.com/x3dom/x3dom/pull/1142/files
I think it is complete ?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1141 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMJ5ZOF2BL7F7F7JSHCRDSRGGPRANCNFSM4T47LLZQ>
.
|
A "small" test for Hanim 1 in X3DOM may be found here:
https://coderextreme.net/X3DJSONLD/src/main/html/x3domjoe.html
Don't use the "Processed" files.
A copy of the JSON Joe files (X3D XML also found in X3d resources
archives), may be found here:
https://coderextreme.net/X3DJSONLD/src/main/data starting with Joe...
…On Sun, Nov 22, 2020 at 9:44 AM Andreas Plesch ***@***.***> wrote:
https://coderextreme.net/X3DJSONLD/src/main/html/joeandjin.html I think
is related.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1141 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMJ57SPBNV6EGAZVH4OHLSREWUBANCNFSM4T47LLZQ>
.
|
https://coderextreme.net/X3DJSONLD/src/main/html/x3domjoe.html does not require the guards for node==null in addChild. Do you have an example where the guards are required ? |
I don't know if node==null is still a problem, since JSONParser.js was
probably fixed.
I've patched my X3DOM, but I can unpatch it, given some time to get into a
better mood (sorry, these things happen).
You said:
https://coderextreme.net/X3DJSONLD/src/main/html/joeandjin.html I think is
related.
Is it still? I can work on reducing the number of files being referenced.
Please give me more time for me to get a coffee replacement,
I'll have some tea to see if I feel like working again.
I understand how it's good to throw exceptions on bad files.
Thanks,
John
…On Sun, Nov 22, 2020 at 6:15 PM Andreas Plesch ***@***.***> wrote:
https://coderextreme.net/X3DJSONLD/src/main/html/x3domjoe.html
does not require the guards for node==null in addChild.
Do you have an example where the guards are required ?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1141 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMJ54XGHIWQY7722IDNTTSRGSQZANCNFSM4T47LLZQ>
.
|
Please feel free to reopen when appropriate. |
Added containerFields for USE sites, segment and joints