From 401553d7e88df5a77a37a24bb8ffbc52e258e8f3 Mon Sep 17 00:00:00 2001 From: liabru Date: Mon, 27 Mar 2023 00:09:12 +0100 Subject: [PATCH] added render.options.wireframeStrokeStyle, closes #406 --- src/render/Render.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/render/Render.js b/src/render/Render.js index 56aa695..1002a42 100644 --- a/src/render/Render.js +++ b/src/render/Render.js @@ -69,6 +69,7 @@ var Mouse = require('../core/Mouse'); pixelRatio: 1, background: '#14151f', wireframeBackground: '#14151f', + wireframeStrokeStyle: '#bbb', hasBounds: !!options.bounds, enabled: true, wireframes: true, @@ -821,7 +822,7 @@ var Mouse = require('../core/Mouse'); c.fill(); } else { c.lineWidth = 1; - c.strokeStyle = '#bbb'; + c.strokeStyle = render.options.wireframeStrokeStyle; c.stroke(); } } @@ -880,7 +881,7 @@ var Mouse = require('../core/Mouse'); } c.lineWidth = 1; - c.strokeStyle = '#bbb'; + c.strokeStyle = render.options.wireframeStrokeStyle; 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. * * @property options.wireframeBackground @@ -1667,6 +1668,15 @@ var Mouse = require('../core/Mouse'); * @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. *