未验证 提交 a642a21d 编写于 作者: M Michael Herzog 提交者: GitHub

Merge pull request #16963 from Mugen87/dev34

Examples: More clean up.
......@@ -2224,8 +2224,6 @@ THREE.GLTFExporter.Utils = {
}
var mergedKeyframeIndex = 0;
var sourceKeyframeIndex = 0;
var sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) );
mergedTrack = mergedTracks[ sourceTrackNode.uuid ];
......
......@@ -1045,8 +1045,6 @@ THREE.LDrawLoader = ( function () {
// Retrieve data from the parent parse scope
var parentParseScope = this.getParentParseScope();
var isRoot = ! parentParseScope.isFromParse;
// Main colour codes passed to this subobject (or default codes 16 and 24 if it is the root object)
var mainColourCode = parentParseScope.mainColourCode;
var mainEdgeColourCode = parentParseScope.mainEdgeColourCode;
......
......@@ -881,19 +881,15 @@ THREE.SVGLoader.prototype = {
var transform = parseNodeTransform( node );
if ( transform ) {
if ( transformStack.length > 0 ) {
if ( transformStack.length > 0 ) {
transform.premultiply( transformStack[ transformStack.length - 1 ] );
}
currentTransform.copy( transform );
transformStack.push( transform );
transform.premultiply( transformStack[ transformStack.length - 1 ] );
}
currentTransform.copy( transform );
transformStack.push( transform );
return transform;
}
......@@ -1178,11 +1174,10 @@ THREE.SVGLoader.prototype = {
};
THREE.SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lineCap, miterLimit ) {
THREE.SVGLoader.getStrokeStyle = function ( width, color, lineJoin, lineCap, miterLimit ) {
// Param width: Stroke width
// Param color: As returned by THREE.Color.getStyle()
// Param opacity: 0 (transparent) to 1 (opaque)
// Param lineJoin: One of "round", "bevel", "miter" or "miter-limit"
// Param lineCap: One of "round", "square" or "butt"
// Param miterLimit: Maximum join length, in multiples of the "width" parameter (join is truncated if it exceeds that distance)
......@@ -1190,7 +1185,6 @@ THREE.SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lin
width = width !== undefined ? width : 1;
color = color !== undefined ? color : '#000';
opacity = opacity !== undefined ? opacity : 1;
lineJoin = lineJoin !== undefined ? lineJoin : 'miter';
lineCap = lineCap !== undefined ? lineCap : 'butt';
miterLimit = miterLimit !== undefined ? miterLimit : 4;
......
......@@ -2248,8 +2248,6 @@ GLTFExporter.Utils = {
}
var mergedKeyframeIndex = 0;
var sourceKeyframeIndex = 0;
var sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) );
mergedTrack = mergedTracks[ sourceTrackNode.uuid ];
......
......@@ -1063,8 +1063,6 @@ var LDrawLoader = ( function () {
// Retrieve data from the parent parse scope
var parentParseScope = this.getParentParseScope();
var isRoot = ! parentParseScope.isFromParse;
// Main colour codes passed to this subobject (or default codes 16 and 24 if it is the root object)
var mainColourCode = parentParseScope.mainColourCode;
var mainEdgeColourCode = parentParseScope.mainEdgeColourCode;
......
......@@ -28,7 +28,7 @@ export class SVGLoader {
parse(text: string) : SVGResult;
static getStrokeStyle(width: number, color: string, opacity: number, lineJoin: string, lineCap: string, miterLimit: number): StrokeStyle;
static getStrokeStyle(width: number, color: string, lineJoin: string, lineCap: string, miterLimit: number): StrokeStyle;
static pointsToStroke(points: Vector3[], style: StrokeStyle, arcDivisions: number, minDistance: number ): BufferGeometry;
static pointsToStrokeWithBuffers(points: Vector3[], style: StrokeStyle, arcDivisions: number, minDistance: number, vertices: number[], normals: number[], uvs: number[], vertexOffset: number): number;
}
......@@ -894,19 +894,15 @@ SVGLoader.prototype = {
var transform = parseNodeTransform( node );
if ( transform ) {
if ( transformStack.length > 0 ) {
if ( transformStack.length > 0 ) {
transform.premultiply( transformStack[ transformStack.length - 1 ] );
}
currentTransform.copy( transform );
transformStack.push( transform );
transform.premultiply( transformStack[ transformStack.length - 1 ] );
}
currentTransform.copy( transform );
transformStack.push( transform );
return transform;
}
......@@ -1191,11 +1187,10 @@ SVGLoader.prototype = {
};
SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lineCap, miterLimit ) {
SVGLoader.getStrokeStyle = function ( width, color, lineJoin, lineCap, miterLimit ) {
// Param width: Stroke width
// Param color: As returned by Color.getStyle()
// Param opacity: 0 (transparent) to 1 (opaque)
// Param lineJoin: One of "round", "bevel", "miter" or "miter-limit"
// Param lineCap: One of "round", "square" or "butt"
// Param miterLimit: Maximum join length, in multiples of the "width" parameter (join is truncated if it exceeds that distance)
......@@ -1203,7 +1198,6 @@ SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lineCap,
width = width !== undefined ? width : 1;
color = color !== undefined ? color : '#000';
opacity = opacity !== undefined ? opacity : 1;
lineJoin = lineJoin !== undefined ? lineJoin : 'miter';
lineCap = lineCap !== undefined ? lineCap : 'butt';
miterLimit = miterLimit !== undefined ? miterLimit : 4;
......
......@@ -520,7 +520,7 @@
var x = i * 128 / WIDTH;
var y = j * 128 / WIDTH;
pixels[ p + 0 ] = noise( x, y, 123.4 );
pixels[ p + 0 ] = noise( x, y );
pixels[ p + 1 ] = pixels[ p + 0 ];
pixels[ p + 2 ] = 0;
pixels[ p + 3 ] = 1;
......
......@@ -204,7 +204,7 @@
hole = subshape.holes[ i ];
process = processShape( hole.curves, true );
process = processShape( hole.curves );
pts = process.pts;
pts2 = process.pts2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册