Doodle3D-Slicer/three.js-master/docs/api/materials/SpriteCanvasMaterial.html
2017-06-22 13:21:07 +02:00

57 lines
1.2 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script src="../../list.js"></script>
<script src="../../page.js"></script>
<link type="text/css" rel="stylesheet" href="../../page.css" />
</head>
<body>
[page:Material] &rarr;
<h1>[name]</h1>
<div class="desc">Create a material that can draw custom sprites using a 2d canvas.</div>
<h2>Constructor</h2>
<h3>[name]( [page:Object parameters] )</h3>
<div>
parameters is an object that can be used to set up the default properties
</div>
<div>
color - the color of the sprite<br/>
program - the program used to draw the sprite
</div>
<h2>Properties</h2>
<h3>[property:Color color]</h3>
<div>
The color of the sprite. The material will set up the color for the context before calling the material's program.
</div>
<h2>Methods</h2>
<h3>[method:null program]([page:CanvasRenderingContext2D context], [page:Color color])</h3>
<div>
context -- The canvas context <br />
color -- The color of the sprite
</div>
<div>
Define a program that will use the context to draw the sprite.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>