ocearo-ui 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.html +1 -1
- package/_next/static/chunks/{0f8af13e.af14efcb2d26c639.js → 0f8af13e.6652bd734d04208b.js} +1 -1
- package/_next/static/chunks/{117-1ad4a6b37bfc6738.js → 117-35a8eb6f9457406b.js} +1 -1
- package/_next/static/chunks/{252.7d334947f15ddf30.js → 252.5e735e4fc4a0a7e8.js} +1 -1
- package/_next/static/chunks/{412.9a891f540865cbd8.js → 412.89dae08d020f4499.js} +1 -1
- package/_next/static/chunks/413.69878f8910eb07d8.js +1 -0
- package/_next/static/chunks/{746-6aad160476963b55.js → 746-f1a5b23db9004a46.js} +1 -1
- package/_next/static/chunks/app/layout-5065440b6db19cf5.js +1 -0
- package/_next/static/chunks/app/page-6b5d2e1a2eed4173.js +1 -0
- package/_next/static/chunks/{main-467be1560a4da41c.js → main-8dbe8bddfa3a978c.js} +1 -1
- package/_next/static/chunks/{webpack-0478fe45d39f1cb5.js → webpack-7e86658b39e9a910.js} +1 -1
- package/_next/static/css/54f9736fb6decfe2.css +3 -0
- package/index.html +1 -1
- package/index.txt +3 -3
- package/manifest.json +4 -4
- package/{ocearo-ui-0.1.10.tgz → ocearo-ui-0.1.11.tgz} +0 -0
- package/package.json +1 -1
- package/_next/static/chunks/890.5c51beba1d47e5ff.js +0 -1
- package/_next/static/chunks/app/layout-0c6b86ae28776be7.js +0 -1
- package/_next/static/chunks/app/page-e4b029f836d524dc.js +0 -1
- package/_next/static/css/b15803f8682c0ad5.css +0 -3
- package/boats/dufour310/docs/index.json +0 -25
- /package/_next/static/{ED8qlar36uSDUQ_aF23bd → jexXgaE8K23jXi92zslC1}/_buildManifest.js +0 -0
- /package/_next/static/{ED8qlar36uSDUQ_aF23bd → jexXgaE8K23jXi92zslC1}/_ssgManifest.js +0 -0
- /package/_next/static/media/{4473ecc91f70f139-s.p.woff → 4473ecc91f70f139-s.woff} +0 -0
- /package/_next/static/media/{463dafcda517f24f-s.p.woff → 463dafcda517f24f-s.woff} +0 -0
- /package/{boats/default/docs → docs}/index.json +0 -0
- /package/{boats/default/docs → docs}/opencpn.pdf +0 -0
- /package/{boats/default/docs → docs}/signalk.pdf +0 -0
package/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/54f9736fb6decfe2.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-7e86658b39e9a910.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-50d0a3499460e502.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-35a8eb6f9457406b.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-ed02033afba81a43.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="theme-color" media="(prefers-color-scheme: light)" content="#4bbcd8"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a2e3d"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><meta name="format-detection" content="telephone=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_d559d3 __variable_692ef5 antialiased"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/ocearo-ui/_next/static/chunks/webpack-7e86658b39e9a910.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HC[\"/\",\"\"]\n2:HL[\"/ocearo-ui/_next/static/css/54f9736fb6decfe2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n5:I[4707,[],\"\"]\n6:I[36423,[],\"\"]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"jexXgaE8K23jXi92zslC1\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L4\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/54f9736fb6decfe2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{}],[\"$\",\"body\",null,{\"className\":\"__variable_d559d3 __variable_692ef5 antialiased\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#4bbcd8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#0a2e3d\"}],[\"$\",\"meta\",\"3\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"4\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"5\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"6\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"7\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"9\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"10\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"11\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"12\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"13\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"14\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"15\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",\"16\",{\"name\":\"next-size-adjust\"}]]\n4:null\n"])</script></body></html>
|
|
@@ -155,4 +155,4 @@ gl_FragColor.a *= edgeAlpha;
|
|
|
155
155
|
if (edgeAlpha == 0.0) {
|
|
156
156
|
discard;
|
|
157
157
|
}
|
|
158
|
-
`,z=new i.vBJ({color:16777215,side:i.ehD,transparent:!0}),V=new i.yGw,j=new i.Pa4,N=new i.Pa4,H=[],X=new i.Pa4,q="+x+y";function Y(e){return Array.isArray(e)?e[0]:e}let $=()=>{let e=new i.Kj0(new i._12(1,1),z);return $=()=>e,e},Z=()=>{let e=new i.Kj0(new i._12(1,1,32,1),z);return Z=()=>e,e},K={type:"syncstart"},J={type:"synccomplete"},Q=["font","fontSize","fontStyle","fontWeight","lang","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],ee=Q.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");class et extends i.Kj0{constructor(){super(new R,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.unicodeFontsURL=null,this.fontSize=.1,this.fontWeight="normal",this.fontStyle="normal",this.lang=null,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=8421504,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=q,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(e){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(e):(this._isSyncing=!0,this.dispatchEvent(K),C({text:this.text,font:this.font,lang:this.lang,fontSize:this.fontSize||.1,fontWeight:this.fontWeight||"normal",fontStyle:this.fontStyle||"normal",letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF,unicodeFontsURL:this.unicodeFontsURL},t=>{this._isSyncing=!1,this._textRenderInfo=t,this.geometry.updateGlyphs(t.glyphBounds,t.glyphAtlasIndices,t.blockBounds,t.chunkedBounds,t.glyphColors);let r=this._queuedSyncs;r&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{r.forEach(e=>e&&e())})),this.dispatchEvent(J),e&&e()})))}onBeforeRender(e,t,r,a,n,i){this.sync(),n.isTroikaTextMaterial&&this._prepareForRender(n)}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}createDerivedMaterial(e){return function(e){let t=(0,u.B$)(e,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new i.FM8},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new i.Ltg(0,0,0,0)},uTroikaClipRect:{value:new i.Ltg(0,0,0,0)},uTroikaEdgeOffset:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new i.FM8},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new i.Ilk},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new i.Vkp},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:M,vertexTransform:E,fragmentDefs:L,fragmentColorTransform:W,customRewriter({vertexShader:e,fragmentShader:t}){let r=/\buniform\s+vec3\s+diffuse\b/;return r.test(t)&&(t=t.replace(r,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),r.test(e)||(e=e.replace(u.MW,"uniform vec3 diffuse;\n$&\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n"))),{vertexShader:e,fragmentShader:t}}});return t.transparent=!0,t.forceSinglePass=!0,Object.defineProperties(t,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),t}(e)}get material(){let e=this._derivedMaterial,t=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=z.clone());if(e&&e.isDerivedFrom(t)||(e=this._derivedMaterial=this.createDerivedMaterial(t),t.addEventListener("dispose",function r(){t.removeEventListener("dispose",r),e.dispose()})),!this.hasOutline())return e;{let t=e._outlineMtl;return t||((t=e._outlineMtl=Object.create(e,{id:{value:e.id+.1}})).isTextOutlineMaterial=!0,t.depthWrite=!1,t.map=null,e.addEventListener("dispose",function r(){e.removeEventListener("dispose",r),t.dispose()})),[t,e]}}set material(e){e&&e.isTroikaTextMaterial?(this._derivedMaterial=e,this._baseMaterial=e.baseMaterial):this._baseMaterial=e}hasOutline(){return!!(this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY)}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(e){this.geometry.detail=e}get curveRadius(){return this.geometry.curveRadius}set curveRadius(e){this.geometry.curveRadius=e}get customDepthMaterial(){return Y(this.material).getDepthMaterial()}get customDistanceMaterial(){return Y(this.material).getDistanceMaterial()}_prepareForRender(e){let t=e.isTextOutlineMaterial,r=e.uniforms,a=this.textRenderInfo;if(a){let e,n,i;let{sdfTexture:o,blockBounds:s}=a;r.uTroikaSDFTexture.value=o,r.uTroikaSDFTextureSize.value.set(o.image.width,o.image.height),r.uTroikaSDFGlyphSize.value=a.sdfGlyphSize,r.uTroikaSDFExponent.value=a.sdfExponent,r.uTroikaTotalBounds.value.fromArray(s),r.uTroikaUseGlyphColors.value=!t&&!!a.glyphColors;let l=0,u=0,h=0,f=0,d=0;if(t){let{outlineWidth:t,outlineOffsetX:r,outlineOffsetY:a,outlineBlur:n,outlineOpacity:i}=this;l=this._parsePercent(t)||0,u=Math.max(0,this._parsePercent(n)||0),e=i,f=this._parsePercent(r)||0,d=this._parsePercent(a)||0}else(h=Math.max(0,this._parsePercent(this.strokeWidth)||0))&&(i=this.strokeColor,r.uTroikaStrokeColor.value.set(null==i?8421504:i),null==(n=this.strokeOpacity)&&(n=1)),e=this.fillOpacity;r.uTroikaEdgeOffset.value=l,r.uTroikaPositionOffset.value.set(f,d),r.uTroikaBlurRadius.value=u,r.uTroikaStrokeWidth.value=h,r.uTroikaStrokeOpacity.value=n,r.uTroikaFillOpacity.value=null==e?1:e,r.uTroikaCurveRadius.value=this.curveRadius||0;let c=this.clipRect;if(c&&Array.isArray(c)&&4===c.length)r.uTroikaClipRect.value.fromArray(c);else{let e=100*(this.fontSize||.1);r.uTroikaClipRect.value.set(s[0]-e,s[1]-e,s[2]+e,s[3]+e)}this.geometry.applyClipRect(r.uTroikaClipRect.value)}r.uTroikaSDFDebug.value=!!this.debugSDF,e.polygonOffset=!!this.depthOffset,e.polygonOffsetFactor=e.polygonOffsetUnits=this.depthOffset||0;let n=t?this.outlineColor||0:this.color;if(null==n)delete e.color;else{let t=e.hasOwnProperty("color")?e.color:e.color=new i.Ilk;(n!==t._input||"object"==typeof n)&&t.set(t._input=n)}let o=this.orientation||q;if(o!==e._orientation){let t=r.uTroikaOrient.value,a=(o=o.replace(/[^-+xyz]/g,""))!==q&&o.match(/^([-+])([xyz])([-+])([xyz])$/);if(a){let[,e,r,n,i]=a;j.set(0,0,0)[r]="-"===e?1:-1,N.set(0,0,0)[i]="-"===n?-1:1,V.lookAt(X,j.cross(N),N),t.setFromMatrix4(V)}else t.identity();e._orientation=o}}_parsePercent(e){if("string"==typeof e){let t=e.match(/^(-?[\d.]+)%$/),r=t?parseFloat(t[1]):NaN;e=(isNaN(r)?0:r/100)*this.fontSize}return e}localPositionToTextCoords(e,t=new i.FM8){t.copy(e);let r=this.curveRadius;return r&&(t.x=Math.atan2(e.x,Math.abs(r)-Math.abs(e.z))*Math.abs(r)),t}worldPositionToTextCoords(e,t=new i.FM8){return j.copy(e),this.localPositionToTextCoords(this.worldToLocal(j),t)}raycast(e,t){let{textRenderInfo:r,curveRadius:a}=this;if(r){let n=r.blockBounds,i=a?Z():$(),o=i.geometry,{position:s,uv:l}=o.attributes;for(let e=0;e<l.count;e++){let t=n[0]+l.getX(e)*(n[2]-n[0]),r=n[1]+l.getY(e)*(n[3]-n[1]),i=0;a&&(i=a-Math.cos(t/a)*a,t=Math.sin(t/a)*a),s.setXYZ(e,t,r,i)}o.boundingSphere=this.geometry.boundingSphere,o.boundingBox=this.geometry.boundingBox,i.matrixWorld=this.matrixWorld,i.material.side=this.material.side,H.length=0,i.raycast(e,H);for(let e=0;e<H.length;e++)H[e].object=this,t.push(H[e])}}copy(e){let t=this.geometry;return super.copy(e),this.geometry=t,ee.forEach(t=>{this[t]=e[t]}),this}clone(){return new this.constructor().copy(this)}}Q.forEach(e=>{let t="_private_"+e;Object.defineProperty(et.prototype,e,{get(){return this[t]},set(e){e!==this[t]&&(this[t]=e,this._needsSync=!0)}})}),new i.ZzF,new i.Ilk,new WeakMap,new WeakMap}}]);
|
|
158
|
+
`,z=new i.vBJ({color:16777215,side:i.ehD,transparent:!0}),V=new i.yGw,j=new i.Pa4,N=new i.Pa4,H=[],X=new i.Pa4,q="+x+y";function Y(e){return Array.isArray(e)?e[0]:e}let $=()=>{let e=new i.Kj0(new i._12(1,1),z);return $=()=>e,e},Z=()=>{let e=new i.Kj0(new i._12(1,1,32,1),z);return Z=()=>e,e},K={type:"syncstart"},J={type:"synccomplete"},Q=["font","fontSize","fontStyle","fontWeight","lang","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],ee=Q.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");class et extends i.Kj0{constructor(){super(new R,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.unicodeFontsURL=null,this.fontSize=.1,this.fontWeight="normal",this.fontStyle="normal",this.lang=null,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=8421504,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=q,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(e){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(e):(this._isSyncing=!0,this.dispatchEvent(K),C({text:this.text,font:this.font,lang:this.lang,fontSize:this.fontSize||.1,fontWeight:this.fontWeight||"normal",fontStyle:this.fontStyle||"normal",letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF,unicodeFontsURL:this.unicodeFontsURL},t=>{this._isSyncing=!1,this._textRenderInfo=t,this.geometry.updateGlyphs(t.glyphBounds,t.glyphAtlasIndices,t.blockBounds,t.chunkedBounds,t.glyphColors);let r=this._queuedSyncs;r&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{r.forEach(e=>e&&e())})),this.dispatchEvent(J),e&&e()})))}onBeforeRender(e,t,r,a,n,i){this.sync(),n.isTroikaTextMaterial&&this._prepareForRender(n)}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}createDerivedMaterial(e){return function(e){let t=(0,u.B$)(e,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new i.FM8},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new i.Ltg(0,0,0,0)},uTroikaClipRect:{value:new i.Ltg(0,0,0,0)},uTroikaEdgeOffset:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new i.FM8},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new i.Ilk},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new i.Vkp},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:M,vertexTransform:E,fragmentDefs:L,fragmentColorTransform:W,customRewriter({vertexShader:e,fragmentShader:t}){let r=/\buniform\s+vec3\s+diffuse\b/;return r.test(t)&&(t=t.replace(r,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),r.test(e)||(e=e.replace(u.MW,"uniform vec3 diffuse;\n$&\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n"))),{vertexShader:e,fragmentShader:t}}});return t.transparent=!0,t.forceSinglePass=!0,Object.defineProperties(t,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),t}(e)}get material(){let e=this._derivedMaterial,t=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=z.clone());if(e&&e.isDerivedFrom(t)||(e=this._derivedMaterial=this.createDerivedMaterial(t),t.addEventListener("dispose",function r(){t.removeEventListener("dispose",r),e.dispose()})),!this.hasOutline())return e;{let t=e._outlineMtl;return t||((t=e._outlineMtl=Object.create(e,{id:{value:e.id+.1}})).isTextOutlineMaterial=!0,t.depthWrite=!1,t.map=null,e.addEventListener("dispose",function r(){e.removeEventListener("dispose",r),t.dispose()})),[t,e]}}set material(e){e&&e.isTroikaTextMaterial?(this._derivedMaterial=e,this._baseMaterial=e.baseMaterial):this._baseMaterial=e}hasOutline(){return!!(this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY)}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(e){this.geometry.detail=e}get curveRadius(){return this.geometry.curveRadius}set curveRadius(e){this.geometry.curveRadius=e}get customDepthMaterial(){return Y(this.material).getDepthMaterial()}set customDepthMaterial(e){}get customDistanceMaterial(){return Y(this.material).getDistanceMaterial()}set customDistanceMaterial(e){}_prepareForRender(e){let t=e.isTextOutlineMaterial,r=e.uniforms,a=this.textRenderInfo;if(a){let e,n,i;let{sdfTexture:o,blockBounds:s}=a;r.uTroikaSDFTexture.value=o,r.uTroikaSDFTextureSize.value.set(o.image.width,o.image.height),r.uTroikaSDFGlyphSize.value=a.sdfGlyphSize,r.uTroikaSDFExponent.value=a.sdfExponent,r.uTroikaTotalBounds.value.fromArray(s),r.uTroikaUseGlyphColors.value=!t&&!!a.glyphColors;let l=0,u=0,h=0,f=0,d=0;if(t){let{outlineWidth:t,outlineOffsetX:r,outlineOffsetY:a,outlineBlur:n,outlineOpacity:i}=this;l=this._parsePercent(t)||0,u=Math.max(0,this._parsePercent(n)||0),e=i,f=this._parsePercent(r)||0,d=this._parsePercent(a)||0}else(h=Math.max(0,this._parsePercent(this.strokeWidth)||0))&&(i=this.strokeColor,r.uTroikaStrokeColor.value.set(null==i?8421504:i),null==(n=this.strokeOpacity)&&(n=1)),e=this.fillOpacity;r.uTroikaEdgeOffset.value=l,r.uTroikaPositionOffset.value.set(f,d),r.uTroikaBlurRadius.value=u,r.uTroikaStrokeWidth.value=h,r.uTroikaStrokeOpacity.value=n,r.uTroikaFillOpacity.value=null==e?1:e,r.uTroikaCurveRadius.value=this.curveRadius||0;let c=this.clipRect;if(c&&Array.isArray(c)&&4===c.length)r.uTroikaClipRect.value.fromArray(c);else{let e=100*(this.fontSize||.1);r.uTroikaClipRect.value.set(s[0]-e,s[1]-e,s[2]+e,s[3]+e)}this.geometry.applyClipRect(r.uTroikaClipRect.value)}r.uTroikaSDFDebug.value=!!this.debugSDF,e.polygonOffset=!!this.depthOffset,e.polygonOffsetFactor=e.polygonOffsetUnits=this.depthOffset||0;let n=t?this.outlineColor||0:this.color;if(null==n)delete e.color;else{let t=e.hasOwnProperty("color")?e.color:e.color=new i.Ilk;(n!==t._input||"object"==typeof n)&&t.set(t._input=n)}let o=this.orientation||q;if(o!==e._orientation){let t=r.uTroikaOrient.value,a=(o=o.replace(/[^-+xyz]/g,""))!==q&&o.match(/^([-+])([xyz])([-+])([xyz])$/);if(a){let[,e,r,n,i]=a;j.set(0,0,0)[r]="-"===e?1:-1,N.set(0,0,0)[i]="-"===n?-1:1,V.lookAt(X,j.cross(N),N),t.setFromMatrix4(V)}else t.identity();e._orientation=o}}_parsePercent(e){if("string"==typeof e){let t=e.match(/^(-?[\d.]+)%$/),r=t?parseFloat(t[1]):NaN;e=(isNaN(r)?0:r/100)*this.fontSize}return e}localPositionToTextCoords(e,t=new i.FM8){t.copy(e);let r=this.curveRadius;return r&&(t.x=Math.atan2(e.x,Math.abs(r)-Math.abs(e.z))*Math.abs(r)),t}worldPositionToTextCoords(e,t=new i.FM8){return j.copy(e),this.localPositionToTextCoords(this.worldToLocal(j),t)}raycast(e,t){let{textRenderInfo:r,curveRadius:a}=this;if(r){let n=r.blockBounds,i=a?Z():$(),o=i.geometry,{position:s,uv:l}=o.attributes;for(let e=0;e<l.count;e++){let t=n[0]+l.getX(e)*(n[2]-n[0]),r=n[1]+l.getY(e)*(n[3]-n[1]),i=0;a&&(i=a-Math.cos(t/a)*a,t=Math.sin(t/a)*a),s.setXYZ(e,t,r,i)}o.boundingSphere=this.geometry.boundingSphere,o.boundingBox=this.geometry.boundingBox,i.matrixWorld=this.matrixWorld,i.material.side=this.material.side,H.length=0,i.raycast(e,H);for(let e=0;e<H.length;e++)H[e].object=this,t.push(H[e])}}copy(e){let t=this.geometry;return super.copy(e),this.geometry=t,ee.forEach(t=>{this[t]=e[t]}),this}clone(){return new this.constructor().copy(this)}}Q.forEach(e=>{let t="_private_"+e;Object.defineProperty(et.prototype,e,{get(){return this[t]},set(e){e!==this[t]&&(this[t]=e,this._needsSync=!0)}})}),new i.ZzF,new i.Ilk,new WeakMap,new WeakMap}}]);
|