@wannaby/wanna-sdk 2.2.2 → 2.2.3
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/core.js +1 -1
- package/iframe.html +1 -1
- package/package.json +2 -2
package/core.js
CHANGED
|
@@ -21730,7 +21730,7 @@ function getTargetPixelRatio(){return null===tA?rA:1}let RA,mA,kA,SA,UA,MA,YA,LA
|
|
|
21730
21730
|
function getContext(Q,E){for(let r=0;r<Q.length;r++){const c=Q[r],h=i.getContext(c,E)
|
|
21731
21731
|
if(null!==h)return h}return null}try{const Q={alpha:r,depth:c,stencil:h,antialias:l,premultipliedAlpha:D,preserveDrawingBuffer:N,powerPreference:R,failIfMajorPerformanceCaveat:k}
|
|
21732
21732
|
if(i.addEventListener("webglcontextlost",onContextLost,!1),i.addEventListener("webglcontextrestored",onContextRestore,!1),null===zA){const i=["webgl2","webgl","experimental-webgl"]
|
|
21733
|
-
if(!0===X.isWebGL1Renderer&&i.shift(),zA=getContext(i,Q),null===zA)throw getContext(i)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===zA.getShaderPrecisionFormat&&(zA.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Q){throw console.error("THREE.WebGLRenderer: "+Q.message),Q}function initGLContext(){RA=new WebGLExtensions(zA),mA=new WebGLCapabilities(zA,RA,Q),RA.init(mA),WA=new WebGLUtils(zA,RA,mA),kA=new WebGLState(zA,RA,mA),dA[0]=1029,SA=new WebGLInfo
|
|
21733
|
+
if(!0===X.isWebGL1Renderer&&i.shift(),zA=getContext(i,Q),null===zA)throw getContext(i)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===zA.getShaderPrecisionFormat&&(zA.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Q){throw console.error("THREE.WebGLRenderer: "+Q.message),Q}function initGLContext(){RA=new WebGLExtensions(zA),mA=new WebGLCapabilities(zA,RA,Q),RA.init(mA),WA=new WebGLUtils(zA,RA,mA),kA=new WebGLState(zA,RA,mA),dA[0]=1029,SA=new WebGLInfo,UA=new WebGLProperties,MA=new WebGLTextures(zA,RA,kA,UA,mA,WA,SA),YA=new WebGLCubeMaps(X),LA=new WebGLAttributes(zA,mA),ZA=new WebGLBindingStates(zA,RA,LA,mA),KA=new WebGLGeometries(zA,LA,SA,ZA),vA=new WebGLObjects(zA,KA,LA,SA),PA=new WebGLMorphtargets(zA),qA=new WebGLClipping(UA),xA=new WebGLPrograms(X,YA,RA,mA,ZA,qA),HA=new WebGLMaterials(UA),bA=new WebGLRenderLists(UA),JA=new WebGLRenderStates(RA,mA),VA=new WebGLBackground(X,YA,kA,vA,D),TA=new WebGLShadowMap(X,vA,mA),_A=new WebGLBufferRenderer(zA,RA,SA,mA),OA=new WebGLIndexedBufferRenderer(zA,RA,SA,mA),SA.programs=xA.programs,X.capabilities=mA,X.extensions=RA,X.properties=UA,X.renderLists=bA,X.shadowMap=TA,X.state=kA,X.info=SA}initGLContext()
|
|
21734
21734
|
const XA=new WebXRManager(X,zA)
|
|
21735
21735
|
function onContextLost(Q){Q.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),$=!0}function onContextRestore(){console.log("THREE.WebGLRenderer: Context Restored."),$=!1
|
|
21736
21736
|
const Q=SA.autoReset,i=TA.enabled,E=TA.autoUpdate,r=TA.needsUpdate,c=TA.type
|
package/iframe.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!-- Copyright © 2022 WANNABY INC. All rights reserved. --><!doctype html><html><head><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="ie=edge"><title>WANNABY / WEB-AR</title><meta name="description" content="WANNA WEB-AR"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="mobile-web-app-capable" content="yes"><style>body,html{height:100%;margin:0;padding:0}.wrapper{height:100%;position:relative;overflow:hidden}#background-canvases,#debug-canvases,#interactions-layer,.wrapper canvas,.wrapper video{height:100%;width:100%}#background-canvases{z-index:-1}#background-canvases,#debug-canvases,#interactions-layer{position:absolute;top:0;left:0}#background-canvases canvas:not(.current-background){display:none}#debug-canvases canvas{position:absolute;width:100%;height:100%}#debug{bottom:0;color:#fff;min-width:220px;overflow:auto;position:absolute;right:0;text-align:right;top:200px}.videoBeforeInit{position:absolute;top:0}.videoAfterInit{position:absolute;top:0;z-index:-1}#screen-loading-stub{width:100%;height:100%;display:none;background:#000;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}#play-button{display:none;position:absolute;top:50%;right:0;background-color:transparent;color:transparent;outline:0;border:none}</style><script defer="defer" src="./core.js?
|
|
1
|
+
<!-- Copyright © 2022 WANNABY INC. All rights reserved. --><!doctype html><html><head><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="ie=edge"><title>WANNABY / WEB-AR</title><meta name="description" content="WANNA WEB-AR"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="mobile-web-app-capable" content="yes"><style>body,html{height:100%;margin:0;padding:0}.wrapper{height:100%;position:relative;overflow:hidden}#background-canvases,#debug-canvases,#interactions-layer,.wrapper canvas,.wrapper video{height:100%;width:100%}#background-canvases{z-index:-1}#background-canvases,#debug-canvases,#interactions-layer{position:absolute;top:0;left:0}#background-canvases canvas:not(.current-background){display:none}#debug-canvases canvas{position:absolute;width:100%;height:100%}#debug{bottom:0;color:#fff;min-width:220px;overflow:auto;position:absolute;right:0;text-align:right;top:200px}.videoBeforeInit{position:absolute;top:0}.videoAfterInit{position:absolute;top:0;z-index:-1}#screen-loading-stub{width:100%;height:100%;display:none;background:#000;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}#play-button{display:none;position:absolute;top:50%;right:0;background-color:transparent;color:transparent;outline:0;border:none}</style><script defer="defer" src="./core.js?b17e80656b13da9c148a"></script></head><body><div id="wrapper" class="wrapper"><div id="screen-loading-stub"></div><video autoplay muted playsinline id="video"></video><button id="play-button">play</button><div id="background-canvases"><canvas></canvas><canvas></canvas></div><canvas id="three-canvas"></canvas><div id="debug-canvases"></div><div id="debug"></div><div id="interactions-layer"></div></div></body></html>
|