Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

troika-3d-text

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

troika-3d-text - npm Package Compare versions

Comparing version 0.36.1 to 0.37.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [0.37.0](https://github.com/protectwise/troika/compare/v0.36.1...v0.37.0) (2021-01-18)
### Features
* **troika-three-text:** added inner stroke and outline blur capabilities ([e004b9d](https://github.com/protectwise/troika/commit/e004b9d2f7e2ef9e841e61156b68958076533a62))
## [0.36.1](https://github.com/protectwise/troika/compare/v0.36.0...v0.36.1) (2020-12-16)

@@ -8,0 +20,0 @@

10

dist/troika-3d-text.esm.js

@@ -182,4 +182,12 @@ import { getSelectionRects, getCaretAtPoint, Text } from 'troika-three-text';

'colorRanges',
'fillOpacity',
'outlineOpacity',
'outlineColor',
'outlineWidth',
'outlineColor',
'outlineOffsetX',
'outlineOffsetY',
'outlineBlur',
'strokeColor',
'strokeWidth',
'strokeOpacity',
'depthOffset',

@@ -186,0 +194,0 @@ 'clipRect',

@@ -203,4 +203,12 @@ (function (global, factory) {

'colorRanges',
'fillOpacity',
'outlineOpacity',
'outlineColor',
'outlineWidth',
'outlineColor',
'outlineOffsetX',
'outlineOffsetY',
'outlineBlur',
'strokeColor',
'strokeWidth',
'strokeOpacity',
'depthOffset',

@@ -207,0 +215,0 @@ 'clipRect',

12

dist/troika-3d-text.umd.min.js

@@ -8,7 +8,7 @@ 'use strict';(function(b,f){"object"===typeof exports&&"undefined"!==typeof module?f(exports,require("troika-three-text"),require("troika-3d"),require("three")):"function"===typeof define&&define.amd?define(["exports","troika-three-text","troika-3d","three"],f):(b=b||self,f(b.troika_3d_text={},b.troika_three_text,b.troika_3d,b.THREE))})(this,function(b,f,k,g){function m(){var c=k.createDerivedMaterial(new g.MeshBasicMaterial({transparent:!0,opacity:.3,depthWrite:!1}),{uniforms:{rect:{value:new g.Vector4}},

d)}}c&&(a.__proto__=c);a.prototype=Object.create(c&&c.prototype);a.prototype.constructor=a;var b={clipRect:{configurable:!0}};a.prototype.afterUpdate=function(){this.data=f.getSelectionRects(this.textRenderInfo,this.selectionStart,this.selectionEnd);c.prototype.afterUpdate.call(this)};b.clipRect.set=function(a){this._clipRect=a&&Array.isArray(a)&&4===a.length?a:q};b.clipRect.get=function(){return this._clipRect};a.prototype.destructor=function(){this._cleanupEvents();c.prototype.destructor.call(this)};
Object.defineProperties(a.prototype,b);return a}(k.ListFacade),x="text anchorX anchorY font fontSize letterSpacing lineHeight maxWidth overflowWrap textAlign textIndent whiteSpace material color colorRanges outlineWidth outlineColor depthOffset clipRect orientation glyphGeometryDetail sdfGlyphSize debugSDF".split(" "),y=function(b){function a(a){var c=this,e=new f.Text;e.geometry.boundingSphere.version=0;b.call(this,a,e);this.selectable=!1;this.selectionStart=this.selectionEnd=-1;this.onSyncComplete=
this.onSyncStart=null;e.addEventListener("syncstart",function(a){c.notifyWorld("text3DSyncStart");if(c.onSyncStart)c.onSyncStart()});e.addEventListener("synccomplete",function(a){if(!c.isDestroying&&(e.geometry.boundingSphere.version++,c.afterUpdate(),c.notifyWorld("text3DSyncComplete"),c.notifyWorld("needsRender"),c.onSyncComplete))c.onSyncComplete()})}b&&(a.__proto__=b);a.prototype=Object.create(b&&b.prototype);a.prototype.constructor=a;var c={textRenderInfo:{configurable:!0}};c.textRenderInfo.get=
function(){return this.threeObject.textRenderInfo};a.prototype.afterUpdate=function(){var a=this,c=this.threeObject;x.forEach(function(b){c[b]=a[b]});c.sync();b.prototype.afterUpdate.call(this);this.text!==this._prevText&&(this.selectionStart=this.selectionEnd=-1,this._prevText=this.text);this._updateSelection()};a.prototype._updateSelection=function(){var a=this,b=this.selectable,c=this.selectionStart,f=this.selectionEnd,d=this._selectionFacade;b!==this._selectable&&((this._selectable=b)?d=this._selectionFacade=
new w(this,function(b,c){a.selectionStart=b;a.selectionEnd=c;a._updateSelection();a.notifyWorld("needsRender")}):(d&&(d.destructor(),d=this._selectionFacade=null),this.selectionStart=this.selectionEnd=-1));d&&(d.textRenderInfo=this.threeObject.textRenderInfo,d.selectionStart=c,d.selectionEnd=f,d.clipRect=this.clipRect,d.renderOrder=this.renderOrder,d.afterUpdate())};a.prototype.destructor=function(){this.threeObject.dispose();this._selectionFacade&&this._selectionFacade.destructor();b.prototype.destructor.call(this)};
Object.defineProperties(a.prototype,c);return a}(k.Object3DFacade);Object.defineProperty(b,"GlyphsGeometry",{enumerable:!0,get:function(){return f.GlyphsGeometry}});Object.defineProperty(b,"TextMesh",{enumerable:!0,get:function(){return f.Text}});Object.defineProperty(b,"configureTextBuilder",{enumerable:!0,get:function(){return f.configureTextBuilder}});Object.defineProperty(b,"fontProcessorWorkerModule",{enumerable:!0,get:function(){return f.fontProcessorWorkerModule}});Object.defineProperty(b,
"getCaretAtPoint",{enumerable:!0,get:function(){return f.getCaretAtPoint}});Object.defineProperty(b,"getSelectionRects",{enumerable:!0,get:function(){return f.getSelectionRects}});Object.defineProperty(b,"preloadFont",{enumerable:!0,get:function(){return f.preloadFont}});b.Text3DFacade=y;Object.defineProperty(b,"__esModule",{value:!0})})
Object.defineProperties(a.prototype,b);return a}(k.ListFacade),x="text anchorX anchorY font fontSize letterSpacing lineHeight maxWidth overflowWrap textAlign textIndent whiteSpace material color colorRanges fillOpacity outlineOpacity outlineColor outlineWidth outlineOffsetX outlineOffsetY outlineBlur strokeColor strokeWidth strokeOpacity depthOffset clipRect orientation glyphGeometryDetail sdfGlyphSize debugSDF".split(" "),y=function(b){function a(a){var c=this,e=new f.Text;e.geometry.boundingSphere.version=
0;b.call(this,a,e);this.selectable=!1;this.selectionStart=this.selectionEnd=-1;this.onSyncComplete=this.onSyncStart=null;e.addEventListener("syncstart",function(a){c.notifyWorld("text3DSyncStart");if(c.onSyncStart)c.onSyncStart()});e.addEventListener("synccomplete",function(a){if(!c.isDestroying&&(e.geometry.boundingSphere.version++,c.afterUpdate(),c.notifyWorld("text3DSyncComplete"),c.notifyWorld("needsRender"),c.onSyncComplete))c.onSyncComplete()})}b&&(a.__proto__=b);a.prototype=Object.create(b&&
b.prototype);a.prototype.constructor=a;var c={textRenderInfo:{configurable:!0}};c.textRenderInfo.get=function(){return this.threeObject.textRenderInfo};a.prototype.afterUpdate=function(){var a=this,c=this.threeObject;x.forEach(function(b){c[b]=a[b]});c.sync();b.prototype.afterUpdate.call(this);this.text!==this._prevText&&(this.selectionStart=this.selectionEnd=-1,this._prevText=this.text);this._updateSelection()};a.prototype._updateSelection=function(){var a=this,b=this.selectable,c=this.selectionStart,
f=this.selectionEnd,d=this._selectionFacade;b!==this._selectable&&((this._selectable=b)?d=this._selectionFacade=new w(this,function(b,c){a.selectionStart=b;a.selectionEnd=c;a._updateSelection();a.notifyWorld("needsRender")}):(d&&(d.destructor(),d=this._selectionFacade=null),this.selectionStart=this.selectionEnd=-1));d&&(d.textRenderInfo=this.threeObject.textRenderInfo,d.selectionStart=c,d.selectionEnd=f,d.clipRect=this.clipRect,d.renderOrder=this.renderOrder,d.afterUpdate())};a.prototype.destructor=
function(){this.threeObject.dispose();this._selectionFacade&&this._selectionFacade.destructor();b.prototype.destructor.call(this)};Object.defineProperties(a.prototype,c);return a}(k.Object3DFacade);Object.defineProperty(b,"GlyphsGeometry",{enumerable:!0,get:function(){return f.GlyphsGeometry}});Object.defineProperty(b,"TextMesh",{enumerable:!0,get:function(){return f.Text}});Object.defineProperty(b,"configureTextBuilder",{enumerable:!0,get:function(){return f.configureTextBuilder}});Object.defineProperty(b,
"fontProcessorWorkerModule",{enumerable:!0,get:function(){return f.fontProcessorWorkerModule}});Object.defineProperty(b,"getCaretAtPoint",{enumerable:!0,get:function(){return f.getCaretAtPoint}});Object.defineProperty(b,"getSelectionRects",{enumerable:!0,get:function(){return f.getSelectionRects}});Object.defineProperty(b,"preloadFont",{enumerable:!0,get:function(){return f.preloadFont}});b.Text3DFacade=y;Object.defineProperty(b,"__esModule",{value:!0})})
{
"name": "troika-3d-text",
"version": "0.36.1",
"version": "0.37.0",
"description": "SDF text for the Troika 3D scene management framework",

@@ -17,6 +17,6 @@ "author": "Jason Johnston <jason.johnston@protectwise.com>",

"dependencies": {
"troika-3d": "^0.36.0",
"troika-three-text": "^0.36.1"
"troika-3d": "^0.37.0",
"troika-three-text": "^0.37.0"
},
"gitHead": "1557947d1aa1f8362a3572039a983c679832cfee"
"gitHead": "f2c9c725b22a88ca3275c39150d75f6894ea3503"
}

@@ -0,0 +0,0 @@ # `troika-3d-text`

@@ -0,0 +0,0 @@ import { ListFacade } from 'troika-3d'

@@ -0,0 +0,0 @@ import { BoxBufferGeometry, Color, Mesh, MeshBasicMaterial, Vector4 } from 'three'

@@ -22,4 +22,12 @@ import { Object3DFacade } from 'troika-3d'

'colorRanges',
'fillOpacity',
'outlineOpacity',
'outlineColor',
'outlineWidth',
'outlineColor',
'outlineOffsetX',
'outlineOffsetY',
'outlineBlur',
'strokeColor',
'strokeWidth',
'strokeOpacity',
'depthOffset',

@@ -26,0 +34,0 @@ 'clipRect',

@@ -0,0 +0,0 @@ // Proxy exports from troika-three-text for convenience:

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc