Thursday, November 05, 2009

Smalltalk Sophie XUL in 3D for Croquet / Krestianstvo space description - разметка пространства в 3D

In this post I want to show, how the Sophie's 1.x (the true project, based on Smalltalk and not Java's one) XUL 2D logic for describing Tweak interfaces, could be used for describing 3D content of the Croquet spaces naturally.
Now it is included in Krestianstvo SDK, as XUL 3D feature.
To try out and to extend for the concrete needs, check for the recent updates from the SDK.

1. So, one could describe the content in plain XML file/string, like:
КрестьянствоБиблиотека class>>примерXUL3DSpacexml

^'<?xml version="1.0"?>
<krestianstvo3D>
<space name="mySpace">
<imageWindow name="one" src ="checker.png" x="-10" y="0" z="-5"/>
<imageWindow name="two" src ="checker.png" x="10" y="0" z="-5"/>
</space>
<imageWindow name="three" src ="checker.png" x="-10" y="0" z="-5"/>
<space name="mySpaceA">
<imageWindow name="some" src ="checker.png" x="-10" y="0" z="-5"/>
<imageWindow name="other" src ="checker.png" x="10" y="0" z="-5"/>
</space>
<!-- ..etc... -->
</krestianstvo3D>'
2. Then this file is parsed into the real objects, node by node:
Крестьянство3DXulЗагрузчик>>readXmlFrom: xmlNode

|tframeClass tframe|

tframeClass := self croquetFrames at: xmlNode name ifAbsent:[nil].
tframeClass ifNotNil:[tframe := tframeClass new readXmlFrom: xmlNode in: self.].

^tframe
3. Every XML node is parsed according to the methods defined in Крестьянство3DXulЗагрузчик class, for example 'imageWindow' is parsed as TWindow instance:
Крестьянство3DXulЗагрузчик>>readWindowFrame: aFrame from: xmlNode

| attr pic p attrX attrY attrZ matNorm |

(attr := xmlNode attributeAt: 'name') ifNotNil:[
nodeAttributes remove:'name'.
aFrame objectName: attr asSymbol.
].

(attr := xmlNode attributeAt: 'src') ifNotNil:[
nodeAttributes remove:'src'.

p := TRectangle new.
aFrame contents: p.

(attr asString) ifNotNil:[
pic := TTexture new.
pic initializeWithFileName: (attr asString)
mipmap: true
shrinkFit: false.
].
p texture: pic.
aFrame extent: pic extent.].
matNorm := TMaterial new.
matNorm ambientColor: #(0.8 0.8 0.8 0.8).
matNorm diffuseColor: #(0.8 0.8 0.8 0.8).
aFrame rectFront material: matNorm.

"...........ect......"
4. In TWindow class (or any other needed TFrame subclass) we add the method, which points to the method to parse the XML node with:
TWindow>>readFrame3DSpecificFrom: xmlNode in: uiLoader

super readFrame3DSpecificFrom: xmlNode in: uiLoader.
uiLoader readWindowFrame: self from: xmlNode
5. All, recognizable names of XML tags are defined in :
Крестьянство3DXulЗагрузчик class>>croquetFrames

^Dictionary newFrom:
{
#imageWindow ->TWindow.
#space ->TSpace.
#window -> TWindow.
#portal -> TPortal;
"any other stuff"
}
6. Finally, the created instances are serialized on to the shared island:
КрестьянствоОснова>>addTFToSpace: aFrame space: aSpace

| frameData tframe |

frameData := TIslandCopier new export: aFrame.
tframe := TIslandCopier new import: frameData to: self activeIsland.
tframe := aFrame copyOntoIsland: self activeIsland.

tframe future registerGlobal: aFrame objectName.
aSpace future addChild: tframe.
..and appeared in the World for collaborative interaction..


As a note: the Tweak menu bar on the top of the Participant window is described using the native Sophie's XUL 2D logic also.

58 Comments:

Anonymous Anonymous said...

buy generic xanax online safest way to order xanax online - xanax overdose icd-9 code

4:08 pm  
Anonymous Anonymous said...

generic xanax xanax extended release - generic xanax .5

5:28 pm  
Anonymous Anonymous said...

buy tramadol online buy tramadol 50 mg online - help with tramadol addiction

6:46 am  
Anonymous Anonymous said...

buy xanax 2mg xanax overdose how many - how to order xanax online no prescription

6:48 am  
Anonymous Anonymous said...

generic xanax generic xanax rating - xanax overdose pathophysiology

7:26 am  
Anonymous Anonymous said...

xanax online xanax home drug test - xanax generic pills look like

9:07 pm  
Anonymous Anonymous said...

buy carisoprodol soma carisoprodol no prescription - carisoprodol 350 mg effects

3:02 pm  
Anonymous Anonymous said...

buy tramadol online tramadol dosage humans weight - buy tramadol online visa

4:01 pm  
Anonymous Anonymous said...

generic xanax xanax schedule 1 drug - buy xanax online from india

7:29 pm  
Anonymous Anonymous said...

buy tramadol cod next day delivery buy tramadol online in australia - buy tramadol cod shipping

7:41 pm  
Anonymous Anonymous said...

xanax online xanax.drugs.com - xanax side effects mixed alcohol

8:07 am  
Anonymous Anonymous said...

purchase tramadol buy tramadol online checking account - tramadol hcl 60 mg

10:22 am  
Anonymous Anonymous said...

buy tramadol online tramadol dosage strength - buy tramadol order cheap tramadol online

3:07 pm  
Anonymous Anonymous said...

xanax buy pills not take xanax - xanax drug test duration

10:00 pm  
Anonymous Anonymous said...

buy tramadol online order tramadol online usa - where can i buy tramadol online

7:49 am  
Anonymous Anonymous said...

buy carisoprodol carisoprodol us - order vicodin online no prescription needed

4:48 pm  
Anonymous Anonymous said...

xanax online xanax online to buy - qualitest 2mg xanax

7:49 pm  
Anonymous Anonymous said...

generic xanax can fail drug test xanax - xanax side effects memory loss

8:29 pm  
Anonymous Anonymous said...

buy tramadol no prescription tramadol hcl xr 200 mg - tramadol zolpidem

3:54 am  
Anonymous Anonymous said...

xanax online can you still buy xanax online - can you buy xanax in australia

1:27 pm  
Anonymous Anonymous said...

buy carisoprodol uses for carisoprodol 350 mg - medicine carisoprodol 350 mg

8:30 pm  
Anonymous Anonymous said...

buy cialis no prescription order cialis at online pharmacy - cialis reviews patients

7:33 pm  
Anonymous Anonymous said...

xanax online generic for xanax side effects - kinda drug xanax

12:31 pm  
Anonymous Anonymous said...

buy cialis online buy cialis online greece - order viagra or cialis online

12:44 pm  
Anonymous Anonymous said...

buy tramadol online ultram side effects weight loss - tramadol high buzz

12:44 pm  
Anonymous Anonymous said...

xanax generic xanax depression - xanax withdrawal + valerian root

10:29 pm  
Anonymous Anonymous said...

buy cialis online cialis daily nhs - cialis daily does it work

10:39 pm  
Anonymous Anonymous said...

buy cialis online cialis hong kong price - order cialis online mastercard

1:59 pm  
Anonymous Anonymous said...

buy cialis online order generic cialis online - purchase cialis online usa

6:47 am  
Anonymous Anonymous said...

xanax online all kinds xanax pills - generic xanax pills look like

11:28 pm  
Anonymous Anonymous said...

cialis online buy cialis toronto - buy cialis online malaysia

6:51 am  
Anonymous Anonymous said...

learn how to buy tramdadol tramadol withdrawal 2012 - tramadol shipped with no prescription

7:47 am  
Anonymous Anonymous said...

buy tramadol order tramadol with mastercard - buy tramadol online usa

11:38 am  
Anonymous Anonymous said...

http://landvoicelearning.com/#38471 buy tramadol cheap no prescription - tramadol saturday delivery no prescription

10:54 am  
Anonymous Anonymous said...

buy tramadol order tramadol online safely - tramadol overdose quantity

3:47 am  
Anonymous Anonymous said...

http://blog.dawn.com/dblog/buy/#21563 buy tramadol online free shipping - tramadol dosage 150 mg

5:10 pm  
Anonymous Anonymous said...

http://buytramadolonlinecool.com/#30694 best place buy tramadol - is tramadol/ultram an opiate

8:10 pm  
Anonymous Anonymous said...

http://blog.dawn.com/dblog/buy/#fda tramadol mg - can you buy tramadol online in usa

8:26 pm  
Anonymous Anonymous said...

buy tramadol online tramadol 50mg how many - tramadol good opiate withdrawal

2:58 am  
Anonymous Anonymous said...

buy tramadol online tramadol withdrawal buprenorphine - has anyone ordered tramadol online

9:45 am  
Anonymous Anonymous said...

buy tramadol overnight side effects to tramadol 50mg - tramadol for dogs half life

1:10 pm  
Anonymous Anonymous said...

ways to buy ativan online xanax vs ativan comparison - buy ativan us

12:32 am  
Anonymous Anonymous said...

ways to buy ativan online ativan side effects women - ativan withdrawal back pain

12:34 pm  
Anonymous Anonymous said...

buy ativan what is apo-lorazepam 1mg used for - overdose on ativan how much

10:00 pm  
Anonymous Anonymous said...

http://reidmoody.com/#65473 ativan for high blood pressure - ativan 8 mg

9:25 pm  
Anonymous Anonymous said...

buy ativan online generic for ativan - where can i buy lorazepam online

2:10 pm  
Anonymous Anonymous said...

alprazolam without prescription blue round xanax generic - xanax xr dosage duration

12:24 pm  
Anonymous Anonymous said...

http://ranchodelastortugas.com/#71453 xanax and employment drug test - xanax 1mg get high

9:32 am  
Anonymous Anonymous said...

buy tramadol online tramadol hcl 50 mg drug interactions - online purchase of tramadol

11:26 am  
Anonymous Anonymous said...

http://staam.org/#56274 tramadol cheap - cheap tramadol overnight delivery

4:45 am  
Anonymous Anonymous said...

buy xanax online 3 1mg xanax - buying xanax from canada online

5:13 am  
Anonymous Anonymous said...

Wow, incredible weblog structure! How long have you been blogging for?
you made running a blog glance easy. The overall look of your website
is fantastic, as well as the content material!


Look into my page :: josh pellicer tao system

4:49 am  
Anonymous Anonymous said...

It's great that you are getting ideas from this post as well as from our dialogue made at this time.

my web site ... where can i buy the tao of badass

5:02 am  
Anonymous Anonymous said...

I will immediately clutch your rss as I can not find your e-mail subscription link or e-newsletter service.
Do you've any? Please permit me understand so that I could subscribe. Thanks.

my blog post - joshua pellicer pdf

5:11 am  
Anonymous Anonymous said...

hello there and thank you for your info – I have definitely picked up something new from right here.
I did however expertise some technical issues using this web site, since I experienced
to reload the website many times previous to I could get it to load correctly.
I had been wondering if your hosting is OK? Not that I'm complaining, but sluggish loading instances times will often affect your placement in google and can damage your quality score if ads and marketing with Adwords. Well I am adding this RSS to my e-mail and could look out for much more of your respective fascinating content. Make sure you update this again very soon.

Feel free to surf to my weblog the tao system joshua pellicer

5:20 am  
Anonymous Anonymous said...

Attractive section of content. I just stumbled upon your site and in accession capital to assert that I
get actually enjoyed account your blog posts. Anyway I'll be subscribing to your augment and even I achievement you access consistently quickly.

Also visit my page; tao system josh

5:41 am  
Anonymous Anonymous said...

Ahaa, its good dialogue about this post at this place at this blog, I have read all that, so now me also commenting here.


Feel free to visit my website - tao of the badass pdf

5:51 am  
Anonymous Anonymous said...

Ahaa, its good dialogue about this post at this place at this blog, I have
read all that, so now me also commenting here.

Visit my page; tao of the badass pdf

5:51 am  

Post a Comment

<< Home