for webgl from jacinto : ceci et un fichier html qui ne foncionera que sur internet pas en local ! [code]<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="http://www.costoso.net/webgl/x3dom.css"> <script src="http://www.costoso.net/webgl/Detector.js"></script> <script src="http://www.x3dom.org/x3dom/example/x3dom.js"></script> <style> html {width:100%;height:100%;margin:0;padding:0;} body {margin:0;padding:0px;width:100%;height:100%;} #the_element { width: 100%; height: 100%; border: none; display: block; position:relative; //background:#000 url(http://www.x3dom.org/x3dom/example/texture/solarSystem/starsbg.png); background: black; } #name { position: absolute; float: left; z-index: 1; bottom: 0px; left: 0px; width: 20em; height: 2em; border: none; background-color: black; color: #ccc; } #toggler { position: absolute; float: left; z-index: 1; top: 0px; left: 0px; width: 10em; height: 2em; border: none; background-color: #202021; color: #ccc; } #toggler:hover { background-color:blue; } </style> <script> if (!window.WebGLRenderingContext) { // the browser doesn't even know what WebGL is window.location = "http://get.webgl.org"; // parent.location.href = 'http://www.costoso.net/wakka.php?wiki=GetWebgl'; } else { var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("webgl"); if (!context) { // browser supports WebGL but initialization failed. //parent.location.href = 'http://www.costoso.net/wakka.php?wiki=NoWebgl'; window.location = "http://get.webgl.org/troubleshooting"; } } var zoomed = false; function toggle(button) { var new_size; var x3d_element; x3d_element = document.getElementById('the_element'); // title = document.getElementById('title') // body = document.getElementById('body') if (zoomed) { // new_size = "50%"; // button.innerHTML = "Zoom"; // title.style.display = "block" // body.style.padding = '10px' // TUTO JICER : ICI dessous TU MAIS LA PAGE DE RETOUR a la place de http://www.costoso.net/wakka.php?wiki=SauT top.location.href = 'http://www.costoso.net/wakka.php?wiki=SauT'; } else { new_size = "100%"; button.innerHTML = "Unzoom"; title.style.display = "none" body.style.padding = '0' } function name(button1) { } zoomed = !zoomed; x3d_element.style.width = new_size; x3d_element.style.height = new_size; } function full() { var new_size; var x3d_element; x3d_element = document.getElementById('the_element'); new_size = "100%"; x3d_element.style.width = new_size; x3d_element.style.height = new_size; } </script> </head> <!-- onload="full();" --> <body id="body"> <!-- <body onload="full();"> --> <h1 id="title">Styling tutorial 4</h1> <x3d id="the_element" showlog="false" showstat="false"> <button id="toggler" onclick="toggle(this); return false;">back</button> // TUTO JICER : ICI dessous TU MET LE TITRE ET LE NOM DE L'OEUVRE a la place de Saut © Jacinto Costoso -2013- <button1 id="name" onclick="name(this); return false;">Saut © Jacinto Costoso -2013-</button1> <script language="JavaScript">toggle(true);</script> <scene> // TUTO JICER : ICI dessous TU METles INLINES au format X3D ou X3DVZ a la place de http://www.costoso.net/webgl/saut.x3dvz <inline url='"http://www.costoso.net/webgl/saut.x3dvz"'></inline> </scene> </x3d> </body> </html> [/code] X3D from vrml : http://doc.instantreality.org/tools/x3d_encoding_converter/ _________________________________________________________________________ |
Contents.................... |
_______________________________________________________________________ |