mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
added render.options.wireframeStrokeStyle, closes #406
This commit is contained in:
parent
2af54d51cd
commit
401553d7e8
1 changed files with 13 additions and 3 deletions
|
@ -69,6 +69,7 @@ var Mouse = require('../core/Mouse');
|
||||||
pixelRatio: 1,
|
pixelRatio: 1,
|
||||||
background: '#14151f',
|
background: '#14151f',
|
||||||
wireframeBackground: '#14151f',
|
wireframeBackground: '#14151f',
|
||||||
|
wireframeStrokeStyle: '#bbb',
|
||||||
hasBounds: !!options.bounds,
|
hasBounds: !!options.bounds,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
wireframes: true,
|
wireframes: true,
|
||||||
|
@ -821,7 +822,7 @@ var Mouse = require('../core/Mouse');
|
||||||
c.fill();
|
c.fill();
|
||||||
} else {
|
} else {
|
||||||
c.lineWidth = 1;
|
c.lineWidth = 1;
|
||||||
c.strokeStyle = '#bbb';
|
c.strokeStyle = render.options.wireframeStrokeStyle;
|
||||||
c.stroke();
|
c.stroke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -880,7 +881,7 @@ var Mouse = require('../core/Mouse');
|
||||||
}
|
}
|
||||||
|
|
||||||
c.lineWidth = 1;
|
c.lineWidth = 1;
|
||||||
c.strokeStyle = '#bbb';
|
c.strokeStyle = render.options.wireframeStrokeStyle;
|
||||||
c.stroke();
|
c.stroke();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1659,7 +1660,7 @@ var Mouse = require('../core/Mouse');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A CSS background color string to use when `render.options.wireframes` is enabled.
|
* A CSS color string to use for background when `render.options.wireframes` is enabled.
|
||||||
* This may be also set to `'transparent'` or equivalent.
|
* This may be also set to `'transparent'` or equivalent.
|
||||||
*
|
*
|
||||||
* @property options.wireframeBackground
|
* @property options.wireframeBackground
|
||||||
|
@ -1667,6 +1668,15 @@ var Mouse = require('../core/Mouse');
|
||||||
* @default '#14151f'
|
* @default '#14151f'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A CSS color string to use for stroke when `render.options.wireframes` is enabled.
|
||||||
|
* This may be also set to `'transparent'` or equivalent.
|
||||||
|
*
|
||||||
|
* @property options.wireframeStrokeStyle
|
||||||
|
* @type string
|
||||||
|
* @default '#bbb'
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A flag that specifies if `render.bounds` should be used when rendering.
|
* A flag that specifies if `render.bounds` should be used when rendering.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue