create3000 / cobweb

Cobweb is now X_ITE
https://github.com/create3000/x_ite
Other
10 stars 5 forks source link

New JSON parser for Cobweb #32

Closed create3000 closed 10 months ago

create3000 commented 7 years ago

There is indeed a need for a JSON parser for Cobweb. All talk about it should be done here.

coderextreme commented 7 years ago

We need to decide whether a DOM is necessary or not (how to construct the scenegraph). Does VRML have a DOM?

coderextreme commented 7 years ago

Should we avoid ES6 where it's reasonable?

andreasplesch commented 7 years ago

A DOM is not necessary AFAIK .

The XML parser just adds a direct reference from the DOM element to the x3d node object, for easy access from the DOM but this is only required for cobwebdom.

One thought I have is what it would take to have live updates to the scene responding to manipulation of the JSON object. In effect this would be an alternative SAI which may be easier to use for some and could be faster than DOM mutations.

On Jan 19, 2017 5:19 PM, "John Carlson" notifications@github.com wrote:

We need to decide whether a DOM is necessary or not (how to construct the scenegraph). Does VRML have a DOM?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/create3000/cobweb/issues/32#issuecomment-273916775, or mute the thread https://github.com/notifications/unsubscribe-auth/AF4p6x6xCAA_dfwDDfnerDdA5Gs1_PBFks5rT-FWgaJpZM4LocFe .

coderextreme commented 7 years ago

I guess we would have to override some default JavaScript operations/functions for this?

On Jan 19, 2017 7:40 PM, "Andreas Plesch" notifications@github.com wrote:

A DOM is not necessary AFAIK .

The XML parser just adds a direct reference from the DOM element to the x3d node object, for easy access from the DOM but this is only required for cobwebdom.

One thought I have is what it would take to have live updates to the scene responding to manipulation of the JSON object. In effect this would be an alternative SAI which may be easier to use for some and could be faster than DOM mutations.

On Jan 19, 2017 5:19 PM, "John Carlson" notifications@github.com wrote:

We need to decide whether a DOM is necessary or not (how to construct the scenegraph). Does VRML have a DOM?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/create3000/cobweb/issues/32#issuecomment-273916775, or mute the thread https://github.com/notifications/unsubscribe-auth/AF4p6x6xCAA_ dfwDDfnerDdA5Gs1_PBFks5rT-FWgaJpZM4LocFe .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/create3000/cobweb/issues/32#issuecomment-273943841, or mute the thread https://github.com/notifications/unsubscribe-auth/AArE97XwemBYxUmdFH3MSy5QDXjNgxY_ks5rUAKHgaJpZM4LocFe .

andreasplesch commented 7 years ago

Instead of overriding there is now a Proxy object which lets you transparently trap standard js operations on a specific object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

There is also an observer but it is deprecated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe

coderextreme commented 7 years ago

Duh, I studied Proxy in my ES6 book.

On Jan 20, 2017 9:20 AM, "Andreas Plesch" notifications@github.com wrote:

Instead of overriding there is now a Proxy object which lets you transparently trap standard js operations on a specific object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Reference/Global_Objects/Proxy

There is also an observer but it is deprecated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Reference/Global_Objects/Object/observe

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/create3000/cobweb/issues/32#issuecomment-274082708, or mute the thread https://github.com/notifications/unsubscribe-auth/AArE9-kUkS8qj3d5Z6DhKOSww3dH4k4kks5rUMKngaJpZM4LocFe .

coderextreme commented 7 years ago

Duh, I studied Proxy in my ES6 book I got for Xmas. Oops!

On Jan 20, 2017 9:20 AM, "Andreas Plesch" notifications@github.com wrote:

Instead of overriding there is now a Proxy object which lets you transparently trap standard js operations on a specific object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Reference/Global_Objects/Proxy

There is also an observer but it is deprecated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Reference/Global_Objects/Object/observe

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/create3000/cobweb/issues/32#issuecomment-274082708, or mute the thread https://github.com/notifications/unsubscribe-auth/AArE9-kUkS8qj3d5Z6DhKOSww3dH4k4kks5rUMKngaJpZM4LocFe .