diff --git a/build/aframe-html.js b/build/aframe-html.js
index 11fe85a..fbf0793 100644
--- a/build/aframe-html.js
+++ b/build/aframe-html.js
@@ -54,7 +54,16 @@
this.dom = dom;
this.anisotropy = 16;
- this.encoding = three.sRGBEncoding;
+ if ( THREE.REVISION === '147' ) { // Keep compatibility with aframe 1.4.2
+
+ this.encoding = three.sRGBEncoding;
+
+ } else {
+
+ this.colorSpace = three.SRGBColorSpace;
+
+ }
+
this.minFilter = three.LinearFilter;
this.magFilter = three.LinearFilter;
diff --git a/build/aframe-html.js.map b/build/aframe-html.js.map
index 08f9958..a24c684 100644
--- a/build/aframe-html.js.map
+++ b/build/aframe-html.js.map
@@ -1 +1 @@
-{"version":3,"file":"aframe-html.js","sources":["../src/HTMLMesh.js","../src/aframe-html.js"],"sourcesContent":["// This is a copy of https://github.com/mrdoob/three.js/blob/0403020848c26a9605eb91c99a949111ad4a532e/examples/jsm/interactive/HTMLMesh.js\n// with the following changes:\n// - Revert back to using \"this.encoding = sRGBEncoding\" instead of \"this.colorSpace = SRGBColorSpace;\" for compatibility with three r147 aframe 1.4.2\n// - window.dispatchEvent line commented, see the TODO below.\n// Look at https://github.com/mrdoob/three.js/commits/dev/examples/jsm/interactive/HTMLMesh.js\n// to see if there are other changes that can be retrieved here.\nimport {\n\tCanvasTexture,\n\tLinearFilter,\n\tMesh,\n\tMeshBasicMaterial,\n\tPlaneGeometry,\n\tsRGBEncoding,\n\tColor\n} from 'three';\n\nclass HTMLMesh extends Mesh {\n\n\tconstructor( dom ) {\n\n\t\tconst texture = new HTMLTexture( dom );\n\n\t\tconst geometry = new PlaneGeometry( texture.image.width * 0.001, texture.image.height * 0.001 );\n\t\tconst material = new MeshBasicMaterial( { map: texture, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tfunction onEvent( event ) {\n\n\t\t\tmaterial.map.dispatchDOMEvent( event );\n\n\t\t}\n\n\t\tthis.addEventListener( 'mousedown', onEvent );\n\t\tthis.addEventListener( 'mousemove', onEvent );\n\t\tthis.addEventListener( 'mouseup', onEvent );\n\t\tthis.addEventListener( 'click', onEvent );\n\n\t\tthis.dispose = function () {\n\n\t\t\tgeometry.dispose();\n\t\t\tmaterial.dispose();\n\n\t\t\tmaterial.map.dispose();\n\n\t\t\tcanvases.delete( dom );\n\n\t\t\tthis.removeEventListener( 'mousedown', onEvent );\n\t\t\tthis.removeEventListener( 'mousemove', onEvent );\n\t\t\tthis.removeEventListener( 'mouseup', onEvent );\n\t\t\tthis.removeEventListener( 'click', onEvent );\n\n\t\t};\n\n\t}\n\n}\n\nclass HTMLTexture extends CanvasTexture {\n\n\tconstructor( dom ) {\n\n\t\tsuper( html2canvas( dom ) );\n\n\t\tthis.dom = dom;\n\n\t\tthis.anisotropy = 16;\n\t\tthis.encoding = sRGBEncoding;\n\t\tthis.minFilter = LinearFilter;\n\t\tthis.magFilter = LinearFilter;\n\n\t\t// Create an observer on the DOM, and run html2canvas update in the next loop\n\t\tconst observer = new MutationObserver( () => {\n\n\t\t\tif ( ! this.scheduleUpdate ) {\n\n\t\t\t\t// ideally should use xr.requestAnimationFrame, here setTimeout to avoid passing the renderer\n\t\t\t\tthis.scheduleUpdate = setTimeout( () => this.update(), 16 );\n\n\t\t\t}\n\n\t\t} );\n\n\t\tconst config = { attributes: true, childList: true, subtree: true, characterData: true };\n\t\tobserver.observe( dom, config );\n\n\t\tthis.observer = observer;\n\n\t}\n\n\tdispatchDOMEvent( event ) {\n\n\t\tif ( event.data ) {\n\n\t\t\thtmlevent( this.dom, event.type, event.data.x, event.data.y );\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tthis.image = html2canvas( this.dom );\n\t\tthis.needsUpdate = true;\n\n\t\tthis.scheduleUpdate = null;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.observer ) {\n\n\t\t\tthis.observer.disconnect();\n\n\t\t}\n\n\t\tthis.scheduleUpdate = clearTimeout( this.scheduleUpdate );\n\n\t\tsuper.dispose();\n\n\t}\n\n}\n\n\n//\n\nconst canvases = new WeakMap();\n\nfunction html2canvas( element ) {\n\n\tconst range = document.createRange();\n\tconst color = new Color();\n\n\tfunction Clipper( context ) {\n\n\t\tconst clips = [];\n\t\tlet isClipping = false;\n\n\t\tfunction doClip() {\n\n\t\t\tif ( isClipping ) {\n\n\t\t\t\tisClipping = false;\n\t\t\t\tcontext.restore();\n\n\t\t\t}\n\n\t\t\tif ( clips.length === 0 ) return;\n\n\t\t\tlet minX = - Infinity, minY = - Infinity;\n\t\t\tlet maxX = Infinity, maxY = Infinity;\n\n\t\t\tfor ( let i = 0; i < clips.length; i ++ ) {\n\n\t\t\t\tconst clip = clips[ i ];\n\n\t\t\t\tminX = Math.max( minX, clip.x );\n\t\t\t\tminY = Math.max( minY, clip.y );\n\t\t\t\tmaxX = Math.min( maxX, clip.x + clip.width );\n\t\t\t\tmaxY = Math.min( maxY, clip.y + clip.height );\n\n\t\t\t}\n\n\t\t\tcontext.save();\n\t\t\tcontext.beginPath();\n\t\t\tcontext.rect( minX, minY, maxX - minX, maxY - minY );\n\t\t\tcontext.clip();\n\n\t\t\tisClipping = true;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\tadd: function ( clip ) {\n\n\t\t\t\tclips.push( clip );\n\t\t\t\tdoClip();\n\n\t\t\t},\n\n\t\t\tremove: function () {\n\n\t\t\t\tclips.pop();\n\t\t\t\tdoClip();\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction drawText( style, x, y, string ) {\n\n\t\tif ( string !== '' ) {\n\n\t\t\tif ( style.textTransform === 'uppercase' ) {\n\n\t\t\t\tstring = string.toUpperCase();\n\n\t\t\t}\n\n\t\t\tcontext.font = style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily;\n\t\t\tcontext.textBaseline = 'top';\n\t\t\tcontext.fillStyle = style.color;\n\t\t\tcontext.fillText( string, x, y + parseFloat( style.fontSize ) * 0.1 );\n\n\t\t}\n\n\t}\n\n\tfunction buildRectPath( x, y, w, h, r ) {\n\n\t\tif ( w < 2 * r ) r = w / 2;\n\t\tif ( h < 2 * r ) r = h / 2;\n\n\t\tcontext.beginPath();\n\t\tcontext.moveTo( x + r, y );\n\t\tcontext.arcTo( x + w, y, x + w, y + h, r );\n\t\tcontext.arcTo( x + w, y + h, x, y + h, r );\n\t\tcontext.arcTo( x, y + h, x, y, r );\n\t\tcontext.arcTo( x, y, x + w, y, r );\n\t\tcontext.closePath();\n\n\t}\n\n\tfunction drawBorder( style, which, x, y, width, height ) {\n\n\t\tconst borderWidth = style[ which + 'Width' ];\n\t\tconst borderStyle = style[ which + 'Style' ];\n\t\tconst borderColor = style[ which + 'Color' ];\n\n\t\tif ( borderWidth !== '0px' && borderStyle !== 'none' && borderColor !== 'transparent' && borderColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\tcontext.strokeStyle = borderColor;\n\t\t\tcontext.lineWidth = parseFloat( borderWidth );\n\t\t\tcontext.beginPath();\n\t\t\tcontext.moveTo( x, y );\n\t\t\tcontext.lineTo( x + width, y + height );\n\t\t\tcontext.stroke();\n\n\t\t}\n\n\t}\n\n\tfunction drawElement( element, style ) {\n\n\t\tlet x = 0, y = 0, width = 0, height = 0;\n\n\t\tif ( element.nodeType === Node.TEXT_NODE ) {\n\n\t\t\t// text\n\n\t\t\trange.selectNode( element );\n\n\t\t\tconst rect = range.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tdrawText( style, x, y, element.nodeValue.trim() );\n\n\t\t} else if ( element.nodeType === Node.COMMENT_NODE ) {\n\n\t\t\treturn;\n\n\t\t} else if ( element instanceof HTMLCanvasElement ) {\n\n\t\t\t// Canvas element\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\n\t\t context.save();\n\t\t\tconst dpr = window.devicePixelRatio;\n\t\t\tcontext.scale( 1 / dpr, 1 / dpr );\n\t\t\tcontext.drawImage( element, x, y );\n\t\t\tcontext.restore();\n\n\t\t} else if ( element instanceof HTMLImageElement ) {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tcontext.drawImage( element, x, y, width, height );\n\n\t\t} else {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tstyle = window.getComputedStyle( element );\n\n\t\t\t// Get the border of the element used for fill and border\n\n\t\t\tbuildRectPath( x, y, width, height, parseFloat( style.borderRadius ) );\n\n\t\t\tconst backgroundColor = style.backgroundColor;\n\n\t\t\tif ( backgroundColor !== 'transparent' && backgroundColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\tcontext.fillStyle = backgroundColor;\n\t\t\t\tcontext.fill();\n\n\t\t\t}\n\n\t\t\t// If all the borders match then stroke the round rectangle\n\n\t\t\tconst borders = [ 'borderTop', 'borderLeft', 'borderBottom', 'borderRight' ];\n\n\t\t\tlet match = true;\n\t\t\tlet prevBorder = null;\n\n\t\t\tfor ( const border of borders ) {\n\n\t\t\t\tif ( prevBorder !== null ) {\n\n\t\t\t\t\tmatch = ( style[ border + 'Width' ] === style[ prevBorder + 'Width' ] ) &&\n\t\t\t\t\t( style[ border + 'Color' ] === style[ prevBorder + 'Color' ] ) &&\n\t\t\t\t\t( style[ border + 'Style' ] === style[ prevBorder + 'Style' ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( match === false ) break;\n\n\t\t\t\tprevBorder = border;\n\n\t\t\t}\n\n\t\t\tif ( match === true ) {\n\n\t\t\t\t// They all match so stroke the rectangle from before allows for border-radius\n\n\t\t\t\tconst width = parseFloat( style.borderTopWidth );\n\n\t\t\t\tif ( style.borderTopWidth !== '0px' && style.borderTopStyle !== 'none' && style.borderTopColor !== 'transparent' && style.borderTopColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\t\tcontext.strokeStyle = style.borderTopColor;\n\t\t\t\t\tcontext.lineWidth = width;\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// Otherwise draw individual borders\n\n\t\t\t\tdrawBorder( style, 'borderTop', x, y, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderLeft', x, y, 0, height );\n\t\t\t\tdrawBorder( style, 'borderBottom', x, y + height, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderRight', x + width, y, 0, height );\n\n\t\t\t}\n\n\t\t\tif ( element instanceof HTMLInputElement ) {\n\n\t\t\t\tlet accentColor = style.accentColor;\n\n\t\t\t\tif ( accentColor === undefined || accentColor === 'auto' ) accentColor = style.color;\n\n\t\t\t\tcolor.set( accentColor );\n\n\t\t\t\tconst luminance = Math.sqrt( 0.299 * ( color.r ** 2 ) + 0.587 * ( color.g ** 2 ) + 0.114 * ( color.b ** 2 ) );\n\t\t\t\tconst accentTextColor = luminance < 0.5 ? 'white' : '#111111';\n\n\t\t\t\tif ( element.type === 'radio' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, height );\n\n\t\t\t\t\tcontext.fillStyle = 'white';\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tbuildRectPath( x + 2, y + 2, width - 4, height - 4, height );\n\n\t\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\t\tcontext.strokeStyle = accentTextColor;\n\t\t\t\t\t\tcontext.lineWidth = 2;\n\t\t\t\t\t\tcontext.fill();\n\t\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'checkbox' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, 2 );\n\n\t\t\t\t\tcontext.fillStyle = element.checked ? accentColor : 'white';\n\t\t\t\t\tcontext.strokeStyle = element.checked ? accentTextColor : accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.stroke();\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tconst currentTextAlign = context.textAlign;\n\n\t\t\t\t\t\tcontext.textAlign = 'center';\n\n\t\t\t\t\t\tconst properties = {\n\t\t\t\t\t\t\tcolor: accentTextColor,\n\t\t\t\t\t\t\tfontFamily: style.fontFamily,\n\t\t\t\t\t\t\tfontSize: height + 'px',\n\t\t\t\t\t\t\tfontWeight: 'bold'\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tdrawText( properties, x + ( width / 2 ), y, '✔' );\n\n\t\t\t\t\t\tcontext.textAlign = currentTextAlign;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'range' ) {\n\n\t\t\t\t\tconst [ min, max, value ] = [ 'min', 'max', 'value' ].map( property => parseFloat( element[ property ] ) );\n\t\t\t\t\tconst position = ( ( value - min ) / ( max - min ) ) * ( width - height );\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), width, height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentTextColor;\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), position + ( height / 2 ), height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tbuildRectPath( x + position, y, height, height, height / 2 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'color' || element.type === 'text' || element.type === 'number' ) {\n\n\t\t\t\t\tclipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\t\t\t\tdrawText( style, x + parseInt( style.paddingLeft ), y + parseInt( style.paddingTop ), element.value );\n\n\t\t\t\t\tclipper.remove();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t// debug\n\t\tcontext.strokeStyle = '#' + Math.random().toString( 16 ).slice( - 3 );\n\t\tcontext.strokeRect( x - 0.5, y - 0.5, width + 1, height + 1 );\n\t\t*/\n\n\t\tconst isClipping = style.overflow === 'auto' || style.overflow === 'hidden';\n\n\t\tif ( isClipping ) clipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\tdrawElement( element.childNodes[ i ], style );\n\n\t\t}\n\n\t\tif ( isClipping ) clipper.remove();\n\n\t}\n\n\tconst offset = element.getBoundingClientRect();\n\n\tlet canvas = canvases.get( element );\n\n\tif ( canvas === undefined ) {\n\n\t\tcanvas = document.createElement( 'canvas' );\n\t\tcanvas.width = offset.width;\n\t\tcanvas.height = offset.height;\n\t\tcanvases.set( element, canvas );\n\n\t}\n\n\tconst context = canvas.getContext( '2d'/*, { alpha: false }*/ );\n\n\tconst clipper = new Clipper( context );\n\n\t// console.time( 'drawElement' );\n\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\n\tdrawElement( element );\n\n\t// console.timeEnd( 'drawElement' );\n\n\treturn canvas;\n\n}\n\nfunction htmlevent( element, event, x, y ) {\n\n\tconst mouseEventInit = {\n\t\tclientX: ( x * element.offsetWidth ) + element.offsetLeft,\n\t\tclientY: ( y * element.offsetHeight ) + element.offsetTop,\n\t\tview: element.ownerDocument.defaultView\n\t};\n\n\t// TODO: Find out why this is added. Keep commented out when this file is updated\n\t// window.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\tconst rect = element.getBoundingClientRect();\n\n\tx = x * rect.width + rect.left;\n\ty = y * rect.height + rect.top;\n\n\tfunction traverse( element ) {\n\n\t\tif ( element.nodeType !== Node.TEXT_NODE && element.nodeType !== Node.COMMENT_NODE ) {\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tif ( x > rect.left && x < rect.right && y > rect.top && y < rect.bottom ) {\n\n\t\t\t\telement.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\t\t\t\tif ( element instanceof HTMLInputElement && element.type === 'range' && ( event === 'mousedown' || event === 'click' ) ) {\n\n\t\t\t\t\tconst [ min, max ] = [ 'min', 'max' ].map( property => parseFloat( element[ property ] ) );\n\n\t\t\t\t\tconst width = rect.width;\n\t\t\t\t\tconst offsetX = x - rect.x;\n\t\t\t\t\tconst proportion = offsetX / width;\n\t\t\t\t\telement.value = min + ( max - min ) * proportion;\n\t\t\t\t\telement.dispatchEvent( new InputEvent( 'input', { bubbles: true } ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\t\ttraverse( element.childNodes[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttraverse( element );\n\n}\n\nexport { HTMLMesh };\n","/* jshint esversion: 9, -W097 */\n/* For dealing with spline curves */\n/* global THREE, AFRAME, setTimeout, console */\n'use strict';\n\nimport { HTMLMesh } from './HTMLMesh.js';\n\nconst schemaHTML = {\n\thtml: {\n\t\ttype: 'selector',\n\t},\n\tcursor: {\n\t\ttype: 'selector',\n\t}\n};\n\ndocumentation:\n{\n\tschemaHTML.html.description = `HTML element to use.`;\n\tschemaHTML.cursor.description = `Visual indicator for where the user is currently pointing`;\n}\n\nconst _pointer = new THREE.Vector2();\nconst _event = { type: '', data: _pointer };\nAFRAME.registerComponent('html', {\n\tschema: schemaHTML,\n\tinit() {\n\t\tthis.rerender = this.rerender.bind(this);\n\t\tthis.handle = this.handle.bind(this);\n\t\tthis.onClick = e => this.handle('click', e);\n\t\tthis.onMouseLeave = e => this.handle('mouseleave', e);\n\t\tthis.onMouseEnter = e => this.handle('mouseenter', e);\n\t\tthis.onMouseUp = e => this.handle('mouseup', e);\n\t\tthis.onMouseDown = e => this.handle('mousedown', e);\n\t\tthis.mouseMoveDetail = {\n\t\t\tdetail: {\n\t\t\t\tcursorEl: null,\n\t\t\t\tintersection: null\n\t\t\t}\n\t\t};\n\t},\n\tplay() {\n\t\tthis.el.addEventListener('click', this.onClick);\n\t\tthis.el.addEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.addEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.addEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.addEventListener('mousedown', this.onMouseDown);\n\t},\n\tpause() {\n\t\tthis.el.removeEventListener('click', this.onClick);\n\t\tthis.el.removeEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.removeEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.removeEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.removeEventListener('mousedown', this.onMouseDown);\n\t},\n\tupdate() {\n\t\tthis.remove();\n\t\tif (!this.data.html) return;\n\t\tconst mesh = new HTMLMesh(this.data.html);\n\t\tthis.el.setObject3D('html', mesh);\n\t\tthis.data.html.addEventListener('input', this.rerender);\n\t\tthis.data.html.addEventListener('change', this.rerender);\n\t\tthis.cursor = this.data.cursor ? this.data.cursor.object3D : null;\n\t},\n\ttick() {\n\t\tif (this.activeRaycaster) {\n\t\t\tconst intersection = this.activeRaycaster.components.raycaster.getIntersection(this.el);\n\t\t\tthis.mouseMoveDetail.detail.cursorEl = this.activeRaycaster;\n\t\t\tthis.mouseMoveDetail.detail.intersection = intersection;\n\t\t\tthis.handle('mousemove', this.mouseMoveDetail);\n\t\t}\n\t},\n\thandle(type, evt) {\n\t\tconst intersection = evt.detail.intersection;\n\t\tconst raycaster = evt.detail.cursorEl;\n\t\tif (type === 'mouseenter') {\n\t\t\tthis.activeRaycaster = raycaster;\n\t\t}\n\t\tif (type === 'mouseleave' && this.activeRaycaster === raycaster) {\n\t\t\tthis.activeRaycaster = null;\n\t\t}\n\t\tif (this.cursor) this.cursor.visible = false;\n\t\tif (intersection) {\n\t\t\tconst mesh = this.el.getObject3D('html');\n\t\t\tconst uv = intersection.uv;\n\t\t\t_event.type = type;\n\t\t\t_event.data.set( uv.x, 1 - uv.y );\n\t\t\tmesh.dispatchEvent( _event );\n\n\t\t\tif (this.cursor) {\n\t\t\t\tthis.cursor.visible = true;\n\t\t\t\tthis.cursor.parent.worldToLocal(this.cursor.position.copy(intersection.point));\n\t\t\t}\n\t\t}\n\t},\n\trerender() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh && !mesh.material.map.scheduleUpdate) {\n\t\t\tmesh.material.map.scheduleUpdate = setTimeout( () => mesh.material.map.update(), 16 );\n\t\t}\n\t},\n\tremove() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh) {\n\t\t\tthis.el.removeObject3D('html');\n\t\t\tthis.data.html.removeEventListener('input', this.rerender);\n\t\t\tthis.data.html.removeEventListener('change', this.rerender);\n\t\t\tmesh.dispose();\n\t\t}\n\t\tthis.activeRaycaster = null;\n\t\tthis.mouseMoveDetail.detail.cursorEl = null;\n\t\tthis.mouseMoveDetail.detail.intersection = null;\n\t\tthis.cursor = null;\n\t},\n});\n"],"names":["Mesh","PlaneGeometry","MeshBasicMaterial","CanvasTexture","sRGBEncoding","LinearFilter","Color"],"mappings":";;;CAAA;AAeA;CACA,MAAM,QAAQ,SAASA,UAAI,CAAC;AAC5B;CACA,CAAC,WAAW,EAAE,GAAG,GAAG;AACpB;CACA,EAAE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,GAAG,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AI,CAAC,QAAQ,CAAC,CAAC;CAC/D,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;CAClB,GAAG;CACH,EAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;CAC9B,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;CAC9C,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;CAClD,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;CACrB,EAAE;CACF,CAAC,CAAC;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"aframe-html.js","sources":["../src/HTMLMesh.js","../src/aframe-html.js"],"sourcesContent":["// This is a copy of https://github.com/mrdoob/three.js/blob/0403020848c26a9605eb91c99a949111ad4a532e/examples/jsm/interactive/HTMLMesh.js\n// with the following changes:\n// - Keep compatibility with three r147 aframe 1.4.2, still using \"this.encoding = sRGBEncoding\", otherwise using \"this.colorSpace = SRGBColorSpace;\"\n// - window.dispatchEvent line commented, see the TODO below.\n// Look at https://github.com/mrdoob/three.js/commits/dev/examples/jsm/interactive/HTMLMesh.js\n// to see if there are other changes that can be retrieved here.\nimport {\n\tCanvasTexture,\n\tLinearFilter,\n\tMesh,\n\tMeshBasicMaterial,\n\tPlaneGeometry,\n\tSRGBColorSpace,\n\tsRGBEncoding,\n\tColor\n} from 'three';\n\nclass HTMLMesh extends Mesh {\n\n\tconstructor( dom ) {\n\n\t\tconst texture = new HTMLTexture( dom );\n\n\t\tconst geometry = new PlaneGeometry( texture.image.width * 0.001, texture.image.height * 0.001 );\n\t\tconst material = new MeshBasicMaterial( { map: texture, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tfunction onEvent( event ) {\n\n\t\t\tmaterial.map.dispatchDOMEvent( event );\n\n\t\t}\n\n\t\tthis.addEventListener( 'mousedown', onEvent );\n\t\tthis.addEventListener( 'mousemove', onEvent );\n\t\tthis.addEventListener( 'mouseup', onEvent );\n\t\tthis.addEventListener( 'click', onEvent );\n\n\t\tthis.dispose = function () {\n\n\t\t\tgeometry.dispose();\n\t\t\tmaterial.dispose();\n\n\t\t\tmaterial.map.dispose();\n\n\t\t\tcanvases.delete( dom );\n\n\t\t\tthis.removeEventListener( 'mousedown', onEvent );\n\t\t\tthis.removeEventListener( 'mousemove', onEvent );\n\t\t\tthis.removeEventListener( 'mouseup', onEvent );\n\t\t\tthis.removeEventListener( 'click', onEvent );\n\n\t\t};\n\n\t}\n\n}\n\nclass HTMLTexture extends CanvasTexture {\n\n\tconstructor( dom ) {\n\n\t\tsuper( html2canvas( dom ) );\n\n\t\tthis.dom = dom;\n\n\t\tthis.anisotropy = 16;\n\t\tif ( THREE.REVISION === '147' ) { // Keep compatibility with aframe 1.4.2\n\n\t\t\tthis.encoding = sRGBEncoding;\n\n\t\t} else {\n\n\t\t\tthis.colorSpace = SRGBColorSpace;\n\n\t\t}\n\n\t\tthis.minFilter = LinearFilter;\n\t\tthis.magFilter = LinearFilter;\n\n\t\t// Create an observer on the DOM, and run html2canvas update in the next loop\n\t\tconst observer = new MutationObserver( () => {\n\n\t\t\tif ( ! this.scheduleUpdate ) {\n\n\t\t\t\t// ideally should use xr.requestAnimationFrame, here setTimeout to avoid passing the renderer\n\t\t\t\tthis.scheduleUpdate = setTimeout( () => this.update(), 16 );\n\n\t\t\t}\n\n\t\t} );\n\n\t\tconst config = { attributes: true, childList: true, subtree: true, characterData: true };\n\t\tobserver.observe( dom, config );\n\n\t\tthis.observer = observer;\n\n\t}\n\n\tdispatchDOMEvent( event ) {\n\n\t\tif ( event.data ) {\n\n\t\t\thtmlevent( this.dom, event.type, event.data.x, event.data.y );\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tthis.image = html2canvas( this.dom );\n\t\tthis.needsUpdate = true;\n\n\t\tthis.scheduleUpdate = null;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.observer ) {\n\n\t\t\tthis.observer.disconnect();\n\n\t\t}\n\n\t\tthis.scheduleUpdate = clearTimeout( this.scheduleUpdate );\n\n\t\tsuper.dispose();\n\n\t}\n\n}\n\n\n//\n\nconst canvases = new WeakMap();\n\nfunction html2canvas( element ) {\n\n\tconst range = document.createRange();\n\tconst color = new Color();\n\n\tfunction Clipper( context ) {\n\n\t\tconst clips = [];\n\t\tlet isClipping = false;\n\n\t\tfunction doClip() {\n\n\t\t\tif ( isClipping ) {\n\n\t\t\t\tisClipping = false;\n\t\t\t\tcontext.restore();\n\n\t\t\t}\n\n\t\t\tif ( clips.length === 0 ) return;\n\n\t\t\tlet minX = - Infinity, minY = - Infinity;\n\t\t\tlet maxX = Infinity, maxY = Infinity;\n\n\t\t\tfor ( let i = 0; i < clips.length; i ++ ) {\n\n\t\t\t\tconst clip = clips[ i ];\n\n\t\t\t\tminX = Math.max( minX, clip.x );\n\t\t\t\tminY = Math.max( minY, clip.y );\n\t\t\t\tmaxX = Math.min( maxX, clip.x + clip.width );\n\t\t\t\tmaxY = Math.min( maxY, clip.y + clip.height );\n\n\t\t\t}\n\n\t\t\tcontext.save();\n\t\t\tcontext.beginPath();\n\t\t\tcontext.rect( minX, minY, maxX - minX, maxY - minY );\n\t\t\tcontext.clip();\n\n\t\t\tisClipping = true;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\tadd: function ( clip ) {\n\n\t\t\t\tclips.push( clip );\n\t\t\t\tdoClip();\n\n\t\t\t},\n\n\t\t\tremove: function () {\n\n\t\t\t\tclips.pop();\n\t\t\t\tdoClip();\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction drawText( style, x, y, string ) {\n\n\t\tif ( string !== '' ) {\n\n\t\t\tif ( style.textTransform === 'uppercase' ) {\n\n\t\t\t\tstring = string.toUpperCase();\n\n\t\t\t}\n\n\t\t\tcontext.font = style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily;\n\t\t\tcontext.textBaseline = 'top';\n\t\t\tcontext.fillStyle = style.color;\n\t\t\tcontext.fillText( string, x, y + parseFloat( style.fontSize ) * 0.1 );\n\n\t\t}\n\n\t}\n\n\tfunction buildRectPath( x, y, w, h, r ) {\n\n\t\tif ( w < 2 * r ) r = w / 2;\n\t\tif ( h < 2 * r ) r = h / 2;\n\n\t\tcontext.beginPath();\n\t\tcontext.moveTo( x + r, y );\n\t\tcontext.arcTo( x + w, y, x + w, y + h, r );\n\t\tcontext.arcTo( x + w, y + h, x, y + h, r );\n\t\tcontext.arcTo( x, y + h, x, y, r );\n\t\tcontext.arcTo( x, y, x + w, y, r );\n\t\tcontext.closePath();\n\n\t}\n\n\tfunction drawBorder( style, which, x, y, width, height ) {\n\n\t\tconst borderWidth = style[ which + 'Width' ];\n\t\tconst borderStyle = style[ which + 'Style' ];\n\t\tconst borderColor = style[ which + 'Color' ];\n\n\t\tif ( borderWidth !== '0px' && borderStyle !== 'none' && borderColor !== 'transparent' && borderColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\tcontext.strokeStyle = borderColor;\n\t\t\tcontext.lineWidth = parseFloat( borderWidth );\n\t\t\tcontext.beginPath();\n\t\t\tcontext.moveTo( x, y );\n\t\t\tcontext.lineTo( x + width, y + height );\n\t\t\tcontext.stroke();\n\n\t\t}\n\n\t}\n\n\tfunction drawElement( element, style ) {\n\n\t\tlet x = 0, y = 0, width = 0, height = 0;\n\n\t\tif ( element.nodeType === Node.TEXT_NODE ) {\n\n\t\t\t// text\n\n\t\t\trange.selectNode( element );\n\n\t\t\tconst rect = range.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tdrawText( style, x, y, element.nodeValue.trim() );\n\n\t\t} else if ( element.nodeType === Node.COMMENT_NODE ) {\n\n\t\t\treturn;\n\n\t\t} else if ( element instanceof HTMLCanvasElement ) {\n\n\t\t\t// Canvas element\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\n\t\t context.save();\n\t\t\tconst dpr = window.devicePixelRatio;\n\t\t\tcontext.scale( 1 / dpr, 1 / dpr );\n\t\t\tcontext.drawImage( element, x, y );\n\t\t\tcontext.restore();\n\n\t\t} else if ( element instanceof HTMLImageElement ) {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tcontext.drawImage( element, x, y, width, height );\n\n\t\t} else {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tstyle = window.getComputedStyle( element );\n\n\t\t\t// Get the border of the element used for fill and border\n\n\t\t\tbuildRectPath( x, y, width, height, parseFloat( style.borderRadius ) );\n\n\t\t\tconst backgroundColor = style.backgroundColor;\n\n\t\t\tif ( backgroundColor !== 'transparent' && backgroundColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\tcontext.fillStyle = backgroundColor;\n\t\t\t\tcontext.fill();\n\n\t\t\t}\n\n\t\t\t// If all the borders match then stroke the round rectangle\n\n\t\t\tconst borders = [ 'borderTop', 'borderLeft', 'borderBottom', 'borderRight' ];\n\n\t\t\tlet match = true;\n\t\t\tlet prevBorder = null;\n\n\t\t\tfor ( const border of borders ) {\n\n\t\t\t\tif ( prevBorder !== null ) {\n\n\t\t\t\t\tmatch = ( style[ border + 'Width' ] === style[ prevBorder + 'Width' ] ) &&\n\t\t\t\t\t( style[ border + 'Color' ] === style[ prevBorder + 'Color' ] ) &&\n\t\t\t\t\t( style[ border + 'Style' ] === style[ prevBorder + 'Style' ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( match === false ) break;\n\n\t\t\t\tprevBorder = border;\n\n\t\t\t}\n\n\t\t\tif ( match === true ) {\n\n\t\t\t\t// They all match so stroke the rectangle from before allows for border-radius\n\n\t\t\t\tconst width = parseFloat( style.borderTopWidth );\n\n\t\t\t\tif ( style.borderTopWidth !== '0px' && style.borderTopStyle !== 'none' && style.borderTopColor !== 'transparent' && style.borderTopColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\t\tcontext.strokeStyle = style.borderTopColor;\n\t\t\t\t\tcontext.lineWidth = width;\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// Otherwise draw individual borders\n\n\t\t\t\tdrawBorder( style, 'borderTop', x, y, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderLeft', x, y, 0, height );\n\t\t\t\tdrawBorder( style, 'borderBottom', x, y + height, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderRight', x + width, y, 0, height );\n\n\t\t\t}\n\n\t\t\tif ( element instanceof HTMLInputElement ) {\n\n\t\t\t\tlet accentColor = style.accentColor;\n\n\t\t\t\tif ( accentColor === undefined || accentColor === 'auto' ) accentColor = style.color;\n\n\t\t\t\tcolor.set( accentColor );\n\n\t\t\t\tconst luminance = Math.sqrt( 0.299 * ( color.r ** 2 ) + 0.587 * ( color.g ** 2 ) + 0.114 * ( color.b ** 2 ) );\n\t\t\t\tconst accentTextColor = luminance < 0.5 ? 'white' : '#111111';\n\n\t\t\t\tif ( element.type === 'radio' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, height );\n\n\t\t\t\t\tcontext.fillStyle = 'white';\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tbuildRectPath( x + 2, y + 2, width - 4, height - 4, height );\n\n\t\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\t\tcontext.strokeStyle = accentTextColor;\n\t\t\t\t\t\tcontext.lineWidth = 2;\n\t\t\t\t\t\tcontext.fill();\n\t\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'checkbox' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, 2 );\n\n\t\t\t\t\tcontext.fillStyle = element.checked ? accentColor : 'white';\n\t\t\t\t\tcontext.strokeStyle = element.checked ? accentTextColor : accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.stroke();\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tconst currentTextAlign = context.textAlign;\n\n\t\t\t\t\t\tcontext.textAlign = 'center';\n\n\t\t\t\t\t\tconst properties = {\n\t\t\t\t\t\t\tcolor: accentTextColor,\n\t\t\t\t\t\t\tfontFamily: style.fontFamily,\n\t\t\t\t\t\t\tfontSize: height + 'px',\n\t\t\t\t\t\t\tfontWeight: 'bold'\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tdrawText( properties, x + ( width / 2 ), y, '✔' );\n\n\t\t\t\t\t\tcontext.textAlign = currentTextAlign;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'range' ) {\n\n\t\t\t\t\tconst [ min, max, value ] = [ 'min', 'max', 'value' ].map( property => parseFloat( element[ property ] ) );\n\t\t\t\t\tconst position = ( ( value - min ) / ( max - min ) ) * ( width - height );\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), width, height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentTextColor;\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), position + ( height / 2 ), height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tbuildRectPath( x + position, y, height, height, height / 2 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'color' || element.type === 'text' || element.type === 'number' ) {\n\n\t\t\t\t\tclipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\t\t\t\tdrawText( style, x + parseInt( style.paddingLeft ), y + parseInt( style.paddingTop ), element.value );\n\n\t\t\t\t\tclipper.remove();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t// debug\n\t\tcontext.strokeStyle = '#' + Math.random().toString( 16 ).slice( - 3 );\n\t\tcontext.strokeRect( x - 0.5, y - 0.5, width + 1, height + 1 );\n\t\t*/\n\n\t\tconst isClipping = style.overflow === 'auto' || style.overflow === 'hidden';\n\n\t\tif ( isClipping ) clipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\tdrawElement( element.childNodes[ i ], style );\n\n\t\t}\n\n\t\tif ( isClipping ) clipper.remove();\n\n\t}\n\n\tconst offset = element.getBoundingClientRect();\n\n\tlet canvas = canvases.get( element );\n\n\tif ( canvas === undefined ) {\n\n\t\tcanvas = document.createElement( 'canvas' );\n\t\tcanvas.width = offset.width;\n\t\tcanvas.height = offset.height;\n\t\tcanvases.set( element, canvas );\n\n\t}\n\n\tconst context = canvas.getContext( '2d'/*, { alpha: false }*/ );\n\n\tconst clipper = new Clipper( context );\n\n\t// console.time( 'drawElement' );\n\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\n\tdrawElement( element );\n\n\t// console.timeEnd( 'drawElement' );\n\n\treturn canvas;\n\n}\n\nfunction htmlevent( element, event, x, y ) {\n\n\tconst mouseEventInit = {\n\t\tclientX: ( x * element.offsetWidth ) + element.offsetLeft,\n\t\tclientY: ( y * element.offsetHeight ) + element.offsetTop,\n\t\tview: element.ownerDocument.defaultView\n\t};\n\n\t// TODO: Find out why this is added. Keep commented out when this file is updated\n\t// window.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\tconst rect = element.getBoundingClientRect();\n\n\tx = x * rect.width + rect.left;\n\ty = y * rect.height + rect.top;\n\n\tfunction traverse( element ) {\n\n\t\tif ( element.nodeType !== Node.TEXT_NODE && element.nodeType !== Node.COMMENT_NODE ) {\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tif ( x > rect.left && x < rect.right && y > rect.top && y < rect.bottom ) {\n\n\t\t\t\telement.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\t\t\t\tif ( element instanceof HTMLInputElement && element.type === 'range' && ( event === 'mousedown' || event === 'click' ) ) {\n\n\t\t\t\t\tconst [ min, max ] = [ 'min', 'max' ].map( property => parseFloat( element[ property ] ) );\n\n\t\t\t\t\tconst width = rect.width;\n\t\t\t\t\tconst offsetX = x - rect.x;\n\t\t\t\t\tconst proportion = offsetX / width;\n\t\t\t\t\telement.value = min + ( max - min ) * proportion;\n\t\t\t\t\telement.dispatchEvent( new InputEvent( 'input', { bubbles: true } ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\t\ttraverse( element.childNodes[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttraverse( element );\n\n}\n\nexport { HTMLMesh };\n","/* jshint esversion: 9, -W097 */\n/* For dealing with spline curves */\n/* global THREE, AFRAME, setTimeout, console */\n'use strict';\n\nimport { HTMLMesh } from './HTMLMesh.js';\n\nconst schemaHTML = {\n\thtml: {\n\t\ttype: 'selector',\n\t},\n\tcursor: {\n\t\ttype: 'selector',\n\t}\n};\n\ndocumentation:\n{\n\tschemaHTML.html.description = `HTML element to use.`;\n\tschemaHTML.cursor.description = `Visual indicator for where the user is currently pointing`;\n}\n\nconst _pointer = new THREE.Vector2();\nconst _event = { type: '', data: _pointer };\nAFRAME.registerComponent('html', {\n\tschema: schemaHTML,\n\tinit() {\n\t\tthis.rerender = this.rerender.bind(this);\n\t\tthis.handle = this.handle.bind(this);\n\t\tthis.onClick = e => this.handle('click', e);\n\t\tthis.onMouseLeave = e => this.handle('mouseleave', e);\n\t\tthis.onMouseEnter = e => this.handle('mouseenter', e);\n\t\tthis.onMouseUp = e => this.handle('mouseup', e);\n\t\tthis.onMouseDown = e => this.handle('mousedown', e);\n\t\tthis.mouseMoveDetail = {\n\t\t\tdetail: {\n\t\t\t\tcursorEl: null,\n\t\t\t\tintersection: null\n\t\t\t}\n\t\t};\n\t},\n\tplay() {\n\t\tthis.el.addEventListener('click', this.onClick);\n\t\tthis.el.addEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.addEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.addEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.addEventListener('mousedown', this.onMouseDown);\n\t},\n\tpause() {\n\t\tthis.el.removeEventListener('click', this.onClick);\n\t\tthis.el.removeEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.removeEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.removeEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.removeEventListener('mousedown', this.onMouseDown);\n\t},\n\tupdate() {\n\t\tthis.remove();\n\t\tif (!this.data.html) return;\n\t\tconst mesh = new HTMLMesh(this.data.html);\n\t\tthis.el.setObject3D('html', mesh);\n\t\tthis.data.html.addEventListener('input', this.rerender);\n\t\tthis.data.html.addEventListener('change', this.rerender);\n\t\tthis.cursor = this.data.cursor ? this.data.cursor.object3D : null;\n\t},\n\ttick() {\n\t\tif (this.activeRaycaster) {\n\t\t\tconst intersection = this.activeRaycaster.components.raycaster.getIntersection(this.el);\n\t\t\tthis.mouseMoveDetail.detail.cursorEl = this.activeRaycaster;\n\t\t\tthis.mouseMoveDetail.detail.intersection = intersection;\n\t\t\tthis.handle('mousemove', this.mouseMoveDetail);\n\t\t}\n\t},\n\thandle(type, evt) {\n\t\tconst intersection = evt.detail.intersection;\n\t\tconst raycaster = evt.detail.cursorEl;\n\t\tif (type === 'mouseenter') {\n\t\t\tthis.activeRaycaster = raycaster;\n\t\t}\n\t\tif (type === 'mouseleave' && this.activeRaycaster === raycaster) {\n\t\t\tthis.activeRaycaster = null;\n\t\t}\n\t\tif (this.cursor) this.cursor.visible = false;\n\t\tif (intersection) {\n\t\t\tconst mesh = this.el.getObject3D('html');\n\t\t\tconst uv = intersection.uv;\n\t\t\t_event.type = type;\n\t\t\t_event.data.set( uv.x, 1 - uv.y );\n\t\t\tmesh.dispatchEvent( _event );\n\n\t\t\tif (this.cursor) {\n\t\t\t\tthis.cursor.visible = true;\n\t\t\t\tthis.cursor.parent.worldToLocal(this.cursor.position.copy(intersection.point));\n\t\t\t}\n\t\t}\n\t},\n\trerender() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh && !mesh.material.map.scheduleUpdate) {\n\t\t\tmesh.material.map.scheduleUpdate = setTimeout( () => mesh.material.map.update(), 16 );\n\t\t}\n\t},\n\tremove() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh) {\n\t\t\tthis.el.removeObject3D('html');\n\t\t\tthis.data.html.removeEventListener('input', this.rerender);\n\t\t\tthis.data.html.removeEventListener('change', this.rerender);\n\t\t\tmesh.dispose();\n\t\t}\n\t\tthis.activeRaycaster = null;\n\t\tthis.mouseMoveDetail.detail.cursorEl = null;\n\t\tthis.mouseMoveDetail.detail.intersection = null;\n\t\tthis.cursor = null;\n\t},\n});\n"],"names":["Mesh","PlaneGeometry","MeshBasicMaterial","CanvasTexture","sRGBEncoding","SRGBColorSpace","LinearFilter","Color"],"mappings":";;;CAAA;AAgBA;CACA,MAAM,QAAQ,SAASA,UAAI,CAAC;AAC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AE;CACZ,GAAG,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;CAClC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;CAC9D,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;CAC/D,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;CAClB,GAAG;CACH,EAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;CAC9B,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;CAC9C,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;CAClD,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;CACrB,EAAE;CACF,CAAC,CAAC;;;;;;"}
\ No newline at end of file
diff --git a/build/aframe-html.min.js b/build/aframe-html.min.js
index eff44ff..400809f 100644
--- a/build/aframe-html.min.js
+++ b/build/aframe-html.min.js
@@ -1,2 +1,2 @@
-!function(e){"use strict";class t extends e.Mesh{constructor(t){const s=new i(t),n=new e.PlaneGeometry(.001*s.image.width,.001*s.image.height),r=new e.MeshBasicMaterial({map:s,toneMapped:!1,transparent:!0});function l(e){r.map.dispatchDOMEvent(e)}super(n,r),this.addEventListener("mousedown",l),this.addEventListener("mousemove",l),this.addEventListener("mouseup",l),this.addEventListener("click",l),this.dispose=function(){n.dispose(),r.dispose(),r.map.dispose(),o.delete(t),this.removeEventListener("mousedown",l),this.removeEventListener("mousemove",l),this.removeEventListener("mouseup",l),this.removeEventListener("click",l)}}}class i extends e.CanvasTexture{constructor(t){super(s(t)),this.dom=t,this.anisotropy=16,this.encoding=e.sRGBEncoding,this.minFilter=e.LinearFilter,this.magFilter=e.LinearFilter;const i=new MutationObserver((()=>{this.scheduleUpdate||(this.scheduleUpdate=setTimeout((()=>this.update()),16))}));i.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),this.observer=i}dispatchDOMEvent(e){e.data&&function(e,t,i,o){const s={clientX:i*e.offsetWidth+e.offsetLeft,clientY:o*e.offsetHeight+e.offsetTop,view:e.ownerDocument.defaultView},n=e.getBoundingClientRect();function r(e){if(e.nodeType!==Node.TEXT_NODE&&e.nodeType!==Node.COMMENT_NODE){const n=e.getBoundingClientRect();if(i>n.left&&in.top&&oparseFloat(e[t]))),s=n.width,r=(i-n.x)/s;e.value=t+(o-t)*r,e.dispatchEvent(new InputEvent("input",{bubbles:!0}))}for(let t=0;tparseFloat(t[e]))),l=(n-o)/(s-o)*(p-m);r(h,u+m/4,p,m/2,m/4),d.fillStyle=i,d.strokeStyle=e,d.lineWidth=1,d.fill(),d.stroke(),r(h,u+m/4,l+m/2,m/2,m/4),d.fillStyle=e,d.fill(),r(h+l,u,m,m,m/2),d.fillStyle=e,d.fill()}"color"!==t.type&&"text"!==t.type&&"number"!==t.type||(c.add({x:h,y:u,width:p,height:m}),n(o,h+parseInt(o.paddingLeft),u+parseInt(o.paddingTop),t.value),c.remove())}}}const v="auto"===o.overflow||"hidden"===o.overflow;v&&c.add({x:h,y:u,width:p,height:m});for(let i=0;ithis.handle("click",e),this.onMouseLeave=e=>this.handle("mouseleave",e),this.onMouseEnter=e=>this.handle("mouseenter",e),this.onMouseUp=e=>this.handle("mouseup",e),this.onMouseDown=e=>this.handle("mousedown",e),this.mouseMoveDetail={detail:{cursorEl:null,intersection:null}}},play(){this.el.addEventListener("click",this.onClick),this.el.addEventListener("mouseleave",this.onMouseLeave),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseup",this.onMouseUp),this.el.addEventListener("mousedown",this.onMouseDown)},pause(){this.el.removeEventListener("click",this.onClick),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("mousedown",this.onMouseDown)},update(){if(this.remove(),!this.data.html)return;const e=new t(this.data.html);this.el.setObject3D("html",e),this.data.html.addEventListener("input",this.rerender),this.data.html.addEventListener("change",this.rerender),this.cursor=this.data.cursor?this.data.cursor.object3D:null},tick(){if(this.activeRaycaster){const e=this.activeRaycaster.components.raycaster.getIntersection(this.el);this.mouseMoveDetail.detail.cursorEl=this.activeRaycaster,this.mouseMoveDetail.detail.intersection=e,this.handle("mousemove",this.mouseMoveDetail)}},handle(e,t){const i=t.detail.intersection,o=t.detail.cursorEl;if("mouseenter"===e&&(this.activeRaycaster=o),"mouseleave"===e&&this.activeRaycaster===o&&(this.activeRaycaster=null),this.cursor&&(this.cursor.visible=!1),i){const t=this.el.getObject3D("html"),o=i.uv;n.type=e,n.data.set(o.x,1-o.y),t.dispatchEvent(n),this.cursor&&(this.cursor.visible=!0,this.cursor.parent.worldToLocal(this.cursor.position.copy(i.point)))}},rerender(){const e=this.el.getObject3D("html");e&&!e.material.map.scheduleUpdate&&(e.material.map.scheduleUpdate=setTimeout((()=>e.material.map.update()),16))},remove(){const e=this.el.getObject3D("html");e&&(this.el.removeObject3D("html"),this.data.html.removeEventListener("input",this.rerender),this.data.html.removeEventListener("change",this.rerender),e.dispose()),this.activeRaycaster=null,this.mouseMoveDetail.detail.cursorEl=null,this.mouseMoveDetail.detail.intersection=null,this.cursor=null}})}(THREE);
+!function(e){"use strict";class t extends e.Mesh{constructor(t){const s=new i(t),n=new e.PlaneGeometry(.001*s.image.width,.001*s.image.height),r=new e.MeshBasicMaterial({map:s,toneMapped:!1,transparent:!0});function l(e){r.map.dispatchDOMEvent(e)}super(n,r),this.addEventListener("mousedown",l),this.addEventListener("mousemove",l),this.addEventListener("mouseup",l),this.addEventListener("click",l),this.dispose=function(){n.dispose(),r.dispose(),r.map.dispose(),o.delete(t),this.removeEventListener("mousedown",l),this.removeEventListener("mousemove",l),this.removeEventListener("mouseup",l),this.removeEventListener("click",l)}}}class i extends e.CanvasTexture{constructor(t){super(s(t)),this.dom=t,this.anisotropy=16,"147"===THREE.REVISION?this.encoding=e.sRGBEncoding:this.colorSpace=e.SRGBColorSpace,this.minFilter=e.LinearFilter,this.magFilter=e.LinearFilter;const i=new MutationObserver((()=>{this.scheduleUpdate||(this.scheduleUpdate=setTimeout((()=>this.update()),16))}));i.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),this.observer=i}dispatchDOMEvent(e){e.data&&function(e,t,i,o){const s={clientX:i*e.offsetWidth+e.offsetLeft,clientY:o*e.offsetHeight+e.offsetTop,view:e.ownerDocument.defaultView},n=e.getBoundingClientRect();function r(e){if(e.nodeType!==Node.TEXT_NODE&&e.nodeType!==Node.COMMENT_NODE){const n=e.getBoundingClientRect();if(i>n.left&&in.top&&oparseFloat(e[t]))),s=n.width,r=(i-n.x)/s;e.value=t+(o-t)*r,e.dispatchEvent(new InputEvent("input",{bubbles:!0}))}for(let t=0;tparseFloat(t[e]))),l=(n-o)/(s-o)*(p-m);r(h,u+m/4,p,m/2,m/4),d.fillStyle=i,d.strokeStyle=e,d.lineWidth=1,d.fill(),d.stroke(),r(h,u+m/4,l+m/2,m/2,m/4),d.fillStyle=e,d.fill(),r(h+l,u,m,m,m/2),d.fillStyle=e,d.fill()}"color"!==t.type&&"text"!==t.type&&"number"!==t.type||(c.add({x:h,y:u,width:p,height:m}),n(o,h+parseInt(o.paddingLeft),u+parseInt(o.paddingTop),t.value),c.remove())}}}const v="auto"===o.overflow||"hidden"===o.overflow;v&&c.add({x:h,y:u,width:p,height:m});for(let i=0;ithis.handle("click",e),this.onMouseLeave=e=>this.handle("mouseleave",e),this.onMouseEnter=e=>this.handle("mouseenter",e),this.onMouseUp=e=>this.handle("mouseup",e),this.onMouseDown=e=>this.handle("mousedown",e),this.mouseMoveDetail={detail:{cursorEl:null,intersection:null}}},play(){this.el.addEventListener("click",this.onClick),this.el.addEventListener("mouseleave",this.onMouseLeave),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseup",this.onMouseUp),this.el.addEventListener("mousedown",this.onMouseDown)},pause(){this.el.removeEventListener("click",this.onClick),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("mousedown",this.onMouseDown)},update(){if(this.remove(),!this.data.html)return;const e=new t(this.data.html);this.el.setObject3D("html",e),this.data.html.addEventListener("input",this.rerender),this.data.html.addEventListener("change",this.rerender),this.cursor=this.data.cursor?this.data.cursor.object3D:null},tick(){if(this.activeRaycaster){const e=this.activeRaycaster.components.raycaster.getIntersection(this.el);this.mouseMoveDetail.detail.cursorEl=this.activeRaycaster,this.mouseMoveDetail.detail.intersection=e,this.handle("mousemove",this.mouseMoveDetail)}},handle(e,t){const i=t.detail.intersection,o=t.detail.cursorEl;if("mouseenter"===e&&(this.activeRaycaster=o),"mouseleave"===e&&this.activeRaycaster===o&&(this.activeRaycaster=null),this.cursor&&(this.cursor.visible=!1),i){const t=this.el.getObject3D("html"),o=i.uv;n.type=e,n.data.set(o.x,1-o.y),t.dispatchEvent(n),this.cursor&&(this.cursor.visible=!0,this.cursor.parent.worldToLocal(this.cursor.position.copy(i.point)))}},rerender(){const e=this.el.getObject3D("html");e&&!e.material.map.scheduleUpdate&&(e.material.map.scheduleUpdate=setTimeout((()=>e.material.map.update()),16))},remove(){const e=this.el.getObject3D("html");e&&(this.el.removeObject3D("html"),this.data.html.removeEventListener("input",this.rerender),this.data.html.removeEventListener("change",this.rerender),e.dispose()),this.activeRaycaster=null,this.mouseMoveDetail.detail.cursorEl=null,this.mouseMoveDetail.detail.intersection=null,this.cursor=null}})}(THREE);
//# sourceMappingURL=aframe-html.min.js.map
diff --git a/build/aframe-html.min.js.map b/build/aframe-html.min.js.map
index b8c30e7..434f82e 100644
--- a/build/aframe-html.min.js.map
+++ b/build/aframe-html.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"aframe-html.min.js","sources":["../src/HTMLMesh.js","../src/aframe-html.js"],"sourcesContent":["// This is a copy of https://github.com/mrdoob/three.js/blob/0403020848c26a9605eb91c99a949111ad4a532e/examples/jsm/interactive/HTMLMesh.js\n// with the following changes:\n// - Revert back to using \"this.encoding = sRGBEncoding\" instead of \"this.colorSpace = SRGBColorSpace;\" for compatibility with three r147 aframe 1.4.2\n// - window.dispatchEvent line commented, see the TODO below.\n// Look at https://github.com/mrdoob/three.js/commits/dev/examples/jsm/interactive/HTMLMesh.js\n// to see if there are other changes that can be retrieved here.\nimport {\n\tCanvasTexture,\n\tLinearFilter,\n\tMesh,\n\tMeshBasicMaterial,\n\tPlaneGeometry,\n\tsRGBEncoding,\n\tColor\n} from 'three';\n\nclass HTMLMesh extends Mesh {\n\n\tconstructor( dom ) {\n\n\t\tconst texture = new HTMLTexture( dom );\n\n\t\tconst geometry = new PlaneGeometry( texture.image.width * 0.001, texture.image.height * 0.001 );\n\t\tconst material = new MeshBasicMaterial( { map: texture, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tfunction onEvent( event ) {\n\n\t\t\tmaterial.map.dispatchDOMEvent( event );\n\n\t\t}\n\n\t\tthis.addEventListener( 'mousedown', onEvent );\n\t\tthis.addEventListener( 'mousemove', onEvent );\n\t\tthis.addEventListener( 'mouseup', onEvent );\n\t\tthis.addEventListener( 'click', onEvent );\n\n\t\tthis.dispose = function () {\n\n\t\t\tgeometry.dispose();\n\t\t\tmaterial.dispose();\n\n\t\t\tmaterial.map.dispose();\n\n\t\t\tcanvases.delete( dom );\n\n\t\t\tthis.removeEventListener( 'mousedown', onEvent );\n\t\t\tthis.removeEventListener( 'mousemove', onEvent );\n\t\t\tthis.removeEventListener( 'mouseup', onEvent );\n\t\t\tthis.removeEventListener( 'click', onEvent );\n\n\t\t};\n\n\t}\n\n}\n\nclass HTMLTexture extends CanvasTexture {\n\n\tconstructor( dom ) {\n\n\t\tsuper( html2canvas( dom ) );\n\n\t\tthis.dom = dom;\n\n\t\tthis.anisotropy = 16;\n\t\tthis.encoding = sRGBEncoding;\n\t\tthis.minFilter = LinearFilter;\n\t\tthis.magFilter = LinearFilter;\n\n\t\t// Create an observer on the DOM, and run html2canvas update in the next loop\n\t\tconst observer = new MutationObserver( () => {\n\n\t\t\tif ( ! this.scheduleUpdate ) {\n\n\t\t\t\t// ideally should use xr.requestAnimationFrame, here setTimeout to avoid passing the renderer\n\t\t\t\tthis.scheduleUpdate = setTimeout( () => this.update(), 16 );\n\n\t\t\t}\n\n\t\t} );\n\n\t\tconst config = { attributes: true, childList: true, subtree: true, characterData: true };\n\t\tobserver.observe( dom, config );\n\n\t\tthis.observer = observer;\n\n\t}\n\n\tdispatchDOMEvent( event ) {\n\n\t\tif ( event.data ) {\n\n\t\t\thtmlevent( this.dom, event.type, event.data.x, event.data.y );\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tthis.image = html2canvas( this.dom );\n\t\tthis.needsUpdate = true;\n\n\t\tthis.scheduleUpdate = null;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.observer ) {\n\n\t\t\tthis.observer.disconnect();\n\n\t\t}\n\n\t\tthis.scheduleUpdate = clearTimeout( this.scheduleUpdate );\n\n\t\tsuper.dispose();\n\n\t}\n\n}\n\n\n//\n\nconst canvases = new WeakMap();\n\nfunction html2canvas( element ) {\n\n\tconst range = document.createRange();\n\tconst color = new Color();\n\n\tfunction Clipper( context ) {\n\n\t\tconst clips = [];\n\t\tlet isClipping = false;\n\n\t\tfunction doClip() {\n\n\t\t\tif ( isClipping ) {\n\n\t\t\t\tisClipping = false;\n\t\t\t\tcontext.restore();\n\n\t\t\t}\n\n\t\t\tif ( clips.length === 0 ) return;\n\n\t\t\tlet minX = - Infinity, minY = - Infinity;\n\t\t\tlet maxX = Infinity, maxY = Infinity;\n\n\t\t\tfor ( let i = 0; i < clips.length; i ++ ) {\n\n\t\t\t\tconst clip = clips[ i ];\n\n\t\t\t\tminX = Math.max( minX, clip.x );\n\t\t\t\tminY = Math.max( minY, clip.y );\n\t\t\t\tmaxX = Math.min( maxX, clip.x + clip.width );\n\t\t\t\tmaxY = Math.min( maxY, clip.y + clip.height );\n\n\t\t\t}\n\n\t\t\tcontext.save();\n\t\t\tcontext.beginPath();\n\t\t\tcontext.rect( minX, minY, maxX - minX, maxY - minY );\n\t\t\tcontext.clip();\n\n\t\t\tisClipping = true;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\tadd: function ( clip ) {\n\n\t\t\t\tclips.push( clip );\n\t\t\t\tdoClip();\n\n\t\t\t},\n\n\t\t\tremove: function () {\n\n\t\t\t\tclips.pop();\n\t\t\t\tdoClip();\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction drawText( style, x, y, string ) {\n\n\t\tif ( string !== '' ) {\n\n\t\t\tif ( style.textTransform === 'uppercase' ) {\n\n\t\t\t\tstring = string.toUpperCase();\n\n\t\t\t}\n\n\t\t\tcontext.font = style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily;\n\t\t\tcontext.textBaseline = 'top';\n\t\t\tcontext.fillStyle = style.color;\n\t\t\tcontext.fillText( string, x, y + parseFloat( style.fontSize ) * 0.1 );\n\n\t\t}\n\n\t}\n\n\tfunction buildRectPath( x, y, w, h, r ) {\n\n\t\tif ( w < 2 * r ) r = w / 2;\n\t\tif ( h < 2 * r ) r = h / 2;\n\n\t\tcontext.beginPath();\n\t\tcontext.moveTo( x + r, y );\n\t\tcontext.arcTo( x + w, y, x + w, y + h, r );\n\t\tcontext.arcTo( x + w, y + h, x, y + h, r );\n\t\tcontext.arcTo( x, y + h, x, y, r );\n\t\tcontext.arcTo( x, y, x + w, y, r );\n\t\tcontext.closePath();\n\n\t}\n\n\tfunction drawBorder( style, which, x, y, width, height ) {\n\n\t\tconst borderWidth = style[ which + 'Width' ];\n\t\tconst borderStyle = style[ which + 'Style' ];\n\t\tconst borderColor = style[ which + 'Color' ];\n\n\t\tif ( borderWidth !== '0px' && borderStyle !== 'none' && borderColor !== 'transparent' && borderColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\tcontext.strokeStyle = borderColor;\n\t\t\tcontext.lineWidth = parseFloat( borderWidth );\n\t\t\tcontext.beginPath();\n\t\t\tcontext.moveTo( x, y );\n\t\t\tcontext.lineTo( x + width, y + height );\n\t\t\tcontext.stroke();\n\n\t\t}\n\n\t}\n\n\tfunction drawElement( element, style ) {\n\n\t\tlet x = 0, y = 0, width = 0, height = 0;\n\n\t\tif ( element.nodeType === Node.TEXT_NODE ) {\n\n\t\t\t// text\n\n\t\t\trange.selectNode( element );\n\n\t\t\tconst rect = range.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tdrawText( style, x, y, element.nodeValue.trim() );\n\n\t\t} else if ( element.nodeType === Node.COMMENT_NODE ) {\n\n\t\t\treturn;\n\n\t\t} else if ( element instanceof HTMLCanvasElement ) {\n\n\t\t\t// Canvas element\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\n\t\t context.save();\n\t\t\tconst dpr = window.devicePixelRatio;\n\t\t\tcontext.scale( 1 / dpr, 1 / dpr );\n\t\t\tcontext.drawImage( element, x, y );\n\t\t\tcontext.restore();\n\n\t\t} else if ( element instanceof HTMLImageElement ) {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tcontext.drawImage( element, x, y, width, height );\n\n\t\t} else {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tstyle = window.getComputedStyle( element );\n\n\t\t\t// Get the border of the element used for fill and border\n\n\t\t\tbuildRectPath( x, y, width, height, parseFloat( style.borderRadius ) );\n\n\t\t\tconst backgroundColor = style.backgroundColor;\n\n\t\t\tif ( backgroundColor !== 'transparent' && backgroundColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\tcontext.fillStyle = backgroundColor;\n\t\t\t\tcontext.fill();\n\n\t\t\t}\n\n\t\t\t// If all the borders match then stroke the round rectangle\n\n\t\t\tconst borders = [ 'borderTop', 'borderLeft', 'borderBottom', 'borderRight' ];\n\n\t\t\tlet match = true;\n\t\t\tlet prevBorder = null;\n\n\t\t\tfor ( const border of borders ) {\n\n\t\t\t\tif ( prevBorder !== null ) {\n\n\t\t\t\t\tmatch = ( style[ border + 'Width' ] === style[ prevBorder + 'Width' ] ) &&\n\t\t\t\t\t( style[ border + 'Color' ] === style[ prevBorder + 'Color' ] ) &&\n\t\t\t\t\t( style[ border + 'Style' ] === style[ prevBorder + 'Style' ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( match === false ) break;\n\n\t\t\t\tprevBorder = border;\n\n\t\t\t}\n\n\t\t\tif ( match === true ) {\n\n\t\t\t\t// They all match so stroke the rectangle from before allows for border-radius\n\n\t\t\t\tconst width = parseFloat( style.borderTopWidth );\n\n\t\t\t\tif ( style.borderTopWidth !== '0px' && style.borderTopStyle !== 'none' && style.borderTopColor !== 'transparent' && style.borderTopColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\t\tcontext.strokeStyle = style.borderTopColor;\n\t\t\t\t\tcontext.lineWidth = width;\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// Otherwise draw individual borders\n\n\t\t\t\tdrawBorder( style, 'borderTop', x, y, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderLeft', x, y, 0, height );\n\t\t\t\tdrawBorder( style, 'borderBottom', x, y + height, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderRight', x + width, y, 0, height );\n\n\t\t\t}\n\n\t\t\tif ( element instanceof HTMLInputElement ) {\n\n\t\t\t\tlet accentColor = style.accentColor;\n\n\t\t\t\tif ( accentColor === undefined || accentColor === 'auto' ) accentColor = style.color;\n\n\t\t\t\tcolor.set( accentColor );\n\n\t\t\t\tconst luminance = Math.sqrt( 0.299 * ( color.r ** 2 ) + 0.587 * ( color.g ** 2 ) + 0.114 * ( color.b ** 2 ) );\n\t\t\t\tconst accentTextColor = luminance < 0.5 ? 'white' : '#111111';\n\n\t\t\t\tif ( element.type === 'radio' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, height );\n\n\t\t\t\t\tcontext.fillStyle = 'white';\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tbuildRectPath( x + 2, y + 2, width - 4, height - 4, height );\n\n\t\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\t\tcontext.strokeStyle = accentTextColor;\n\t\t\t\t\t\tcontext.lineWidth = 2;\n\t\t\t\t\t\tcontext.fill();\n\t\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'checkbox' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, 2 );\n\n\t\t\t\t\tcontext.fillStyle = element.checked ? accentColor : 'white';\n\t\t\t\t\tcontext.strokeStyle = element.checked ? accentTextColor : accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.stroke();\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tconst currentTextAlign = context.textAlign;\n\n\t\t\t\t\t\tcontext.textAlign = 'center';\n\n\t\t\t\t\t\tconst properties = {\n\t\t\t\t\t\t\tcolor: accentTextColor,\n\t\t\t\t\t\t\tfontFamily: style.fontFamily,\n\t\t\t\t\t\t\tfontSize: height + 'px',\n\t\t\t\t\t\t\tfontWeight: 'bold'\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tdrawText( properties, x + ( width / 2 ), y, '✔' );\n\n\t\t\t\t\t\tcontext.textAlign = currentTextAlign;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'range' ) {\n\n\t\t\t\t\tconst [ min, max, value ] = [ 'min', 'max', 'value' ].map( property => parseFloat( element[ property ] ) );\n\t\t\t\t\tconst position = ( ( value - min ) / ( max - min ) ) * ( width - height );\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), width, height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentTextColor;\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), position + ( height / 2 ), height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tbuildRectPath( x + position, y, height, height, height / 2 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'color' || element.type === 'text' || element.type === 'number' ) {\n\n\t\t\t\t\tclipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\t\t\t\tdrawText( style, x + parseInt( style.paddingLeft ), y + parseInt( style.paddingTop ), element.value );\n\n\t\t\t\t\tclipper.remove();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t// debug\n\t\tcontext.strokeStyle = '#' + Math.random().toString( 16 ).slice( - 3 );\n\t\tcontext.strokeRect( x - 0.5, y - 0.5, width + 1, height + 1 );\n\t\t*/\n\n\t\tconst isClipping = style.overflow === 'auto' || style.overflow === 'hidden';\n\n\t\tif ( isClipping ) clipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\tdrawElement( element.childNodes[ i ], style );\n\n\t\t}\n\n\t\tif ( isClipping ) clipper.remove();\n\n\t}\n\n\tconst offset = element.getBoundingClientRect();\n\n\tlet canvas = canvases.get( element );\n\n\tif ( canvas === undefined ) {\n\n\t\tcanvas = document.createElement( 'canvas' );\n\t\tcanvas.width = offset.width;\n\t\tcanvas.height = offset.height;\n\t\tcanvases.set( element, canvas );\n\n\t}\n\n\tconst context = canvas.getContext( '2d'/*, { alpha: false }*/ );\n\n\tconst clipper = new Clipper( context );\n\n\t// console.time( 'drawElement' );\n\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\n\tdrawElement( element );\n\n\t// console.timeEnd( 'drawElement' );\n\n\treturn canvas;\n\n}\n\nfunction htmlevent( element, event, x, y ) {\n\n\tconst mouseEventInit = {\n\t\tclientX: ( x * element.offsetWidth ) + element.offsetLeft,\n\t\tclientY: ( y * element.offsetHeight ) + element.offsetTop,\n\t\tview: element.ownerDocument.defaultView\n\t};\n\n\t// TODO: Find out why this is added. Keep commented out when this file is updated\n\t// window.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\tconst rect = element.getBoundingClientRect();\n\n\tx = x * rect.width + rect.left;\n\ty = y * rect.height + rect.top;\n\n\tfunction traverse( element ) {\n\n\t\tif ( element.nodeType !== Node.TEXT_NODE && element.nodeType !== Node.COMMENT_NODE ) {\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tif ( x > rect.left && x < rect.right && y > rect.top && y < rect.bottom ) {\n\n\t\t\t\telement.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\t\t\t\tif ( element instanceof HTMLInputElement && element.type === 'range' && ( event === 'mousedown' || event === 'click' ) ) {\n\n\t\t\t\t\tconst [ min, max ] = [ 'min', 'max' ].map( property => parseFloat( element[ property ] ) );\n\n\t\t\t\t\tconst width = rect.width;\n\t\t\t\t\tconst offsetX = x - rect.x;\n\t\t\t\t\tconst proportion = offsetX / width;\n\t\t\t\t\telement.value = min + ( max - min ) * proportion;\n\t\t\t\t\telement.dispatchEvent( new InputEvent( 'input', { bubbles: true } ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\t\ttraverse( element.childNodes[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttraverse( element );\n\n}\n\nexport { HTMLMesh };\n","/* jshint esversion: 9, -W097 */\n/* For dealing with spline curves */\n/* global THREE, AFRAME, setTimeout, console */\n'use strict';\n\nimport { HTMLMesh } from './HTMLMesh.js';\n\nconst schemaHTML = {\n\thtml: {\n\t\ttype: 'selector',\n\t},\n\tcursor: {\n\t\ttype: 'selector',\n\t}\n};\n\ndocumentation:\n{\n\tschemaHTML.html.description = `HTML element to use.`;\n\tschemaHTML.cursor.description = `Visual indicator for where the user is currently pointing`;\n}\n\nconst _pointer = new THREE.Vector2();\nconst _event = { type: '', data: _pointer };\nAFRAME.registerComponent('html', {\n\tschema: schemaHTML,\n\tinit() {\n\t\tthis.rerender = this.rerender.bind(this);\n\t\tthis.handle = this.handle.bind(this);\n\t\tthis.onClick = e => this.handle('click', e);\n\t\tthis.onMouseLeave = e => this.handle('mouseleave', e);\n\t\tthis.onMouseEnter = e => this.handle('mouseenter', e);\n\t\tthis.onMouseUp = e => this.handle('mouseup', e);\n\t\tthis.onMouseDown = e => this.handle('mousedown', e);\n\t\tthis.mouseMoveDetail = {\n\t\t\tdetail: {\n\t\t\t\tcursorEl: null,\n\t\t\t\tintersection: null\n\t\t\t}\n\t\t};\n\t},\n\tplay() {\n\t\tthis.el.addEventListener('click', this.onClick);\n\t\tthis.el.addEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.addEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.addEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.addEventListener('mousedown', this.onMouseDown);\n\t},\n\tpause() {\n\t\tthis.el.removeEventListener('click', this.onClick);\n\t\tthis.el.removeEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.removeEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.removeEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.removeEventListener('mousedown', this.onMouseDown);\n\t},\n\tupdate() {\n\t\tthis.remove();\n\t\tif (!this.data.html) return;\n\t\tconst mesh = new HTMLMesh(this.data.html);\n\t\tthis.el.setObject3D('html', mesh);\n\t\tthis.data.html.addEventListener('input', this.rerender);\n\t\tthis.data.html.addEventListener('change', this.rerender);\n\t\tthis.cursor = this.data.cursor ? this.data.cursor.object3D : null;\n\t},\n\ttick() {\n\t\tif (this.activeRaycaster) {\n\t\t\tconst intersection = this.activeRaycaster.components.raycaster.getIntersection(this.el);\n\t\t\tthis.mouseMoveDetail.detail.cursorEl = this.activeRaycaster;\n\t\t\tthis.mouseMoveDetail.detail.intersection = intersection;\n\t\t\tthis.handle('mousemove', this.mouseMoveDetail);\n\t\t}\n\t},\n\thandle(type, evt) {\n\t\tconst intersection = evt.detail.intersection;\n\t\tconst raycaster = evt.detail.cursorEl;\n\t\tif (type === 'mouseenter') {\n\t\t\tthis.activeRaycaster = raycaster;\n\t\t}\n\t\tif (type === 'mouseleave' && this.activeRaycaster === raycaster) {\n\t\t\tthis.activeRaycaster = null;\n\t\t}\n\t\tif (this.cursor) this.cursor.visible = false;\n\t\tif (intersection) {\n\t\t\tconst mesh = this.el.getObject3D('html');\n\t\t\tconst uv = intersection.uv;\n\t\t\t_event.type = type;\n\t\t\t_event.data.set( uv.x, 1 - uv.y );\n\t\t\tmesh.dispatchEvent( _event );\n\n\t\t\tif (this.cursor) {\n\t\t\t\tthis.cursor.visible = true;\n\t\t\t\tthis.cursor.parent.worldToLocal(this.cursor.position.copy(intersection.point));\n\t\t\t}\n\t\t}\n\t},\n\trerender() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh && !mesh.material.map.scheduleUpdate) {\n\t\t\tmesh.material.map.scheduleUpdate = setTimeout( () => mesh.material.map.update(), 16 );\n\t\t}\n\t},\n\tremove() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh) {\n\t\t\tthis.el.removeObject3D('html');\n\t\t\tthis.data.html.removeEventListener('input', this.rerender);\n\t\t\tthis.data.html.removeEventListener('change', this.rerender);\n\t\t\tmesh.dispose();\n\t\t}\n\t\tthis.activeRaycaster = null;\n\t\tthis.mouseMoveDetail.detail.cursorEl = null;\n\t\tthis.mouseMoveDetail.detail.intersection = null;\n\t\tthis.cursor = null;\n\t},\n});\n"],"names":["HTMLMesh","Mesh","constructor","dom","texture","HTMLTexture","geometry","PlaneGeometry","image","width","height","material","MeshBasicMaterial","map","toneMapped","transparent","onEvent","event","dispatchDOMEvent","super","this","addEventListener","dispose","canvases","delete","removeEventListener","CanvasTexture","html2canvas","anisotropy","encoding","sRGBEncoding","minFilter","LinearFilter","magFilter","observer","MutationObserver","scheduleUpdate","setTimeout","update","observe","attributes","childList","subtree","characterData","data","element","x","y","mouseEventInit","clientX","offsetWidth","offsetLeft","clientY","offsetHeight","offsetTop","view","ownerDocument","defaultView","rect","getBoundingClientRect","traverse","nodeType","Node","TEXT_NODE","COMMENT_NODE","left","right","top","bottom","dispatchEvent","MouseEvent","HTMLInputElement","type","min","max","property","parseFloat","proportion","value","InputEvent","bubbles","i","childNodes","length","htmlevent","needsUpdate","disconnect","clearTimeout","WeakMap","range","document","createRange","color","Color","drawText","style","string","textTransform","toUpperCase","context","font","fontWeight","fontSize","fontFamily","textBaseline","fillStyle","fillText","buildRectPath","w","h","r","beginPath","moveTo","arcTo","closePath","drawBorder","which","borderWidth","borderStyle","borderColor","strokeStyle","lineWidth","lineTo","stroke","offset","canvas","get","undefined","createElement","set","getContext","clipper","clips","isClipping","doClip","restore","minX","Infinity","minY","maxX","maxY","clip","Math","save","add","push","remove","pop","clearRect","drawElement","selectNode","nodeValue","trim","HTMLCanvasElement","display","dpr","window","devicePixelRatio","scale","drawImage","HTMLImageElement","getComputedStyle","borderRadius","backgroundColor","fill","borders","match","prevBorder","border","borderTopWidth","borderTopStyle","borderTopColor","accentColor","accentTextColor","sqrt","g","b","checked","currentTextAlign","textAlign","position","parseInt","paddingLeft","paddingTop","overflow","_event","THREE","Vector2","AFRAME","registerComponent","schema","html","cursor","init","rerender","bind","handle","onClick","e","onMouseLeave","onMouseEnter","onMouseUp","onMouseDown","mouseMoveDetail","detail","cursorEl","intersection","play","el","pause","mesh","setObject3D","object3D","tick","activeRaycaster","components","raycaster","getIntersection","evt","visible","getObject3D","uv","parent","worldToLocal","copy","point","removeObject3D"],"mappings":"0BAgBA,MAAMA,UAAiBC,EAAAA,KAEtBC,YAAaC,GAEZ,MAAMC,EAAU,IAAIC,EAAaF,GAE3BG,EAAW,IAAIC,gBAAqC,KAAtBH,EAAQI,MAAMC,MAAsC,KAAvBL,EAAQI,MAAME,QACzEC,EAAW,IAAIC,oBAAmB,CAAEC,IAAKT,EAASU,YAAY,EAAOC,aAAa,IAIxF,SAASC,EAASC,GAEjBN,EAASE,IAAIK,iBAAkBD,GAJhCE,MAAOb,EAAUK,GAQjBS,KAAKC,iBAAkB,YAAaL,GACpCI,KAAKC,iBAAkB,YAAaL,GACpCI,KAAKC,iBAAkB,UAAWL,GAClCI,KAAKC,iBAAkB,QAASL,GAEhCI,KAAKE,QAAU,WAEdhB,EAASgB,UACTX,EAASW,UAETX,EAASE,IAAIS,UAEbC,EAASC,OAAQrB,GAEjBiB,KAAKK,oBAAqB,YAAaT,GACvCI,KAAKK,oBAAqB,YAAaT,GACvCI,KAAKK,oBAAqB,UAAWT,GACrCI,KAAKK,oBAAqB,QAAST,KAQtC,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B,EAAO9L,KAAK4L,GAAGY,YAAY,QAC7BV,IAASA,EAAKvM,SAASE,IAAIuB,iBAC9B8K,EAAKvM,SAASE,IAAIuB,eAAiBC,YAAY,IAAM6K,EAAKvM,SAASE,IAAIyB,UAAU,MAGnF4G,SACC,MAAMgE,EAAO9L,KAAK4L,GAAGY,YAAY,QAC7BV,IACH9L,KAAK4L,GAAGkB,eAAe,QACvB9M,KAAKwB,KAAKmJ,KAAKtK,oBAAoB,QAASL,KAAK8K,UACjD9K,KAAKwB,KAAKmJ,KAAKtK,oBAAoB,SAAUL,KAAK8K,UAClDgB,EAAK5L,WAENF,KAAKkM,gBAAkB,KACvBlM,KAAKuL,gBAAgBC,OAAOC,SAAW,KACvCzL,KAAKuL,gBAAgBC,OAAOE,aAAe,KAC3C1L,KAAK4K,OAAS"}
\ No newline at end of file
+{"version":3,"file":"aframe-html.min.js","sources":["../src/HTMLMesh.js","../src/aframe-html.js"],"sourcesContent":["// This is a copy of https://github.com/mrdoob/three.js/blob/0403020848c26a9605eb91c99a949111ad4a532e/examples/jsm/interactive/HTMLMesh.js\n// with the following changes:\n// - Keep compatibility with three r147 aframe 1.4.2, still using \"this.encoding = sRGBEncoding\", otherwise using \"this.colorSpace = SRGBColorSpace;\"\n// - window.dispatchEvent line commented, see the TODO below.\n// Look at https://github.com/mrdoob/three.js/commits/dev/examples/jsm/interactive/HTMLMesh.js\n// to see if there are other changes that can be retrieved here.\nimport {\n\tCanvasTexture,\n\tLinearFilter,\n\tMesh,\n\tMeshBasicMaterial,\n\tPlaneGeometry,\n\tSRGBColorSpace,\n\tsRGBEncoding,\n\tColor\n} from 'three';\n\nclass HTMLMesh extends Mesh {\n\n\tconstructor( dom ) {\n\n\t\tconst texture = new HTMLTexture( dom );\n\n\t\tconst geometry = new PlaneGeometry( texture.image.width * 0.001, texture.image.height * 0.001 );\n\t\tconst material = new MeshBasicMaterial( { map: texture, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tfunction onEvent( event ) {\n\n\t\t\tmaterial.map.dispatchDOMEvent( event );\n\n\t\t}\n\n\t\tthis.addEventListener( 'mousedown', onEvent );\n\t\tthis.addEventListener( 'mousemove', onEvent );\n\t\tthis.addEventListener( 'mouseup', onEvent );\n\t\tthis.addEventListener( 'click', onEvent );\n\n\t\tthis.dispose = function () {\n\n\t\t\tgeometry.dispose();\n\t\t\tmaterial.dispose();\n\n\t\t\tmaterial.map.dispose();\n\n\t\t\tcanvases.delete( dom );\n\n\t\t\tthis.removeEventListener( 'mousedown', onEvent );\n\t\t\tthis.removeEventListener( 'mousemove', onEvent );\n\t\t\tthis.removeEventListener( 'mouseup', onEvent );\n\t\t\tthis.removeEventListener( 'click', onEvent );\n\n\t\t};\n\n\t}\n\n}\n\nclass HTMLTexture extends CanvasTexture {\n\n\tconstructor( dom ) {\n\n\t\tsuper( html2canvas( dom ) );\n\n\t\tthis.dom = dom;\n\n\t\tthis.anisotropy = 16;\n\t\tif ( THREE.REVISION === '147' ) { // Keep compatibility with aframe 1.4.2\n\n\t\t\tthis.encoding = sRGBEncoding;\n\n\t\t} else {\n\n\t\t\tthis.colorSpace = SRGBColorSpace;\n\n\t\t}\n\n\t\tthis.minFilter = LinearFilter;\n\t\tthis.magFilter = LinearFilter;\n\n\t\t// Create an observer on the DOM, and run html2canvas update in the next loop\n\t\tconst observer = new MutationObserver( () => {\n\n\t\t\tif ( ! this.scheduleUpdate ) {\n\n\t\t\t\t// ideally should use xr.requestAnimationFrame, here setTimeout to avoid passing the renderer\n\t\t\t\tthis.scheduleUpdate = setTimeout( () => this.update(), 16 );\n\n\t\t\t}\n\n\t\t} );\n\n\t\tconst config = { attributes: true, childList: true, subtree: true, characterData: true };\n\t\tobserver.observe( dom, config );\n\n\t\tthis.observer = observer;\n\n\t}\n\n\tdispatchDOMEvent( event ) {\n\n\t\tif ( event.data ) {\n\n\t\t\thtmlevent( this.dom, event.type, event.data.x, event.data.y );\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tthis.image = html2canvas( this.dom );\n\t\tthis.needsUpdate = true;\n\n\t\tthis.scheduleUpdate = null;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.observer ) {\n\n\t\t\tthis.observer.disconnect();\n\n\t\t}\n\n\t\tthis.scheduleUpdate = clearTimeout( this.scheduleUpdate );\n\n\t\tsuper.dispose();\n\n\t}\n\n}\n\n\n//\n\nconst canvases = new WeakMap();\n\nfunction html2canvas( element ) {\n\n\tconst range = document.createRange();\n\tconst color = new Color();\n\n\tfunction Clipper( context ) {\n\n\t\tconst clips = [];\n\t\tlet isClipping = false;\n\n\t\tfunction doClip() {\n\n\t\t\tif ( isClipping ) {\n\n\t\t\t\tisClipping = false;\n\t\t\t\tcontext.restore();\n\n\t\t\t}\n\n\t\t\tif ( clips.length === 0 ) return;\n\n\t\t\tlet minX = - Infinity, minY = - Infinity;\n\t\t\tlet maxX = Infinity, maxY = Infinity;\n\n\t\t\tfor ( let i = 0; i < clips.length; i ++ ) {\n\n\t\t\t\tconst clip = clips[ i ];\n\n\t\t\t\tminX = Math.max( minX, clip.x );\n\t\t\t\tminY = Math.max( minY, clip.y );\n\t\t\t\tmaxX = Math.min( maxX, clip.x + clip.width );\n\t\t\t\tmaxY = Math.min( maxY, clip.y + clip.height );\n\n\t\t\t}\n\n\t\t\tcontext.save();\n\t\t\tcontext.beginPath();\n\t\t\tcontext.rect( minX, minY, maxX - minX, maxY - minY );\n\t\t\tcontext.clip();\n\n\t\t\tisClipping = true;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\tadd: function ( clip ) {\n\n\t\t\t\tclips.push( clip );\n\t\t\t\tdoClip();\n\n\t\t\t},\n\n\t\t\tremove: function () {\n\n\t\t\t\tclips.pop();\n\t\t\t\tdoClip();\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction drawText( style, x, y, string ) {\n\n\t\tif ( string !== '' ) {\n\n\t\t\tif ( style.textTransform === 'uppercase' ) {\n\n\t\t\t\tstring = string.toUpperCase();\n\n\t\t\t}\n\n\t\t\tcontext.font = style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily;\n\t\t\tcontext.textBaseline = 'top';\n\t\t\tcontext.fillStyle = style.color;\n\t\t\tcontext.fillText( string, x, y + parseFloat( style.fontSize ) * 0.1 );\n\n\t\t}\n\n\t}\n\n\tfunction buildRectPath( x, y, w, h, r ) {\n\n\t\tif ( w < 2 * r ) r = w / 2;\n\t\tif ( h < 2 * r ) r = h / 2;\n\n\t\tcontext.beginPath();\n\t\tcontext.moveTo( x + r, y );\n\t\tcontext.arcTo( x + w, y, x + w, y + h, r );\n\t\tcontext.arcTo( x + w, y + h, x, y + h, r );\n\t\tcontext.arcTo( x, y + h, x, y, r );\n\t\tcontext.arcTo( x, y, x + w, y, r );\n\t\tcontext.closePath();\n\n\t}\n\n\tfunction drawBorder( style, which, x, y, width, height ) {\n\n\t\tconst borderWidth = style[ which + 'Width' ];\n\t\tconst borderStyle = style[ which + 'Style' ];\n\t\tconst borderColor = style[ which + 'Color' ];\n\n\t\tif ( borderWidth !== '0px' && borderStyle !== 'none' && borderColor !== 'transparent' && borderColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\tcontext.strokeStyle = borderColor;\n\t\t\tcontext.lineWidth = parseFloat( borderWidth );\n\t\t\tcontext.beginPath();\n\t\t\tcontext.moveTo( x, y );\n\t\t\tcontext.lineTo( x + width, y + height );\n\t\t\tcontext.stroke();\n\n\t\t}\n\n\t}\n\n\tfunction drawElement( element, style ) {\n\n\t\tlet x = 0, y = 0, width = 0, height = 0;\n\n\t\tif ( element.nodeType === Node.TEXT_NODE ) {\n\n\t\t\t// text\n\n\t\t\trange.selectNode( element );\n\n\t\t\tconst rect = range.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tdrawText( style, x, y, element.nodeValue.trim() );\n\n\t\t} else if ( element.nodeType === Node.COMMENT_NODE ) {\n\n\t\t\treturn;\n\n\t\t} else if ( element instanceof HTMLCanvasElement ) {\n\n\t\t\t// Canvas element\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\n\t\t context.save();\n\t\t\tconst dpr = window.devicePixelRatio;\n\t\t\tcontext.scale( 1 / dpr, 1 / dpr );\n\t\t\tcontext.drawImage( element, x, y );\n\t\t\tcontext.restore();\n\n\t\t} else if ( element instanceof HTMLImageElement ) {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tcontext.drawImage( element, x, y, width, height );\n\n\t\t} else {\n\n\t\t\tif ( element.style.display === 'none' ) return;\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tx = rect.left - offset.left - 0.5;\n\t\t\ty = rect.top - offset.top - 0.5;\n\t\t\twidth = rect.width;\n\t\t\theight = rect.height;\n\n\t\t\tstyle = window.getComputedStyle( element );\n\n\t\t\t// Get the border of the element used for fill and border\n\n\t\t\tbuildRectPath( x, y, width, height, parseFloat( style.borderRadius ) );\n\n\t\t\tconst backgroundColor = style.backgroundColor;\n\n\t\t\tif ( backgroundColor !== 'transparent' && backgroundColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\tcontext.fillStyle = backgroundColor;\n\t\t\t\tcontext.fill();\n\n\t\t\t}\n\n\t\t\t// If all the borders match then stroke the round rectangle\n\n\t\t\tconst borders = [ 'borderTop', 'borderLeft', 'borderBottom', 'borderRight' ];\n\n\t\t\tlet match = true;\n\t\t\tlet prevBorder = null;\n\n\t\t\tfor ( const border of borders ) {\n\n\t\t\t\tif ( prevBorder !== null ) {\n\n\t\t\t\t\tmatch = ( style[ border + 'Width' ] === style[ prevBorder + 'Width' ] ) &&\n\t\t\t\t\t( style[ border + 'Color' ] === style[ prevBorder + 'Color' ] ) &&\n\t\t\t\t\t( style[ border + 'Style' ] === style[ prevBorder + 'Style' ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( match === false ) break;\n\n\t\t\t\tprevBorder = border;\n\n\t\t\t}\n\n\t\t\tif ( match === true ) {\n\n\t\t\t\t// They all match so stroke the rectangle from before allows for border-radius\n\n\t\t\t\tconst width = parseFloat( style.borderTopWidth );\n\n\t\t\t\tif ( style.borderTopWidth !== '0px' && style.borderTopStyle !== 'none' && style.borderTopColor !== 'transparent' && style.borderTopColor !== 'rgba(0, 0, 0, 0)' ) {\n\n\t\t\t\t\tcontext.strokeStyle = style.borderTopColor;\n\t\t\t\t\tcontext.lineWidth = width;\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// Otherwise draw individual borders\n\n\t\t\t\tdrawBorder( style, 'borderTop', x, y, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderLeft', x, y, 0, height );\n\t\t\t\tdrawBorder( style, 'borderBottom', x, y + height, width, 0 );\n\t\t\t\tdrawBorder( style, 'borderRight', x + width, y, 0, height );\n\n\t\t\t}\n\n\t\t\tif ( element instanceof HTMLInputElement ) {\n\n\t\t\t\tlet accentColor = style.accentColor;\n\n\t\t\t\tif ( accentColor === undefined || accentColor === 'auto' ) accentColor = style.color;\n\n\t\t\t\tcolor.set( accentColor );\n\n\t\t\t\tconst luminance = Math.sqrt( 0.299 * ( color.r ** 2 ) + 0.587 * ( color.g ** 2 ) + 0.114 * ( color.b ** 2 ) );\n\t\t\t\tconst accentTextColor = luminance < 0.5 ? 'white' : '#111111';\n\n\t\t\t\tif ( element.type === 'radio' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, height );\n\n\t\t\t\t\tcontext.fillStyle = 'white';\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tbuildRectPath( x + 2, y + 2, width - 4, height - 4, height );\n\n\t\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\t\tcontext.strokeStyle = accentTextColor;\n\t\t\t\t\t\tcontext.lineWidth = 2;\n\t\t\t\t\t\tcontext.fill();\n\t\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'checkbox' ) {\n\n\t\t\t\t\tbuildRectPath( x, y, width, height, 2 );\n\n\t\t\t\t\tcontext.fillStyle = element.checked ? accentColor : 'white';\n\t\t\t\t\tcontext.strokeStyle = element.checked ? accentTextColor : accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.stroke();\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tif ( element.checked ) {\n\n\t\t\t\t\t\tconst currentTextAlign = context.textAlign;\n\n\t\t\t\t\t\tcontext.textAlign = 'center';\n\n\t\t\t\t\t\tconst properties = {\n\t\t\t\t\t\t\tcolor: accentTextColor,\n\t\t\t\t\t\t\tfontFamily: style.fontFamily,\n\t\t\t\t\t\t\tfontSize: height + 'px',\n\t\t\t\t\t\t\tfontWeight: 'bold'\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tdrawText( properties, x + ( width / 2 ), y, '✔' );\n\n\t\t\t\t\t\tcontext.textAlign = currentTextAlign;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'range' ) {\n\n\t\t\t\t\tconst [ min, max, value ] = [ 'min', 'max', 'value' ].map( property => parseFloat( element[ property ] ) );\n\t\t\t\t\tconst position = ( ( value - min ) / ( max - min ) ) * ( width - height );\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), width, height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentTextColor;\n\t\t\t\t\tcontext.strokeStyle = accentColor;\n\t\t\t\t\tcontext.lineWidth = 1;\n\t\t\t\t\tcontext.fill();\n\t\t\t\t\tcontext.stroke();\n\n\t\t\t\t\tbuildRectPath( x, y + ( height / 4 ), position + ( height / 2 ), height / 2, height / 4 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t\tbuildRectPath( x + position, y, height, height, height / 2 );\n\t\t\t\t\tcontext.fillStyle = accentColor;\n\t\t\t\t\tcontext.fill();\n\n\t\t\t\t}\n\n\t\t\t\tif ( element.type === 'color' || element.type === 'text' || element.type === 'number' ) {\n\n\t\t\t\t\tclipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\t\t\t\tdrawText( style, x + parseInt( style.paddingLeft ), y + parseInt( style.paddingTop ), element.value );\n\n\t\t\t\t\tclipper.remove();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t// debug\n\t\tcontext.strokeStyle = '#' + Math.random().toString( 16 ).slice( - 3 );\n\t\tcontext.strokeRect( x - 0.5, y - 0.5, width + 1, height + 1 );\n\t\t*/\n\n\t\tconst isClipping = style.overflow === 'auto' || style.overflow === 'hidden';\n\n\t\tif ( isClipping ) clipper.add( { x: x, y: y, width: width, height: height } );\n\n\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\tdrawElement( element.childNodes[ i ], style );\n\n\t\t}\n\n\t\tif ( isClipping ) clipper.remove();\n\n\t}\n\n\tconst offset = element.getBoundingClientRect();\n\n\tlet canvas = canvases.get( element );\n\n\tif ( canvas === undefined ) {\n\n\t\tcanvas = document.createElement( 'canvas' );\n\t\tcanvas.width = offset.width;\n\t\tcanvas.height = offset.height;\n\t\tcanvases.set( element, canvas );\n\n\t}\n\n\tconst context = canvas.getContext( '2d'/*, { alpha: false }*/ );\n\n\tconst clipper = new Clipper( context );\n\n\t// console.time( 'drawElement' );\n\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\n\tdrawElement( element );\n\n\t// console.timeEnd( 'drawElement' );\n\n\treturn canvas;\n\n}\n\nfunction htmlevent( element, event, x, y ) {\n\n\tconst mouseEventInit = {\n\t\tclientX: ( x * element.offsetWidth ) + element.offsetLeft,\n\t\tclientY: ( y * element.offsetHeight ) + element.offsetTop,\n\t\tview: element.ownerDocument.defaultView\n\t};\n\n\t// TODO: Find out why this is added. Keep commented out when this file is updated\n\t// window.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\tconst rect = element.getBoundingClientRect();\n\n\tx = x * rect.width + rect.left;\n\ty = y * rect.height + rect.top;\n\n\tfunction traverse( element ) {\n\n\t\tif ( element.nodeType !== Node.TEXT_NODE && element.nodeType !== Node.COMMENT_NODE ) {\n\n\t\t\tconst rect = element.getBoundingClientRect();\n\n\t\t\tif ( x > rect.left && x < rect.right && y > rect.top && y < rect.bottom ) {\n\n\t\t\t\telement.dispatchEvent( new MouseEvent( event, mouseEventInit ) );\n\n\t\t\t\tif ( element instanceof HTMLInputElement && element.type === 'range' && ( event === 'mousedown' || event === 'click' ) ) {\n\n\t\t\t\t\tconst [ min, max ] = [ 'min', 'max' ].map( property => parseFloat( element[ property ] ) );\n\n\t\t\t\t\tconst width = rect.width;\n\t\t\t\t\tconst offsetX = x - rect.x;\n\t\t\t\t\tconst proportion = offsetX / width;\n\t\t\t\t\telement.value = min + ( max - min ) * proportion;\n\t\t\t\t\telement.dispatchEvent( new InputEvent( 'input', { bubbles: true } ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < element.childNodes.length; i ++ ) {\n\n\t\t\t\ttraverse( element.childNodes[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttraverse( element );\n\n}\n\nexport { HTMLMesh };\n","/* jshint esversion: 9, -W097 */\n/* For dealing with spline curves */\n/* global THREE, AFRAME, setTimeout, console */\n'use strict';\n\nimport { HTMLMesh } from './HTMLMesh.js';\n\nconst schemaHTML = {\n\thtml: {\n\t\ttype: 'selector',\n\t},\n\tcursor: {\n\t\ttype: 'selector',\n\t}\n};\n\ndocumentation:\n{\n\tschemaHTML.html.description = `HTML element to use.`;\n\tschemaHTML.cursor.description = `Visual indicator for where the user is currently pointing`;\n}\n\nconst _pointer = new THREE.Vector2();\nconst _event = { type: '', data: _pointer };\nAFRAME.registerComponent('html', {\n\tschema: schemaHTML,\n\tinit() {\n\t\tthis.rerender = this.rerender.bind(this);\n\t\tthis.handle = this.handle.bind(this);\n\t\tthis.onClick = e => this.handle('click', e);\n\t\tthis.onMouseLeave = e => this.handle('mouseleave', e);\n\t\tthis.onMouseEnter = e => this.handle('mouseenter', e);\n\t\tthis.onMouseUp = e => this.handle('mouseup', e);\n\t\tthis.onMouseDown = e => this.handle('mousedown', e);\n\t\tthis.mouseMoveDetail = {\n\t\t\tdetail: {\n\t\t\t\tcursorEl: null,\n\t\t\t\tintersection: null\n\t\t\t}\n\t\t};\n\t},\n\tplay() {\n\t\tthis.el.addEventListener('click', this.onClick);\n\t\tthis.el.addEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.addEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.addEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.addEventListener('mousedown', this.onMouseDown);\n\t},\n\tpause() {\n\t\tthis.el.removeEventListener('click', this.onClick);\n\t\tthis.el.removeEventListener('mouseleave', this.onMouseLeave);\n\t\tthis.el.removeEventListener('mouseenter', this.onMouseEnter);\n\t\tthis.el.removeEventListener('mouseup', this.onMouseUp);\n\t\tthis.el.removeEventListener('mousedown', this.onMouseDown);\n\t},\n\tupdate() {\n\t\tthis.remove();\n\t\tif (!this.data.html) return;\n\t\tconst mesh = new HTMLMesh(this.data.html);\n\t\tthis.el.setObject3D('html', mesh);\n\t\tthis.data.html.addEventListener('input', this.rerender);\n\t\tthis.data.html.addEventListener('change', this.rerender);\n\t\tthis.cursor = this.data.cursor ? this.data.cursor.object3D : null;\n\t},\n\ttick() {\n\t\tif (this.activeRaycaster) {\n\t\t\tconst intersection = this.activeRaycaster.components.raycaster.getIntersection(this.el);\n\t\t\tthis.mouseMoveDetail.detail.cursorEl = this.activeRaycaster;\n\t\t\tthis.mouseMoveDetail.detail.intersection = intersection;\n\t\t\tthis.handle('mousemove', this.mouseMoveDetail);\n\t\t}\n\t},\n\thandle(type, evt) {\n\t\tconst intersection = evt.detail.intersection;\n\t\tconst raycaster = evt.detail.cursorEl;\n\t\tif (type === 'mouseenter') {\n\t\t\tthis.activeRaycaster = raycaster;\n\t\t}\n\t\tif (type === 'mouseleave' && this.activeRaycaster === raycaster) {\n\t\t\tthis.activeRaycaster = null;\n\t\t}\n\t\tif (this.cursor) this.cursor.visible = false;\n\t\tif (intersection) {\n\t\t\tconst mesh = this.el.getObject3D('html');\n\t\t\tconst uv = intersection.uv;\n\t\t\t_event.type = type;\n\t\t\t_event.data.set( uv.x, 1 - uv.y );\n\t\t\tmesh.dispatchEvent( _event );\n\n\t\t\tif (this.cursor) {\n\t\t\t\tthis.cursor.visible = true;\n\t\t\t\tthis.cursor.parent.worldToLocal(this.cursor.position.copy(intersection.point));\n\t\t\t}\n\t\t}\n\t},\n\trerender() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh && !mesh.material.map.scheduleUpdate) {\n\t\t\tmesh.material.map.scheduleUpdate = setTimeout( () => mesh.material.map.update(), 16 );\n\t\t}\n\t},\n\tremove() {\n\t\tconst mesh = this.el.getObject3D('html');\n\t\tif (mesh) {\n\t\t\tthis.el.removeObject3D('html');\n\t\t\tthis.data.html.removeEventListener('input', this.rerender);\n\t\t\tthis.data.html.removeEventListener('change', this.rerender);\n\t\t\tmesh.dispose();\n\t\t}\n\t\tthis.activeRaycaster = null;\n\t\tthis.mouseMoveDetail.detail.cursorEl = null;\n\t\tthis.mouseMoveDetail.detail.intersection = null;\n\t\tthis.cursor = null;\n\t},\n});\n"],"names":["HTMLMesh","Mesh","constructor","dom","texture","HTMLTexture","geometry","PlaneGeometry","image","width","height","material","MeshBasicMaterial","map","toneMapped","transparent","onEvent","event","dispatchDOMEvent","super","this","addEventListener","dispose","canvases","delete","removeEventListener","CanvasTexture","html2canvas","anisotropy","THREE","REVISION","encoding","sRGBEncoding","colorSpace","SRGBColorSpace","minFilter","LinearFilter","magFilter","observer","MutationObserver","scheduleUpdate","setTimeout","update","observe","attributes","childList","subtree","characterData","data","element","x","y","mouseEventInit","clientX","offsetWidth","offsetLeft","clientY","offsetHeight","offsetTop","view","ownerDocument","defaultView","rect","getBoundingClientRect","traverse","nodeType","Node","TEXT_NODE","COMMENT_NODE","left","right","top","bottom","dispatchEvent","MouseEvent","HTMLInputElement","type","min","max","property","parseFloat","proportion","value","InputEvent","bubbles","i","childNodes","length","htmlevent","needsUpdate","disconnect","clearTimeout","WeakMap","range","document","createRange","color","Color","drawText","style","string","textTransform","toUpperCase","context","font","fontWeight","fontSize","fontFamily","textBaseline","fillStyle","fillText","buildRectPath","w","h","r","beginPath","moveTo","arcTo","closePath","drawBorder","which","borderWidth","borderStyle","borderColor","strokeStyle","lineWidth","lineTo","stroke","offset","canvas","get","undefined","createElement","set","getContext","clipper","clips","isClipping","doClip","restore","minX","Infinity","minY","maxX","maxY","clip","Math","save","add","push","remove","pop","clearRect","drawElement","selectNode","nodeValue","trim","HTMLCanvasElement","display","dpr","window","devicePixelRatio","scale","drawImage","HTMLImageElement","getComputedStyle","borderRadius","backgroundColor","fill","borders","match","prevBorder","border","borderTopWidth","borderTopStyle","borderTopColor","accentColor","accentTextColor","sqrt","g","b","checked","currentTextAlign","textAlign","position","parseInt","paddingLeft","paddingTop","overflow","_event","Vector2","AFRAME","registerComponent","schema","html","cursor","init","rerender","bind","handle","onClick","e","onMouseLeave","onMouseEnter","onMouseUp","onMouseDown","mouseMoveDetail","detail","cursorEl","intersection","play","el","pause","mesh","setObject3D","object3D","tick","activeRaycaster","components","raycaster","getIntersection","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KAAK+L,GAAGkB,eAAe,QACvBjN,KAAK4B,KAAKkJ,KAAKzK,oBAAoB,QAASL,KAAKiL,UACjDjL,KAAK4B,KAAKkJ,KAAKzK,oBAAoB,SAAUL,KAAKiL,UAClDgB,EAAK/L,WAENF,KAAKqM,gBAAkB,KACvBrM,KAAK0L,gBAAgBC,OAAOC,SAAW,KACvC5L,KAAK0L,gBAAgBC,OAAOE,aAAe,KAC3C7L,KAAK+K,OAAS,IACd"}
\ No newline at end of file
diff --git a/src/HTMLMesh.js b/src/HTMLMesh.js
index 378ff92..f6935d1 100644
--- a/src/HTMLMesh.js
+++ b/src/HTMLMesh.js
@@ -1,6 +1,6 @@
// This is a copy of https://github.com/mrdoob/three.js/blob/0403020848c26a9605eb91c99a949111ad4a532e/examples/jsm/interactive/HTMLMesh.js
// with the following changes:
-// - Revert back to using "this.encoding = sRGBEncoding" instead of "this.colorSpace = SRGBColorSpace;" for compatibility with three r147 aframe 1.4.2
+// - Keep compatibility with three r147 aframe 1.4.2, still using "this.encoding = sRGBEncoding", otherwise using "this.colorSpace = SRGBColorSpace;"
// - window.dispatchEvent line commented, see the TODO below.
// Look at https://github.com/mrdoob/three.js/commits/dev/examples/jsm/interactive/HTMLMesh.js
// to see if there are other changes that can be retrieved here.
@@ -10,6 +10,7 @@ import {
Mesh,
MeshBasicMaterial,
PlaneGeometry,
+ SRGBColorSpace,
sRGBEncoding,
Color
} from 'three';
@@ -65,7 +66,16 @@ class HTMLTexture extends CanvasTexture {
this.dom = dom;
this.anisotropy = 16;
- this.encoding = sRGBEncoding;
+ if ( THREE.REVISION === '147' ) { // Keep compatibility with aframe 1.4.2
+
+ this.encoding = sRGBEncoding;
+
+ } else {
+
+ this.colorSpace = SRGBColorSpace;
+
+ }
+
this.minFilter = LinearFilter;
this.magFilter = LinearFilter;