@realsee/five 6.7.0-alpha.22 → 6.7.0-alpha.24
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/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +22 -0
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BoundingMesh.html +1 -1
- package/docs/classes/five.EffectComposer.html +21 -0
- package/docs/classes/five.EyeDomeLightingPass.html +21 -0
- package/docs/classes/five.Five.html +78 -79
- package/docs/classes/five.FivePass.html +16 -18
- package/docs/classes/five.FiveRenderer.html +11 -0
- package/docs/classes/five.FullScreenQuad.html +3 -4
- package/docs/classes/five.Model.html +1 -1
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +6 -7
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.Parameter.html +44 -46
- package/docs/classes/five.Tile3D.html +1 -1
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.WorkResolvedObserver.html +1 -1
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.ParticleGPU.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/functions/react.withFive.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.FiveInitArgs.html +3 -3
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +29 -31
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +43 -45
- package/docs/interfaces/five.Pass.html +9 -0
- package/docs/interfaces/five.ResolvedParameterValue.html +43 -45
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkObserver.html +1 -1
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +28 -27
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +18 -18
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +9 -9
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +3 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +5 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +4 -4
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
- package/docs/modules/five.html +1 -1
- package/docs/types/five.ParseOptions.html +1 -1
- package/docs/types/five.PostProcessingType.html +1 -1
- package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +2 -2
- package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +2 -2
- package/five/index.d.ts +116 -59
- package/five/index.js +238 -184
- package/five/index.mjs +4035 -4413
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +1 -1
- package/plugins/index.d.ts +11 -4
- package/plugins/index.js +19 -17
- package/plugins/index.mjs +962 -922
- package/react/index.d.ts +1 -1
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.js +3 -3
- package/shader-lib/index.mjs +3 -3
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +19 -17
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +3 -3
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +238 -184
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
- package/docs/classes/five.Pass.html +0 -11
package/umd/five-react.js
CHANGED
package/umd/five-shader-lib.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 12/
|
|
5
|
-
* Version: 6.7.0-alpha.
|
|
4
|
+
* Generated: 12/8/2025
|
|
5
|
+
* Version: 6.7.0-alpha.24
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -501,7 +501,7 @@ vPointSize = gl_PointSize;
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
`,D=(function(){function a(){this.canvasCache=new Map,this.canvas=document.createElement("canvas"),this.canvas.width=512,this.canvas.height=512,this.polygonTexture=new l.CanvasTexture(this.canvas),this.polygonCount=0}return a.prototype.setSize=function(n){this.canvas.width=n,this.canvas.height=n},a.prototype.generatePolygonCanvas=function(n){var e=JSON.stringify(n);if(this.canvasCache.has(e))return this.canvasCache.get(e);var o=document.createElement("canvas");o.width=this.canvas.width,o.height=this.canvas.height;var t=o.getContext("2d");if(!t)throw new Error("Failed to get canvas context");if(this.polygonCount>=24)throw new Error("polygon count exceed 24, please clear the canvas");t.clearRect(0,0,this.canvas.width,this.canvas.height),t.fillStyle="rgba(0,0,0,1.0)",t.beginPath();var r=n[0][0],s=n[0][0],f=n[0][1],c=n[0][1];n.forEach(function(p){var g=p[0],v=p[1];r=Math.min(r,g),s=Math.max(s,g),f=Math.min(f,v),c=Math.max(c,v)});var i=s-r,u=c-f,d=this.canvas.width,h=i>=u?d/i:d/u,m=n.map(function(p){var g=p[0]-r,v=p[1]-f;return[g,v]}),P=m.map(function(p){return[p[0]*h,p[1]*h]});return P.forEach(function(p,g){var v=p[0],x=p[1];g===0?t.moveTo(v,x):t.lineTo(v,x)}),t.closePath(),t.fill(),this.polygonCount++,this.canvasCache.set(e,o),o},a.generatePolygonGeometry=function(n,e){for(var o=new l.BufferGeometry,t=n.slice(0,-1),r=t.map(function(h){return[h[0],0,h[1]]}),s=t.map(function(h){return[h[0],e,h[1]]}),f=z(z([],r,!0),s,!0),c=t.length,i=[],u=1;u<c-1;u++)i.push(0,u,u+1);for(var u=1;u<c-1;u++)i.push(c,c+u,c+u+1);for(var u=0;u<c;u++){var d=(u+1)%c;i.push(u,d,c+u),i.push(d,c+d,c+u)}return o.setAttribute("position",new l.Float32BufferAttribute(f.flat(),3)),o.setIndex(i),o.computeVertexNormals(),o},a.prototype.generatePolygonTexture=function(n){var e=this.canvas.getContext("2d",{willReadFrequently:!0});if(!e)throw new Error("Failed to get canvas context");for(var o=e.createImageData(this.canvas.width,this.canvas.height),t=0;t<this.canvas.width;t++)for(var r=0;r<this.canvas.height;r++){for(var s=0,f=0,c=0,i=0;i<n.length;i++){var u=n[i].getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("Failed to get canvas context");var d=u.getImageData(t,r,1,1).data;if(d[3]===255){var h=i%8,m=Math.floor(i/8);m===0?s=s|1<<h:m===1?f=f|1<<h:m===2&&(c=c|1<<h)}}var P=(t+r*this.canvas.width)*4;o.data[P]=s,o.data[P+1]=f,o.data[P+2]=c,o.data[P+3]=255}return e.putImageData(o,0,0),new l.CanvasTexture(this.canvas)},a})(),ie=(function(a){_(n,a);function n(e){e===void 0&&(e=512);var o=a.call(this,{type:["basic","phong","pointcloud"],fragment:{mainBefore:re,mainEnd:ae},uniforms:{polygonClippers:new l.Uniform([]),polygonTexture:new l.Uniform(null)}})||this;return o._polygonClippers=[],o.polygonGenerater=new D,o._radio=512,o.radio=e,o.workerPool=new oe(function(){return new ne},1),o}return n.prototype.setPolygonClippersAsync=function(e){return L(this,void 0,void 0,function(){var o,t,r,s,f,c,i=this;return W(this,function(u){switch(u.label){case 0:return this._polygonClippers=e,o=this.uniforms,o.polygonClippers.value=e.map(function(d){var h=new l.Matrix4().getInverse(d.polygonTransform),m=d.polygonHeight,P=d.cutOutSide,p=d.polygon,g=p[0][0],v=p[0][0],x=p[0][1],w=p[0][1];p.forEach(function(B){var b=B[0],F=B[1];g=Math.min(g,b),v=Math.max(v,b),x=Math.min(x,F),w=Math.max(w,F)});var S=new l.Vector2(g,x),C=v-g>=w-x?v-g:w-x;return{polygonTransformInverse:h,polygonHeight:m,minPos:S,polygonScale:C,cutOutSide:P}}),t=e.map(function(d){return{polygon:d.polygon,width:i.polygonGenerater.canvas.width,height:i.polygonGenerater.canvas.height}}),[4,this.workerPool.postMessage({canvasDataList:t,width:this.polygonGenerater.canvas.width,height:this.polygonGenerater.canvas.height})];case 1:return r=u.sent(),s=document.createElement("canvas"),s.width=this.polygonGenerater.canvas.width,s.height=this.polygonGenerater.canvas.height,f=s.getContext("2d"),f&&(f.putImageData(r.imageData,0,0),c=new l.CanvasTexture(s),c.minFilter=l.NearestFilter,c.magFilter=l.NearestFilter,this.uniforms.polygonTexture.value=c,this.needsUpdate=!0),[2]}})})},Object.defineProperty(n.prototype,"polygonClippers",{get:function(){return this._polygonClippers},set:function(e){this._polygonClippers=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"radio",{get:function(){return this._radio},set:function(e){this._radio=e,this.polygonGenerater.setSize(e)},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){this.workerPool.dispose()},n.prototype.onBeforeCompile=function(e,o){var t=String(this.polygonClippers.length);e.vertexShader=e.vertexShader.replace(/NUM_POLYGON_CLIPPER/g,t),e.fragmentShader=e.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g,t)},n})(E.CustomShader),se=`
|
|
504
|
+
`,D=(function(){function a(){this.canvasCache=new Map,this.canvas=document.createElement("canvas"),this.canvas.width=512,this.canvas.height=512,this.polygonTexture=new l.CanvasTexture(this.canvas),this.polygonCount=0}return a.prototype.setSize=function(n){this.canvas.width=n,this.canvas.height=n},a.prototype.generatePolygonCanvas=function(n){var e=JSON.stringify(n);if(this.canvasCache.has(e))return this.canvasCache.get(e);var o=document.createElement("canvas");o.width=this.canvas.width,o.height=this.canvas.height;var t=o.getContext("2d");if(!t)throw new Error("Failed to get canvas context");if(this.polygonCount>=24)throw new Error("polygon count exceed 24, please clear the canvas");t.clearRect(0,0,this.canvas.width,this.canvas.height),t.fillStyle="rgba(0,0,0,1.0)",t.beginPath();var r=n[0][0],s=n[0][0],f=n[0][1],c=n[0][1];n.forEach(function(p){var g=p[0],v=p[1];r=Math.min(r,g),s=Math.max(s,g),f=Math.min(f,v),c=Math.max(c,v)});var i=s-r,u=c-f,d=this.canvas.width,h=i>=u?d/i:d/u,m=n.map(function(p){var g=p[0]-r,v=p[1]-f;return[g,v]}),P=m.map(function(p){return[p[0]*h,p[1]*h]});return P.forEach(function(p,g){var v=p[0],x=p[1];g===0?t.moveTo(v,x):t.lineTo(v,x)}),t.closePath(),t.fill(),this.polygonCount++,this.canvasCache.set(e,o),o},a.generatePolygonGeometry=function(n,e){for(var o=new l.BufferGeometry,t=n.slice(0,-1),r=t.map(function(h){return[h[0],0,h[1]]}),s=t.map(function(h){return[h[0],e,h[1]]}),f=z(z([],r,!0),s,!0),c=t.length,i=[],u=1;u<c-1;u++)i.push(0,u,u+1);for(var u=1;u<c-1;u++)i.push(c,c+u,c+u+1);for(var u=0;u<c;u++){var d=(u+1)%c;i.push(u,d,c+u),i.push(d,c+d,c+u)}return o.setAttribute("position",new l.Float32BufferAttribute(f.flat(),3)),o.setIndex(i),o.computeVertexNormals(),o},a.prototype.generatePolygonTexture=function(n){var e=this.canvas.getContext("2d",{willReadFrequently:!0});if(!e)throw new Error("Failed to get canvas context");for(var o=e.createImageData(this.canvas.width,this.canvas.height),t=0;t<this.canvas.width;t++)for(var r=0;r<this.canvas.height;r++){for(var s=0,f=0,c=0,i=0;i<n.length;i++){var u=n[i].getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("Failed to get canvas context");var d=u.getImageData(t,r,1,1).data;if(d[3]===255){var h=i%8,m=Math.floor(i/8);m===0?s=s|1<<h:m===1?f=f|1<<h:m===2&&(c=c|1<<h)}}var P=(t+r*this.canvas.width)*4;o.data[P]=s,o.data[P+1]=f,o.data[P+2]=c,o.data[P+3]=255}return e.putImageData(o,0,0),new l.CanvasTexture(this.canvas)},a})(),ie=(function(a){_(n,a);function n(e){e===void 0&&(e=512);var o=a.call(this,{type:["basic","phong","pointcloud"],fragment:{mainBefore:re,mainEnd:ae},uniforms:{polygonClippers:new l.Uniform([]),polygonTexture:new l.Uniform(null)}})||this;return o._polygonClippers=[],o.polygonGenerater=new D,o._radio=512,o.radio=e,o.workerPool=new oe(function(){return new ne},1),o}return n.prototype.setPolygonClippersAsync=function(e){return L(this,void 0,void 0,function(){var o,t,r,s,f,c,i=this;return W(this,function(u){switch(u.label){case 0:return this._polygonClippers=e,o=this.uniforms,o.polygonClippers.value=e.map(function(d){var h=new l.Matrix4().getInverse(d.polygonTransform),m=d.polygonHeight,P=d.cutOutSide,p=d.polygon,g=p[0][0],v=p[0][0],x=p[0][1],w=p[0][1];p.forEach(function(B){var b=B[0],F=B[1];g=Math.min(g,b),v=Math.max(v,b),x=Math.min(x,F),w=Math.max(w,F)});var S=new l.Vector2(g,x),C=v-g>=w-x?v-g:w-x;return{polygonTransformInverse:h,polygonHeight:m,minPos:S,polygonScale:C,cutOutSide:P}}),t=e.map(function(d){return{polygon:d.polygon,width:i.polygonGenerater.canvas.width,height:i.polygonGenerater.canvas.height}}),[4,this.workerPool.postMessage({canvasDataList:t,width:this.polygonGenerater.canvas.width,height:this.polygonGenerater.canvas.height})];case 1:return r=u.sent(),s=document.createElement("canvas"),s.width=this.polygonGenerater.canvas.width,s.height=this.polygonGenerater.canvas.height,f=s.getContext("2d"),f&&(f.putImageData(r.imageData,0,0),c=new l.CanvasTexture(s),c.minFilter=l.NearestFilter,c.magFilter=l.NearestFilter,this.uniforms.polygonTexture.value=c,this.needsUpdate=!0),[2]}})})},Object.defineProperty(n.prototype,"polygonClippers",{get:function(){return this._polygonClippers},set:function(e){this._polygonClippers=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"radio",{get:function(){return this._radio},set:function(e){this._radio=e,this.polygonGenerater.setSize(e)},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){this.workerPool.dispose()},n.prototype.onBeforeCompile=function(e,o){var t=String(this.polygonClippers.length);e.vertexShader=e.vertexShader.replace(/NUM_POLYGON_CLIPPER/g,t),e.fragmentShader=e.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g,t)},n})(E.CustomShader),se=`
|
|
505
505
|
#if NUM_SHINE_OBJECTS > 0
|
|
506
506
|
uniform float shineProgress;
|
|
507
507
|
struct SHINE_OBJECT {
|
package/umd/five-sticker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 12/
|
|
5
|
-
* Version: 6.7.0-alpha.
|
|
4
|
+
* Generated: 12/8/2025
|
|
5
|
+
* Version: 6.7.0-alpha.24
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,4 +252,4 @@
|
|
|
252
252
|
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
|
-
*/(function(s,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],u):(s=typeof globalThis!="undefined"?globalThis:s||self,u(s.FiveSDK_Sticker={},s.THREE))})(this,(function(s,u){"use strict";function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const o=w(u);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},m(t,n)};function T(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),_=new Float32Array([0,0,1,0,0,1,1,1]),R=new Uint8Array([0,1,2,1,3,2]),c=new o.BufferGeometry;c.setAttribute("position",new o.BufferAttribute(E,3)),c.setAttribute("uv",new o.BufferAttribute(_,2)),c.setIndex(new o.BufferAttribute(R,1));var l=window,g=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame||(function(t){return setTimeout(t,16)}),S=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),v=typeof performance!="undefined"?(function(){return S+performance.now()}):(function(){return Date.now()});function A(t,n){t.naturalWidth>0&&g(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function b(t,n){var e=v(),r=!1,i=function(){r=!0,n();var f=v();f-e<3e3?g(i):r=!1},a=function(){e=v(),r===!1&&i()};return t.addEventListener("timeupdate",a,!1),function(){t.removeEventListener("timeupdate",a,!1),r=!1}}function h(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var O=(function(t){T(n,t);function n(e,r,i){var a=this,f=new o.MeshBasicMaterial;if(a=t.call(this,c,f)||this,a._needsRender=!1,a.scale.set(e,r,1),typeof i=="string"){f.transparent=/\.png$/.test(i);var y=new Image;y.src=i,y.crossOrigin="",i=y}if(i instanceof HTMLImageElement){var p=f.map=new o.Texture;p.wrapS=o.ClampToEdgeWrapping,p.wrapT=o.ClampToEdgeWrapping,p.minFilter=o.LinearFilter,p.encoding=o.sRGBEncoding,h(p,A(i,function(){p.image=i,p.needsUpdate=!0,a._needsRender=!0}))}else if(i instanceof HTMLCanvasElement)f.map=new o.CanvasTexture(i);else if(i instanceof HTMLVideoElement){var d=f.map=new o.VideoTexture(i);d.wrapS=o.ClampToEdgeWrapping,d.wrapT=o.ClampToEdgeWrapping,d.minFilter=o.LinearFilter,d.encoding=o.sRGBEncoding,h(d,b(i,function(){a._needsRender=!0}))}return a}return Object.defineProperty(n,"version",{get:function(){return"6.7.0-alpha.
|
|
255
|
+
*/(function(s,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],u):(s=typeof globalThis!="undefined"?globalThis:s||self,u(s.FiveSDK_Sticker={},s.THREE))})(this,(function(s,u){"use strict";function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const o=w(u);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},m(t,n)};function T(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),_=new Float32Array([0,0,1,0,0,1,1,1]),R=new Uint8Array([0,1,2,1,3,2]),c=new o.BufferGeometry;c.setAttribute("position",new o.BufferAttribute(E,3)),c.setAttribute("uv",new o.BufferAttribute(_,2)),c.setIndex(new o.BufferAttribute(R,1));var l=window,g=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame||(function(t){return setTimeout(t,16)}),S=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),v=typeof performance!="undefined"?(function(){return S+performance.now()}):(function(){return Date.now()});function A(t,n){t.naturalWidth>0&&g(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function b(t,n){var e=v(),r=!1,i=function(){r=!0,n();var f=v();f-e<3e3?g(i):r=!1},a=function(){e=v(),r===!1&&i()};return t.addEventListener("timeupdate",a,!1),function(){t.removeEventListener("timeupdate",a,!1),r=!1}}function h(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var O=(function(t){T(n,t);function n(e,r,i){var a=this,f=new o.MeshBasicMaterial;if(a=t.call(this,c,f)||this,a._needsRender=!1,a.scale.set(e,r,1),typeof i=="string"){f.transparent=/\.png$/.test(i);var y=new Image;y.src=i,y.crossOrigin="",i=y}if(i instanceof HTMLImageElement){var p=f.map=new o.Texture;p.wrapS=o.ClampToEdgeWrapping,p.wrapT=o.ClampToEdgeWrapping,p.minFilter=o.LinearFilter,p.encoding=o.sRGBEncoding,h(p,A(i,function(){p.image=i,p.needsUpdate=!0,a._needsRender=!0}))}else if(i instanceof HTMLCanvasElement)f.map=new o.CanvasTexture(i);else if(i instanceof HTMLVideoElement){var d=f.map=new o.VideoTexture(i);d.wrapS=o.ClampToEdgeWrapping,d.wrapT=o.ClampToEdgeWrapping,d.minFilter=o.LinearFilter,d.encoding=o.sRGBEncoding,h(d,b(i,function(){a._needsRender=!0}))}return a}return Object.defineProperty(n,"version",{get:function(){return"6.7.0-alpha.24"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,r){this.scale.set(e,r,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,r){r===void 0&&(r=.005);var i=e.point,a=e.face;this.position.copy(i),a&&(this.position.add(a.normal.clone().setLength(r)),this.lookAt(i.clone().add(a.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n})(o.Mesh);s.Sticker=O,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
package/umd/five-vfx.js
CHANGED