canvas: add webgl2 context type as an option
This commit is contained in:
parent
4cde746a74
commit
93ba5d7397
3 changed files with 3 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"name": "open-stage-control",
|
||||
"productName": "Open Stage Control",
|
||||
"description": "Libre and modular OSC / MIDI controller",
|
||||
"version": "1.29.8",
|
||||
"version": "1.29.9-dev",
|
||||
"author": {
|
||||
"name": "Jean-Emmanuel Doucet",
|
||||
"email": "jean-emmanuel@ammd.net"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Canvas extends Widget {
|
|||
|
||||
this.canvas = DOM.get(this.container, 'canvas')[0]
|
||||
|
||||
this.ctx = this.canvas.getContext('2d',{
|
||||
this.ctx = this.canvas.getContext(this.getProp('contextType') || '2d',{
|
||||
desynchronized: !ELECTRON_NOGPU && ENV.desynccanvas ? true : false,
|
||||
alpha: true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class CanvasWidget extends Canvas {
|
|||
|
||||
var defaults = super.defaults().extend({
|
||||
class_specific: {
|
||||
contextType: {type: 'string', value: '2d', choices: ['2d', 'webgl2'], help: 'Context type for the canvas'},
|
||||
valueLength: {type: 'number', value: 1, help:[
|
||||
'Defines the number of values accepted by the widget (minimum 1). Incoming messages that don\'t comply will be ignored',
|
||||
'When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue