微信小程序-省心预览工具
This commit is contained in:
commit
edf1e51846
173 files changed
+78282
No files matched your search
+14181
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/index.ts", "../../../spine-core/src/Utils.ts", "../../../spine-core/src/attachments/Attachment.ts", "../../../spine-core/src/attachments/Sequence.ts", "../../../spine-core/src/Animation.ts", "../../../spine-core/src/AnimationState.ts", "../../../spine-core/src/AnimationStateData.ts", "../../../spine-core/src/attachments/BoundingBoxAttachment.ts", "../../../spine-core/src/attachments/ClippingAttachment.ts", "../../../spine-core/src/Texture.ts", "../../../spine-core/src/TextureAtlas.ts", "../../../spine-core/src/attachments/MeshAttachment.ts", "../../../spine-core/src/attachments/PathAttachment.ts", "../../../spine-core/src/attachments/PointAttachment.ts", "../../../spine-core/src/attachments/RegionAttachment.ts", "../../../spine-core/src/AtlasAttachmentLoader.ts", "../../../spine-core/src/BoneData.ts", "../../../spine-core/src/Bone.ts", "../../../spine-core/src/ConstraintData.ts", "../../../spine-core/src/AssetManagerBase.ts", "../../../spine-core/src/Event.ts", "../../../spine-core/src/EventData.ts", "../../../spine-core/src/IkConstraint.ts", "../../../spine-core/src/IkConstraintData.ts", "../../../spine-core/src/PathConstraintData.ts", "../../../spine-core/src/PathConstraint.ts", "../../../spine-core/src/PhysicsConstraint.ts", "../../../spine-core/src/Slot.ts", "../../../spine-core/src/TransformConstraint.ts", "../../../spine-core/src/Skeleton.ts", "../../../spine-core/src/PhysicsConstraintData.ts", "../../../spine-core/src/SkeletonData.ts", "../../../spine-core/src/Skin.ts", "../../../spine-core/src/SlotData.ts", "../../../spine-core/src/TransformConstraintData.ts", "../../../spine-core/src/SkeletonBinary.ts", "../../../spine-core/src/SkeletonBounds.ts", "../../../spine-core/src/Triangulator.ts", "../../../spine-core/src/SkeletonClipping.ts", "../../../spine-core/src/SkeletonJson.ts", "../../../spine-core/src/polyfills.ts", "../../src/WebGL.ts", "../../src/GLTexture.ts", "../../src/AssetManager.ts", "../../src/Vector3.ts", "../../src/Matrix4.ts", "../../src/Camera.ts", "../../src/Input.ts", "../../src/CameraController.ts", "../../src/Shader.ts", "../../src/Mesh.ts", "../../src/PolygonBatcher.ts", "../../src/ShapeRenderer.ts", "../../src/SkeletonDebugRenderer.ts", "../../src/SkeletonRenderer.ts", "../../src/SceneRenderer.ts", "../../src/LoadingScreen.ts", "../../src/SpineCanvas.ts"],
|
||||
"sourcesContent": ["export * from \"./AssetManager.js\";\nexport * from \"./Camera.js\";\nexport * from \"./CameraController.js\";\nexport * from \"./GLTexture.js\";\nexport * from \"./Input.js\";\nexport * from \"./LoadingScreen.js\";\nexport * from \"./Matrix4.js\";\nexport * from \"./Mesh.js\";\nexport * from \"./PolygonBatcher.js\";\nexport * from \"./SceneRenderer.js\";\nexport * from \"./Shader.js\";\nexport * from \"./ShapeRenderer.js\";\nexport * from \"./SkeletonDebugRenderer.js\";\nexport * from \"./SkeletonRenderer.js\";\nexport * from \"./SpineCanvas.js\";\nexport * from \"./Vector3.js\";\nexport * from \"./WebGL.js\";\nexport * from \"@esotericsoftware/spine-core\";", "/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated April 5, 2025. Replaces all prior versions.\n *\n * Copyright (c) 2013-2025, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\n * or otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nimport { Skeleton } from \"./Skeleton.js\";\nimport { MixBlend } from \"./Animation.js\";\n\nexport interface StringMap<T> {\n\t[key: string]: T;\n}\n\nexport class IntSet {\n\tarray = new Array<number | undefined>();\n\n\tadd (value: number): boolean {\n\t\tlet contains = this.contains(value);\n\t\tthis.array[value | 0] = value | 0;\n\t\treturn !contains;\n\t}\n\n\tcontains (value: number) {\n\t\treturn this.array[value | 0] != undefined;\n\t}\n\n\tremove (value: number) {\n\t\tthis.array[value | 0] = undefined;\n\t}\n\n\tclear () {\n\t\tthis.array.length = 0;\n\t}\n}\n\nexport class StringSet {\n\tentries: StringMap<boolean> = {};\n\tsize = 0;\n\n\tadd (value: string): boolean {\n\t\tlet contains = this.entries[value];\n\t\tthis.entries[value] = true;\n\t\tif (!contains) {\n\t\t\tthis.size++;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\taddAll (values: string[]): boolean {\n\t\tlet oldSize = this.size;\n\t\tfor (var i = 0, n = values.length; i < n; i++)\n\t\t\tthis.add(values[i]);\n\t\treturn oldSize != this.size;\n\t}\n\n\tcontains (value: string) {\n\t\treturn this.entries[value];\n\t}\n\n\tclear () {\n\t\tthis.entries = {};\n\t\tthis.size = 0;\n\t}\n}\n\nexport type NumberArrayLike = Array<number> | Float32Array;\nexport type IntArrayLike = Array<number> | Int16Array;\n\nexport interface Disposable {\n\tdispose (): void;\n}\n\nexport interface Restorable {\n\trestore (): void;\n}\n\nexport class Color {\n\tpublic static WHITE = new Color(1, 1, 1, 1);\n\tpublic static RED = new Color(1, 0, 0, 1);\n\tpublic static GREEN = new Color(0, 1, 0, 1);\n\tpublic static BLUE = new Color(0, 0, 1, 1);\n\tpublic static MAGENTA = new Color(1, 0, 1, 1);\n\n\tconstructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\n\t}\n\n\tset (r: number, g: number, b: number, a: number) {\n\t\tthis.r = r;\n\t\tthis.g = g;\n\t\tthis.b = b;\n\t\tthis.a = a;\n\t\treturn this.clamp();\n\t}\n\n\tsetFromColor (c: Color) {\n\t\tthis.r = c.r;\n\t\tthis.g = c.g;\n\t\tthis.b = c.b;\n\t\tthis.a = c.a;\n\t\treturn this;\n\t}\n\n\tsetFromString (hex: string) {\n\t\thex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n\t\tthis.r = parseInt(hex.substr(0, 2), 16) / 255;\n\t\tthis.g = parseInt(hex.substr(2, 2), 16) / 255;\n\t\tthis.b = parseInt(hex.substr(4, 2), 16) / 255;\n\t\tthis.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n\t\treturn this;\n\t}\n\n\tadd (r: number, g: number, b: number, a: number) {\n\t\tthis.r += r;\n\t\tthis.g += g;\n\t\tthis.b += b;\n\t\tthis.a += a;\n\t\treturn this.clLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAW;AACxB,aAAO,IAAI,IAAI,KAAK,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;AAAA,IAC3C;AAAA,IAEA,OAAO,KAAM,GAAW;AACvB,UAAI,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AACnC,aAAO,IAAI,IAAI,CAAC,IAAI;AAAA,IACrB;AAAA,IAEA,OAAO,iBAAkB,KAAa,KAAqB;AAC1D,aAAO,WAAU,qBAAqB,KAAK,MAAM,MAAM,OAAO,GAAG;AAAA,IAClE;AAAA,IAEA,OAAO,qBAAsB,KAAa,KAAa,MAAsB;AAC5E,UAAI,IAAI,KAAK,OAAO;AACpB,UAAI,IAAI,MAAM;AACd,UAAI,MAAM,OAAO,OAAO,EAAG,QAAO,MAAM,KAAK,KAAK,IAAI,KAAK,OAAO,IAAI;AACtE,aAAO,MAAM,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,KAAK;AAAA,IAClD;AAAA,IAEA,OAAO,aAAc,OAAe;AACnC,aAAO,UAAU,QAAS,QAAQ,OAAQ;AAAA,IAC3C;AAAA,EACD;AAEO,MAAe,gBAAf,MAA6B;AAAA,IAEnC,MAAO,OAAe,KAAa,GAAmB;AACrD,aAAO,SAAS,MAAM,SAAS,KAAK,cLine truncated
|
||||
"names": ["Matrix4", "v", "SequenceMode", "MixBlend", "MixDirection", "x", "y", "i", "vertexAttachment", "constraint", "i", "n", "timeline", "EventType", "TextureFilter", "TextureWrap", "page", "Inherit", "s", "PositionMode", "SpacingMode", "RotateMode", "closed", "pathLength", "multiplier", "Physics", "BlendMode", "closed", "n", "LinkedMesh", "readTimeline1", "readTimeline2", "timeline", "Matrix4", "Matrix4", "VertexAttributeType", "temp", "ShapeType", "i", "n", "n", "ResizeMode"]
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
"use strict";var spine=(()=>{var Ie=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,_i=Object.getOwnPropertyNames,ji=Object.prototype.hasOwnProperty,Zi=(e,t)=>{for(var s in t)Ie(e,s,{get:t[s],enumerable:!0})},Ki=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _i(t))!ji.call(e,r)&&r!==s&&Ie(e,r,{get:()=>t[r],enumerable:!(i=Hi(t,r))||i.enumerable});return e},Ji=e=>Ki(Ie({},"__esModule",{value:!0}),e),Ws={};Zi(Ws,{AlphaTimeline:()=>ze,Animation:()=>ne,AnimationState:()=>sr,AnimationStateAdapter:()=>ir,AnimationStateData:()=>rr,AssetCache:()=>li,AssetManager:()=>bi,AssetManagerBase:()=>ai,AtlasAttachmentLoader:()=>lr,Attachment:()=>Re,AttachmentTimeline:()=>Ot,BinaryInput:()=>gi,BlendMode:()=>Is,Bone:()=>ms,BoneData:()=>us,BoundingBoxAttachment:()=>hs,CURRENT:()=>ei,CameraController:()=>qr,ClippingAttachment:()=>$t,Color:()=>st,Color2Attribute:()=>Ai,ColorAttribute:()=>me,ConstraintData:()=>ee,CurveTimeline:()=>Ct,CurveTimeline1:()=>yt,CurveTimeline2:()=>ae,DebugUtils:()=>tr,DeformTimeline:()=>Ge,Downloader:()=>gs,DrawOrderTimeline:()=>zt,Event:()=>xs,EventData:()=>ps,EventQueue:()=>Qs,EventTimeline:()=>le,EventType:()=>$s,FIRST:()=>as,FakeTexture:()=>nr,GLTexture:()=>Gt,HOLD_FIRST:()=>he,HOLD_MIX:()=>ti,HOLD_SUBSEQUENT:()=>ls,IkConstraint:()=>oi,IkConstraintData:()=>ws,IkConstraintTimeline:()=>He,Inherit:()=>de,InheritTimeline:()=>De,Input:()=>Ys,IntSet:()=>Qi,Interpolation:()=>qs,LoadingScreen:()=>Zr,M00:()=>D,M01:()=>G,M02:()=>H,M03:()=>N,M10:()=>_,M11:()=>U,M12:()=>j,M13:()=>z,M20:()=>Z,M21:()=>K,M22:()=>W,M23:()=>q,M30:()=>$,M31:()=>tt,M32:()=>et,M33:()=>Q,ManagedWebGLRenderingContext:()=>xt,MathUtils:()=>P,Matrix4:()=>se,Mesh:()=>ks,MeshAttachment:()=>Wt,MixBlend:()=>Zs,MixDirection:()=>Ks,OrthoCamera:()=>vi,PathAttachment:()=>qt,PathConstraint:()=>hi,PathConstraintData:()=>bs,PathConstraintMixTimeline:()=>Ke,PathConstraintPositionTimeline:()=>je,PathConstraintSpacingTimeline:()=>Ze,Physics:()=>ui,PhysicsConstraintDampingTimeline:()=>$e,PhysicsConstraintGravityTimeline:()=>ss,PhysicsConstraintInertiaTimeline:()=>Je,PhysicsConstraintMassTimeline:()=>ts,PhysicsConstraintMixTimeline:()=>is,PhysicsConstraintResetTimeline:()=>rs,PhysicsConstraintStrengthTimeline:()=>Qe,PhysicsConstraintTimeline:()=>Pt,PhysicsConstraintWindTimeline:()=>es,PointAttachment:()=>ni,PolygonBatcher:()=>Xs,Pool:()=>Jt,Position2Attribute:()=>ue,Position3Attribute:()=>Gr,PositionMode:()=>vs,Pow:()=>Gs,PowOut:()=>$i,RGB2Timeline:()=>qe,RGBA2Timeline:()=>We,RGBATimeline:()=>Ne,RGBTimeline:()=>Ue,RegionAttachment:()=>te,ResizeMode:()=>ki,RotateMode:()=>As,RotateTimeline:()=>Qt,SETUP:()=>os,SUBSEQUENT:()=>oe,ScaleTimeline:()=>Xe,ScaleXTimeline:()=>Pe,ScaleYTimeline:()=>Le,SceneRenderer:()=>Yi,SequenceTimeline:()=>ns,Shader:()=>Tt,ShapeRenderer:()=>Ps,ShapeType:()=>Mi,ShearTimeline:()=>Be,ShearXTimeline:()=>Ve,ShearYTimeline:()=>Oe,Skeleton:()=>fi,SkeletonBinary:()=>hr,SkeletonBounds:()=>xi,SkeletonClipping:()=>wi,SkeletonData:()=>Cs,SkeletonDebugRenderer:()=>Ei,SkeletonJson:()=>zr,SkeletonRenderer:()=>Ri,Skin:()=>fe,SkinEntry:()=>Ss,Slot:()=>ci,SlotData:()=>Ts,SpacingMode:()=>ys,SpineCanvas:()=>Qr,StringSet:()=>Me,TexCoordAttribute:()=>Fs,Texture:()=>cs,TextureAtlas:()=>ds,TextureAtlasPage:()=>ri,TextureAtlasRegion:()=>fs,TextureFilter:()=>ce,TextureRegion:()=>ii,TextureWrap:()=>si,TimeKeeper:()=>Ee,Timeline:()=>ft,Touch:()=>yi,TrackEntry:()=>Js,TransformConstraint:()=>di,TransformConstraintData:()=>Ms,TransformConstraintTimeline:()=>_e,TranslateTimeline:()=>Ye,TranslateXTimeline:()=>ke,TranslateYTimeline:()=>Fe,Triangulator:()=>pi,Utils:()=>L,Vector2:()=>Vt,Vector3:()=>At,VertexAttachment:()=>Yt,VertexAttribute:()=>Ht,VertexAttributeType:()=>Ci,WindowedMean:()=>er});var Qi=class{array=new Array;add(e){let t=this.contains(e);return this.array[e|0]=e|0,!t}contains(e){return this.array[e|0]!=null}remove(e){this.array[e|0]=void 0}clear(){this.array.length=0}},Me=class{entries={};size=0;add(e){let t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){let t=this.size;for(var s=0,i=e.length;s<i;s++)this.add(e[s]);return t!=this.size}contains(e){return this.entries[e]}clear(){this.entries={},this.size=0}},st=class Nt{constructor(t=0,s=0,i=0,r=0){this.r=t,this.g=s,this.b=i,this.a=r}static WHITE=new Nt(1,1,1,1);static RED=new Nt(1,0,0,1);static GREEN=new Nt(0,1,0,1);static BLUE=new Nt(0,0,1,1);static MAGENTA=new Nt(1,0,1,1);set(t,s,i,r){return this.r=t,this.g=s,this.b=i,this.a=r,this.clamp()}setFromColor(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}setFromString(t){return t=t.charAt(0)=="#"?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=t.length!=8?1:parseInt(t.substr(6,2),16)/255,this}add(t,s,i,r){return this.r+=t,this.g+=s,this.b+=i,this.a+=r,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<Line truncated
|
||||
`+s:""))}remove(e){e=this.pathPrefix+e;let t=this.cache.assets[e];return t.dispose&&t.dispose(),delete this.cache.assets[e],delete this.cache.assetsRefCount[e],delete this.cache.assetsLoaded[e],t}removeAll(){for(let e in this.cache.assets){let t=this.cache.assets[e];t.dispose&&t.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad==0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(e){const t=this.cache.assets[e];if(t instanceof ds){t.dispose();return}this.disposeAssetInternal(e)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(e){if(this.cache.assetsRefCount[e]>0&&--this.cache.assetsRefCount[e]===0)return this.remove(e)}createTextureAtlas(e,t){const s=new ds(t);return s.dispose=()=>{if(!(this.cache.assetsRefCount[e]<=0)){this.disposeAssetInternal(e);for(const i of s.pages)i.texture?.dispose()}},s}createTexture(e,t){const s=this.textureLoader(t),i=s.dispose.bind(s);return s.dispose=()=>{this.disposeAssetInternal(e)&&i()},s}},li=class Se{assets={};assetsRefCount={};assetsLoaded={};static AVAILABLE_CACHES=new Map;static getCache(t){const s=Se.AVAILABLE_CACHES.get(t);if(s)return s;const i=new Se;return Se.AVAILABLE_CACHES.set(t,i),i}async addAsset(t,s){this.assetsLoaded[t]=Promise.resolve(s),this.assets[t]=await s}},gs=class{callbacks={};rawDataUris={};dataUriToString(e){if(!e.startsWith("data:"))throw new Error("Not a data URI.");let t=e.indexOf("base64,");return t!=-1?(t+=7,atob(e.substr(t))):e.substr(e.indexOf(",")+1)}base64ToUint8Array(e){for(var t=window.atob(e),s=t.length,i=new Uint8Array(s),r=0;r<s;r++)i[r]=t.charCodeAt(r);return i}dataUriToUint8Array(e){if(!e.startsWith("data:"))throw new Error("Not a data URI.");let t=e.indexOf("base64,");if(t==-1)throw new Error("Not a binary data URI.");return t+=7,this.base64ToUint8Array(e.substr(t))}downloadText(e,t,s){if(this.start(e,t,s))return;const i=this.rawDataUris[e];if(i&&!i.includes(".")){try{this.finish(e,200,this.dataUriToString(i))}catch(l){this.finish(e,400,JSON.stringify(l))}return}let r=new XMLHttpRequest;r.overrideMimeType("text/html"),r.open("GET",i||e,!0);let h=()=>{this.finish(e,r.status,r.responseText)};r.onload=h,r.onerror=h,r.send()}downloadJson(e,t,s){this.downloadText(e,i=>{t(JSON.parse(i))},s)}downloadBinary(e,t,s){if(this.start(e,t,s))return;const i=this.rawDataUris[e];if(i&&!i.includes(".")){try{this.finish(e,200,this.dataUriToUint8Array(i))}catch(l){this.finish(e,400,JSON.stringify(l))}return}let r=new XMLHttpRequest;r.open("GET",i||e,!0),r.responseType="arraybuffer";let h=()=>{this.finish(e,r.status,r.response)};r.onload=()=>{r.status==200||r.status==0?this.finish(e,200,new Uint8Array(r.response)):h()},r.onerror=h,r.send()}start(e,t,s){let i=this.callbacks[e];try{if(i)return!0;this.callbacks[e]=i=[]}finally{i.push(t,s)}}finish(e,t,s){let i=this.callbacks[e];delete this.callbacks[e];let r=t==200||t==0?[s]:[t,s];for(let h=r.length-1,l=i.length;h<l;h+=2)i[h].apply(null,r)}},xs=class{data;intValue=0;floatValue=0;stringValue=null;time=0;volume=0;balance=0;constructor(e,t){if(!t)throw new Error("data cannot be null.");this.time=e,this.data=t}},ps=class{name;intValue=0;floatValue=0;stringValue=null;audioPath=null;volume=0;balance=0;constructor(e){this.name=e}},oi=class{data;bones;target;bendDirection=0;compress=!1;stretch=!1;mix=1;softness=0;active=!1;constructor(e,t){if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let i=0;i<e.bones.length;i++){let r=t.findBone(e.bones[i].name);if(!r)throw new Error(`Couldn't find bone ${e.bones[i].name}`);this.bones.push(r)}let s=t.findBone(e.target.name);if(!s)throw new Error(`Couldn't find bone ${e.target.name}`);this.target=s,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch}isActive(){return this.active}setToSetupPose(){const e=this.data;this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch}update(e){if(this.mix==0)return;let t=this.target,s=this.bones;switch(s.length){case 1:this.apply1(s[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(s[0],s[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.data.uniform,this.softness,this.mix);break}}apply1(e,t,s,i,r,h,l){let n=e.parent;if(!n)throw new Error("IK bone must have parent.");let a=n.a,o=n.b,c=n.c,d=n.d,f=-e.ashearX-e.arotation,m=0,u=0;switch(e.inherit){case 1:m=(t-e.worldX)*P.signum(e.skeleton.scaleX),u=(s-e.worldY)*P.signum(e.skeleton.scaleY);break;case 2:let b=Math.abs(a*d-o*c)/Math.max(1e-4,a*a+c*c),x=a/e.skeleton.scaleX,p=c/e.skeleton.scaleY;o=-p*b*e.skeleton.scaleX,d=x*b*e.skeleton.scaleY,f+=Math.atan2(p,x)*P.radDeg;default:let v=t-n.worldX,y=s-n.worldY,A=a*d-o*c;Math.abs(A)<=1e-4?(m=0,u=0)
Line truncated
|
||||
attribute vec4 ${dt.POSITION};
|
||||
attribute vec4 ${dt.COLOR};
|
||||
attribute vec2 ${dt.TEXCOORDS};
|
||||
uniform mat4 ${dt.MVP_MATRIX};
|
||||
varying vec4 v_color;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main () {
|
||||
v_color = ${dt.COLOR};
|
||||
v_texCoords = ${dt.TEXCOORDS};
|
||||
gl_Position = ${dt.MVP_MATRIX} * ${dt.POSITION};
|
||||
}
|
||||
`,i=`
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
precision mediump float;
|
||||
#else
|
||||
#define LOWP
|
||||
#endif
|
||||
varying LOWP vec4 v_color;
|
||||
varying vec2 v_texCoords;
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
void main () {
|
||||
gl_FragColor = v_color * texture2D(u_texture, v_texCoords);
|
||||
}
|
||||
`;return new dt(t,s,i)}static newTwoColoredTextured(t){let s=`
|
||||
attribute vec4 ${dt.POSITION};
|
||||
attribute vec4 ${dt.COLOR};
|
||||
attribute vec4 ${dt.COLOR2};
|
||||
attribute vec2 ${dt.TEXCOORDS};
|
||||
uniform mat4 ${dt.MVP_MATRIX};
|
||||
varying vec4 v_light;
|
||||
varying vec4 v_dark;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main () {
|
||||
v_light = ${dt.COLOR};
|
||||
v_dark = ${dt.COLOR2};
|
||||
v_texCoords = ${dt.TEXCOORDS};
|
||||
gl_Position = ${dt.MVP_MATRIX} * ${dt.POSITION};
|
||||
}
|
||||
`,i=`
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
precision mediump float;
|
||||
#else
|
||||
#define LOWP
|
||||
#endif
|
||||
varying LOWP vec4 v_light;
|
||||
varying LOWP vec4 v_dark;
|
||||
varying vec2 v_texCoords;
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
void main () {
|
||||
vec4 texColor = texture2D(u_texture, v_texCoords);
|
||||
gl_FragColor.a = texColor.a * v_light.a;
|
||||
gl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;
|
||||
}
|
||||
`;return new dt(t,s,i)}static newColored(t){let s=`
|
||||
attribute vec4 ${dt.POSITION};
|
||||
attribute vec4 ${dt.COLOR};
|
||||
uniform mat4 ${dt.MVP_MATRIX};
|
||||
varying vec4 v_color;
|
||||
|
||||
void main () {
|
||||
v_color = ${dt.COLOR};
|
||||
gl_Position = ${dt.MVP_MATRIX} * ${dt.POSITION};
|
||||
}
|
||||
`,i=`
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
precision mediump float;
|
||||
#else
|
||||
#define LOWP
|
||||
#endif
|
||||
varying LOWP vec4 v_color;
|
||||
|
||||
void main () {
|
||||
gl_FragColor = v_color;
|
||||
}
|
||||
`;return new dt(t,s,i)}},ks=class{constructor(e,t,s,i){this.attributes=t,this.context=e instanceof xt?e:new xt(e),this.elementsPerVertex=0;for(let r=0;r<t.length;r++)this.elementsPerVertex+=t[r].numElements;this.vertices=new Float32Array(s*this.elementsPerVertex),this.indices=new Uint16Array(i),this.context.addRestorable(this)}context;vertices;verticesBuffer=null;verticesLength=0;dirtyVertices=!1;indices;indicesBuffer=null;indicesLength=0;dirtyIndices=!1;elementsPerVertex=0;getAttributes(){return this.attributes}maxVertices(){return this.vertices.length/this.elementsPerVertex}numVertices(){return this.verticesLength/this.elementsPerVertex}setVerticesLength(e){this.dirtyVertices=!0,this.verticesLength=e}getVertices(){return this.vertices}maxIndices(){return this.indices.length}numIndices(){return this.indicesLength}setIndicesLength(e){this.dirtyIndices=!0,this.indicesLength=e}getIndices(){return this.indices}getVertexSizeInFloats(){let e=0;for(var t=0;t<this.attributes.length;t++){let s=this.attributes[t];e+=s.numElements}return e}setVertices(e){if(this.dirtyVertices=!0,e.length>this.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(e,0),this.verticesLength=e.length}setIndices(e){if(this.dirtyIndices=!0,e.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(e,0),this.indicesLength=e.length}draw(e,t){this.drawWithOffset(e,t,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)}drawWithOffset(e,t,s,i){let r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(e),this.indicesLength>0?r.drawElements(t,i,r.UNSIGNED_SHORT,s*2):r.drawArrays(t,s,i),this.unbind(e)}bind(e){let t=this.context.gl;t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer);let s=0;for(let i=0;i<this.attributes.length;i++){let r=this.attributes[i],h=e.getAttributeLocation(r.name);t.enableVertexAttribArray(h),t.vertexAttribPointer(h,r.numElements,t.FLOAT,!1,this.elementsPerVertex*4,s*4),s+=r.numElements}this.indicesLength>0&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)}unbind(e){let t=this.context.gl;for(let s=0;s<this.attributes.length;s++){let i=this.attributes[s],r=e.getAttributeLocation(i.name);t.disableVertexAttribArray(r)}t.bindBuffer(t.ARRAY_BUFFER,null),this.indicesLength>0&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}update(){let e=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=e.createBuffer()),e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer),e.bufferData(e.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),e.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=e.createBuffer()),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),e.DYNAMIC_DRAW),this.dirtyIndices=!1)}restore(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()}dispose(){this.context.removeRestorable(this);let e=this.context.gl;e.deleteBuffer(this.verticesBuffer),e.deleteBuffer(this.indicesBuffer)}},Ht=class{constructor(e,t,s){this.name=e,this.type=t,this.numElements=s}},ue=class extends Ht{constructor(){super(Tt.POSITION,0,2)}},Gr=class extends Ht{constructor(){super(Tt.POSITION,0,3)}},Fs=class extends Ht{constructor(e=0){super(Tt.TEXCOORDS+(e==0?"":e),0,2)}},me=class extends Ht{constructor(){super(Tt.COLOR,0,4)}},Ai=class extends Ht{constructor(){super(Tt.COLOR2,0,4)}},Ci=(e=>(e[e.Float=0]="Float",e))(Ci||{}),Xt=1,Hr=769,Si=770,Ti=771,Ii=774,Xs=class Ut{static disableCulling=!1;context;drawCalls=0;static globalDrawCalls=0;isDrawing=!1;mesh;shader=null;lastTexture=null;verticesLength=0;indicesLength=0;srcColorBlend;srcAlphaBlend;dstBlend;cullWasEnabled=!1;constructor(t,s=!0,i=10920){if(i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof xt?t:new xt(t);let r=s?[new ue,new me,new Fs,new Ai]:[new ue,new me,new Fs];this.mesh=new ks(t,r,i,i*3);let h=this.context.gl;this.srcColorBlend=h.SRC_ALPHA,this.srcAlphaBlend=h.ONE,this.dstBlend=h.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0;let s=this.context.gl;s.enable(s.BLEND),s.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend),Ut.disableCulling&&(this.cullWasEnabled=s.isEnabled(s.CULL_FACE),this.cullWasEnabled&&s.disable(s.CULL_FACE))}static blendModesGL=[{srcRgb:Si,srcRgbPma:Xt,dstRgb:Ti,srcAlpha:Xt},{srcRgb:Si,srcRgbPma:Xt,dstRgb:Xt,srcAlpha:Xt},{srcRgb:Ii,srcRgbPma:Ii,dstRgb:Ti,srcAlpha:Xt},{srcRgb:Xt,srcRgbPma:Xt,dstRgb:Hr,srcAlpha:Xt}];setBlendMode(t,s){const i=Ut.blendModesGL[t],r=s?i.srcRgbPma:i.srcRgb,h=i.srcAlpha,l=i.dstRgb;if(this.srcColorBlend==r&&this.srcAlphaBlend==h&&this.dstBlend==l)return;
Line truncated
|
||||
Reference in new issue
Block a user