breaking(plugin-gore): Drop goreNumber
prop
Please use `gores` instead.
This commit is contained in:
parent
7f5a066dea
commit
1e5c55f65a
2 changed files with 10 additions and 16 deletions
|
@ -1,9 +1,5 @@
|
||||||
import pkg from '../package.json'
|
import pkg from '../package.json'
|
||||||
|
|
||||||
const deprecated =
|
|
||||||
"The 'goreNumber' property for the gore macro is deprecated " +
|
|
||||||
"and will be removed in a future version. Please use 'gores' instead"
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: pkg.name,
|
name: pkg.name,
|
||||||
version: pkg.version,
|
version: pkg.version,
|
||||||
|
@ -12,13 +8,11 @@ export default {
|
||||||
},
|
},
|
||||||
macros: {
|
macros: {
|
||||||
gore: function (so) {
|
gore: function (so) {
|
||||||
let from = so.from
|
const from = so.from
|
||||||
// TODO: Drop so.goreNumber in v3, it's deprecated
|
const gores = so.gores
|
||||||
let gores = so.gores || so.goreNumber //number of gores for the complete sphere
|
const radius = so.radius //radius of the sphere
|
||||||
if (so.goreNumber) console.log(deprecated)
|
const prefix = so.prefix
|
||||||
let radius = so.radius //radius of the sphere
|
const extraLength = so.extraLength //the length of the straight section after a complete semisphere
|
||||||
let prefix = so.prefix
|
|
||||||
let extraLength = so.extraLength //the length of the straight section after a complete semisphere
|
|
||||||
|
|
||||||
this.points[prefix + 'p1'] = from.shift(0, (radius * Math.PI) / 2 + extraLength)
|
this.points[prefix + 'p1'] = from.shift(0, (radius * Math.PI) / 2 + extraLength)
|
||||||
this.points[prefix + 'Cp1'] = this.points[prefix + 'p1'].shift(
|
this.points[prefix + 'Cp1'] = this.points[prefix + 'p1'].shift(
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe('Gore Plugin Tests', () => {
|
||||||
macro('gore', {
|
macro('gore', {
|
||||||
from:anchorPoint,
|
from:anchorPoint,
|
||||||
radius:25,
|
radius:25,
|
||||||
goreNumber:4,
|
gores:4,
|
||||||
extraLength:0,
|
extraLength:0,
|
||||||
prefix:'gore'
|
prefix:'gore'
|
||||||
})
|
})
|
||||||
|
@ -36,7 +36,7 @@ describe('Gore Plugin Tests', () => {
|
||||||
macro('gore', {
|
macro('gore', {
|
||||||
from:anchorPoint,
|
from:anchorPoint,
|
||||||
radius:25,
|
radius:25,
|
||||||
goreNumber:8,
|
gores:8,
|
||||||
extraLength:0,
|
extraLength:0,
|
||||||
prefix:'gore'
|
prefix:'gore'
|
||||||
})
|
})
|
||||||
|
@ -58,7 +58,7 @@ describe('Gore Plugin Tests', () => {
|
||||||
macro('gore', {
|
macro('gore', {
|
||||||
from:anchorPoint,
|
from:anchorPoint,
|
||||||
radius:25,
|
radius:25,
|
||||||
goreNumber:4,
|
gores:4,
|
||||||
extraLength:20,
|
extraLength:20,
|
||||||
prefix:'gore'
|
prefix:'gore'
|
||||||
})
|
})
|
||||||
|
@ -80,7 +80,7 @@ describe('Gore Plugin Tests', () => {
|
||||||
macro('gore', {
|
macro('gore', {
|
||||||
from:anchorPoint,
|
from:anchorPoint,
|
||||||
radius:30,
|
radius:30,
|
||||||
goreNumber:4,
|
gores:4,
|
||||||
extraLength:0,
|
extraLength:0,
|
||||||
prefix:'gore'
|
prefix:'gore'
|
||||||
})
|
})
|
||||||
|
@ -102,7 +102,7 @@ describe('Gore Plugin Tests', () => {
|
||||||
macro('gore', {
|
macro('gore', {
|
||||||
from:anchorPoint,
|
from:anchorPoint,
|
||||||
radius:25,
|
radius:25,
|
||||||
goreNumber:4,
|
gores:4,
|
||||||
extraLength:0,
|
extraLength:0,
|
||||||
prefix:'gore'
|
prefix:'gore'
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue