MediaWiki:Common.js: различия между версиями
Перейти к навигации
Перейти к поиску
(WebGL example) |
(WebGL example) |
||
Строка 5: | Строка 5: | ||
$('head').append("<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script> <link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'></link>"); | $('head').append("<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script> <link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'></link>"); | ||
− | $('#webgl-example').html("<x3d width='600px' height='400px'><scene><shape><box></box></shape></scene></x3d>"); | + | // $('#webgl-example').html("<x3d width='600px' height='400px'><scene><shape><box></box></shape></scene></x3d>"); |
+ | |||
+ | $('#webgl-example').html("<x3d width='600px' height='400px'><scene><shape><appearance><material diffuseColor='1 0 0'></material></appearance><box></box></shape><transform translation='-3 0 0'><shape><appearance><material diffuseColor='0 1 0'></material></appearance><cone></cone></shape></transform><transform translation='3 0 0'><shape><appearance><material diffuseColor='0 0 1'></material></appearance><sphere></sphere></shape></transform></scene></x3d>"); | ||
}()); | }()); |
Версия 16:10, 25 февраля 2016
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */
(function () {
$('head').append("<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script> <link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'></link>");
// $('#webgl-example').html("<x3d width='600px' height='400px'><scene><shape><box></box></shape></scene></x3d>");
$('#webgl-example').html("<x3d width='600px' height='400px'><scene><shape><appearance><material diffuseColor='1 0 0'></material></appearance><box></box></shape><transform translation='-3 0 0'><shape><appearance><material diffuseColor='0 1 0'></material></appearance><cone></cone></shape></transform><transform translation='3 0 0'><shape><appearance><material diffuseColor='0 0 1'></material></appearance><sphere></sphere></shape></transform></scene></x3d>");
}());