-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js.map
1 lines (1 loc) · 26.3 KB
/
index.js.map
1
{"version":3,"file":"index.js","sources":["src/index.js"],"sourcesContent":["import karas from 'karas';\nimport { MarsPlayer,AssetManager,Material,glContext,Composition } from '@galacean/mars-player';\n// const { MarsPlayer,AssetManager,Material,glContext,Composition } = window.mars;\nimport { version } from '../package.json';\n\nconst {\n refresh: {\n level: {\n CACHE,\n },\n webgl: {\n drawTextureCache,\n },\n },\n math: {\n matrix: {\n calRectPoint,\n },\n },\n util: {\n isNil,\n },\n mode: {\n CANVAS,\n WEBGL,\n },\n inject,\n} = karas;\n\nconst r2d = 180 / Math.PI;\n\nconst vertexSimple = `\nprecision lowp float;\nattribute vec2 aPos;\nvoid main(){ gl_Position = vec4(aPos,.0,1.);}\n`;\nconst fragmentSimple = `\nprecision lowp float;\nvoid main(){ gl_FragColor = vec4(1.);}\n`;\n\nfunction mapRange(p, min, max) {\n return p === 0 ? 0 : min + (max - min) * p;\n}\n\nclass $ extends karas.Geom {\n scene = null;\n playOptions = null;\n mp = null;\n timeDelta = 0;\n playbackRate = 1;\n\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break) {\n return res;\n }\n let root = this.__root;\n if(renderMode !== root.__renderMode || renderMode !== WEBGL) {\n return res;\n }\n let scene = this.scene;\n let gl = ctx;\n if(scene) {\n let mp = this.mp;\n if(!mp) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n const renderFramework = gl instanceof WebGLRenderingContext? 'webgl': 'webgl2';\n mp = this.mp = new MarsPlayer({\n gl, renderFramework,\n manualRender: true,\n });\n this.gpu = mp.gpuCapability;\n this.renderState = mp.renderer.pipelineContext.gl;\n this.defaultMtl = Material.create({\n name: 'defMtl',\n shader: {\n vertex: vertexSimple,\n fragment: fragmentSimple,\n }\n });\n this.defaultMtl.blending = true;\n this.defaultMtl.blendFunction = [gl.ONE,gl.ONE_MINUS_SRC_ALPHA,gl.ONE,gl.ONE_MINUS_SRC_ALPHA];\n this.defaultMtl.depthMask = true;\n this.defaultMtl.depthTest = true;\n this.defaultMtl.culling = false;\n this.defaultMtl.cullFace = gl.CCW;\n this.defaultMtl.stencilTest = false;\n this.defaultMtl.polygonOffsetFill = false;\n this.defaultMtl.polygonOffset = [1, 0];\n\n this.renderState.bindFramebuffer(gl.FRAMEBUFFER, null);\n this.renderState.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);\n\n if(!this.host.blend) {\n this.renderState.disable(glContext.BLEND);\n }\n let flipY = gl.getParameter(gl.UNPACK_FLIP_Y_WEBGL);\n let premultiply = gl.getParameter(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL);\n let program = gl.getParameter(gl.CURRENT_PROGRAM);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n let activeTexIndex = gl.getParameter(gl.ACTIVE_TEXTURE);\n let originTexture = gl.getParameter(gl.TEXTURE_BINDING_2D);\n const renderer = mp.renderer;\n let composition = this.composition = Composition.initialize(scene, {\n handleEnd: () => {},\n keepResource: false,\n willReverseTime: false,\n ...this.playOptions,\n renderer,\n width: renderer.getWidth(),\n height: renderer.getHeight(),\n shaderLibrary: renderer.getShaderLibrary(),\n });\n let onComp = () => {\n composition.start();\n if (originTexture) {\n gl.bindTexture(gl.TEXTURE_2D, originTexture);\n }\n gl.activeTexture(activeTexIndex);\n this.renderState.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, +premultiply);\n this.renderState.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, +flipY);\n this.renderState.useProgram(null);\n gl.useProgram(program);\n scene.textures = void 0;\n };\n onComp();\n }\n let comp = this.composition;\n let renderer = comp && comp.renderer;\n if(renderer && !renderer.isDestroyed && !mp.paused) {\n this._updateTransform();\n this._updateComposition();\n let bit = glContext.STENCIL_BUFFER_BIT;\n if(this.host.clearDepth) {\n bit = bit | glContext.DEPTH_BUFFER_BIT;\n }\n this.renderState.clear(bit);\n renderer.renderRenderFrame(comp.renderFrame)\n }\n this._reset(ctx);\n }\n }\n\n _updateTransform() {\n let parent = this.domParent;\n let comp = this.composition;\n let point = this.project3DPoint(comp.camera);\n let scaleX = parent.getStyle('scaleX'),\n scaleY = parent.getStyle('scaleY'),\n rotateZ = parent.getStyle('rotateZ');\n let env = this.env;\n comp.rootTransform.setTransform({\n // position: point,\n scale: [scaleX, scaleY, 1],\n // rotation: [0, 0, rotateZ],\n });\n }\n\n _updateComposition() {\n let comp = this.composition;\n if(comp.shouldRestart()) {\n comp.restart();\n comp.update(0);\n }\n else if(!comp.shouldDestroy) {\n let dt = Math.min(this.timeDelta || 0, 33) * this.playbackRate;\n comp.update(dt);\n }\n }\n\n _reset(gl) {\n gl.useProgram(gl.program);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n this.aliasRenderState();\n }\n\n aliasRenderState() {\n let mtl = this.defaultMtl;\n let marsRenderState = this.mp.renderer.pipelineContext;\n\n if(mtl && marsRenderState) {\n marsRenderState.reset();\n mtl.setupStates(marsRenderState);\n delete marsRenderState.glCapabilityCache[glContext.BLEND];\n marsRenderState.depthMask(false);\n marsRenderState.activeTexture(glContext.TEXTURE0);\n }\n }\n\n project3DPoint(camera, z = 0) {\n let parent = this.domParent;\n let x1 = this.x, y1 = this.y,\n translateX = parent.getStyle('translateX'),\n translateY = parent.getStyle('translateY');\n let pos = camera.position;\n let pw = this.width, ph = this.height;\n let fov = Math.tan(camera.fov / r2d / 2);\n let depth = pos[2] - z;\n let width, height;\n if(camera.clipMode) {\n width = fov * depth;\n height = width * ph / pw;\n }\n else {\n height = fov * depth;\n width = height * pw / ph;\n }\n let x = (x1 + translateX) / pw;\n let y = (y1 + translateY) / ph;\n return [mapRange(x, -width, width) + pos[0], mapRange(y, -height, height) + pos[1], z];\n }\n}\n\nclass Mars extends karas.Component {\n isPlay = false;\n isLoaded = false;\n __playbackRate = 1;\n clearDepth = false;\n blend = false;\n\n constructor(props) {\n super(props);\n\n this.isPlay = props.autoPlay !== false;\n this.__playbackRate = props.playbackRate ?? 1;\n this.clearDepth = !!props.clearDepth;\n this.blend = !!props.blend;\n }\n\n componentDidMount() {\n this.load();\n\n let { autoPlay = true } = this.props;\n this.cb = timeDelta => {\n fake.timeDelta = timeDelta;\n if(this.isPlay && this.isLoaded) {\n fake.refresh();\n }\n }\n let fake = this.ref.fake;\n fake.playbackRate = this.__playbackRate;\n if(autoPlay) {\n fake.frameAnimate(this.cb);\n }\n }\n\n componentWillUnmount() {\n const mp = this.ref.fake.mp;\n mp && mp.destroy(true);\n }\n\n load() {\n let url = this.props.url;\n if(!url) {\n return;\n }\n let request = new XMLHttpRequest();\n request.open('get', url, true);\n request.responseType = 'json';\n request.onload = () => {\n if(request.response) {\n this.isLoaded = true;\n let json = request.response;\n const asset = new AssetManager( {...this.props?.loadOptions});\n asset.loadScene(json).then(scene => {\n this.props.onLoad?.();\n this.playAnimation(scene);\n });\n }\n };\n request.send();\n }\n\n playAnimation(scene) {\n let fake = this.ref.fake;\n fake.scene = scene;\n fake.playOptions = this.props?.playOptions;\n // 第一帧强制显示\n fake.refresh();\n }\n\n render() {\n return <div>\n <$ ref=\"fake\" style={{\n width: '100%',\n height: '100%',\n fill: 'none',\n stroke: 0,\n }}/>\n </div>;\n }\n\n play(start) {\n const cb = () => {\n let comp = this.ref.fake.composition;\n if (comp) {\n this.ref.fake.removeFrameAnimate(cb);\n this.pause();\n comp.restart();\n comp.update(start ?? 0);\n this.resume();\n }\n }\n this.ref.fake.frameAnimate(cb);\n }\n\n pause() {\n this.ref.fake.removeFrameAnimate(this.cb);\n }\n\n resume() {\n this.ref.fake.frameAnimate(this.cb);\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n v = parseFloat(v) ?? 1;\n // if(v <= 0) {\n // v = 1;\n // }\n this.__playbackRate = v;\n if (this.ref.fake) {\n this.ref.fake.playbackRate = v;\n }\n }\n}\n\nMars.version = version;\n\nexport default Mars;\n"],"names":["_karas$refresh","karas","refresh","CACHE","level","drawTextureCache","webgl","calRectPoint","math","matrix","isNil","util","_karas$mode","mode","CANVAS","WEBGL","inject","r2d","Math","PI","vertexSimple","fragmentSimple","mapRange","p","min","max","$","_karas$Geom","_inherits","tagName","props","_this","call","_defineProperty","_assertThisInitialized","_createClass","key","value","render","renderMode","ctx","dx","dy","_this2","res","_get","_getPrototypeOf","prototype","root","__root","__renderMode","scene","gl","mp","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","renderFramework","WebGLRenderingContext","MarsPlayer","manualRender","gpu","gpuCapability","renderState","renderer","pipelineContext","defaultMtl","Material","create","name","shader","vertex","fragment","blending","blendFunction","ONE","ONE_MINUS_SRC_ALPHA","depthMask","depthTest","culling","cullFace","CCW","stencilTest","polygonOffsetFill","polygonOffset","bindFramebuffer","FRAMEBUFFER","host","blend","disable","glContext","BLEND","flipY","getParameter","UNPACK_FLIP_Y_WEBGL","premultiply","program","CURRENT_PROGRAM","activeTexIndex","ACTIVE_TEXTURE","originTexture","TEXTURE_BINDING_2D","composition","Composition","initialize","_objectSpread","handleEnd","keepResource","willReverseTime","playOptions","width","getWidth","height","getHeight","shaderLibrary","getShaderLibrary","onComp","start","bindTexture","TEXTURE_2D","activeTexture","useProgram","textures","comp","isDestroyed","paused","_updateTransform","_updateComposition","bit","STENCIL_BUFFER_BIT","clearDepth","DEPTH_BUFFER_BIT","clear","renderRenderFrame","renderFrame","_reset","parent","domParent","project3DPoint","camera","scaleX","getStyle","scaleY","rotateZ","env","rootTransform","setTransform","scale","shouldRestart","restart","update","shouldDestroy","dt","timeDelta","playbackRate","enable","blendFunc","aliasRenderState","mtl","marsRenderState","reset","setupStates","glCapabilityCache","TEXTURE0","z","arguments","length","undefined","x1","x","y1","y","translateX","translateY","pos","position","pw","ph","fov","tan","depth","clipMode","Geom","Mars","_karas$Component","_props$playbackRate","_this3","isPlay","autoPlay","__playbackRate","componentDidMount","_this4","load","_this$props$autoPlay","cb","fake","isLoaded","ref","frameAnimate","componentWillUnmount","destroy","_this5","url","request","XMLHttpRequest","open","responseType","onload","response","_this5$props","json","asset","AssetManager","loadOptions","loadScene","then","_this5$props$onLoad","_this5$props2","onLoad","playAnimation","send","_this$props","createElement","style","fill","stroke","play","_this6","removeFrameAnimate","pause","resume","get","set","v","_parseFloat","parseFloat","Component","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAAA,cAAA,GAsBIC,yBAAK,CArBPC,OAAO,CAAA;EAEHC,EAAKH,cAAA,CADPI,KAAK,CACHD,KAAK,CAAA;EAGLE,EAAgBL,cAAA,CADlBM,KAAK,CACHD,gBAAgB,CAAA;EAKhBE,EAWFN,yBAAK,CAbPO,IAAI,CACFC,MAAM,CACJF,YAAY,CAAA;EAIdG,EAOAT,yBAAK,CARPU,IAAI,CACFD,KAAK,CAAA;QAAAE,WAAA,GAOLX,yBAAK,CALPY,IAAI,CAAA;IACID,WAAA,CAANE,MAAM,CAAA;QACNC,KAAK,GAAAH,WAAA,CAALG,KAAK,CAAA;IAGLd,yBAAK,CADPe,OAAM;EAGR,IAAMC,GAAG,GAAG,GAAG,GAAGC,IAAI,CAACC,EAAE,CAAA;EAEzB,IAAMC,YAAY,GAIjB,gGAAA,CAAA;EACD,IAAMC,cAAc,GAGnB,mEAAA,CAAA;EAED,SAASC,QAAQA,CAACC,CAAC,EAAEC,GAAG,EAAEC,GAAG,EAAE;EAC7B,EAAA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