Commit b65067af authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

initial commit

parent 187112a7
......@@ -12,8 +12,8 @@ Javascript viewer for X3D models
## Install
* clone this repo
* link to your webserver, e.g.: `http://localhost/x3domviewer`
* open example: `http://localhost/x3domviewer/index.html?model=x3d/0393-12-29.x3d`
* copy or link all x3d models to some dir, e.g.: `/var/www/html/x3domviewer/x3d/`
* access: `http://localhost/x3domviewer/index.html?model=x3d/some-model.x3d`
## Notes
* The code is just separated from [freecad_x3d](https://git.elphel.com/Elphel/freecad_x3d) project
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,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BAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
//Requires:
// <script src="jquery-2.1.4.min.js"></script>
// <script src="bootstrap/js/bootstrap.min.js"></script>
function init_help(element){
var help_str = "\
<table>\
<tr>\
<td>Display area:<td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; left-click:</b></td>\
<td valign='top'>select/deselect part and its copies</td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; left-click + move:</b></td>\
<td valign='top'>rotate</td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; right-click:</b></td>\
<td valign='top'>hide part and its copies. <b>undo</b>-button to unhide</td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; right-click + move:</b></td>\
<td valign='top'>zoom</td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; middle-click + move:</b></td>\
<td valign='top'>drag</td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; dbl-left-click:</b></td>\
<td valign='top'>hide part and its copies, <span style='color:rgba(255,100,100,1)'><b>interferes with center of rotation</b></span></td>\
</tr>\
<tr>\
<td valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; dbl-middle-click:</b></td>\
<td valign='top'>set center of rotation</td>\
</tr>\
<tr>\
<td>Side buttons (if enabled):</td>\
</tr>\
<tr>\
<td>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; <span style='padding:1px 5px;background:green;border-radius:2px 0px 0px 2px;'>abc</span><span style='padding:1px 5px;background:white;border-radius:0px 2px 2px 0px;color:black;'>&#x25BE;</span>&nbsp;<b>:</b></td>\
<td><b>abc</b> = Part Number</td>\
</tr>\
<tr>\
<td>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; <span style='padding:1px 5px;background:green;border-radius:2px 0px 0px 2px;'>abc</span> left-click:</b></td>\
<td>select / single / hide / delesect</td>\
</tr>\
<tr>\
<td>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; dropdown</b> <span style='padding:1px 5px;background:green;border-radius:2px;'>all</span> <b>:</b></td>\
<td>hide/show part and its copies</td>\
</tr>\
<tr>\
<td>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; dropdown</b> <span style='padding:1px 5px;background:green;border-radius:2px;'>1</span> <b>:</b></td>\
<td>hide/show single part or copy</td>\
</tr>\
<tr>\
<td>X3DOM controls help:</td>\
</tr>\
<tr>\
<td>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; <a href='http://www.x3dom.org/documentation/interaction/' style='color:white'><img src='http://www.x3dom.org/wp-content/themes/x3domnew/x3dom_logo.png' style='background:rgba(250,250,250,0.8);height:25px;padding:3px'/> www.x3dom.org</a></td>\
</tr>\
<tr>\
<td>Source code:</td>\
</tr>\
<tr>\
<td>&nbsp;&nbsp;&nbsp;&nbsp;<b>&#8226; <a href='https://github.com/Elphel/freecad_x3d' style='color:white'><img src='http://blog.elphel.com/wp-content/themes/pixelgreen/images/blog-logo.png' style='height:25px;'/> Elphel <img src='https://github.com/fluidicon.png' style='height:25px;'/> github.com</a></td>\
</tr>\
</table>\
";
var hlp = $("<div>").addClass("btn btn-primary nooutline btn-sm btn-my").html("?");
hlp.css({
position:"absolute",
right: "3px",
top: "3px",
background:"rgba(100,100,100,0.7)",
border: "1px solid gray",
padding: "0px 6px 0px 6px"
});
var hlp_text = $("<div>",{id:"help-text"}).css({
position:"absolute",
top:"2px",
right:"2px",
"border-radius":"2px",
border: "1px solid gray",
color:"white",
"font-size":"1.2em",
padding:"10px 10px 10px 10px",
background:"rgba(50,50,50,0.9)",
display:"none",
"z-index":"100"
});
hlp_text.html(help_str);
hlp.click(function(){hlp_text.css({display:""});});
hlp_text.click(function(){$(this).css({display:"none"});});
element.append(hlp).append(hlp_text);
}
\ No newline at end of file
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<!-- libs -->
<!--<script src="jquery-3.2.1.js"></script>-->
<script src="jquery-2.2.4.js"></script>
<script src="popper.js"></script>
<!--<script src="bootstrap-4.0.0-beta.2-dist/js/bootstrap.js"></script>-->
<script src="bootstrap/js/bootstrap.js"></script>
<!-- elphel -->
<script src="help.js"></script>
<script src="viewmodel.js"></script>
<!-- libs -->
<!--<link rel="stylesheet" href="bootstrap-4.0.0-beta.2-dist/css/bootstrap.css">-->
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="x3dom-1.7.2/x3dom.css">
<!-- elphel -->
<link rel="stylesheet" href="viewmodel.css">
</head>
<body>
<div id='main'>
<div id='thrd'>
<div class="dropdown">
<button class="btn-my dropdown-toggle btn nooutline" data-toggle="dropdown" href="#">View <span class="caret"></span></button>
<ul class="dropdown-menu" style="padding:0px">
<li id="v1">view 1 (+<b>x</b>)</li>
<li id="v2">view 2 (&minus;<b>x</b>)</li>
<li id="v3">view 3 (+<b>y</b>)</li>
<li id="v4">view 4 (&minus;<b>y</b>)</li>
<li id="v5">view 5 (+<b>z</b>)</li>
<li id="v6">view 6 (&minus;<b>z</b>)</li>
<li id="v7">view 7 (default)</li>
</ul>
</div>
</div>
</div>
<div id="test:5" secretvalue='-4'></div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
#x3d_canvas{
/* background:#000 url(http://i.stack.imgur.com/p9mUO.jpg); */
}
body{
padding:5px;
}
.nooutline{
/*font-weight:bold;*/
outline:none;
}
.nooutline:focus{
outline:none;
}
#thrd li {
padding:2px 2px 2px 10px;
}
#thrd li:hover{
background-color:rgba(200,200,200,0.2);
}
#x3dom-state-viewer {
position: absolute;
top:1px;
left:1px;
background-color:rgba(100,100,100,0.7);
border: 1px solid gray;
color:rgba(250,250,250,1);
border-radius: 1px;
padding: 3px;
}
.btn-my {
background:rgba(100,100,100,0.7);
border:1px solid gray;
color: white;
/*font-weight: bold;*/
/*border-radius: 1px;*/
}
.btn-my:hover{
background:rgba(100,100,100,0.9);
color: white;
}
.btn-my:focus {
background:rgba(100,100,100,0.9);
}
.btn-my:active {
background:rgba(100,100,100,0.9);
color: white;
}
.btn-my.disabled {
color: red;
}
#bom li{
padding:2px 2px 2px 10px;
border:0px solid black;
}
#bom button{
/*padding:5px 15px 5px 15px;*/
border: 1px solid rgba(50,50,50,0.5);
}
#help-text td{
padding:1px 15px 1px 15px;
}
#x3dom_logdiv{
position:absolute;
bottom:1px;
left:1px;
}
.btn-odd-success{
background:rgba(90,150,90,1);
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
X3DOM has been developed by Fraunhofer IGD (VCST group).
Contributions to core X3DOM components:
* Johannes Behr
* Yvonne Jung
* Timo Sturm
* Andreas Aderhold
* Katarzyna Wilkosinska
* Max Limper
* Maik Thoener
* Christian Stein
* Tobias Franke
* Peter Eschler
* Timm Drevensek
* Sven Kluge
Contributions to shadow mapping:
* Nicolas Eicke
Contributions to BVHRefiner component:
* Michael Englert
Contributions to the CAD component:
* Don Brutzman <brutzman@nps.edu>
* Vincent Marchetti <vmarchetti@ameritech.net>
* "이효광 (Hyokwang Lee)" <adpc92@gmail.com>
* Joe D Williams <joedwil@earthlink.net>
Contributions to the Geo component:
* "Byounghyun Yoo (유병현)" <yoo@byoo.net>
* Andreas Plesch <andreasplesch@gmail.com>
Other much-appreciated contributors:
* x3domer
* James Sweet
* John Congote
* Ander Arbelaiz <aarbelaiz@vicomtech.org>
* Yurai Núñez-Rodríguez <yurai@weblakes.com>
* ...
* Your Name <couldbe@here.com>
A big thank you to Philip Taylor. X3DOM is originally based on his first prototypical implementation of a scene graph in HTML 5. http://philip.html5.org
Dual licensed under the MIT and GPL licenses.
==[MIT]====================================================================
Copyright (c) 2009 X3DOM
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
==[GPL]====================================================================
X3DOM - Declarative 3D for HTML
Copyright (C) 2009 X3DOM
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Welcome to X3DOM
================
X3DOM is a framework for integrating and manipulating (X)3D scenes as HTML5
DOM elements, which are rendered via an X3D plugin, Flash/Stage3D or WebGL.
The open-source system allows defining 3D scene description and runtime
behavior declaratively, without any low-level JavaScript or GLSL coding.
Getting started
---------------
Please have a look at the official documentation in order to get started:
http://doc.x3dom.org
Need help?
----------
If you want to use X3DOM and seek help and exchange of knowledge, please use
the x3dom-users mailing list or the forums. Beginner questions usually have
been asked already and in many cases the mailinglist or forum archives provide
quick answers to many questions.
If you decide to post to the mailing list or forum, please include as much
info as possible and describe your problem and what you tried already
succinctly.
Mailing List
-------------
Please use the mailinglists as much as you can. The
[x3dom-users][] list is the one you are most likely interested in
and the first address for help or questions.
Issue Tracker
-------------
Please report issues and attach patches here. For general help and questions
direct your inquiry to the x3dom-users mailing list or one of the forums.
https://github.com/x3dom/x3dom/issues
**Uploading Files to the Issue Tracker**
The GitHub issue tracker does not allow to upload files. However, there is a
service that helps you with sharing files: https://gist.github.com. Just copy
and paste your file contents there and then copy the Gist URL into the
issues form.
It immensely helps us if you can provide a live web page illustrating your
problem. So if you have webspace and can upload and post the URL with your
issue, the chances we will have a look at it increase.
Contributing
------------
We encourage you to contribute to X3DOM! If you would like to contribute to
X3DOM, you should subscribe to the developers mailing list ([x3dom-dev][]),
where the developers of X3DOM discuss the development of the library itself.
You can send pull requests via GitHub. Patches should:
1. Follow the style of the existing code.
2. One commit should do exactly one thing.
3. Commit messages should start with a summary line below 80 characters
followed by a blank line, and then the reasoning/analysis for why the
change was made (if appropriate).
4. Commits that fix a bug in a previous commit (which has already been
merged) should start with `fixup!` and then the summary line of the
commit it fixes.
5. Rebase your branch against the upstream’s master. We don’t want to pull
redundant merge commits.
6. **Be clear about what license applies to your patch:** The files within
this repository are under the GPL3 (or later) but, as the original
creators, we are still allowed to create non-free derivatives. However,
if patches are given to us under GPL then those cannot make it into any
non-free derivatives we may later wish to create. So to make it easier
for us (and avoid any legal issues) we prefer if patches are released as
public domain.
### GitHub Workflow
Developing patches should follow this workflow:
1. Fork on GitHub (click Fork button)
2. Clone to computer: `git clone git@github.com:«github account»/x3dom.git`
3. cd into your repo: `cd x3dom`
4. Set up remote upstream: `git remote add -f upstream git://github.com/x3dom/x3dom.git`
5. Create a branch for the new feature: `git checkout -b my_new_feature`
6. Work on your feature, add and commit as usual
Creating a branch is not strictly necessary, but it makes it easy to delete
your branch when the feature has been merged into upstream, diff your branch
with the version that actually ended in upstream, and to submit pull requests
for multiple features (branches).
7. Push branch to GitHub: `git push origin my_new_feature`
8. Issue pull request: Click Pull Request button on GitHub
#### Useful Commands
If a lot of changes have happened upstream you can replay your local changes
on top of these, this is done with `rebase`, e.g.:
git fetch upstream
git rebase upstream/master
This will fetch changes and re-apply your commits on top of these.
This is generally better than merge, as it will give a clear picture of which
commits are local to your branch. It will also “prune” any of your local
commits if the same changes have been applied upstream.
You can use `-i` with `rebase` for an “interactive” rebase. This allows you
to drop, re-arrange, merge, and reword commits, e.g.:
git rebase -i upstream/master
There's always the [x3dom-dev][] mailinglist.
[x3dom-users]: https://lists.sourceforge.net/lists/listinfo/x3dom-users
[x3dom-dev]: https://lists.sourceforge.net/lists/listinfo/x3dom-developers
[GPL 3]: http://www.gnu.org/copyleft/gpl.html
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.2 - 61a235203deb34329fe615cbbf21314db6ebf49f - Mon Dec 19 19:17:05 2016 +0100 */
x3dom.registerNodeType("HAnimDisplacer","H-Anim",defineClass(x3dom.nodeTypes.X3DGeometricPropertyNode,function(ctx){x3dom.nodeTypes.HAnimDisplacer.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFFloat(ctx,'weight',0);this.addField_MFInt32(ctx,'coordIndex',[]);this.addField_MFVec3f(ctx,'displacements',[]);x3dom.debug.logWarning("HAnimDisplacer NYI!");}));x3dom.registerNodeType("HAnimJoint","H-Anim",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.HAnimJoint.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_MFNode('displacers',x3dom.nodeTypes.HAnimDisplacer);this.addField_SFRotation(ctx,'limitOrientation',0,0,1,0);this.addField_MFFloat(ctx,'llimit',[]);this.addField_MFFloat(ctx,'ulimit',[]);this.addField_MFInt32(ctx,'skinCoordIndex',[]);this.addField_MFFloat(ctx,'skinCoordWeight',[]);}));x3dom.registerNodeType("HAnimSegment","H-Anim",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.HAnimSegment.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFVec3f(ctx,'centerOfMass',0,0,0);this.addField_SFFloat(ctx,'mass',0);this.addField_MFFloat(ctx,'momentsOfInertia',[0,0,0,0,0,0,0,0,0]);this.addField_SFNode('coord',x3dom.nodeTypes.X3DCoordinateNode);this.addField_MFNode('displacers',x3dom.nodeTypes.HAnimDisplacer);},{}));x3dom.registerNodeType("HAnimSite","H-Anim",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.HAnimSite.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");}));x3dom.registerNodeType("HAnimHumanoid","H-Anim",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.HAnimHumanoid.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFString(ctx,'version',"");this.addField_MFString(ctx,'info',[]);this.addField_MFNode('joints',x3dom.nodeTypes.HAnimJoint);this.addField_MFNode('segments',x3dom.nodeTypes.HAnimSegment);this.addField_MFNode('sites',x3dom.nodeTypes.HAnimSite);this.addField_MFNode('skeleton',x3dom.nodeTypes.HAnimJoint);this.addField_MFNode('skin',x3dom.nodeTypes.X3DChildNode);this.addField_MFNode('skinCoord',x3dom.nodeTypes.X3DCoordinateNode);this.addField_MFNode('skinNormal',x3dom.nodeTypes.X3DNormalNode);this.addField_MFNode('viewpoints',x3dom.nodeTypes.HAnimSite);},{}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.2 - 61a235203deb34329fe615cbbf21314db6ebf49f - Mon Dec 19 19:17:05 2016 +0100 */
x3dom.registerNodeType("ScreenGroup","Layout",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.ScreenGroup.superClass.call(this,ctx);},{collectDrawableObjects:function(transform,drawableCollection,singlePath,invalidateCache,planeMask,clipPlanes)
{if(singlePath&&(this._parentNodes.length>1))
singlePath=false;if(singlePath&&(invalidateCache=invalidateCache||this.cacheInvalid()))
this.invalidateCache();planeMask=drawableCollection.cull(transform,this.graphState(),singlePath,planeMask);if(planeMask<0){return;}
singlePath=false;var doc,vp,minus_one,zero,viewport_height,one_to_one_pixel_depth,view_transform,view_direction,model_transform,camera_position,screengroup_position,viewpoint_to_screengroup,ratio,scale_matrix;doc=this._nameSpace.doc;vp=doc._scene.getViewpoint();viewport_height=doc._x3dElem.clientHeight;one_to_one_pixel_depth=viewport_height/vp.getImgPlaneHeightAtDistOne();minus_one=new x3dom.fields.SFVec3f(0,0,-1.0);zero=new x3dom.fields.SFVec3f(0,0,0);view_transform=drawableCollection.viewMatrix;model_transform=transform;view_direction=minus_one;camera_position=zero;screengroup_position=view_transform.multMatrixPnt(model_transform.multMatrixPnt(zero));viewpoint_to_screengroup=screengroup_position.subtract(camera_position);ratio=view_direction.dot(viewpoint_to_screengroup)/one_to_one_pixel_depth;scale_matrix=x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(ratio,ratio,ratio));var childTransform=this.transformMatrix(model_transform.mult(scale_matrix));for(var i=0,i_n=this._childNodes.length;i<i_n;i++)
{var cnode=this._childNodes[i];if(cnode){cnode.collectDrawableObjects(childTransform,drawableCollection,singlePath,invalidateCache,planeMask,clipPlanes);}}}}));
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment