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  
-20%
Le deal à ne pas rater :
-20% Récupérateur à eau mural 300 litres (Anthracite)
79 € 99 €
Voir le deal

 

 html/vrml

Go down 
4 posters
AuthorMessage
alain
fondateur
fondateur
alain


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

html/vrml Empty
PostSubject: html/vrml   html/vrml EmptyTue 11 Apr - 11:23

quand j'aurai le temps je regarderai ça , trouvé sur web3d

Quote :


legloups Ecrit le: samedi 08 avril 2006, 21:05

Salut,
Voilà, je dois créer une page html où il y a des vignettes représentant les caméras... Il faudrait que lorsque l'on appuie sur l'une de ces vignettes, ma scène vrml se place directement sur la bonne caméra...
Merci d'avance et bonne soirée


Jean-Michel Ecrit le: lundi 10 avril 2006, 22:12


Bin alors, personne répond ?

Si, dans ta page HTML, ton viewer Contact s'appelle cc3d (c'et souvent le cas)

par exemple :

height="100%" width="100%"
src="toto.wrl" >

tu peux ajouter une fonction javascript dans ta page HTML pour envoyer des events à ta page VRML :

function sendEvent(node, field, value)
{
cc3d.setNodeEventIn(node, field, value);
}

Si dans ta scène VRML tu as un truc du genre :
DEF vp Viewpoint {}

Dans ta page HTML, tu pourras appeler ta fonction javascript, coté HTML, comme cela :

sendEvent('vp', 'set_bind', 'true');

Tu peux insérer ca dans un onclick ou ailleurs
Back to top Go down
Flav'
+1000
+1000
Flav'


Number of posts : 1720
Age : 117
Registration date : 2005-06-10

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptyTue 11 Apr - 15:48

Ouahou c'est complexe ton truc là Oo enfin moi j'ai rien compris en tout cas Mad
Back to top Go down
alain
fondateur
fondateur
alain


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

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptyWed 12 Apr - 22:35

Quote :


Pour router une evenements depuis le noeud qui vient d'etre rajouté, n'utilise pas son DEF
(puisque venant d'un autre fichier, il existe dans un "monde parallel").
Il faut utiliser le noeud lui-meme afin de faire un Browser.addRoute()
Exemple:

CODE

Viewpoint{position 0 0 5}
DEF Test22 Transform2{
children [
Shape{
appearance Appearance{material Material{emissiveColor 1 1 1 diffuseColor 0 0 0}}
geometry DEF DESCRIPTIONtest Text {
string "nothing"
fontStyle FontStyle {
size 0.4
justify [ "MIDDLE" ]
}
}
}
]
}
DEF script_qui_cree_les_routes Script{
field SFNode DESCRIPTIONtest USE DESCRIPTIONtest
eventIn MFNode childrenAdded
directOutput TRUE
url "javascript:
function childrenAdded(v){
Browser.addRoute(v[0], 'text', DESCRIPTIONtest, 'set_string');
v[0].do_initialize = -1;
}
"

}
ROUTE Test22.childrenAdded TO script_qui_cree_les_routes.childrenAdded


DEF ChargMiniat Script{
field SFNode self7 USE Test22
url "javascript:
function initialize() {
var rapporteur = 'transform2_addchildren.wrl'; http://test.php
Browser.createVrmlFromURL(new MFString(rapporteur), self7, 'addChildren');
}
"
}



Et dans le fichier php :
CODE
Script {
eventIn SFTime do_initialize
eventOut MFString text
url "javascript:
function do_initialize(){text = new MFString('hello world');}
"
}



Juste, pour le Transform, j'ai utilisé un Transform2 a la place histoire d'un eventOut avec juste les noeuds ajoutés, mais il serait aussi possible de prendre un Transform normal et faire une route sur children et prendre le dernier élément par exemple.

CODE
PROTO Transform2 [
field SFVec3f bboxCenter 0 0 0
field SFVec3f bboxSize -1 -1 -1
exposedField SFVec3f translation 0 0 0
exposedField SFVec3f center 0 0 0
exposedField SFRotation rotation 0 0 1 0
exposedField SFVec3f scale 1 1 1
exposedField SFRotation scaleOrientation 0 0 1 0
exposedField MFNode children []
eventIn SFTime clear
eventIn MFNode addChildren
eventIn MFNode removeChildren
eventOut MFNode childrenAdded
eventOut MFNode childrenRemoved
]{
DEF gr Transform{
children IS children addChildren IS addChildren removeChildren IS removeChildren
translation IS translation center IS center rotation IS rotation scale IS scale
scaleOrientation IS scaleOrientation bboxCenter IS bboxCenter bboxSize IS bboxSize
}
DEF brain Script{
eventIn SFTime clear IS clear
eventIn MFNode addChildren IS addChildren
eventIn MFNode removeChildren IS removeChildren
eventOut MFNode childrenAdded IS childrenAdded
eventOut MFNode childrenRemoved IS childrenRemoved
eventOut MFNode remove
directOutput TRUE
url "javascript:
function addChildren(v){childrenAdded = v;}
function removeChildren(v){childrenRemoved = v;}
function clear(){childrenRemoved = gr.children; remove = gr.children; }
"
}
ROUTE brain.remove TO gr.removeChildren
}

Back to top Go down
Flav'
+1000
+1000
Flav'


Number of posts : 1720
Age : 117
Registration date : 2005-06-10

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptyThu 13 Apr - 9:14

Tu peux expliquer cette histoire de "noeud"? Car là tu me perds lol
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

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptyTue 2 May - 6:16

Hi all !

Does somebody know a way for getting the absolute x,y position on screen (in pixel) of a vrml node?

Please, tell me.

If it should be a browser specific solution, it should be for any CC3D based viewer (Blaxxun, BS), anyhow, I would rather prefer a standard solution.

Thankies,

pig
Back to top Go down
alain
fondateur
fondateur
alain


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

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptyTue 2 May - 10:03

I got that on web3d-fr.com
Quote :


DEF Scr Script {
eventIn SFVec3f touchPoint
eventIn SFTime touchTime
field SFVec3f oldTouch 0 0 0
url"javascript:
function touchPoint() {
Browser.setDescription(oldTouch.toString());
}
function touchTime(value,time) {
oldTouch=new SFVec3f(touchPoint);
}
"
}

] }

ROUTE TS.hitPoint_changed TO Scr.touchPoint
ROUTE TS.touchTime TO Scr.touchTime

I will go to check who made it and what he said about ....,
I just copied it :
here it is on a sphere but you can adapt it I guess ...:

http://perso.wanadoo.fr/alaindumenieu/artvrml/wrl/touchcoordonnees.wrl

( hello Peter !!! of course you are on the black list for Paris ! of course !!!

you will see I am ready to tell when and where we will meet to eat at midi ! hihihi
Back to top Go down
magnus
+200
+200
magnus


Number of posts : 367
Registration date : 2006-11-21

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptySun 5 Aug - 20:12

Test de présentation d'avatar

Je cherche à faire les gestures dans le html avec le javascript exemple avec erreur :
Quote :
function active(value)
{
document.CC3D.setNodeField("gesture","set_startTime","TRUE", value);
}
Pour pouvoir mettre des pages qui seraient comme ça :

html/vrml Tesava10

OK pour le RETOUR fait revenir à la page précédente de l'historique.
OK pour TORCHE j'ai repris "function showHeadlight()".
Pour SUIVANT, je n'est pas encors décidé.
Par contre ce sont les Animations que je cherche à faire aller mais ce n'est pas avec le :
Quote :
function sendGesture( value )
{
sendEvent("SharedZone", "set_myAvatarGesture", value);
}
Ce qui anime notre avatar dans la scéne où je montre l'avatar.
Dur de trouver cette fonction html (javascript) pour ce vrml.
Et ainsi de ne pas le faire en vrml avec la réutilisation du lien : monavtest d'Alain
Je fais un tour par ce lien : blaxxun Developer Information Avatars
ou par la traduction Google : l'information de réalisateur de blaxxun Avatars
Back to top Go down
alain
fondateur
fondateur
alain


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

html/vrml Empty
PostSubject: Re: html/vrml   html/vrml EmptySun 5 Aug - 22:48

hum moi j'avais "archivé " ça parce que je ne savais plus à qui c'était ,
'( et me souviens plus non plus Sad

http://dumenieu.free.fr/vrml/avatarspublic/monavtest.html


et Thyme a un truc de ce genre avec des petites boxes pour cliquer les gestures , tu as dû voir ça ..

mais c'est pas html / vrml ......
Back to top Go down
Sponsored content





html/vrml Empty
PostSubject: Re: html/vrml   html/vrml Empty

Back to top Go down
 
html/vrml
Back to top 
Page 1 of 1
 Similar topics
-
» Chat HTML - VRML dans PHP
» World Magic Park
» Balises HTML accéptés
» http://www.uzine.net/article1073.html
» http://accad.osu.edu/~pgerstma/protolib/index.html

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