LouiZeForum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
LouiZeForum

3D vrml
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  3Dchats / forums3Dchats / forums  

 

 random

Go down 
4 posters
AuthorMessage
alain
fondateur
fondateur
alain


Number of posts : 23529
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

random Empty
PostSubject: random   random EmptyWed 6 May - 10:53

what's the hell ?? !!

I wanted to re take a look at a tuto they have on web3d-fr ,
about random and createVrmlFromString

and !
it works with blaxxun but not for BS !!!


Code:
#VRML V2.0 utf8

 ##### http://209.85.229.132/search?q=cache:XiL9S6pWAKUJ:www.web3d-fr.com/tutoriels/Ateliers/CreateVrmlFromString/step_05.txt+CreateVrmlFromString+step_05.txt&cd=1&hl=fr&ct=clnk&gl=fr

########step 5

#*** GENERALITES **************************************************

NavigationInfo {
   type ["WALK"]
   avatarSize [.1 1.6 2]
   headlight FALSE
   speed 5
}

Background{
   skyAngle [  1.1 1.57 ]
   skyColor [  .3 .3 1 .4 .4 1 .7 .7 .9 ]
}

DirectionalLight {
   direction 0 -.5 -1
   intensity 1
}
DirectionalLight {
   direction -1 -.5 .5
   intensity .9
}
DirectionalLight {
   direction 1 -.5 .5
   intensity .8
}

#*** MONDE ********************************************************

Viewpoint {
   position 50 1.6 150
   description   "Entry"
}

Viewpoint {
   position 50 200 50
   orientation   1 0 0 -1.54
   description   "Plan"
}

Shape {
   appearance Appearance {
      material Material {
         diffuseColor .3 .3 1
         transparency .1
      }
   }
   geometry Box {
      size 1000 0.01 1000
   }
}

DEF   ROOT Transform {}

#*** SCRIPT *******************************************************

Script {
   field SFNode ROOT USE ROOT
   url   "javascript:
      function R(){
         return Math.random();
      }

      function initialize(){

         for(i=0;i<30;i++){

            string=   'Transform {                              '+
                  '   translation   '+100*R()+' 0 '+100*R()+'            '+
                  '   children [                        '+
                  '      Shape {                        '+
                  '         appearance Appearance {               '+
                  '            material Material {            '+
                  '               diffuseColor '+R()+' '+R()+' '+R()+'   '+
                  '            }                  '+
                  '         }                     '+
                  '         geometry Box {                  '+
                  '            size '+20*R()+' '+40*R()+' '+20*R()+'      '+
                  '         }                     '+
                  '      }                        '+
                  '   ]                           '+
                  '}                              ';

            newNode = Browser.createVrmlFromString(string);

            ROOT.children[i]=newNode[0];
         }
      }
   "
}


and


Code:
#*** http://209.85.229.132/search?q=cache:X3GuGzphZPoJ:www.web3d-fr.com/tutoriels/Ateliers/CreateVrmlFromString/step_03.txt+CreateVrmlFromString+step_03.txt&cd=1&hl=fr&ct=clnk&gl=fr
########MONDE step_03 ********************************************************

Viewpoint {
   position 50 10 150
}

DEF   ROOT Transform {}

#*** SCRIPT *******************************************************

Script {
   field SFNode ROOT USE ROOT
   url   "javascript:
      function R(){
         return Math.random();
      }

      function initialize(){

         string=   'Transform {                              '+
               '   translation   '+100*R()+' 0 '+100*R()+'            '+
               '   children [                        '+
               '      Shape {                        '+
               '         appearance Appearance {               '+
               '            material Material {            '+
               '               diffuseColor '+R()+' '+R()+' '+R()+'   '+
               '            }                  '+
               '         }                     '+
               '         geometry Box {                  '+
               '            size '+20*R()+' '+40*R()+' '+20*R()+'      '+
               '         }                     '+
               '      }                        '+
               '   ]                           '+
               '}                              ';
         
         newNode = Browser.createVrmlFromString(string);

         ROOT.children=newNode;
      }
   "
}

same for you ??

and why ????
Back to top Go down
peter le cochon
+1000
+1000
peter le cochon


Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 13:12

Sad

Sorry, I can not try anything on BS because I am running IE 8 and BS does not support it.

So guys : don't you ever install IE 8 if you want to use BS !!!!

Anyway : I don't want to uninstall IE 8 because I need to know how far the stuff I am doing is working properly under IE 8.

I can't see anything wrong on your code :

I don't think that BS did drop anything usefull from Blaxx's ecmascript interpreter, so Math.random() should not be a problem for it.

BS did probably drop some old Blaxx bug ...

Maybe, BS does not allow to construct a new MFNode by using createVrmlFromString().

So, just try out this :

newNode=new MFNode();
newNode=Browser.createVrmlFromString(string);
ROOT.children[i]=newNode[0];

Also try a short version :

ROOT.children[ROOT.children.length]=Browser.createVrmlFromString(string);

This assuming that you can add an MFNode to the children of an MFNode.

Otherwise try :

ROOT.children=Browser.createVrmlFromString(string);


May be it works, lol.

TC

Peter
Back to top Go down
alain
fondateur
fondateur
alain


Number of posts : 23529
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 17:21

LOL thanx but I am more lost Smile

here are my previous versions

http://dumenieu.free.fr/louizeforum/random3.wrl

http://dumenieu.free.fr/louizeforum/random5.wrl

then I tried your ideas

http://dumenieu.free.fr/louizeforum/random33.wrl

BS and blaxx says

Use of unitialized local var i in function initializein Script
Arrary subscript must be number in function initializein Script


and for http://dumenieu.free.fr/louizeforum/random333.wrl

it says notning wrong but all is black Sad



REEDIT !!!!!!!!!!

arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrgggggggggggg

!!!!

I had a bug I guess !! *****

now all is OK even my previous versions 3 and 5 !

very sorry , Peter to watse your time

I understand nothing of what happened Sad


*** or it was not OK in local ,

but on the web it is !!
Back to top Go down
tutancamon
+200
+200



Number of posts : 685
Age : 62
Localisation : Europa / România / Bucuresti
Registration date : 2007-09-07

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 18:01

Maybe he will work if You will put that file on another folder. Try to make a new folder on C root.
Quote :
C:\folder\yourFile.wrl
At me work BS Contact 7.1
I use SP2 and IExplorer 8 ...
If You have wrl files on My Documents, is posible that there, Blaxxun to show just a black screen ...

And ather point: is posible to work well again, just after You will reinstall Blaxxun ... Also is usefule to clean his cache memmory ...
Smile
Back to top Go down
http://vrmlserver.xooit.com/index.php
alain
fondateur
fondateur
alain


Number of posts : 23529
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 18:09

thanks but btw it is OK now in any place ,
so I think I had been wrong ro refresh Sad

can't remember what I did Sad

sorry to waste your time , guys
Back to top Go down
tutancamon
+200
+200



Number of posts : 685
Age : 62
Localisation : Europa / România / Bucuresti
Registration date : 2007-09-07

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 18:11

alain wrote:
thanks but btw it is OK now in any place ,
so I think I had been wrong ro refresh Sad

can't remember what I did Sad

sorry to waste your time , guys
Very Happy
none wasting time !
It was a pleasure to talk about what I know .
Laughing
Back to top Go down
http://vrmlserver.xooit.com/index.php
alain
fondateur
fondateur
alain


Number of posts : 23529
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 18:12

thanks but btw it is OK now in any place ,
so I think I had been wrong ro refresh

can't remember what I did

sorry to waste your time , guys

anyways I like the random way , it is very funny ,
I want that for my wife or children or dogs ,
imagine each day you have a random version of your wife or dog or children ,

or ..yourself ! loooooooool
Back to top Go down
tutancamon
+200
+200



Number of posts : 685
Age : 62
Localisation : Europa / România / Bucuresti
Registration date : 2007-09-07

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 18:19

alain wrote:
[...] each day you have a random version of your wife or dog or children [...]
This is 'ZEBULON' effect ! Laughing
Back to top Go down
http://vrmlserver.xooit.com/index.php
peter le cochon
+1000
+1000
peter le cochon


Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 19:01

tutancamon wrote:

At me work BS Contact 7.1
I use SP2 and IExplorer 8 ...

Hi Tut!

IE 8 and BS 7.1 ... why does this couple refuse work on my computer?

Any idea?

Peter
Back to top Go down
X
+200
+200
X


Number of posts : 564
Age : 78
Localisation : Canada
Registration date : 2005-05-09

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 19:35

hI GUYS!

Random 3 & 5 work here on blaxx 5.1
will test 5 as RANDOM ruins for Australia or New York OR Paris this evening in X-Robotica
fun toys for me to play with today!

merci who? tut? alain? Peter?

Very Happy ColiX
PS. have not received any e-mails in 5 days -- please resend any here via PM. Will call Sympatico today.
Back to top Go down
http://cyberhenge.ca
alain
fondateur
fondateur
alain


Number of posts : 23529
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 19:40

hello Colin ,
the tuto I used is here

http://www.web3d-fr.com/tutoriels/Ateliers/CreateVrmlFromString/atelier.php

and ..take a look at MixED thread , Jack will show us the jacinto's vernissage live lol
Back to top Go down
tutancamon
+200
+200



Number of posts : 685
Age : 62
Localisation : Europa / România / Bucuresti
Registration date : 2007-09-07

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 19:48

peter le cochon wrote:
tutancamon wrote:

At me work BS Contact 7.1
I use SP2 and IExplorer 8 ...

Hi Tut!

IE 8 and BS 7.1 ... why does this couple refuse work on my computer?

Any idea?

Peter
Probably 'ZEBULON' is also at You ... Be carefuly ! Is very, very dangerous !
You are a clone of that old Peter the pig ?
Or You are a Peter release ...
You must keep the original version. Maybe is necesary to make a restore ...

Shocked
Back to top Go down
http://vrmlserver.xooit.com/index.php
tutancamon
+200
+200



Number of posts : 685
Age : 62
Localisation : Europa / România / Bucuresti
Registration date : 2007-09-07

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 19:56

X wrote:
[...] tut? alain? [...]
Hi X !
Maybe is from flu of porcine.
Peter is healthy?
Swine flu creates many controversies ...
scratch
Back to top Go down
http://vrmlserver.xooit.com/index.php
X
+200
+200
X


Number of posts : 564
Age : 78
Localisation : Canada
Registration date : 2005-05-09

random Empty
PostSubject: Re: random   random EmptyWed 6 May - 20:40

YES TUT

pig le cochon has the Swine Flu pig


random Pig-fly



pig We are all going to die!! Oink!! oink!! pig


Very Happy X
Back to top Go down
http://cyberhenge.ca
Sponsored content





random Empty
PostSubject: Re: random   random Empty

Back to top Go down
 
random
Back to top 
Page 1 of 1
 Similar topics
-
» clock et random

Permissions in this forum:You cannot reply to topics in this forum
LouiZeForum :: ARTS :: 3D art :: Script-
Jump to: