Merge branch 'master' of gitea.iwm-tuebingen.de:IWMBrowser/iwmlib
# Conflicts: # dist/iwmlib.js
This commit is contained in:
commit
5407f66aae
18
dist/iwmlib.pixi.js
vendored
18
dist/iwmlib.pixi.js
vendored
@ -2862,10 +2862,10 @@
|
||||
* @return {Button} A reference to the button for chaining.
|
||||
*/
|
||||
hide() {
|
||||
this.opts.strokeAlpha = 0;
|
||||
this.opts.strokeActiveAlpha = 0;
|
||||
this.opts.fillAlpha = 0;
|
||||
this.opts.fillActiveAlpha = 0;
|
||||
this.opts.strokeAlpha = 0.0;
|
||||
this.opts.strokeActiveAlpha = 0.0;
|
||||
this.opts.fillAlpha = 0.0000000001; // WORKAROUND: See https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide#graphics-interaction
|
||||
this.opts.fillActiveAlpha = 0.0000000001;
|
||||
|
||||
this.layout();
|
||||
|
||||
@ -14604,7 +14604,7 @@
|
||||
}
|
||||
|
||||
tiltToLineWidth(value) {
|
||||
return Math.round(Math.abs(value / 10) + 1)
|
||||
return 16 // Math.round(Math.abs(value / 10) + 1)
|
||||
}
|
||||
|
||||
drawStroke(stroke) {
|
||||
@ -14612,9 +14612,15 @@
|
||||
let start = stroke[0];
|
||||
this.beginFill(0, 0);
|
||||
this.moveTo(start.x, start.y);
|
||||
let lineWidth = this.tiltToLineWidth(start.tiltY);
|
||||
this.lineStyle(lineWidth, start.color, this.colorAlpha);
|
||||
for (let i = 1; i < stroke.length; i++) {
|
||||
let info = stroke[i];
|
||||
this.lineStyle(this.tiltToLineWidth(info.tiltY), info.color, this.colorAlpha);
|
||||
let lw = this.tiltToLineWidth(info.tiltY);
|
||||
if (lw != lineWidth) {
|
||||
lineWidth = lw;
|
||||
this.lineStyle(lineWidth, info.color, this.colorAlpha);
|
||||
}
|
||||
this.lineTo(info.x, info.y);
|
||||
}
|
||||
this.endFill();
|
||||
|
@ -632,10 +632,10 @@ export default class Button extends PIXI.Container {
|
||||
* @return {Button} A reference to the button for chaining.
|
||||
*/
|
||||
hide() {
|
||||
this.opts.strokeAlpha = 0
|
||||
this.opts.strokeActiveAlpha = 0
|
||||
this.opts.fillAlpha = 0
|
||||
this.opts.fillActiveAlpha = 0
|
||||
this.opts.strokeAlpha = 0.0
|
||||
this.opts.strokeActiveAlpha = 0.0
|
||||
this.opts.fillAlpha = 0.0000000001 // WORKAROUND: See https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide#graphics-interaction
|
||||
this.opts.fillActiveAlpha = 0.0000000001
|
||||
|
||||
this.layout()
|
||||
|
||||
|
@ -51,7 +51,8 @@ const index = new Index(itemTemplate, [
|
||||
['Flip Effect', 'flipeffect.html'],
|
||||
['Blur Filter', 'blurfilter.html'],
|
||||
['Text', 'text.html'],
|
||||
['Scrollview', 'scrollview.html']
|
||||
['Scrollview', 'scrollview.html'],
|
||||
['Stylus', 'stylus.html']
|
||||
],
|
||||
null)
|
||||
index.load()
|
||||
|
@ -305,9 +305,15 @@ export default class Stylus extends PIXI.Graphics {
|
||||
let start = stroke[0]
|
||||
this.beginFill(0, 0)
|
||||
this.moveTo(start.x, start.y)
|
||||
let lineWidth = this.tiltToLineWidth(start.tiltY)
|
||||
this.lineStyle(lineWidth, start.color, this.colorAlpha)
|
||||
for (let i = 1; i < stroke.length; i++) {
|
||||
let info = stroke[i]
|
||||
this.lineStyle(this.tiltToLineWidth(info.tiltY), info.color, this.colorAlpha)
|
||||
let lw = this.tiltToLineWidth(info.tiltY)
|
||||
if (lw != lineWidth) {
|
||||
lineWidth = lw
|
||||
this.lineStyle(lineWidth, info.color, this.colorAlpha)
|
||||
}
|
||||
this.lineTo(info.x, info.y)
|
||||
}
|
||||
this.endFill()
|
||||
|
Loading…
Reference in New Issue
Block a user