@realsee/five 6.8.0-alpha.20 → 6.8.0-alpha.21
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/ai_guides/features/material.md +1 -1
- package/ai_guides/release_notes/6.8.md +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Five.html +41 -41
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGSObject.html +5 -3
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.Parameter.html +5 -5
- package/docs/documents/features_material.html +1 -1
- package/docs/documents/release_notes_6.8.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +6 -6
- package/docs/interfaces/five.ParameterValue.html +6 -6
- package/docs/interfaces/five.ResolvedParameterValue.html +6 -6
- package/docs/interfaces/five.SplatData.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/five/application/five.d.ts +1 -6
- package/five/gaussian-splatting/util/renderData.d.ts +52 -0
- package/five/index.js +9 -9
- package/five/index.mjs +443 -230
- package/five/model/index.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +2 -2
- package/five/model/loaders/spz.d.ts +2 -2
- package/five/model/objects/{pbmGSObject.d.ts → pbmGaussianSplattingObject.d.ts} +4 -1
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/parameter.d.ts +1 -1
- package/five/model/tile3d/tile-node.d.ts +2 -2
- package/five/utils/memoryUsage.d.ts +2 -2
- package/gltf-loader/index.js +2 -2
- package/gltf-loader/index.mjs +2 -2
- package/line/index.js +2 -2
- package/line/index.mjs +2 -2
- package/package.json +1 -1
- package/plugins/index.js +1 -1
- package/plugins/index.mjs +1 -1
- package/react/index.js +1 -1
- package/react/index.mjs +1 -1
- package/shader-lib/index.js +1 -1
- package/shader-lib/index.mjs +1 -1
- package/sticker/index.js +2 -2
- package/sticker/index.mjs +2 -2
- package/umd/five-gltf-loader.js +2 -2
- package/umd/five-line.js +2 -2
- package/umd/five-plugins.js +1 -1
- package/umd/five-react.js +1 -1
- package/umd/five-shader-lib.js +1 -1
- package/umd/five-sticker.js +2 -2
- package/umd/five-vfx.js +1 -1
- package/umd/five-vue.js +1 -1
- package/umd/five.js +10 -10
- package/vfx/index.js +1 -1
- package/vfx/index.mjs +1 -1
- package/vue/index.js +1 -1
- package/vue/index.mjs +1 -1
- package/work-downloader/index.js +1 -1
- package/work-downloader/index.mjs +1 -1
- package/five/gs/util/renderData.d.ts +0 -32
- package/five/model/objects/pbmGSRenderMesh.d.ts +0 -32
- /package/five/{gs → gaussian-splatting}/wasm/data.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/sort.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/dataWorker.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/sortWorker.d.ts +0 -0
package/umd/five-line.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
4
|
* Generated: 3/19/2026
|
|
5
|
-
* Version: 6.8.0-alpha.
|
|
5
|
+
* Version: 6.8.0-alpha.21
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -451,4 +451,4 @@
|
|
|
451
451
|
#include <premultiplied_alpha_fragment>
|
|
452
452
|
|
|
453
453
|
}
|
|
454
|
-
`},d=class extends t.ShaderMaterial{constructor(e){super({uniforms:t.UniformsUtils.clone(u.uniforms),vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,clipping:!0}),this.type=`LineMaterial`,this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get(){return this.uniforms.diffuse.value},set(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get(){return this.uniforms.linewidth.value},set(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get(){return this.uniforms.dashScale.value},set(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get(){return this.uniforms.dashSize.value},set(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get(){return this.uniforms.gapSize.value},set(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get(){return this.uniforms.opacity.value},set(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get(){return this.uniforms.resolution.value},set(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)}};Object.assign(d.prototype,{isLineMaterial:!0});var f=class extends t.Mesh{constructor(e,t){super(),this.type=`LineSegments2`,this.geometry=e===void 0?new l:e,this.material=t===void 0?new d({color:Math.random()*16777215}):t}computeLineDistances(){let e=this.geometry,n=e.attributes.instanceStart,r=e.attributes.instanceEnd,i=new Float32Array(2*n.count),a=new t.Vector3,o=new t.Vector3;for(var s=0,c=0,l=n.count;s<l;s++,c+=2)a.fromBufferAttribute(n,s),o.fromBufferAttribute(r,s),i[c]=c===0?0:i[c-1],i[c+1]=i[c]+a.distanceTo(o);let u=new t.InstancedInterleavedBuffer(i,2,1);return e.setAttribute(`instanceDistanceStart`,new t.InterleavedBufferAttribute(u,1,0)),e.setAttribute(`instanceDistanceEnd`,new t.InterleavedBufferAttribute(u,1,1)),this}raycast(e,n){e.camera===null&&console.error(`LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.`);let r=e.ray,i=e.camera,a=i.projectionMatrix,o=this.geometry,s=this.material,c=s.resolution,l=s.linewidth,u=o.attributes.instanceStart,d=o.attributes.instanceEnd,f=new t.Vector4,p=new t.Vector4,m=new t.Vector4,h=new t.Vector3,g=new t.Matrix4,_=new t.Line3,v=new t.Vector3;r.at(1,m),m.w=1,m.applyMatrix4(i.matrixWorldInverse),m.applyMatrix4(a),m.multiplyScalar(1/m.w),m.x*=c.x/2,m.y*=c.y/2,m.z=0,h.copy(m);let y=this.matrixWorld;g.multiplyMatrices(i.matrixWorldInverse,y);for(var b=0,x=u.count;b<x;b++){f.fromBufferAttribute(u,b),p.fromBufferAttribute(d,b),f.w=1,p.w=1,f.applyMatrix4(g),p.applyMatrix4(g),f.applyMatrix4(a),p.applyMatrix4(a),f.multiplyScalar(1/f.w),p.multiplyScalar(1/p.w);var S=f.z<-1&&p.z<-1,C=f.z>1&&p.z>1;if(S||C)continue;f.x*=c.x/2,f.y*=c.y/2,p.x*=c.x/2,p.y*=c.y/2,_.start.copy(f),_.start.z=0,_.end.copy(p),_.end.z=0;let e=_.closestPointToPointParameter(h,!0);_.at(e,v);let i=t.MathUtils.lerp(f.z,p.z,e),o=i>=-1&&i<=1;var w=h.distanceTo(v)<l*.5;if(o&&w){_.start.fromBufferAttribute(u,b),_.end.fromBufferAttribute(d,b),_.start.applyMatrix4(y),_.end.applyMatrix4(y);var T=new t.Vector3,E=new t.Vector3;r.distanceSqToSegment(_.start,_.end,E,T),n.push({point:E,pointOnLine:T,distance:r.origin.distanceTo(E),object:this,faceIndex:b})}}}};Object.assign(f.prototype,{isLineSegments2:!0});var p=class extends f{constructor(e,t){super(e,t),this.type=`Line2`}};Object.assign(p.prototype,{isLine2:!0});var m=class extends l{constructor(){super(),this.type=`LineGeometry`}setPositions(e){let t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setPositions(n),this}setColors(e){let t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setColors(n),this}fromLine(e){let n=e.geometry;if(n instanceof t.Geometry){let e=new t.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof t.BufferGeometry&&this.setPositions(n.attributes.position.array);return this}copy(){return this}};Object.assign(m.prototype,{isLineGeometry:!0});var h=14467195,g=8,_=2,v=20,y=null,b=class extends t.Object3D{static get version(){return`6.8.0-alpha.
|
|
454
|
+
`},d=class extends t.ShaderMaterial{constructor(e){super({uniforms:t.UniformsUtils.clone(u.uniforms),vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,clipping:!0}),this.type=`LineMaterial`,this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get(){return this.uniforms.diffuse.value},set(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get(){return this.uniforms.linewidth.value},set(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get(){return this.uniforms.dashScale.value},set(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get(){return this.uniforms.dashSize.value},set(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get(){return this.uniforms.gapSize.value},set(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get(){return this.uniforms.opacity.value},set(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get(){return this.uniforms.resolution.value},set(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)}};Object.assign(d.prototype,{isLineMaterial:!0});var f=class extends t.Mesh{constructor(e,t){super(),this.type=`LineSegments2`,this.geometry=e===void 0?new l:e,this.material=t===void 0?new d({color:Math.random()*16777215}):t}computeLineDistances(){let e=this.geometry,n=e.attributes.instanceStart,r=e.attributes.instanceEnd,i=new Float32Array(2*n.count),a=new t.Vector3,o=new t.Vector3;for(var s=0,c=0,l=n.count;s<l;s++,c+=2)a.fromBufferAttribute(n,s),o.fromBufferAttribute(r,s),i[c]=c===0?0:i[c-1],i[c+1]=i[c]+a.distanceTo(o);let u=new t.InstancedInterleavedBuffer(i,2,1);return e.setAttribute(`instanceDistanceStart`,new t.InterleavedBufferAttribute(u,1,0)),e.setAttribute(`instanceDistanceEnd`,new t.InterleavedBufferAttribute(u,1,1)),this}raycast(e,n){e.camera===null&&console.error(`LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.`);let r=e.ray,i=e.camera,a=i.projectionMatrix,o=this.geometry,s=this.material,c=s.resolution,l=s.linewidth,u=o.attributes.instanceStart,d=o.attributes.instanceEnd,f=new t.Vector4,p=new t.Vector4,m=new t.Vector4,h=new t.Vector3,g=new t.Matrix4,_=new t.Line3,v=new t.Vector3;r.at(1,m),m.w=1,m.applyMatrix4(i.matrixWorldInverse),m.applyMatrix4(a),m.multiplyScalar(1/m.w),m.x*=c.x/2,m.y*=c.y/2,m.z=0,h.copy(m);let y=this.matrixWorld;g.multiplyMatrices(i.matrixWorldInverse,y);for(var b=0,x=u.count;b<x;b++){f.fromBufferAttribute(u,b),p.fromBufferAttribute(d,b),f.w=1,p.w=1,f.applyMatrix4(g),p.applyMatrix4(g),f.applyMatrix4(a),p.applyMatrix4(a),f.multiplyScalar(1/f.w),p.multiplyScalar(1/p.w);var S=f.z<-1&&p.z<-1,C=f.z>1&&p.z>1;if(S||C)continue;f.x*=c.x/2,f.y*=c.y/2,p.x*=c.x/2,p.y*=c.y/2,_.start.copy(f),_.start.z=0,_.end.copy(p),_.end.z=0;let e=_.closestPointToPointParameter(h,!0);_.at(e,v);let i=t.MathUtils.lerp(f.z,p.z,e),o=i>=-1&&i<=1;var w=h.distanceTo(v)<l*.5;if(o&&w){_.start.fromBufferAttribute(u,b),_.end.fromBufferAttribute(d,b),_.start.applyMatrix4(y),_.end.applyMatrix4(y);var T=new t.Vector3,E=new t.Vector3;r.distanceSqToSegment(_.start,_.end,E,T),n.push({point:E,pointOnLine:T,distance:r.origin.distanceTo(E),object:this,faceIndex:b})}}}};Object.assign(f.prototype,{isLineSegments2:!0});var p=class extends f{constructor(e,t){super(e,t),this.type=`Line2`}};Object.assign(p.prototype,{isLine2:!0});var m=class extends l{constructor(){super(),this.type=`LineGeometry`}setPositions(e){let t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setPositions(n),this}setColors(e){let t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setColors(n),this}fromLine(e){let n=e.geometry;if(n instanceof t.Geometry){let e=new t.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof t.BufferGeometry&&this.setPositions(n.attributes.position.array);return this}copy(){return this}};Object.assign(m.prototype,{isLineGeometry:!0});var h=14467195,g=8,_=2,v=20,y=null,b=class extends t.Object3D{static get version(){return`6.8.0-alpha.21`}constructor(e=new t.Vector3,n=new t.Vector3){super(),this.type=`FiveLine`,this.needsRender=!0,this.line=new p(new m,new d({color:h,linewidth:_,dashScale:v,dashed:!1}));let r=new t.BufferGeometry,i=new t.PointsMaterial({color:h,size:g,map:y||(y=new t.TextureLoader().load(`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==`)),sizeAttenuation:!1,transparent:!0});this.points=new t.Points(r,i),this.points.renderOrder=11,this.points.frustumCulled=!1,this.setPoints(e,n),this.add(this.line,this.points)}setPoints(e,n){let r=[].concat(e.toArray(),n.toArray());this.points.geometry.setAttribute(`position`,new t.BufferAttribute(new Float32Array(r),3)),this.line.geometry.setPositions(r),this.line.computeLineDistances(),this.needsRender=!0}getPoints(){let e=this.points.geometry.attributes.position.array;return[new t.Vector3(e[0],e[1],e[2]),new t.Vector3(e[3],e[4],e[5])]}setMaterial(e){let t=this.line.material;for(let n in e){if(!e.hasOwnProperty(n))continue;let r=e[n];n===`dashed`?(t.dashed=r,r?t.defines.USE_DASH=``:delete t.defines.USE_DASH,t.needsUpdate=!0):t[n]=e[n]}this.needsRender=!0}setResolution(e,t){let n=this.line.material.resolution;(n.x!==e||n.y!==t)&&(n.set(e,t),this.needsRender=!0)}};Object.assign(b.prototype,{isFiveLine:!0}),e.Line=b,e.LineGeometry=m,e.LineMaterial=d,e.LineSegmentsGeometry=l,e.THREE_Line2=p,e.THREE_LineSegments2=f});
|
package/umd/five-plugins.js
CHANGED
package/umd/five-react.js
CHANGED
package/umd/five-shader-lib.js
CHANGED
package/umd/five-sticker.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
4
|
* Generated: 3/19/2026
|
|
5
|
-
* Version: 6.8.0-alpha.
|
|
5
|
+
* Version: 6.8.0-alpha.21
|
|
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(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`three`)):typeof define==`function`&&define.amd?define([`exports`,`three`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FiveSDK_Sticker={},e.THREE))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)))(t);var l=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),u=new Float32Array([0,0,1,0,0,1,1,1]),d=new Uint8Array([0,1,2,1,3,2]),f=new t.BufferGeometry;f.setAttribute(`position`,new t.BufferAttribute(l,3)),f.setAttribute(`uv`,new t.BufferAttribute(u,2)),f.setIndex(new t.BufferAttribute(d,1));var p=window,m=p.requestAnimationFrame||p.mozRequestAnimationFrame||p.webkitRequestAnimationFrame||p.msRequestAnimationFrame||(e=>setTimeout(e,16)),h=typeof performance<`u`&&performance.timing!==void 0?performance.timing.navigationStart:Date.now(),g=typeof performance<`u`?(()=>h+performance.now()):(()=>Date.now());function _(e,t){e.naturalWidth>0&&m(()=>t());let n=()=>t();return e.addEventListener(`load`,n,!1),()=>e.removeEventListener(`load`,n,!1)}function v(e,t){let n=g(),r=!1,i=()=>{r=!0,t(),g()-n<3e3?m(i):r=!1},a=()=>{n=g(),r===!1&&i()};return e.addEventListener(`timeupdate`,a,!1),()=>{e.removeEventListener(`timeupdate`,a,!1),r=!1}}function y(e,t){let n=e.dispose;e.dispose=()=>{t(),n.call(e)}}e.Sticker=class extends t.Mesh{static get version(){return`6.8.0-alpha.
|
|
255
|
+
*/(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`three`)):typeof define==`function`&&define.amd?define([`exports`,`three`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FiveSDK_Sticker={},e.THREE))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)))(t);var l=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),u=new Float32Array([0,0,1,0,0,1,1,1]),d=new Uint8Array([0,1,2,1,3,2]),f=new t.BufferGeometry;f.setAttribute(`position`,new t.BufferAttribute(l,3)),f.setAttribute(`uv`,new t.BufferAttribute(u,2)),f.setIndex(new t.BufferAttribute(d,1));var p=window,m=p.requestAnimationFrame||p.mozRequestAnimationFrame||p.webkitRequestAnimationFrame||p.msRequestAnimationFrame||(e=>setTimeout(e,16)),h=typeof performance<`u`&&performance.timing!==void 0?performance.timing.navigationStart:Date.now(),g=typeof performance<`u`?(()=>h+performance.now()):(()=>Date.now());function _(e,t){e.naturalWidth>0&&m(()=>t());let n=()=>t();return e.addEventListener(`load`,n,!1),()=>e.removeEventListener(`load`,n,!1)}function v(e,t){let n=g(),r=!1,i=()=>{r=!0,t(),g()-n<3e3?m(i):r=!1},a=()=>{n=g(),r===!1&&i()};return e.addEventListener(`timeupdate`,a,!1),()=>{e.removeEventListener(`timeupdate`,a,!1),r=!1}}function y(e,t){let n=e.dispose;e.dispose=()=>{t(),n.call(e)}}e.Sticker=class extends t.Mesh{static get version(){return`6.8.0-alpha.21`}constructor(e,n,r){let i=new t.MeshBasicMaterial;if(super(f,i),this._needsRender=!1,this.scale.set(e,n,1),typeof r==`string`){i.transparent=/\.png$/.test(r);let e=new Image;e.src=r,e.crossOrigin=``,r=e}if(r instanceof HTMLImageElement){let e=i.map=new t.Texture;e.wrapS=t.ClampToEdgeWrapping,e.wrapT=t.ClampToEdgeWrapping,e.minFilter=t.LinearFilter,e.encoding=t.sRGBEncoding,y(e,_(r,()=>{e.image=r,e.needsUpdate=!0,this._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)i.map=new t.CanvasTexture(r);else if(r instanceof HTMLVideoElement){let e=i.map=new t.VideoTexture(r);e.wrapS=t.ClampToEdgeWrapping,e.wrapT=t.ClampToEdgeWrapping,e.minFilter=t.LinearFilter,e.encoding=t.sRGBEncoding,y(e,v(r,()=>{this._needsRender=!0}))}}get needsRender(){return this._needsRender}set needsRender(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)}setSize(e,t){this.scale.set(e,t,1),this._needsRender=!0}setTransparent(e){this.material.transparent=e,this._needsRender=!0}locationWithIntersection(e,t=.005){let{point:n,face:r}=e;this.position.copy(n),r&&(this.position.add(r.normal.clone().setLength(t)),this.lookAt(n.clone().add(r.normal))),this._needsRender=!0}dispose(){var e;(e=this.material.map)==null||e.dispose(),this.material.dispose()}}});
|
package/umd/five-vfx.js
CHANGED