CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

Le topic sur les maladies du au pc?

BigDams
BigDams
Niveau 10
25 janvier 2005 à 01:37:31

DEF rootScript Script {
eventIn SFTime addParticle

field SFNode particleShape Shape {
geometry Sphere {
radius 3
}
appearance Appearance {
material Material {
diffuseColor 0 0 . 02
specularColor . 88 . 88 . 88
emissiveColor 0 0 . 37
shininess . 24
ambientIntensity . 0633
transparency . 59
}
}
}

field SFInt32 maxParticle 150
field SFFloat gravity -.2
field SFFloat inertia . 5
field SFFloat minStrength 0
field SFFloat maxStrength . 1
field SFFloat minRotateSpeed -5
field SFFloat maxRotateSpeed 5
field SFFloat minScale . 1
field SFFloat maxScale . 15
field SFTime minDeathTime 5
field SFTime maxDeathTime 5

field SFTime initTime 0
field SFTime localTime 0
field SFTime currentTime 0
field SFTime memoryTime 0
field SFTime deathTime 0
field SFInt32 index 0
field SFInt32 particleIndex 0
field SFInt32 particleNumber 0
field SFVec3f memVec3f 0 0 0
field SFVec3f randomPosition 0 0 0
field SFVec3f currentHitPoint 0 0 0
field SFVec3f memoryHitPoint 0 0 0
field SFVec3f position 0 0 0
field SFVec3f direction 0 0 0
field SFVec3f speed 0 0 0
field SFVec3f scale 0 0 0
field MFVec3f angle []
field MFVec3f pulsation []
field SFRotation rotation 0 1 0 0
field SFNode rootTimeSensor USE rootTimeSensor
field SFNode particleTransform NULL
field SFNode particleScript NULL
eventOut MFNode children_changed
url [
"javascript:
function addParticle(currentTime){
if(initTime==0) {
initTime=currentTime;
for ( index=0;index<30;index++){
angle[index]=new
SFVec3f(Math.random()*2-1,Math.random()*2-1,Math.r
andom()*2-1);
pulsation[index]=new
SFVec3f(Math.random()*3-1.5,Math.random()*3-1.5,Ma
th.random()*2-1);
}
}
localTime=currentTime-initTime;
for ( index=0;index<30;index++){

memVec3f.x+=Math.sin(angle[index].x+pulsation[
index].x*localTime);

memVec3f.y+=Math.sin(angle[index].y+pulsation[
index].y*localTime);

memVec3f.z+=Math.sin(angle[index].z+pulsation[
index].z*localTime);
}
randomPosition=memVec3f.multiply(.8);
memVec3f.x=0;
memVec3f.y=0;
memVec3f.z=0;
if(particleIndex==0){
children_changed[0]=rootTimeSensor;
}
if(particleIndex>=maxParticle){
particleIndex--;
for(index=2;index<maxParticle;index++){

children_changed[index-1]=children_changed[in
dex];
}
children_changed[particleIndex]=new SFNode ( );
}
position=randomPosition;

speed=position.subtract(memoryHitPoint).divide(
currentTime-memoryTime);
rotation=new
SFRotation(rand(2,-1),rand(2,-1),rand(2,-1),rand(2

  • Math.PI,0));

direction=rotation.getAxis().multiply(1/rotatio
n.getAxis().length()*rand(maxStrength-minStrength,
minStrength));
scale=new
SFVec3f(rand(maxScale-minScale,minScale),rand(maxS
cale-minScale,minScale),rand(maxScale-minScale,min
Scale));

deathTime=rand(maxDeathTime-minDeathTime,minDea
thTime);
particleTransform=new SFNode(
´DEF particleTransform´+particleNumber+´ Transform {´+
´translation ´+position.toString()+´ ´+
´rotation ´+rotation.toString()+´ ´+
´scale ´+scale.toString()+´ ´+
´}´
);
particleScript=new SFNode(
´DEF particleScript´+particleNumber+´ Script {´+
´eventIn SFTime setTime ´+
´field SFTime initTime ´+currentTime+´ ´+
´field SFTime currentTime 0´+
´field SFTime localTime 0´+
´field SFVec3f speed ´+speed.toString()+´ ´+
´field SFVec3f position ´+position.toString()+´ ´+
´field SFVec3f direction ´+direction.toString()+´ ´+
´field SFTime deathTime ´+deathTime+´ ´+
´field SFVec3f scale ´+scale.toString()+´ ´+
´eventOut SFVec3f position_changed ´+
´eventOut SFRotation rotation_changed ´+
´eventOut MFNode children_changed ´+
´eventOut SFVec3f scale_changed ´+
´url [´+
´\"javascript:´+
´function setTime(currentTime) {´+
´localTime=currentTime-initTime;´+

´position_changed=position.add(direction.mul
tiply(Math.sqrt(localTime)*5)).add(speed.multiply(
Math.sqrt(localTime)*´+(inertia/5)+´));´+

´position_changed.y-=Math.pow(localTime,2)*´
+gravity+´;´+

´rotation_changed.angle=localTime*´+rand(max
RotateSpeed-minRotateSpeed,minRotateSpeed)+´;´+

´scale_changed=scale.multiply(Math.sqrt(Math
.abs(1-(localTime/deathTime))));´+
´if(localTime>deathTime) {´+
´children_changed[1]=new SFNode();´+
´}´+
´}´+
´\"´+
´]´+
´}´
);
particleTransform.children[0]=particleShape;
particleTransform.children[1]=particleScript;

children_changed[particleIndex]=particleTransfo
rm;

Browser.addRoute(rootTimeSensor,´time´,particle
Script,´setTime´);

Browser.addRoute(particleScript,´position_chang
ed´,particleTransform,´set_translation´);

Browser.addRoute(particleScript,´rotation_chang
ed´,particleTransform,´set_rotation´);

Browser.addRoute(particleScript,´children_chang
ed´,particleTransform,´children´);

Browser.addRoute(particleScript,´scale_changed´
,particleTransform,´set_scale´);
if(currentTime-memoryTime>.1){
memoryHitPoint=position;
memoryTime=currentTime;
}
particleNumber++;
particleIndex++;
}
function rand(plage,origine) {
if ( plage==0) {
return origine;
} else
return
Math.round((Math.random()*plage*1000)+origine*1000
)/1000;
}"
]
}
ROUTE rootTimeSensor.time TO rootScript.addParticle
ROUTE rootScript.children_changed TO rootTransform.children

voila le code :-)

Ubi-Soft
Ubi-Soft
Niveau 10
25 janvier 2005 à 01:39:25

merci

Ubi-Soft
Ubi-Soft
Niveau 10
25 janvier 2005 à 01:40:01

je le sauve en . txt?

BigDams
BigDams
Niveau 10
25 janvier 2005 à 01:41:27

tu ne vas pas aller bien loin avec ça :)
il manque le début du code

  1. VRML V2.0 utf8

PointLight{
intensity 0.5
location -6.84 31.9 18.6
radius 86.8
}
PointLight{
intensity 0.4
color . 4 . 35 . 52
location 5.31 -10.4 9.64
radius 86.8
}
PointLight{
intensity 0.7
color 0.976 0.906 0.784
location 18.7 42 -29
radius 86.8
}
Background{
groundColor [0 0 0,0.02 0.07 0.2]
groundAngle [1.52]
skyColor [0.3 0.3 0.4,0.02 0.07 0.2]
skyAngle 1.52
}
NavigationInfo{
headlight FALSE
}

Viewpoint {
position 1.5 0 11
fieldOfView 1
}
DEF rootTransform Collision {
collide FALSE
}
DEF rootTimeSensor TimeSensor {
loop TRUE
}

il faut enregistrer tout ça en . WRL depuis le bloc note
ensuite il faut un viewer vrml, à moins que ton navigateur n´en dispose déja ( ie n´en a pas...)

Ubi-Soft
Ubi-Soft
Niveau 10
25 janvier 2005 à 01:43:00

jai des prob avec blender je fai add,mesh CUBE met kan je change de vue je voi rien aucun cube

BigDams
BigDams
Niveau 10
25 janvier 2005 à 01:44:56

http://apia.u-strasbg.fr/vrml/ressources/cosmo/cosmo_win95nt_fr.exe
un viewer 3d

c´est normal par défaut blender ne dessine pas les géométries, juste les repères

Ubi-Soft
Ubi-Soft
Niveau 10
25 janvier 2005 à 01:48:30

cmt je met les geometry pcq mon avion fai dur on la voi pas

[-The_Squall-]
[-The_Squall-]
Niveau 4
25 janvier 2005 à 05:29:18

:lol:

Sous forums
  • Aide à l'achat Mac
  • Macintosh
  • Création de Jeux
  • Programmation
  • Création de sites web
  • Linux
  • Internet
  • Steam Deck
  • Hardware
La vidéo du moment