You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.5 KiB
101 lines
2.5 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<base href="../../" />
|
|
<script src="list.js"></script>
|
|
<script src="page.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
|
</head>
|
|
<body>
|
|
<h1>[name]</h1>
|
|
|
|
<div class="desc">
|
|
<p>
|
|
[name] can be used to render geometric data using SVG. The produced vector graphics are particular useful in the following use cases:
|
|
</p>
|
|
<ul>
|
|
<li>Animated logos or icons</li>
|
|
<li>Interactive 2D/3D diagrams or graphs</li>
|
|
<li>Interactive maps</li>
|
|
<li>Complex or animated user interfaces</li>
|
|
</ul>
|
|
<p>
|
|
[name] has various advantages. It produces crystal-clear and sharp output which is independent of the actual viewport resolution.<br />
|
|
SVG elements can be styled via CSS. And they have good accessibility since it's possible to add metadata like title or description (useful for search engines or screen readers).
|
|
</p>
|
|
<p>
|
|
There are, however, some important limitations:
|
|
</p>
|
|
<ul>
|
|
<li>No advanced shading</li>
|
|
<li>No texture support</li>
|
|
<li>No shadow support</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
// iOS iframe auto-resize workaround
|
|
|
|
if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
|
|
|
|
var scene = document.getElementById( 'scene' );
|
|
|
|
scene.style.width = getComputedStyle( scene ).width;
|
|
scene.style.height = getComputedStyle( scene ).height;
|
|
scene.setAttribute( 'scrolling', 'no' );
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<h2>Examples</h2>
|
|
|
|
<p>
|
|
[example:svg_lines lines]<br />
|
|
[example:svg_sandbox sandbox]
|
|
</p>
|
|
|
|
<h2>Constructor</h2>
|
|
|
|
<h3>[name]()</h3>
|
|
|
|
<h2>Methods</h2>
|
|
|
|
<h3>[method:null clear]()</h3>
|
|
<p>
|
|
Tells the renderer to clear its drawing surface.
|
|
</p>
|
|
|
|
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
|
|
<p>
|
|
Renders a [page:Scene scene] using a [page:Camera camera].
|
|
</p>
|
|
|
|
<h3>[method:null setClearColor]( [param:Color color], [param:number alpha] )</h3>
|
|
<p>
|
|
Sets the clearColor and the clearAlpha.
|
|
</p>
|
|
|
|
<h3>[method:null setPrecision]( [param:Number precision] )</h3>
|
|
<p>
|
|
Sets the precision of the data used to create a path.
|
|
</p>
|
|
|
|
<h3>[method:null setQuality]()</h3>
|
|
<p>
|
|
Sets the render quality. Possible values are *low* and *high* (default).
|
|
</p>
|
|
|
|
<h3>[method:null setSize]( [param:Number width], [param:Number height] )</h3>
|
|
<p>
|
|
Resizes the renderer to (width, height).
|
|
</p>
|
|
|
|
<h2>Source</h2>
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/[path].js examples/js/[path].js]
|
|
</body>
|
|
</html>
|