troika-3d-text
Advanced tools
Comparing version 0.48.0-unicode.3 to 0.48.0-unicode.4
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.48.0-unicode.4](https://github.com/protectwise/troika/compare/v0.48.0-unicode.3...v0.48.0-unicode.4) (2023-09-07) | ||
### Features | ||
* allow configuring unicode-font-resolver data URL ([c6ff8d7](https://github.com/protectwise/troika/commit/c6ff8d7e5d5a4e40c73ffb8f9af4c05ee246bec7)) | ||
# [0.48.0-unicode.3](https://github.com/protectwise/troika/compare/v0.48.0-unicode.2...v0.48.0-unicode.3) (2023-07-10) | ||
@@ -8,0 +19,0 @@ |
@@ -234,2 +234,3 @@ import { getSelectionRects, getCaretAtPoint, Text } from 'troika-three-text'; | ||
'sdfGlyphSize', | ||
'unicodeFontsURL', | ||
'gpuAccelerateSDF', | ||
@@ -236,0 +237,0 @@ 'debugSDF' |
@@ -234,2 +234,3 @@ (function (global, factory) { | ||
'sdfGlyphSize', | ||
'unicodeFontsURL', | ||
'gpuAccelerateSDF', | ||
@@ -236,0 +237,0 @@ 'debugSDF' |
@@ -8,3 +8,3 @@ 'use strict';(function(b,e){"object"===typeof exports&&"undefined"!==typeof module?e(exports,require("troika-three-text"),require("troika-3d"),require("three"),require("troika-three-utils")):"function"===typeof define&&define.amd?define(["exports","troika-three-text","troika-3d","three","troika-three-utils"],e):(b="undefined"!==typeof globalThis?globalThis:b||self,e(b.troika_3d_text={},b.troika_three_text,b.troika_3d,b.THREE,b.troika_three_utils))})(this,function(b,e,k,d,t){let l=new d.Vector4,m= | ||
v)).intersectPlane(w.setComponents(0,0,1,0),x))&&(c=e.getCaretAtPoint(c,f.x,f.y))&&b(this.selectionStart,c.charIndex);a.preventDefault()}},h=b=>{a.removeEventListener("drag",f);a.removeEventListener("dragend",h)};a.addEventListener("dragstart",c);a.addEventListener("mousedown",c);this._cleanupEvents=()=>{h();a.removeEventListener("dragstart",c);a.removeEventListener("mousedown",c)}}afterUpdate(){this.data=e.getSelectionRects(this.textRenderInfo,this.selectionStart,this.selectionEnd);super.afterUpdate()}set clipRect(a){this._clipRect= | ||
a&&Array.isArray(a)&&4===a.length?a:q}get clipRect(){return this._clipRect}destructor(){this._cleanupEvents();super.destructor()}}let z="text anchorX anchorY font fontSize fontWeight fontStyle letterSpacing lineHeight maxWidth overflowWrap direction textAlign textIndent whiteSpace material color colorRanges fillOpacity outlineOpacity outlineColor outlineWidth outlineOffsetX outlineOffsetY outlineBlur strokeColor strokeWidth strokeOpacity curveRadius depthOffset clipRect orientation glyphGeometryDetail sdfGlyphSize gpuAccelerateSDF debugSDF".split(" "); | ||
a&&Array.isArray(a)&&4===a.length?a:q}get clipRect(){return this._clipRect}destructor(){this._cleanupEvents();super.destructor()}}let z="text anchorX anchorY font fontSize fontWeight fontStyle letterSpacing lineHeight maxWidth overflowWrap direction textAlign textIndent whiteSpace material color colorRanges fillOpacity outlineOpacity outlineColor outlineWidth outlineOffsetX outlineOffsetY outlineBlur strokeColor strokeWidth strokeOpacity curveRadius depthOffset clipRect orientation glyphGeometryDetail sdfGlyphSize unicodeFontsURL gpuAccelerateSDF debugSDF".split(" "); | ||
class A extends k.Object3DFacade{constructor(a){let b=new e.Text;b.geometry.boundingSphere.version=0;super(a,b);this.selectable=!1;this.selectionStart=this.selectionEnd=-1;this.onSyncComplete=this.onSyncStart=null;this.gpuAccelerateSDF=!0;b.addEventListener("syncstart",a=>{this.notifyWorld("text3DSyncStart");if(this.onSyncStart)this.onSyncStart()});b.addEventListener("synccomplete",a=>{if(!this.isDestroying&&(b.geometry.boundingSphere.version++,this.afterUpdate(),this.notifyWorld("text3DSyncComplete"), | ||
@@ -11,0 +11,0 @@ this.requestRender(),this.onSyncComplete))this.onSyncComplete()})}get textRenderInfo(){return this.threeObject.textRenderInfo}afterUpdate(){let a=this.threeObject;z.forEach(b=>{a[b]=this[b]});a.sync();super.afterUpdate();this.text!==this._prevText&&(this.selectionStart=this.selectionEnd=-1,this._prevText=this.text);this._updateSelection()}_updateSelection(){let {selectable:a,selectionStart:b,selectionEnd:d}=this,c=this._selectionFacade;a!==this._selectable&&((this._selectable=a)?c=this._selectionFacade= |
{ | ||
"name": "troika-3d-text", | ||
"version": "0.48.0-unicode.3", | ||
"version": "0.48.0-unicode.4", | ||
"description": "SDF text for the Troika 3D scene management framework", | ||
@@ -18,3 +18,3 @@ "author": "Jason Johnston <jason.johnston@protectwise.com>", | ||
"troika-3d": "^0.47.2", | ||
"troika-three-text": "^0.48.0-unicode.3", | ||
"troika-three-text": "^0.48.0-unicode.4", | ||
"troika-three-utils": "^0.47.2" | ||
@@ -25,3 +25,3 @@ }, | ||
}, | ||
"gitHead": "674bd8fc557342d970115791d3091e18c8706c77" | ||
"gitHead": "bb554249ade96f060b3857c89ea9a668bcd22fc3" | ||
} |
@@ -41,2 +41,3 @@ import { Object3DFacade } from 'troika-3d' | ||
'sdfGlyphSize', | ||
'unicodeFontsURL', | ||
'gpuAccelerateSDF', | ||
@@ -43,0 +44,0 @@ 'debugSDF' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62253
1069