diff --git a/examples/jsm/animation/CCDIKSolver.js b/examples/jsm/animation/CCDIKSolver.js index 7066c99b7fc240..577653b856ddee 100644 --- a/examples/jsm/animation/CCDIKSolver.js +++ b/examples/jsm/animation/CCDIKSolver.js @@ -13,17 +13,17 @@ import { Vector3 } from 'three'; -const _q = new Quaternion(); -const _targetPos = new Vector3(); -const _targetVec = new Vector3(); -const _effectorPos = new Vector3(); -const _effectorVec = new Vector3(); -const _linkPos = new Vector3(); -const _invLinkQ = new Quaternion(); -const _linkScale = new Vector3(); -const _axis = new Vector3(); -const _vector = new Vector3(); -const _matrix = new Matrix4(); +const _q = /* @__PURE__ */ new Quaternion(); +const _targetPos = /* @__PURE__ */ new Vector3(); +const _targetVec = /* @__PURE__ */ new Vector3(); +const _effectorPos = /* @__PURE__ */ new Vector3(); +const _effectorVec = /* @__PURE__ */ new Vector3(); +const _linkPos = /* @__PURE__ */ new Vector3(); +const _invLinkQ = /* @__PURE__ */ new Quaternion(); +const _linkScale = /* @__PURE__ */ new Vector3(); +const _axis = /* @__PURE__ */ new Vector3(); +const _vector = /* @__PURE__ */ new Vector3(); +const _matrix = /* @__PURE__ */ new Matrix4(); /** diff --git a/examples/jsm/animation/MMDAnimationHelper.js b/examples/jsm/animation/MMDAnimationHelper.js index b24dea116a84fe..1cc2bdb06bc724 100644 --- a/examples/jsm/animation/MMDAnimationHelper.js +++ b/examples/jsm/animation/MMDAnimationHelper.js @@ -1113,7 +1113,7 @@ class AudioManager { } -const _q = new Quaternion(); +const _q = /* @__PURE__ */ new Quaternion(); /** * Solver for Grant (Fuyo in Japanese. I just google translated because diff --git a/examples/jsm/animation/MMDPhysics.js b/examples/jsm/animation/MMDPhysics.js index 057090112e818b..003917d235bb02 100644 --- a/examples/jsm/animation/MMDPhysics.js +++ b/examples/jsm/animation/MMDPhysics.js @@ -1230,10 +1230,10 @@ class Constraint { // -const _position = new Vector3(); -const _quaternion = new Quaternion(); -const _scale = new Vector3(); -const _matrixWorldInv = new Matrix4(); +const _position = /* @__PURE__ */ new Vector3(); +const _quaternion = /* @__PURE__ */ new Quaternion(); +const _scale = /* @__PURE__ */ new Vector3(); +const _matrixWorldInv = /* @__PURE__ */ new Matrix4(); class MMDPhysicsHelper extends Object3D { diff --git a/examples/jsm/controls/ArcballControls.js b/examples/jsm/controls/ArcballControls.js index b6b36962e35a27..c12c2c9d2c13cf 100644 --- a/examples/jsm/controls/ArcballControls.js +++ b/examples/jsm/controls/ArcballControls.js @@ -54,8 +54,8 @@ const _center = { //transformation matrices for gizmos and camera const _transformation = { - camera: new Matrix4(), - gizmos: new Matrix4() + camera: /* @__PURE__ */ new Matrix4(), + gizmos: /* @__PURE__ */ new Matrix4() }; @@ -64,12 +64,12 @@ const _changeEvent = { type: 'change' }; const _startEvent = { type: 'start' }; const _endEvent = { type: 'end' }; -const _raycaster = new Raycaster(); -const _offset = new Vector3(); +const _raycaster = /* @__PURE__ */ new Raycaster(); +const _offset = /* @__PURE__ */ new Vector3(); -const _gizmoMatrixStateTemp = new Matrix4(); -const _cameraMatrixStateTemp = new Matrix4(); -const _scalePointTemp = new Vector3(); +const _gizmoMatrixStateTemp = /* @__PURE__ */ new Matrix4(); +const _cameraMatrixStateTemp = /* @__PURE__ */ new Matrix4(); +const _scalePointTemp = /* @__PURE__ */ new Vector3(); /** * * @param {Camera} camera Virtual camera used in the scene diff --git a/examples/jsm/controls/DragControls.js b/examples/jsm/controls/DragControls.js index f93f7745075561..c05729fab73c31 100644 --- a/examples/jsm/controls/DragControls.js +++ b/examples/jsm/controls/DragControls.js @@ -7,14 +7,14 @@ import { Vector3 } from 'three'; -const _plane = new Plane(); -const _raycaster = new Raycaster(); - -const _pointer = new Vector2(); -const _offset = new Vector3(); -const _intersection = new Vector3(); -const _worldPosition = new Vector3(); -const _inverseMatrix = new Matrix4(); +const _plane = /* @__PURE__ */ new Plane(); +const _raycaster = /* @__PURE__ */ new Raycaster(); + +const _pointer = /* @__PURE__ */ new Vector2(); +const _offset = /* @__PURE__ */ new Vector3(); +const _intersection = /* @__PURE__ */ new Vector3(); +const _worldPosition = /* @__PURE__ */ new Vector3(); +const _inverseMatrix = /* @__PURE__ */ new Matrix4(); class DragControls extends EventDispatcher { diff --git a/examples/jsm/controls/FirstPersonControls.js b/examples/jsm/controls/FirstPersonControls.js index 0d03421c8b8c54..f61f091fbc027c 100644 --- a/examples/jsm/controls/FirstPersonControls.js +++ b/examples/jsm/controls/FirstPersonControls.js @@ -4,9 +4,9 @@ import { Vector3 } from 'three'; -const _lookDirection = new Vector3(); -const _spherical = new Spherical(); -const _target = new Vector3(); +const _lookDirection = /* @__PURE__ */ new Vector3(); +const _spherical = /* @__PURE__ */ new Spherical(); +const _target = /* @__PURE__ */ new Vector3(); class FirstPersonControls { diff --git a/examples/jsm/controls/OrbitControls.js b/examples/jsm/controls/OrbitControls.js index 6b8bea9104919c..0e987b6d4661ef 100644 --- a/examples/jsm/controls/OrbitControls.js +++ b/examples/jsm/controls/OrbitControls.js @@ -21,9 +21,11 @@ import { const _changeEvent = { type: 'change' }; const _startEvent = { type: 'start' }; const _endEvent = { type: 'end' }; -const _ray = new Ray(); -const _plane = new Plane(); -const TILT_LIMIT = Math.cos( 70 * MathUtils.DEG2RAD ); +const _ray = /* @__PURE__ */ new Ray(); +const _plane = /* @__PURE__ */ new Plane(); + +const { DEG2RAD } = MathUtils; +const TILT_LIMIT = Math.cos( 70 * DEG2RAD ); class OrbitControls extends EventDispatcher { diff --git a/examples/jsm/controls/PointerLockControls.js b/examples/jsm/controls/PointerLockControls.js index 1d2856d3f6131b..d1dc4949e1b8d8 100644 --- a/examples/jsm/controls/PointerLockControls.js +++ b/examples/jsm/controls/PointerLockControls.js @@ -4,8 +4,8 @@ import { Vector3 } from 'three'; -const _euler = new Euler( 0, 0, 0, 'YXZ' ); -const _vector = new Vector3(); +const _euler = /* @__PURE__ */ new Euler( 0, 0, 0, 'YXZ' ); +const _vector = /* @__PURE__ */ new Vector3(); const _changeEvent = { type: 'change' }; const _lockEvent = { type: 'lock' }; diff --git a/examples/jsm/controls/TransformControls.js b/examples/jsm/controls/TransformControls.js index 1163078c49179a..aa3de08d1d535c 100644 --- a/examples/jsm/controls/TransformControls.js +++ b/examples/jsm/controls/TransformControls.js @@ -20,15 +20,15 @@ import { Vector3 } from 'three'; -const _raycaster = new Raycaster(); +const _raycaster = /* @__PURE__ */ new Raycaster(); -const _tempVector = new Vector3(); -const _tempVector2 = new Vector3(); -const _tempQuaternion = new Quaternion(); +const _tempVector = /* @__PURE__ */ new Vector3(); +const _tempVector2 = /* @__PURE__ */ new Vector3(); +const _tempQuaternion = /* @__PURE__ */ new Quaternion(); const _unit = { - X: new Vector3( 1, 0, 0 ), - Y: new Vector3( 0, 1, 0 ), - Z: new Vector3( 0, 0, 1 ) + X: /* @__PURE__ */ new Vector3( 1, 0, 0 ), + Y: /* @__PURE__ */ new Vector3( 0, 1, 0 ), + Z: /* @__PURE__ */ new Vector3( 0, 0, 1 ) }; const _changeEvent = { type: 'change' }; @@ -761,22 +761,22 @@ function intersectObjectWithRay( object, raycaster, includeInvisible ) { // Reusable utility variables -const _tempEuler = new Euler(); -const _alignVector = new Vector3( 0, 1, 0 ); -const _zeroVector = new Vector3( 0, 0, 0 ); -const _lookAtMatrix = new Matrix4(); -const _tempQuaternion2 = new Quaternion(); -const _identityQuaternion = new Quaternion(); -const _dirVector = new Vector3(); -const _tempMatrix = new Matrix4(); - -const _unitX = new Vector3( 1, 0, 0 ); -const _unitY = new Vector3( 0, 1, 0 ); -const _unitZ = new Vector3( 0, 0, 1 ); - -const _v1 = new Vector3(); -const _v2 = new Vector3(); -const _v3 = new Vector3(); +const _tempEuler = /* @__PURE__ */ new Euler(); +const _alignVector = /* @__PURE__ */ new Vector3( 0, 1, 0 ); +const _zeroVector = /* @__PURE__ */ new Vector3( 0, 0, 0 ); +const _lookAtMatrix = /* @__PURE__ */ new Matrix4(); +const _tempQuaternion2 = /* @__PURE__ */ new Quaternion(); +const _identityQuaternion = /* @__PURE__ */ new Quaternion(); +const _dirVector = /* @__PURE__ */ new Vector3(); +const _tempMatrix = /* @__PURE__ */ new Matrix4(); + +const _unitX = /* @__PURE__ */ new Vector3( 1, 0, 0 ); +const _unitY = /* @__PURE__ */ new Vector3( 0, 1, 0 ); +const _unitZ = /* @__PURE__ */ new Vector3( 0, 0, 1 ); + +const _v1 = /* @__PURE__ */ new Vector3(); +const _v2 = /* @__PURE__ */ new Vector3(); +const _v3 = /* @__PURE__ */ new Vector3(); class TransformControlsGizmo extends Object3D { diff --git a/examples/jsm/csm/CSM.js b/examples/jsm/csm/CSM.js index 649a0e5e9fb450..43a3b8df94873f 100644 --- a/examples/jsm/csm/CSM.js +++ b/examples/jsm/csm/CSM.js @@ -10,15 +10,15 @@ import { import { CSMFrustum } from './CSMFrustum.js'; import { CSMShader } from './CSMShader.js'; -const _cameraToLightMatrix = new Matrix4(); -const _lightSpaceFrustum = new CSMFrustum(); -const _center = new Vector3(); -const _bbox = new Box3(); +const _cameraToLightMatrix = /* @__PURE__ */ new Matrix4(); +const _lightSpaceFrustum = /* @__PURE__ */ new CSMFrustum(); +const _center = /* @__PURE__ */ new Vector3(); +const _bbox = /* @__PURE__ */ new Box3(); const _uniformArray = []; const _logArray = []; -const _lightOrientationMatrix = new Matrix4(); -const _lightOrientationMatrixInverse = new Matrix4(); -const _up = new Vector3( 0, 1, 0 ); +const _lightOrientationMatrix = /* @__PURE__ */ new Matrix4(); +const _lightOrientationMatrixInverse = /* @__PURE__ */ new Matrix4(); +const _up = /* @__PURE__ */ new Vector3( 0, 1, 0 ); export class CSM { diff --git a/examples/jsm/csm/CSMFrustum.js b/examples/jsm/csm/CSMFrustum.js index 2d968bebdb929f..9bd8d0def6c1cc 100644 --- a/examples/jsm/csm/CSMFrustum.js +++ b/examples/jsm/csm/CSMFrustum.js @@ -1,6 +1,6 @@ import { Vector3, Matrix4 } from 'three'; -const inverseProjectionMatrix = new Matrix4(); +const inverseProjectionMatrix = /* @__PURE__ */ new Matrix4(); class CSMFrustum { diff --git a/examples/jsm/csm/CSMShader.js b/examples/jsm/csm/CSMShader.js index a1611f2885d960..9aace2d94632c8 100644 --- a/examples/jsm/csm/CSMShader.js +++ b/examples/jsm/csm/CSMShader.js @@ -1,5 +1,7 @@ import { ShaderChunk } from 'three'; +const { lights_pars_begin } = ShaderChunk; + const CSMShader = { lights_fragment_begin: /* glsl */` vec3 geometryPosition = - vViewPosition; @@ -284,7 +286,7 @@ uniform vec2 CSM_cascades[CSM_CASCADES]; uniform float cameraNear; uniform float shadowFar; #endif - ` + ShaderChunk.lights_pars_begin + ` + lights_pars_begin }; export { CSMShader }; diff --git a/examples/jsm/exporters/DRACOExporter.js b/examples/jsm/exporters/DRACOExporter.js index 85a2e15adc4d6d..bbd86143317322 100644 --- a/examples/jsm/exporters/DRACOExporter.js +++ b/examples/jsm/exporters/DRACOExporter.js @@ -17,6 +17,8 @@ import { Color } from 'three'; /* global DracoEncoderModule */ +const DRACOExporter = /* @__PURE__ */ ( () => { + class DRACOExporter { parse( object, options = {} ) { @@ -264,4 +266,8 @@ DRACOExporter.COLOR = 2; DRACOExporter.TEX_COORD = 3; DRACOExporter.GENERIC = 4; +return DRACOExporter; + +} )(); + export { DRACOExporter }; diff --git a/examples/jsm/exporters/EXRExporter.js b/examples/jsm/exporters/EXRExporter.js index bd1d8202d2d83d..246f7b881bcbd9 100644 --- a/examples/jsm/exporters/EXRExporter.js +++ b/examples/jsm/exporters/EXRExporter.js @@ -13,7 +13,7 @@ import { } from 'three'; import * as fflate from '../libs/fflate.module.js'; -const textEncoder = new TextEncoder(); +const textEncoder = /* @__PURE__ */ new TextEncoder(); const NO_COMPRESSION = 0; const ZIPS_COMPRESSION = 2; diff --git a/examples/jsm/exporters/GLTFExporter.js b/examples/jsm/exporters/GLTFExporter.js index f1a9831e72cb18..e2ec5b4f56e370 100644 --- a/examples/jsm/exporters/GLTFExporter.js +++ b/examples/jsm/exporters/GLTFExporter.js @@ -27,6 +27,7 @@ import { } from 'three'; import { decompress } from './../utils/TextureUtils.js'; +const GLTFExporter = /* @__PURE__ */ ( () => { /** * The KHR_mesh_quantization extension allows these extra attribute component types @@ -3228,4 +3229,8 @@ GLTFExporter.Utils = { }; +return GLTFExporter; + +} )(); + export { GLTFExporter }; diff --git a/examples/jsm/geometries/RoundedBoxGeometry.js b/examples/jsm/geometries/RoundedBoxGeometry.js index 8baa16822365c4..9399b031619a68 100644 --- a/examples/jsm/geometries/RoundedBoxGeometry.js +++ b/examples/jsm/geometries/RoundedBoxGeometry.js @@ -3,7 +3,7 @@ import { Vector3 } from 'three'; -const _tempNormal = new Vector3(); +const _tempNormal = /* @__PURE__ */ new Vector3(); function getUv( faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength ) { diff --git a/examples/jsm/helpers/VertexNormalsHelper.js b/examples/jsm/helpers/VertexNormalsHelper.js index bfe41aba8644d1..6cf45ff656f791 100644 --- a/examples/jsm/helpers/VertexNormalsHelper.js +++ b/examples/jsm/helpers/VertexNormalsHelper.js @@ -7,9 +7,9 @@ import { Vector3 } from 'three'; -const _v1 = new Vector3(); -const _v2 = new Vector3(); -const _normalMatrix = new Matrix3(); +const _v1 = /* @__PURE__ */ new Vector3(); +const _v2 = /* @__PURE__ */ new Vector3(); +const _normalMatrix = /* @__PURE__ */ new Matrix3(); class VertexNormalsHelper extends LineSegments { diff --git a/examples/jsm/helpers/VertexTangentsHelper.js b/examples/jsm/helpers/VertexTangentsHelper.js index 1ad413f65e95c7..82afd8bd7ccb5d 100644 --- a/examples/jsm/helpers/VertexTangentsHelper.js +++ b/examples/jsm/helpers/VertexTangentsHelper.js @@ -6,8 +6,8 @@ import { Vector3 } from 'three'; -const _v1 = new Vector3(); -const _v2 = new Vector3(); +const _v1 = /* @__PURE__ */ new Vector3(); +const _v2 = /* @__PURE__ */ new Vector3(); class VertexTangentsHelper extends LineSegments { diff --git a/examples/jsm/interactive/InteractiveGroup.js b/examples/jsm/interactive/InteractiveGroup.js index a8d7b30f59e279..eac31865c038fa 100644 --- a/examples/jsm/interactive/InteractiveGroup.js +++ b/examples/jsm/interactive/InteractiveGroup.js @@ -5,7 +5,7 @@ import { Vector2 } from 'three'; -const _pointer = new Vector2(); +const _pointer = /* @__PURE__ */ new Vector2(); const _event = { type: '', data: _pointer }; class InteractiveGroup extends Group { diff --git a/examples/jsm/interactive/SelectionBox.js b/examples/jsm/interactive/SelectionBox.js index 597b9b2f101f66..d1b3203552d269 100644 --- a/examples/jsm/interactive/SelectionBox.js +++ b/examples/jsm/interactive/SelectionBox.js @@ -9,29 +9,29 @@ import { * This is a class to check whether objects are in a selection area in 3D space */ -const _frustum = new Frustum(); -const _center = new Vector3(); +const _frustum = /* @__PURE__ */ new Frustum(); +const _center = /* @__PURE__ */ new Vector3(); -const _tmpPoint = new Vector3(); +const _tmpPoint = /* @__PURE__ */ new Vector3(); -const _vecNear = new Vector3(); -const _vecTopLeft = new Vector3(); -const _vecTopRight = new Vector3(); -const _vecDownRight = new Vector3(); -const _vecDownLeft = new Vector3(); +const _vecNear = /* @__PURE__ */ new Vector3(); +const _vecTopLeft = /* @__PURE__ */ new Vector3(); +const _vecTopRight = /* @__PURE__ */ new Vector3(); +const _vecDownRight = /* @__PURE__ */ new Vector3(); +const _vecDownLeft = /* @__PURE__ */ new Vector3(); -const _vecFarTopLeft = new Vector3(); -const _vecFarTopRight = new Vector3(); -const _vecFarDownRight = new Vector3(); -const _vecFarDownLeft = new Vector3(); +const _vecFarTopLeft = /* @__PURE__ */ new Vector3(); +const _vecFarTopRight = /* @__PURE__ */ new Vector3(); +const _vecFarDownRight = /* @__PURE__ */ new Vector3(); +const _vecFarDownLeft = /* @__PURE__ */ new Vector3(); -const _vectemp1 = new Vector3(); -const _vectemp2 = new Vector3(); -const _vectemp3 = new Vector3(); +const _vectemp1 = /* @__PURE__ */ new Vector3(); +const _vectemp2 = /* @__PURE__ */ new Vector3(); +const _vectemp3 = /* @__PURE__ */ new Vector3(); -const _matrix = new Matrix4(); -const _quaternion = new Quaternion(); -const _scale = new Vector3(); +const _matrix = /* @__PURE__ */ new Matrix4(); +const _quaternion = /* @__PURE__ */ new Quaternion(); +const _scale = /* @__PURE__ */ new Vector3(); class SelectionBox { diff --git a/examples/jsm/libs/chevrotain.module.min.js b/examples/jsm/libs/chevrotain.module.min.js index 424790cbae7ef3..4b8a2a836f137c 100644 --- a/examples/jsm/libs/chevrotain.module.min.js +++ b/examples/jsm/libs/chevrotain.module.min.js @@ -1,4 +1,5 @@ /*! chevrotain - v9.0.1 */ +const chevrotain = /*@__PURE__*/ (() => { var R=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var Er=R(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.VERSION=void 0;Pt.VERSION="9.0.1"});var k=R((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(t,e){for(var r=0,n=e.length,i=t.length;r{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof St=="object"&&St.exports?St.exports=e():t.regexpToAst=e()})(typeof self!="undefined"?self:sn,function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(u){this.idx=u.idx,this.input=u.input,this.groupIdx=u.groupIdx},t.prototype.pattern=function(u){this.idx=0,this.input=u,this.groupIdx=0,this.consumeChar("/");var d=this.disjunction();this.consumeChar("/");for(var A={type:"Flags",loc:{begin:this.idx,end:u.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(A,"global");break;case"i":o(A,"ignoreCase");break;case"m":o(A,"multiLine");break;case"u":o(A,"unicode");break;case"y":o(A,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:A,value:d,loc:this.loc(0)}},t.prototype.disjunction=function(){var u=[],d=this.idx;for(u.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),u.push(this.alternative());return{type:"Disjunction",value:u,loc:this.loc(d)}},t.prototype.alternative=function(){for(var u=[],d=this.idx;this.isTerm();)u.push(this.term());return{type:"Alternative",value:u,loc:this.loc(d)}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){var u=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(u)};case"$":return{type:"EndAnchor",loc:this.loc(u)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(u)};case"B":return{type:"NonWordBoundary",loc:this.loc(u)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var d;switch(this.popChar()){case"=":d="Lookahead";break;case"!":d="NegativeLookahead";break}s(d);var A=this.disjunction();return this.consumeChar(")"),{type:d,value:A,loc:this.loc(u)}}c()},t.prototype.quantifier=function(u){var d,A=this.idx;switch(this.popChar()){case"*":d={atLeast:0,atMost:Infinity};break;case"+":d={atLeast:1,atMost:Infinity};break;case"?":d={atLeast:0,atMost:1};break;case"{":var _=this.integerIncludingZero();switch(this.popChar()){case"}":d={atLeast:_,atMost:_};break;case",":var g;this.isDigit()?(g=this.integerIncludingZero(),d={atLeast:_,atMost:g}):d={atLeast:_,atMost:Infinity},this.consumeChar("}");break}if(u===!0&&d===void 0)return;s(d);break}if(!(u===!0&&d===void 0))return s(d),this.peekChar(0)==="?"?(this.consumeChar("?"),d.greedy=!1):d.greedy=!0,d.type="Quantifier",d.loc=this.loc(A),d},t.prototype.atom=function(){var u,d=this.idx;switch(this.peekChar()){case".":u=this.dotAll();break;case"\\":u=this.atomEscape();break;case"[":u=this.characterClass();break;case"(":u=this.group();break}return u===void 0&&this.isPatternCharacter()&&(u=this.patternCharacter()),s(u),u.loc=this.loc(d),this.isQuantifier()&&(u.quantifier=this.quantifier()),u},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i(` `),i("\r"),i("\u2028"),i("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){var u=this.positiveInteger();return{type:"GroupBackReference",value:u}},t.prototype.characterClassEscape=function(){var u,d=!1;switch(this.popChar()){case"d":u=p;break;case"D":u=p,d=!0;break;case"s":u=m;break;case"S":u=m,d=!0;break;case"w":u=l;break;case"W":u=l,d=!0;break}return s(u),{type:"Set",value:u,complement:d}},t.prototype.controlEscapeAtom=function(){var u;switch(this.popChar()){case"f":u=i("\f");break;case"n":u=i(` `);break;case"r":u=i("\r");break;case"t":u=i(" ");break;case"v":u=i("\v");break}return s(u),{type:"Character",value:u}},t.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var u=this.popChar();if(/[a-zA-Z]/.test(u)===!1)throw Error("Invalid ");var d=u.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:d}},t.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},t.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},t.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},t.prototype.identityEscapeAtom=function(){var u=this.popChar();return{type:"Character",value:i(u)}},t.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` @@ -138,4 +139,6 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis `;return s+c+f+p+l+m}cr.createSyntaxDiagramsCode=Iu});var Fa=R(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.Parser=E.createSyntaxDiagramsCode=E.clearCache=E.GAstVisitor=E.serializeProduction=E.serializeGrammar=E.Terminal=E.Rule=E.RepetitionWithSeparator=E.RepetitionMandatoryWithSeparator=E.RepetitionMandatory=E.Repetition=E.Option=E.NonTerminal=E.Alternative=E.Alternation=E.defaultLexerErrorProvider=E.NoViableAltException=E.NotAllInputParsedException=E.MismatchedTokenException=E.isRecognitionException=E.EarlyExitException=E.defaultParserErrorProvider=E.tokenName=E.tokenMatcher=E.tokenLabel=E.EOF=E.createTokenInstance=E.createToken=E.LexerDefinitionErrorType=E.Lexer=E.EMPTY_ALT=E.ParserDefinitionErrorType=E.EmbeddedActionsParser=E.CstParser=E.VERSION=void 0;var ku=Er();Object.defineProperty(E,"VERSION",{enumerable:!0,get:function(){return ku.VERSION}});var lr=ce();Object.defineProperty(E,"CstParser",{enumerable:!0,get:function(){return lr.CstParser}});Object.defineProperty(E,"EmbeddedActionsParser",{enumerable:!0,get:function(){return lr.EmbeddedActionsParser}});Object.defineProperty(E,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return lr.ParserDefinitionErrorType}});Object.defineProperty(E,"EMPTY_ALT",{enumerable:!0,get:function(){return lr.EMPTY_ALT}});var Ma=ft();Object.defineProperty(E,"Lexer",{enumerable:!0,get:function(){return Ma.Lexer}});Object.defineProperty(E,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return Ma.LexerDefinitionErrorType}});var nt=Ue();Object.defineProperty(E,"createToken",{enumerable:!0,get:function(){return nt.createToken}});Object.defineProperty(E,"createTokenInstance",{enumerable:!0,get:function(){return nt.createTokenInstance}});Object.defineProperty(E,"EOF",{enumerable:!0,get:function(){return nt.EOF}});Object.defineProperty(E,"tokenLabel",{enumerable:!0,get:function(){return nt.tokenLabel}});Object.defineProperty(E,"tokenMatcher",{enumerable:!0,get:function(){return nt.tokenMatcher}});Object.defineProperty(E,"tokenName",{enumerable:!0,get:function(){return nt.tokenName}});var Pu=mt();Object.defineProperty(E,"defaultParserErrorProvider",{enumerable:!0,get:function(){return Pu.defaultParserErrorProvider}});var Nt=et();Object.defineProperty(E,"EarlyExitException",{enumerable:!0,get:function(){return Nt.EarlyExitException}});Object.defineProperty(E,"isRecognitionException",{enumerable:!0,get:function(){return Nt.isRecognitionException}});Object.defineProperty(E,"MismatchedTokenException",{enumerable:!0,get:function(){return Nt.MismatchedTokenException}});Object.defineProperty(E,"NotAllInputParsedException",{enumerable:!0,get:function(){return Nt.NotAllInputParsedException}});Object.defineProperty(E,"NoViableAltException",{enumerable:!0,get:function(){return Nt.NoViableAltException}});var Su=kr();Object.defineProperty(E,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return Su.defaultLexerErrorProvider}});var Se=ne();Object.defineProperty(E,"Alternation",{enumerable:!0,get:function(){return Se.Alternation}});Object.defineProperty(E,"Alternative",{enumerable:!0,get:function(){return Se.Alternative}});Object.defineProperty(E,"NonTerminal",{enumerable:!0,get:function(){return Se.NonTerminal}});Object.defineProperty(E,"Option",{enumerable:!0,get:function(){return Se.Option}});Object.defineProperty(E,"Repetition",{enumerable:!0,get:function(){return Se.Repetition}});Object.defineProperty(E,"RepetitionMandatory",{enumerable:!0,get:function(){return Se.RepetitionMandatory}});Object.defineProperty(E,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return Se.RepetitionMandatoryWithSeparator}});Object.defineProperty(E,"RepetitionWithSeparator",{enumerable:!0,get:function(){return Se.RepetitionWithSeparator}});Object.defineProperty(E,"Rule",{enumerable:!0,get:function(){return Se.Rule}});Object.defineProperty(E,"Terminal",{enumerable:!0,get:function(){return Se.Terminal}});var ba=ne();Object.defineProperty(E,"serializeGrammar",{enumerable:!0,get:function(){return ba.serializeGrammar}});Object.defineProperty(E,"serializeProduction",{enumerable:!0,get:function(){return ba.serializeProduction}});var xu=$e();Object.defineProperty(E,"GAstVisitor",{enumerable:!0,get:function(){return xu.GAstVisitor}});function Cu(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API. It performs no action other than printing this message. Please avoid using it as it will be completely removed in the future`)}E.clearCache=Cu;var Lu=La();Object.defineProperty(E,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return Lu.createSyntaxDiagramsCode}});var Mu=function(){function t(){throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead. -See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return t}();E.Parser=Mu});export default Fa(); +See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return t}();E.Parser=Mu});return Fa();})(); + +export default chevrotain; diff --git a/examples/jsm/libs/fflate.module.js b/examples/jsm/libs/fflate.module.js index 808000a503cf63..acee3976ca08e3 100644 --- a/examples/jsm/libs/fflate.module.js +++ b/examples/jsm/libs/fflate.module.js @@ -14,6 +14,56 @@ version 0.6.9 // However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size. // Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint // is better for memory in most engines (I *think*). + +const { + + Deflate, + AsyncDeflate, + deflate, + deflateSync, + Inflate, + AsyncInflate, + inflate, + inflateSync, + Gzip, + AsyncGzip, + gzip, + gzipSync, + Gunzip, + AsyncGunzip, + gunzip, + gunzipSync, + Zlib, + AsyncZlib, + zlib, + zlibSync, + Unzlib, + AsyncUnzlib, + unzlib, + unzlibSync, + Decompress, + AsyncDecompress, + decompress, + decompressSync, + DecodeUTF8, + EncodeUTF8, + strToU8, + strFromU8, + ZipPassThrough, + ZipDeflate, + AsyncZipDeflate, + Zip, + zip, + zipSync, + UnzipPassThrough, + UnzipInflate, + AsyncUnzipInflate, + Unzip, + unzip, + unzipSync, + +} = /* @__PURE__ */ ( () => { + var ch2 = {}; var durl = function (c) { return URL.createObjectURL(new Blob([c], { type: 'text/javascript' })); }; var cwk = function (u) { return new Worker(u); }; @@ -957,7 +1007,7 @@ var Deflate = /*#__PURE__*/ (function () { }; return Deflate; }()); -export { Deflate }; + /** * Asynchronous streaming DEFLATE compression */ @@ -973,8 +1023,8 @@ var AsyncDeflate = /*#__PURE__*/ (function () { } return AsyncDeflate; }()); -export { AsyncDeflate }; -export function deflate(data, opts, cb) { + +function deflate(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -989,7 +1039,7 @@ export function deflate(data, opts, cb) { * @param opts The compression options * @returns The deflated version of the data */ -export function deflateSync(data, opts) { +function deflateSync(data, opts) { return dopt(data, opts || {}, 0, 0); } /** @@ -1032,7 +1082,7 @@ var Inflate = /*#__PURE__*/ (function () { }; return Inflate; }()); -export { Inflate }; + /** * Asynchronous streaming DEFLATE decompression */ @@ -1053,8 +1103,8 @@ var AsyncInflate = /*#__PURE__*/ (function () { } return AsyncInflate; }()); -export { AsyncInflate }; -export function inflate(data, opts, cb) { + +function inflate(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -1069,7 +1119,7 @@ export function inflate(data, opts, cb) { * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. * @returns The decompressed version of the data */ -export function inflateSync(data, out) { +function inflateSync(data, out) { return inflt(data, out); } // before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize. @@ -1103,7 +1153,7 @@ var Gzip = /*#__PURE__*/ (function () { }; return Gzip; }()); -export { Gzip }; + /** * Asynchronous streaming GZIP compression */ @@ -1120,8 +1170,8 @@ var AsyncGzip = /*#__PURE__*/ (function () { } return AsyncGzip; }()); -export { AsyncGzip }; -export function gzip(data, opts, cb) { + +function gzip(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -1138,7 +1188,7 @@ export function gzip(data, opts, cb) { * @param opts The compression options * @returns The gzipped version of the data */ -export function gzipSync(data, opts) { +function gzipSync(data, opts) { if (!opts) opts = {}; var c = crc(), l = data.length; @@ -1182,7 +1232,7 @@ var Gunzip = /*#__PURE__*/ (function () { }; return Gunzip; }()); -export { Gunzip }; + /** * Asynchronous streaming GZIP decompression */ @@ -1204,8 +1254,8 @@ var AsyncGunzip = /*#__PURE__*/ (function () { } return AsyncGunzip; }()); -export { AsyncGunzip }; -export function gunzip(data, opts, cb) { + +function gunzip(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -1222,7 +1272,7 @@ export function gunzip(data, opts, cb) { * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory. * @returns The decompressed version of the data */ -export function gunzipSync(data, out) { +function gunzipSync(data, out) { return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data))); } /** @@ -1253,7 +1303,7 @@ var Zlib = /*#__PURE__*/ (function () { }; return Zlib; }()); -export { Zlib }; + /** * Asynchronous streaming Zlib compression */ @@ -1270,8 +1320,8 @@ var AsyncZlib = /*#__PURE__*/ (function () { } return AsyncZlib; }()); -export { AsyncZlib }; -export function zlib(data, opts, cb) { + +function zlib(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -1288,7 +1338,7 @@ export function zlib(data, opts, cb) { * @param opts The compression options * @returns The zlib-compressed version of the data */ -export function zlibSync(data, opts) { +function zlibSync(data, opts) { if (!opts) opts = {}; var a = adler(); @@ -1331,7 +1381,7 @@ var Unzlib = /*#__PURE__*/ (function () { }; return Unzlib; }()); -export { Unzlib }; + /** * Asynchronous streaming Zlib decompression */ @@ -1353,8 +1403,8 @@ var AsyncUnzlib = /*#__PURE__*/ (function () { } return AsyncUnzlib; }()); -export { AsyncUnzlib }; -export function unzlib(data, opts, cb) { + +function unzlib(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -1371,13 +1421,10 @@ export function unzlib(data, opts, cb) { * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. * @returns The decompressed version of the data */ -export function unzlibSync(data, out) { +function unzlibSync(data, out) { return inflt((zlv(data), data.subarray(2, -4)), out); } -// Default algorithm for compression (used because having a known output size allows faster decompression) -export { gzip as compress, AsyncGzip as AsyncCompress }; -// Default algorithm for compression (used because having a known output size allows faster decompression) -export { gzipSync as compressSync, Gzip as Compress }; + /** * Streaming GZIP, Zlib, or raw DEFLATE decompression */ @@ -1424,7 +1471,7 @@ var Decompress = /*#__PURE__*/ (function () { }; return Decompress; }()); -export { Decompress }; + /** * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression */ @@ -1449,8 +1496,8 @@ var AsyncDecompress = /*#__PURE__*/ (function () { }; return AsyncDecompress; }()); -export { AsyncDecompress }; -export function decompress(data, opts, cb) { + +function decompress(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -1467,7 +1514,7 @@ export function decompress(data, opts, cb) { * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. * @returns The decompressed version of the data */ -export function decompressSync(data, out) { +function decompressSync(data, out) { return (data[0] == 31 && data[1] == 139 && data[2] == 8) ? gunzipSync(data, out) : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) @@ -1566,7 +1613,7 @@ var DecodeUTF8 = /*#__PURE__*/ (function () { }; return DecodeUTF8; }()); -export { DecodeUTF8 }; + /** * Streaming UTF-8 encoding */ @@ -1592,7 +1639,7 @@ var EncodeUTF8 = /*#__PURE__*/ (function () { }; return EncodeUTF8; }()); -export { EncodeUTF8 }; + /** * Converts a string into a Uint8Array for use with compression/decompression methods * @param str The string to encode @@ -1600,7 +1647,7 @@ export { EncodeUTF8 }; * not need to be true unless decoding a binary string. * @returns The string encoded in UTF-8/Latin-1 binary */ -export function strToU8(str, latin1) { +function strToU8(str, latin1) { if (latin1) { var ar_1 = new u8(str.length); for (var i = 0; i < str.length; ++i) @@ -1639,7 +1686,7 @@ export function strToU8(str, latin1) { * not need to be true unless encoding to binary string. * @returns The original UTF-8/Latin-1 string */ -export function strFromU8(dat, latin1) { +function strFromU8(dat, latin1) { if (latin1) { var r = ''; for (var i = 0; i < dat.length; i += 16384) @@ -1776,7 +1823,7 @@ var ZipPassThrough = /*#__PURE__*/ (function () { }; return ZipPassThrough; }()); -export { ZipPassThrough }; + // I don't extend because TypeScript extension adds 1kB of runtime bloat /** * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate @@ -1817,7 +1864,7 @@ var ZipDeflate = /*#__PURE__*/ (function () { }; return ZipDeflate; }()); -export { ZipDeflate }; + /** * Asynchronous streaming DEFLATE compression for ZIP archives */ @@ -1852,7 +1899,7 @@ var AsyncZipDeflate = /*#__PURE__*/ (function () { }; return AsyncZipDeflate; }()); -export { AsyncZipDeflate }; + // TODO: Better tree shaking /** * A zippable archive to which files can incrementally be added @@ -1997,8 +2044,8 @@ var Zip = /*#__PURE__*/ (function () { }; return Zip; }()); -export { Zip }; -export function zip(data, opts, cb) { + +function zip(data, opts, cb) { if (!cb) cb = opts, opts = {}; if (typeof cb != 'function') @@ -2094,7 +2141,7 @@ export function zip(data, opts, cb) { * @param opts The main options, merged with per-file options * @returns The generated ZIP archive */ -export function zipSync(data, opts) { +function zipSync(data, opts) { if (!opts) opts = {}; var r = {}; @@ -2149,7 +2196,7 @@ var UnzipPassThrough = /*#__PURE__*/ (function () { UnzipPassThrough.compression = 0; return UnzipPassThrough; }()); -export { UnzipPassThrough }; + /** * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for * better performance. @@ -2175,7 +2222,7 @@ var UnzipInflate = /*#__PURE__*/ (function () { UnzipInflate.compression = 8; return UnzipInflate; }()); -export { UnzipInflate }; + /** * Asynchronous streaming DEFLATE decompression for ZIP archives */ @@ -2205,7 +2252,7 @@ var AsyncUnzipInflate = /*#__PURE__*/ (function () { AsyncUnzipInflate.compression = 8; return AsyncUnzipInflate; }()); -export { AsyncUnzipInflate }; + /** * A ZIP archive decompression stream that emits files as they are discovered */ @@ -2358,14 +2405,14 @@ var Unzip = /*#__PURE__*/ (function () { }; return Unzip; }()); -export { Unzip }; + /** * Asynchronously decompresses a ZIP archive * @param data The raw compressed ZIP file * @param cb The callback to call with the decompressed files * @returns A function that can be used to immediately terminate the unzipping */ -export function unzip(data, cb) { +function unzip(data, cb) { if (typeof cb != 'function') throw 'no callback'; var term = []; @@ -2440,7 +2487,7 @@ export function unzip(data, cb) { * @param data The raw compressed ZIP file * @returns The decompressed files */ -export function unzipSync(data) { +function unzipSync(data) { var files = {}; var e = data.length - 22; for (; b4(data, e) != 0x6054B50; --e) { @@ -2472,3 +2519,105 @@ export function unzipSync(data) { } return files; } + +return { + + Deflate, + AsyncDeflate, + deflate, + deflateSync, + Inflate, + AsyncInflate, + inflate, + inflateSync, + Gzip, + AsyncGzip, + gzip, + gzipSync, + Gunzip, + AsyncGunzip, + gunzip, + gunzipSync, + Zlib, + AsyncZlib, + zlib, + zlibSync, + Unzlib, + AsyncUnzlib, + unzlib, + unzlibSync, + Decompress, + AsyncDecompress, + decompress, + decompressSync, + DecodeUTF8, + EncodeUTF8, + strToU8, + strFromU8, + ZipPassThrough, + ZipDeflate, + AsyncZipDeflate, + Zip, + zip, + zipSync, + UnzipPassThrough, + UnzipInflate, + AsyncUnzipInflate, + Unzip, + unzip, + unzipSync, + +}; + +} )(); + +export { + Deflate, + AsyncDeflate, + deflate, + deflateSync, + Inflate, + AsyncInflate, + inflate, + inflateSync, + Gzip, + AsyncGzip, + gzip, + gzipSync, + Gunzip, + AsyncGunzip, + gunzip, + gunzipSync, + Zlib, + AsyncZlib, + zlib, + zlibSync, + Unzlib, + AsyncUnzlib, + unzlib, + unzlibSync, + gzip as compress, + AsyncGzip as AsyncCompress, + gzipSync as compressSync, + Gzip as Compress, + Decompress, + AsyncDecompress, + decompress, + decompressSync, + DecodeUTF8, + EncodeUTF8, + strToU8, + strFromU8, + ZipPassThrough, + ZipDeflate, + AsyncZipDeflate, + Zip, + zip, + zipSync, + UnzipPassThrough, + UnzipInflate, + AsyncUnzipInflate, + Unzip, + unzip, + unzipSync, +} diff --git a/examples/jsm/libs/lottie_canvas.module.js b/examples/jsm/libs/lottie_canvas.module.js index cbe3a964e5c90d..2dfcafa3102e80 100644 --- a/examples/jsm/libs/lottie_canvas.module.js +++ b/examples/jsm/libs/lottie_canvas.module.js @@ -1,3 +1,5 @@ +const lottie = /* @__PURE__ */ ( () => { + const svgNS = 'http://www.w3.org/2000/svg'; let locationHref = ''; @@ -14841,4 +14843,8 @@ setExpressionsPlugin(Expressions); initialize$1(); initialize(); -export { lottie as default }; +return lottie; + +} ); + +export default lottie; diff --git a/examples/jsm/libs/mmdparser.module.js b/examples/jsm/libs/mmdparser.module.js index 5a587f10dc43c6..468025713df516 100644 --- a/examples/jsm/libs/mmdparser.module.js +++ b/examples/jsm/libs/mmdparser.module.js @@ -4,6 +4,8 @@ * Simple CharsetEncoder. */ +const { MMDParser, CharsetEncoder, Parser } = /* @__PURE__ */ ( () => { + function CharsetEncoder() { } @@ -11527,4 +11529,8 @@ var MMDParser = { Parser: Parser }; +return { MMDParser, CharsetEncoder, Parser }; + +} )(); + export { MMDParser, CharsetEncoder, Parser }; diff --git a/examples/jsm/libs/motion-controllers.module.js b/examples/jsm/libs/motion-controllers.module.js index 9b2caaee6d1c4c..37944de1949a9a 100644 --- a/examples/jsm/libs/motion-controllers.module.js +++ b/examples/jsm/libs/motion-controllers.module.js @@ -3,41 +3,41 @@ */ const Constants = { - Handedness: Object.freeze({ + Handedness: { NONE: 'none', LEFT: 'left', RIGHT: 'right' - }), + }, - ComponentState: Object.freeze({ + ComponentState: { DEFAULT: 'default', TOUCHED: 'touched', PRESSED: 'pressed' - }), + }, - ComponentProperty: Object.freeze({ + ComponentProperty: { BUTTON: 'button', X_AXIS: 'xAxis', Y_AXIS: 'yAxis', STATE: 'state' - }), + }, - ComponentType: Object.freeze({ + ComponentType: { TRIGGER: 'trigger', SQUEEZE: 'squeeze', TOUCHPAD: 'touchpad', THUMBSTICK: 'thumbstick', BUTTON: 'button' - }), + }, ButtonTouchThreshold: 0.05, AxisTouchThreshold: 0.1, - VisualResponseProperty: Object.freeze({ + VisualResponseProperty: { TRANSFORM: 'transform', VISIBILITY: 'visibility' - }) + } }; /** diff --git a/examples/jsm/libs/opentype.module.js b/examples/jsm/libs/opentype.module.js index 71032872dbe7e4..c8729119d8b190 100644 --- a/examples/jsm/libs/opentype.module.js +++ b/examples/jsm/libs/opentype.module.js @@ -1,3 +1,5 @@ +const { opentype, BoundingBox, Font, Glyph, Path, parse, load, loadSync, parseBuffer } = /* @__PURE__ */ ( () => { + /** * https://opentype.js.org v1.3.4 | (c) Frederik De Bleser and other contributors | MIT License | Uses tiny-inflate by Devon Govett and string.prototype.codepointat polyfill by Mathias Bynens */ @@ -14564,5 +14566,9 @@ var opentype = /*#__PURE__*/Object.freeze({ loadSync: loadSync }); +return { opentype, BoundingBox, Font, Glyph, Path, parse, load, loadSync, parseBuffer }; + +} )(); + export default opentype; export { BoundingBox, Font, Glyph, Path, parse as _parse, load, loadSync, parseBuffer as parse }; diff --git a/examples/jsm/libs/utif.module.js b/examples/jsm/libs/utif.module.js index 9a655bd26d1dfc..4869ca70fd3609 100644 --- a/examples/jsm/libs/utif.module.js +++ b/examples/jsm/libs/utif.module.js @@ -1,3 +1,5 @@ +const UTIF = /* @__PURE__ */ ( () => { + var UTIF = {}; // Following lines add a JPEG decoder to UTIF.JpegDecoder @@ -1662,4 +1664,8 @@ X { UniformsLib.line = { @@ -633,4 +634,8 @@ class LineMaterial extends ShaderMaterial { } +return LineMaterial; + +} )(); + export { LineMaterial }; diff --git a/examples/jsm/lines/LineSegments2.js b/examples/jsm/lines/LineSegments2.js index e2a3e2a14b9a24..8f8f1a4c12caee 100644 --- a/examples/jsm/lines/LineSegments2.js +++ b/examples/jsm/lines/LineSegments2.js @@ -13,21 +13,21 @@ import { import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js'; import { LineMaterial } from '../lines/LineMaterial.js'; -const _start = new Vector3(); -const _end = new Vector3(); +const _start = /* @__PURE__ */ new Vector3(); +const _end = /* @__PURE__ */ new Vector3(); -const _start4 = new Vector4(); -const _end4 = new Vector4(); +const _start4 = /* @__PURE__ */ new Vector4(); +const _end4 = /* @__PURE__ */ new Vector4(); -const _ssOrigin = new Vector4(); -const _ssOrigin3 = new Vector3(); -const _mvMatrix = new Matrix4(); -const _line = new Line3(); -const _closestPoint = new Vector3(); +const _ssOrigin = /* @__PURE__ */ new Vector4(); +const _ssOrigin3 = /* @__PURE__ */ new Vector3(); +const _mvMatrix = /* @__PURE__ */ new Matrix4(); +const _line = /* @__PURE__ */ new Line3(); +const _closestPoint = /* @__PURE__ */ new Vector3(); -const _box = new Box3(); -const _sphere = new Sphere(); -const _clipToWorldVector = new Vector4(); +const _box = /* @__PURE__ */ new Box3(); +const _sphere = /* @__PURE__ */ new Sphere(); +const _clipToWorldVector = /* @__PURE__ */ new Vector4(); let _ray, _lineWidth; diff --git a/examples/jsm/lines/LineSegmentsGeometry.js b/examples/jsm/lines/LineSegmentsGeometry.js index c7cf8774bc9c41..b7518f4bfbe58e 100644 --- a/examples/jsm/lines/LineSegmentsGeometry.js +++ b/examples/jsm/lines/LineSegmentsGeometry.js @@ -9,8 +9,8 @@ import { WireframeGeometry } from 'three'; -const _box = new Box3(); -const _vector = new Vector3(); +const _box = /* @__PURE__ */ new Box3(); +const _vector = /* @__PURE__ */ new Vector3(); class LineSegmentsGeometry extends InstancedBufferGeometry { diff --git a/examples/jsm/lines/Wireframe.js b/examples/jsm/lines/Wireframe.js index cfa65aa6d62dcb..6db8bb81c8a052 100644 --- a/examples/jsm/lines/Wireframe.js +++ b/examples/jsm/lines/Wireframe.js @@ -7,8 +7,8 @@ import { import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js'; import { LineMaterial } from '../lines/LineMaterial.js'; -const _start = new Vector3(); -const _end = new Vector3(); +const _start = /* @__PURE__ */ new Vector3(); +const _end = /* @__PURE__ */ new Vector3(); class Wireframe extends Mesh { diff --git a/examples/jsm/loaders/FBXLoader.js b/examples/jsm/loaders/FBXLoader.js index dbbcc9821a545a..a847393371509d 100644 --- a/examples/jsm/loaders/FBXLoader.js +++ b/examples/jsm/loaders/FBXLoader.js @@ -3942,8 +3942,8 @@ function getData( polygonVertexIndex, polygonIndex, vertexIndex, infoObject ) { } -const tempEuler = new Euler(); -const tempVec = new Vector3(); +const tempEuler = /* @__PURE__ */ new Euler(); +const tempVec = /* @__PURE__ */ new Vector3(); // generate transformation from FBX transform data // ref: https://help.autodesk.com/view/FBX/2017/ENU/?guid=__files_GUID_10CDD63C_79C1_4F2D_BB28_AD2BE65A02ED_htm diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 8436a3d2d6f61a..6d24550ec8d101 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -2030,7 +2030,7 @@ class GLTFCubicSplineInterpolant extends Interpolant { } -const _q = new Quaternion(); +const _q = /* @__PURE__ */ new Quaternion(); class GLTFCubicSplineQuaternionInterpolant extends GLTFCubicSplineInterpolant { @@ -2419,7 +2419,7 @@ function getImageURIMimeType( uri ) { } -const _identityMatrix = new Matrix4(); +const _identityMatrix = /* @__PURE__ */ new Matrix4(); /* GLTF PARSER */ diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index 3a2c1ca3727631..5edbbc6d3cbaff 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -71,6 +71,8 @@ import { } from '../libs/ktx-parse.module.js'; import { ZSTDDecoder } from '../libs/zstddec.module.js'; +const KTX2Loader = /* @__PURE__ */ ( () => { + const _taskCache = new WeakMap(); let _activeLoaders = 0; @@ -914,4 +916,8 @@ function parseColorSpace( container ) { } +return KTX2Loader; + +} )(); + export { KTX2Loader }; diff --git a/examples/jsm/loaders/LDrawLoader.js b/examples/jsm/loaders/LDrawLoader.js index 14ca28db63322c..793812d2af3c26 100644 --- a/examples/jsm/loaders/LDrawLoader.js +++ b/examples/jsm/loaders/LDrawLoader.js @@ -42,8 +42,8 @@ const MAIN_EDGE_COLOUR_CODE = '24'; const COLOR_SPACE_LDRAW = SRGBColorSpace; -const _tempVec0 = new Vector3(); -const _tempVec1 = new Vector3(); +const _tempVec0 = /* @__PURE__ */ new Vector3(); +const _tempVec1 = /* @__PURE__ */ new Vector3(); class LDrawConditionalLineMaterial extends ShaderMaterial { @@ -205,7 +205,7 @@ function generateFaceNormals( faces ) { } -const _ray = new Ray(); +const _ray = /* @__PURE__ */ new Ray(); function smoothNormals( faces, lineSegments, checkSubSegments = false ) { // NOTE: 1e2 is pretty coarse but was chosen to quantize the resulting value because diff --git a/examples/jsm/loaders/LogLuvLoader.js b/examples/jsm/loaders/LogLuvLoader.js index 310cdd6bd58418..089cd3668fcf3c 100644 --- a/examples/jsm/loaders/LogLuvLoader.js +++ b/examples/jsm/loaders/LogLuvLoader.js @@ -44,6 +44,8 @@ class LogLuvLoader extends DataTextureLoader { // from https://github.com/photopea/UTIF.js (MIT License) +const UTIF = /* @__PURE__ */ ( () => { + const UTIF = {}; UTIF.decode = function ( buff, prm ) { @@ -603,4 +605,8 @@ UTIF._copyTile = function ( tb, tw, th, b, w, h, xoff, yoff ) { }; +return UTIF; + +} )(); + export { LogLuvLoader }; diff --git a/examples/jsm/loaders/OBJLoader.js b/examples/jsm/loaders/OBJLoader.js index 7792458abce807..f3e79ac1e276da 100644 --- a/examples/jsm/loaders/OBJLoader.js +++ b/examples/jsm/loaders/OBJLoader.js @@ -25,14 +25,14 @@ const _material_use_pattern = /^usemtl /; const _map_use_pattern = /^usemap /; const _face_vertex_data_separator_pattern = /\s+/; -const _vA = new Vector3(); -const _vB = new Vector3(); -const _vC = new Vector3(); +const _vA = /* @__PURE__ */ new Vector3(); +const _vB = /* @__PURE__ */ new Vector3(); +const _vC = /* @__PURE__ */ new Vector3(); -const _ab = new Vector3(); -const _cb = new Vector3(); +const _ab = /* @__PURE__ */ new Vector3(); +const _cb = /* @__PURE__ */ new Vector3(); -const _color = new Color(); +const _color = /* @__PURE__ */ new Color(); function ParserState() { diff --git a/examples/jsm/loaders/PLYLoader.js b/examples/jsm/loaders/PLYLoader.js index 3834bfbfd36984..fd4c732f0a66f2 100644 --- a/examples/jsm/loaders/PLYLoader.js +++ b/examples/jsm/loaders/PLYLoader.js @@ -42,7 +42,7 @@ import { * */ -const _color = new Color(); +const _color = /* @__PURE__ */ new Color(); class PLYLoader extends Loader { diff --git a/examples/jsm/loaders/RGBMLoader.js b/examples/jsm/loaders/RGBMLoader.js index 44420c47869f37..6704a26d306c55 100644 --- a/examples/jsm/loaders/RGBMLoader.js +++ b/examples/jsm/loaders/RGBMLoader.js @@ -127,6 +127,8 @@ class RGBMLoader extends DataTextureLoader { // from https://github.com/photopea/UPNG.js (MIT License) +const UPNG = /* @__PURE__ */ ( () => { + var UPNG = {}; UPNG.toRGBA8 = function ( out ) { @@ -890,7 +892,7 @@ UPNG.decode._filterZero = function ( data, out, off, w, h ) { else if ( type == 1 ) { for ( ; x < bpp; x ++ ) data[ i + x ] = data[ di + x ]; - for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + data[ i + x - bpp ] ); + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + data[ i + x - bpp ] ); } else if ( type == 2 ) { @@ -899,12 +901,12 @@ UPNG.decode._filterZero = function ( data, out, off, w, h ) { } else if ( type == 3 ) { for ( ; x < bpp; x ++ ) data[ i + x ] = ( data[ di + x ] + ( data[ i + x - bpl ] >>> 1 ) ); - for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + ( ( data[ i + x - bpl ] + data[ i + x - bpp ] ) >>> 1 ) ); + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + ( ( data[ i + x - bpl ] + data[ i + x - bpp ] ) >>> 1 ) ); } else { for ( ; x < bpp; x ++ ) data[ i + x ] = ( data[ di + x ] + paeth( 0, data[ i + x - bpl ], 0 ) ); - for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + paeth( data[ i + x - bpp ], data[ i + x - bpl ], data[ i + x - bpp - bpl ] ) ); + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + paeth( data[ i + x - bpp ], data[ i + x - bpl ], data[ i + x - bpp - bpl ] ) ); } @@ -1062,4 +1064,8 @@ UPNG._copyTile = function ( sb, sw, sh, tb, tw, th, xoff, yoff, mode ) { }; +return UPNG; + +} )(); + export { RGBMLoader }; diff --git a/examples/jsm/loaders/VRMLLoader.js b/examples/jsm/loaders/VRMLLoader.js index e9df4fa36fad4b..7db34fa2d76acf 100644 --- a/examples/jsm/loaders/VRMLLoader.js +++ b/examples/jsm/loaders/VRMLLoader.js @@ -3275,7 +3275,7 @@ class VRMLLexer { } -const CstParser = chevrotain.CstParser; +const { CstParser } = chevrotain; class VRMLParser extends CstParser { diff --git a/examples/jsm/materials/MeshGouraudMaterial.js b/examples/jsm/materials/MeshGouraudMaterial.js index 21758cf43cd2d1..75087383e64065 100644 --- a/examples/jsm/materials/MeshGouraudMaterial.js +++ b/examples/jsm/materials/MeshGouraudMaterial.js @@ -7,19 +7,30 @@ import { UniformsUtils, UniformsLib, ShaderMaterial, Color, MultiplyOperation } from 'three'; +const { + common, + specularmap, + envmap, + aomap, + lightmap, + emissivemap, + fog, + lights, +} = UniformsLib; + const GouraudShader = { - uniforms: UniformsUtils.merge( [ - UniformsLib.common, - UniformsLib.specularmap, - UniformsLib.envmap, - UniformsLib.aomap, - UniformsLib.lightmap, - UniformsLib.emissivemap, - UniformsLib.fog, - UniformsLib.lights, + uniforms: /* @__PURE__ */ UniformsUtils.merge( [ + common, + specularmap, + envmap, + aomap, + lightmap, + emissivemap, + fog, + lights, { - emissive: { value: new Color( 0x000000 ) } + emissive: { value: /* @__PURE__ */ new Color( 0x000000 ) } } ] ), diff --git a/examples/jsm/math/Capsule.js b/examples/jsm/math/Capsule.js index 08f191c136e7e1..a6f6554567f8fe 100644 --- a/examples/jsm/math/Capsule.js +++ b/examples/jsm/math/Capsule.js @@ -2,9 +2,9 @@ import { Vector3 } from 'three'; -const _v1 = new Vector3(); -const _v2 = new Vector3(); -const _v3 = new Vector3(); +const _v1 = /* @__PURE__ */ new Vector3(); +const _v2 = /* @__PURE__ */ new Vector3(); +const _v3 = /* @__PURE__ */ new Vector3(); const EPS = 1e-10; diff --git a/examples/jsm/math/ConvexHull.js b/examples/jsm/math/ConvexHull.js index b1368a4ed8ea1a..46acf2712e8692 100644 --- a/examples/jsm/math/ConvexHull.js +++ b/examples/jsm/math/ConvexHull.js @@ -12,11 +12,11 @@ import { const Visible = 0; const Deleted = 1; -const _v1 = new Vector3(); -const _line3 = new Line3(); -const _plane = new Plane(); -const _closestPoint = new Vector3(); -const _triangle = new Triangle(); +const _v1 = /* @__PURE__ */ new Vector3(); +const _line3 = /* @__PURE__ */ new Line3(); +const _plane = /* @__PURE__ */ new Plane(); +const _closestPoint = /* @__PURE__ */ new Vector3(); +const _triangle = /* @__PURE__ */ new Triangle(); class ConvexHull { diff --git a/examples/jsm/math/ImprovedNoise.js b/examples/jsm/math/ImprovedNoise.js index 5647d1b208d9e4..c0e1b14f2529fe 100644 --- a/examples/jsm/math/ImprovedNoise.js +++ b/examples/jsm/math/ImprovedNoise.js @@ -1,6 +1,8 @@ // https://cs.nyu.edu/~perlin/noise/ -const _p = [ 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, +const _p = /* @__PURE__ */ ( () => { + + const _p = [ 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, @@ -11,11 +13,15 @@ const _p = [ 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 2 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180 ]; -for ( let i = 0; i < 256; i ++ ) { + for ( let i = 0; i < 256; i ++ ) { - _p[ 256 + i ] = _p[ i ]; + _p[ 256 + i ] = _p[ i ]; -} + } + + return _p; + +} )(); function fade( t ) { diff --git a/examples/jsm/math/MeshSurfaceSampler.js b/examples/jsm/math/MeshSurfaceSampler.js index da9dd93703d548..350c146c209365 100644 --- a/examples/jsm/math/MeshSurfaceSampler.js +++ b/examples/jsm/math/MeshSurfaceSampler.js @@ -15,9 +15,11 @@ import { * - https://stackoverflow.com/a/4322940/1314762 */ -const _face = new Triangle(); -const _color = new Vector3(); -const _uva = new Vector2(), _uvb = new Vector2(), _uvc = new Vector2(); +const _face = /* @__PURE__ */ new Triangle(); +const _color = /* @__PURE__ */ new Vector3(); +const _uva = /* @__PURE__ */ new Vector2(); +const _uvb = /* @__PURE__ */ new Vector2(); +const _uvc = /* @__PURE__ */ new Vector2(); class MeshSurfaceSampler { diff --git a/examples/jsm/math/OBB.js b/examples/jsm/math/OBB.js index 29ae1286dc39ba..76adbf02328f5f 100644 --- a/examples/jsm/math/OBB.js +++ b/examples/jsm/math/OBB.js @@ -11,13 +11,13 @@ import { const a = { c: null, // center - u: [ new Vector3(), new Vector3(), new Vector3() ], // basis vectors + u: [ /* @__PURE__ */ new Vector3(), /* @__PURE__ */ new Vector3(), /* @__PURE__ */ new Vector3() ], // basis vectors e: [] // half width }; const b = { c: null, // center - u: [ new Vector3(), new Vector3(), new Vector3() ], // basis vectors + u: [ /* @__PURE__ */ new Vector3(), /* @__PURE__ */ new Vector3(), /* @__PURE__ */ new Vector3() ], // basis vectors e: [] // half width }; @@ -25,17 +25,17 @@ const R = [[], [], []]; const AbsR = [[], [], []]; const t = []; -const xAxis = new Vector3(); -const yAxis = new Vector3(); -const zAxis = new Vector3(); -const v1 = new Vector3(); -const size = new Vector3(); -const closestPoint = new Vector3(); -const rotationMatrix = new Matrix3(); -const aabb = new Box3(); -const matrix = new Matrix4(); -const inverse = new Matrix4(); -const localRay = new Ray(); +const xAxis = /* @__PURE__ */ new Vector3(); +const yAxis = /* @__PURE__ */ new Vector3(); +const zAxis = /* @__PURE__ */ new Vector3(); +const v1 = /* @__PURE__ */ new Vector3(); +const size = /* @__PURE__ */ new Vector3(); +const closestPoint = /* @__PURE__ */ new Vector3(); +const rotationMatrix = /* @__PURE__ */ new Matrix3(); +const aabb = /* @__PURE__ */ new Box3(); +const matrix = /* @__PURE__ */ new Matrix4(); +const inverse = /* @__PURE__ */ new Matrix4(); +const localRay = /* @__PURE__ */ new Ray(); // OBB @@ -418,6 +418,6 @@ class OBB { } -const obb = new OBB(); +const obb = /* @__PURE__ */ new OBB(); export { OBB }; diff --git a/examples/jsm/math/Octree.js b/examples/jsm/math/Octree.js index fda28705cf8488..b20d2f02b95df2 100644 --- a/examples/jsm/math/Octree.js +++ b/examples/jsm/math/Octree.js @@ -9,13 +9,13 @@ import { import { Capsule } from '../math/Capsule.js'; -const _v1 = new Vector3(); -const _v2 = new Vector3(); -const _plane = new Plane(); -const _line1 = new Line3(); -const _line2 = new Line3(); -const _sphere = new Sphere(); -const _capsule = new Capsule(); +const _v1 = /* @__PURE__ */ new Vector3(); +const _v2 = /* @__PURE__ */ new Vector3(); +const _plane = /* @__PURE__ */ new Plane(); +const _line1 = /* @__PURE__ */ new Line3(); +const _line2 = /* @__PURE__ */ new Line3(); +const _sphere = /* @__PURE__ */ new Sphere(); +const _capsule = /* @__PURE__ */ new Capsule(); class Octree { diff --git a/examples/jsm/misc/ConvexObjectBreaker.js b/examples/jsm/misc/ConvexObjectBreaker.js index 69e2aa3fa7e216..378559b24355a9 100644 --- a/examples/jsm/misc/ConvexObjectBreaker.js +++ b/examples/jsm/misc/ConvexObjectBreaker.js @@ -35,7 +35,7 @@ import { ConvexGeometry } from '../geometries/ConvexGeometry.js'; * */ -const _v1 = new Vector3(); +const _v1 = /* @__PURE__ */ new Vector3(); class ConvexObjectBreaker { diff --git a/examples/jsm/misc/Gyroscope.js b/examples/jsm/misc/Gyroscope.js index 9269c9c819112d..c508eec3f2a800 100644 --- a/examples/jsm/misc/Gyroscope.js +++ b/examples/jsm/misc/Gyroscope.js @@ -4,13 +4,13 @@ import { Vector3 } from 'three'; -const _translationObject = new Vector3(); -const _quaternionObject = new Quaternion(); -const _scaleObject = new Vector3(); +const _translationObject = /* @__PURE__ */ new Vector3(); +const _quaternionObject = /* @__PURE__ */ new Quaternion(); +const _scaleObject = /* @__PURE__ */ new Vector3(); -const _translationWorld = new Vector3(); -const _quaternionWorld = new Quaternion(); -const _scaleWorld = new Vector3(); +const _translationWorld = /* @__PURE__ */ new Vector3(); +const _quaternionWorld = /* @__PURE__ */ new Quaternion(); +const _scaleWorld = /* @__PURE__ */ new Vector3(); class Gyroscope extends Object3D { diff --git a/examples/jsm/modifiers/CurveModifier.js b/examples/jsm/modifiers/CurveModifier.js index fc3f49c2761c87..d856d01847402e 100644 --- a/examples/jsm/modifiers/CurveModifier.js +++ b/examples/jsm/modifiers/CurveModifier.js @@ -248,7 +248,7 @@ export class Flow { } } -const matrix = new Matrix4(); +const matrix = /* @__PURE__ */ new Matrix4(); /** * A helper class for creating instanced versions of flow, where the instances are placed on the curve. diff --git a/examples/jsm/modifiers/EdgeSplitModifier.js b/examples/jsm/modifiers/EdgeSplitModifier.js index 4ae83add37ff5e..0505ccebe00c5c 100644 --- a/examples/jsm/modifiers/EdgeSplitModifier.js +++ b/examples/jsm/modifiers/EdgeSplitModifier.js @@ -5,9 +5,9 @@ import { } from 'three'; import * as BufferGeometryUtils from '../utils/BufferGeometryUtils.js'; -const _A = new Vector3(); -const _B = new Vector3(); -const _C = new Vector3(); +const _A = /* @__PURE__ */ new Vector3(); +const _B = /* @__PURE__ */ new Vector3(); +const _C = /* @__PURE__ */ new Vector3(); class EdgeSplitModifier { diff --git a/examples/jsm/modifiers/SimplifyModifier.js b/examples/jsm/modifiers/SimplifyModifier.js index a3be03080d4d1b..4544c55c4c238e 100644 --- a/examples/jsm/modifiers/SimplifyModifier.js +++ b/examples/jsm/modifiers/SimplifyModifier.js @@ -15,7 +15,8 @@ import * as BufferGeometryUtils from '../utils/BufferGeometryUtils.js'; * - http://www.melax.com/polychop/ */ -const _cb = new Vector3(), _ab = new Vector3(); +const _cb = /* @__PURE__ */ new Vector3(); +const _ab = /* @__PURE__ */ new Vector3(); class SimplifyModifier { diff --git a/examples/jsm/objects/Lensflare.js b/examples/jsm/objects/Lensflare.js index 42436dcee99208..f2cd4997dada2d 100644 --- a/examples/jsm/objects/Lensflare.js +++ b/examples/jsm/objects/Lensflare.js @@ -15,6 +15,8 @@ import { Vector4 } from 'three'; +const { Lensflare, LensflareElement } = /* @__PURE__ */ ( () => { + class Lensflare extends Mesh { constructor() { @@ -391,4 +393,8 @@ Lensflare.Geometry = ( function () { } )(); +return { Lensflare, LensflareElement }; + +} )(); + export { Lensflare, LensflareElement }; diff --git a/examples/jsm/objects/Reflector.js b/examples/jsm/objects/Reflector.js index a175403048733a..40ca3542685ee7 100644 --- a/examples/jsm/objects/Reflector.js +++ b/examples/jsm/objects/Reflector.js @@ -12,6 +12,8 @@ import { HalfFloatType } from 'three'; +const Reflector = /* @__PURE__ */ ( () => { + class Reflector extends Mesh { constructor( geometry, options = {} ) { @@ -261,4 +263,8 @@ Reflector.ReflectorShader = { }` }; +return Reflector; + +} )(); + export { Reflector }; diff --git a/examples/jsm/objects/ReflectorForSSRPass.js b/examples/jsm/objects/ReflectorForSSRPass.js index fd5fc0b0fcce6f..d1d8550c812317 100644 --- a/examples/jsm/objects/ReflectorForSSRPass.js +++ b/examples/jsm/objects/ReflectorForSSRPass.js @@ -15,6 +15,8 @@ import { HalfFloatType } from 'three'; +const ReflectorForSSRPass = /* @__PURE__ */ ( () => { + class ReflectorForSSRPass extends Mesh { constructor( geometry, options = {} ) { @@ -261,16 +263,16 @@ ReflectorForSSRPass.ReflectorShader = { color: { value: null }, tDiffuse: { value: null }, tDepth: { value: null }, - textureMatrix: { value: new Matrix4() }, + textureMatrix: { value: /* @__PURE__ */ new Matrix4() }, maxDistance: { value: 180 }, opacity: { value: 0.5 }, fresnelCoe: { value: null }, virtualCameraNear: { value: null }, virtualCameraFar: { value: null }, - virtualCameraProjectionMatrix: { value: new Matrix4() }, - virtualCameraMatrixWorld: { value: new Matrix4() }, - virtualCameraProjectionMatrixInverse: { value: new Matrix4() }, - resolution: { value: new Vector2() }, + virtualCameraProjectionMatrix: { value: /* @__PURE__ */ new Matrix4() }, + virtualCameraMatrixWorld: { value: /* @__PURE__ */ new Matrix4() }, + virtualCameraProjectionMatrixInverse: { value: /* @__PURE__ */ new Matrix4() }, + resolution: { value: /* @__PURE__ */ new Vector2() }, }, @@ -346,4 +348,8 @@ ReflectorForSSRPass.ReflectorShader = { `, }; +return ReflectorForSSRPass; + +} )(); + export { ReflectorForSSRPass }; diff --git a/examples/jsm/objects/Refractor.js b/examples/jsm/objects/Refractor.js index 5d557a6a86db19..e49130d223c818 100644 --- a/examples/jsm/objects/Refractor.js +++ b/examples/jsm/objects/Refractor.js @@ -13,6 +13,8 @@ import { HalfFloatType } from 'three'; +const Refractor = /* @__PURE__ */ ( () => { + class Refractor extends Mesh { constructor( geometry, options = {} ) { @@ -321,4 +323,8 @@ Refractor.RefractorShader = { }; +return Refractor; + +} )(); + export { Refractor }; diff --git a/examples/jsm/objects/ShadowMesh.js b/examples/jsm/objects/ShadowMesh.js index d43236a4954dde..c545e4b1930bf1 100644 --- a/examples/jsm/objects/ShadowMesh.js +++ b/examples/jsm/objects/ShadowMesh.js @@ -10,7 +10,7 @@ import { * A shadow Mesh that follows a shadow-casting Mesh in the scene, but is confined to a single plane. */ -const _shadowMatrix = new Matrix4(); +const _shadowMatrix = /* @__PURE__ */ new Matrix4(); class ShadowMesh extends Mesh { diff --git a/examples/jsm/objects/Sky.js b/examples/jsm/objects/Sky.js index 68908bb9c0833b..d673402e892501 100644 --- a/examples/jsm/objects/Sky.js +++ b/examples/jsm/objects/Sky.js @@ -21,6 +21,8 @@ import { * Three.js integration by zz85 http://twitter.com/blurspline */ +const Sky = /* @__PURE__ */ ( () => { + class Sky extends Mesh { constructor() { @@ -51,8 +53,8 @@ Sky.SkyShader = { 'rayleigh': { value: 1 }, 'mieCoefficient': { value: 0.005 }, 'mieDirectionalG': { value: 0.8 }, - 'sunPosition': { value: new Vector3() }, - 'up': { value: new Vector3( 0, 1, 0 ) } + 'sunPosition': { value: /* @__PURE__ */ new Vector3() }, + 'up': { value: /* @__PURE__ */ new Vector3( 0, 1, 0 ) } }, vertexShader: /* glsl */` @@ -214,4 +216,8 @@ Sky.SkyShader = { }; +return Sky; + +} )(); + export { Sky }; diff --git a/examples/jsm/objects/Water2.js b/examples/jsm/objects/Water2.js index 4989b953334020..4f54c4e323e9a1 100644 --- a/examples/jsm/objects/Water2.js +++ b/examples/jsm/objects/Water2.js @@ -21,6 +21,8 @@ import { Refractor } from '../objects/Refractor.js'; * */ +const Water = /* @__PURE__ */ ( () => { + class Water extends Mesh { constructor( geometry, options = {} ) { @@ -244,7 +246,7 @@ Water.WaterShader = { 'config': { type: 'v4', - value: new Vector4() + value: /* @__PURE__ */ new Vector4() } }, @@ -355,4 +357,8 @@ Water.WaterShader = { }; +return Water; + +} )(); + export { Water }; diff --git a/examples/jsm/physics/RapierPhysics.js b/examples/jsm/physics/RapierPhysics.js index 8f55433b606f09..797cb9a640eacf 100644 --- a/examples/jsm/physics/RapierPhysics.js +++ b/examples/jsm/physics/RapierPhysics.js @@ -4,8 +4,8 @@ const RAPIER_PATH = 'https://cdn.skypack.dev/@dimforge/rapier3d-compat@0.11.2'; const frameRate = 60; -const _scale = new Vector3( 1, 1, 1 ); -const ZERO = new Vector3(); +const _scale = /* @__PURE__ */ new Vector3( 1, 1, 1 ); +const ZERO = /* @__PURE__ */ new Vector3(); let RAPIER = null; diff --git a/examples/jsm/postprocessing/BloomPass.js b/examples/jsm/postprocessing/BloomPass.js index 14b0554d1bcf88..905102337b6c54 100644 --- a/examples/jsm/postprocessing/BloomPass.js +++ b/examples/jsm/postprocessing/BloomPass.js @@ -9,6 +9,8 @@ import { import { Pass, FullScreenQuad } from './Pass.js'; import { ConvolutionShader } from '../shaders/ConvolutionShader.js'; +const BloomPass = /* @__PURE__ */ ( () => { + class BloomPass extends Pass { constructor( strength = 1, kernelSize = 25, sigma = 4 ) { @@ -166,7 +168,11 @@ const CombineShader = { }; -BloomPass.blurX = new Vector2( 0.001953125, 0.0 ); -BloomPass.blurY = new Vector2( 0.0, 0.001953125 ); +BloomPass.blurX = /* @__PURE__ */ new Vector2( 0.001953125, 0.0 ); +BloomPass.blurY = /* @__PURE__ */ new Vector2( 0.0, 0.001953125 ); + +return BloomPass; + +} )(); export { BloomPass }; diff --git a/examples/jsm/postprocessing/OutlinePass.js b/examples/jsm/postprocessing/OutlinePass.js index f96a7f46fd9ca3..9169f39fcde615 100644 --- a/examples/jsm/postprocessing/OutlinePass.js +++ b/examples/jsm/postprocessing/OutlinePass.js @@ -16,6 +16,8 @@ import { import { Pass, FullScreenQuad } from './Pass.js'; import { CopyShader } from '../shaders/CopyShader.js'; +const OutlinePass = /* @__PURE__ */ ( () => { + class OutlinePass extends Pass { constructor( resolution, scene, camera, selectedObjects ) { @@ -648,7 +650,11 @@ class OutlinePass extends Pass { } -OutlinePass.BlurDirectionX = new Vector2( 1.0, 0.0 ); -OutlinePass.BlurDirectionY = new Vector2( 0.0, 1.0 ); +OutlinePass.BlurDirectionX = /* @__PURE__ */ new Vector2( 1.0, 0.0 ); +OutlinePass.BlurDirectionY = /* @__PURE__ */ new Vector2( 0.0, 1.0 ); + +return OutlinePass; + +} )(); export { OutlinePass }; diff --git a/examples/jsm/postprocessing/Pass.js b/examples/jsm/postprocessing/Pass.js index a81582d13de21a..f62d2fe9f73249 100644 --- a/examples/jsm/postprocessing/Pass.js +++ b/examples/jsm/postprocessing/Pass.js @@ -39,7 +39,7 @@ class Pass { // Helper for passes that need to fill the viewport with a single quad. -const _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); +const _camera = /* @__PURE__ */ new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); // https://github.com/mrdoob/three.js/pull/21358 @@ -56,7 +56,7 @@ class FullscreenTriangleGeometry extends BufferGeometry { } -const _geometry = new FullscreenTriangleGeometry(); +const _geometry = /* @__PURE__ */ new FullscreenTriangleGeometry(); class FullScreenQuad { diff --git a/examples/jsm/postprocessing/SAOPass.js b/examples/jsm/postprocessing/SAOPass.js index 09061c5ef0bf21..68681523a52bc5 100644 --- a/examples/jsm/postprocessing/SAOPass.js +++ b/examples/jsm/postprocessing/SAOPass.js @@ -27,6 +27,8 @@ import { CopyShader } from '../shaders/CopyShader.js'; * SAO implementation inspired from bhouston previous SAO work */ +const SAOPass = /* @__PURE__ */ ( () => { + class SAOPass extends Pass { constructor( scene, camera, resolution = new Vector2( 256, 256 ) ) { @@ -333,4 +335,8 @@ SAOPass.OUTPUT = { 'Normal': 2 }; +return SAOPass; + +} )(); + export { SAOPass }; diff --git a/examples/jsm/postprocessing/SSAOPass.js b/examples/jsm/postprocessing/SSAOPass.js index f011e1aac340a8..26f16c5448394e 100644 --- a/examples/jsm/postprocessing/SSAOPass.js +++ b/examples/jsm/postprocessing/SSAOPass.js @@ -30,6 +30,8 @@ import { SSAOBlurShader } from '../shaders/SSAOShader.js'; import { SSAODepthShader } from '../shaders/SSAOShader.js'; import { CopyShader } from '../shaders/CopyShader.js'; +const SSAOPass = /* @__PURE__ */ ( () => { + class SSAOPass extends Pass { constructor( scene, camera, width, height, kernelSize = 32 ) { @@ -417,4 +419,8 @@ SSAOPass.OUTPUT = { 'Normal': 4 }; +return SSAOPass; + +} )(); + export { SSAOPass }; diff --git a/examples/jsm/postprocessing/SSRPass.js b/examples/jsm/postprocessing/SSRPass.js index a1429c5c4a655c..7eb47709645a67 100644 --- a/examples/jsm/postprocessing/SSRPass.js +++ b/examples/jsm/postprocessing/SSRPass.js @@ -21,6 +21,8 @@ import { SSRBlurShader } from '../shaders/SSRShader.js'; import { SSRDepthShader } from '../shaders/SSRShader.js'; import { CopyShader } from '../shaders/CopyShader.js'; +const SSRPass = /* @__PURE__ */ ( () => { + class SSRPass extends Pass { constructor( { renderer, scene, camera, width, height, selects, bouncing = false, groundReflector } ) { @@ -638,4 +640,8 @@ SSRPass.OUTPUT = { 'Metalness': 7, }; +return SSRPass; + +} )(); + export { SSRPass }; diff --git a/examples/jsm/postprocessing/UnrealBloomPass.js b/examples/jsm/postprocessing/UnrealBloomPass.js index a53754288d9890..c49b6e4d0f57a3 100644 --- a/examples/jsm/postprocessing/UnrealBloomPass.js +++ b/examples/jsm/postprocessing/UnrealBloomPass.js @@ -22,6 +22,8 @@ import { LuminosityHighPassShader } from '../shaders/LuminosityHighPassShader.js * Reference: * - https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/ */ +const UnrealBloomPass = /* @__PURE__ */ ( () => { + class UnrealBloomPass extends Pass { constructor( resolution, strength, radius, threshold ) { @@ -409,7 +411,11 @@ class UnrealBloomPass extends Pass { } -UnrealBloomPass.BlurDirectionX = new Vector2( 1.0, 0.0 ); -UnrealBloomPass.BlurDirectionY = new Vector2( 0.0, 1.0 ); +UnrealBloomPass.BlurDirectionX = /* @__PURE__ */ new Vector2( 1.0, 0.0 ); +UnrealBloomPass.BlurDirectionY = /* @__PURE__ */ new Vector2( 0.0, 1.0 ); + +return UnrealBloomPass; + +} )(); export { UnrealBloomPass }; diff --git a/examples/jsm/renderers/CSS2DRenderer.js b/examples/jsm/renderers/CSS2DRenderer.js index 6d67931b97ff44..fe78adc5b039f6 100644 --- a/examples/jsm/renderers/CSS2DRenderer.js +++ b/examples/jsm/renderers/CSS2DRenderer.js @@ -54,11 +54,11 @@ class CSS2DObject extends Object3D { // -const _vector = new Vector3(); -const _viewMatrix = new Matrix4(); -const _viewProjectionMatrix = new Matrix4(); -const _a = new Vector3(); -const _b = new Vector3(); +const _vector = /* @__PURE__ */ new Vector3(); +const _viewMatrix = /* @__PURE__ */ new Matrix4(); +const _viewProjectionMatrix = /* @__PURE__ */ new Matrix4(); +const _a = /* @__PURE__ */ new Vector3(); +const _b = /* @__PURE__ */ new Vector3(); class CSS2DRenderer { diff --git a/examples/jsm/renderers/CSS3DRenderer.js b/examples/jsm/renderers/CSS3DRenderer.js index 0dffeeaef4eed4..8473efeb5766bd 100644 --- a/examples/jsm/renderers/CSS3DRenderer.js +++ b/examples/jsm/renderers/CSS3DRenderer.js @@ -9,9 +9,9 @@ import { * Based on http://www.emagix.net/academic/mscs-project/item/camera-sync-with-css3-and-webgl-threejs */ -const _position = new Vector3(); -const _quaternion = new Quaternion(); -const _scale = new Vector3(); +const _position = /* @__PURE__ */ new Vector3(); +const _quaternion = /* @__PURE__ */ new Quaternion(); +const _scale = /* @__PURE__ */ new Vector3(); class CSS3DObject extends Object3D { @@ -82,8 +82,8 @@ class CSS3DSprite extends CSS3DObject { // -const _matrix = new Matrix4(); -const _matrix2 = new Matrix4(); +const _matrix = /* @__PURE__ */ new Matrix4(); +const _matrix2 = /* @__PURE__ */ new Matrix4(); class CSS3DRenderer { diff --git a/examples/jsm/shaders/BokehShader2.js b/examples/jsm/shaders/BokehShader2.js index 80190f8731fbfa..e2c798e6b9e607 100644 --- a/examples/jsm/shaders/BokehShader2.js +++ b/examples/jsm/shaders/BokehShader2.js @@ -43,7 +43,7 @@ const BokehShader = { 'pentagon': { value: 0 }, 'shaderFocus': { value: 1 }, - 'focusCoords': { value: new Vector2() } + 'focusCoords': { value: /* @__PURE__ */ new Vector2() } }, diff --git a/examples/jsm/shaders/ColorCorrectionShader.js b/examples/jsm/shaders/ColorCorrectionShader.js index df93a63ff9ec47..7ee506308148ac 100644 --- a/examples/jsm/shaders/ColorCorrectionShader.js +++ b/examples/jsm/shaders/ColorCorrectionShader.js @@ -11,9 +11,9 @@ const ColorCorrectionShader = { uniforms: { 'tDiffuse': { value: null }, - 'powRGB': { value: new Vector3( 2, 2, 2 ) }, - 'mulRGB': { value: new Vector3( 1, 1, 1 ) }, - 'addRGB': { value: new Vector3( 0, 0, 0 ) } + 'powRGB': { value: /* @__PURE__ */ new Vector3( 2, 2, 2 ) }, + 'mulRGB': { value: /* @__PURE__ */ new Vector3( 1, 1, 1 ) }, + 'addRGB': { value: /* @__PURE__ */ new Vector3( 0, 0, 0 ) } }, diff --git a/examples/jsm/shaders/ColorifyShader.js b/examples/jsm/shaders/ColorifyShader.js index 12bced7ea66b6c..9271bfd7fb6616 100644 --- a/examples/jsm/shaders/ColorifyShader.js +++ b/examples/jsm/shaders/ColorifyShader.js @@ -13,7 +13,7 @@ const ColorifyShader = { uniforms: { 'tDiffuse': { value: null }, - 'color': { value: new Color( 0xffffff ) } + 'color': { value: /* @__PURE__ */ new Color( 0xffffff ) } }, diff --git a/examples/jsm/shaders/ConvolutionShader.js b/examples/jsm/shaders/ConvolutionShader.js index 774b2090eae76d..51f15b40154059 100644 --- a/examples/jsm/shaders/ConvolutionShader.js +++ b/examples/jsm/shaders/ConvolutionShader.js @@ -21,7 +21,7 @@ const ConvolutionShader = { uniforms: { 'tDiffuse': { value: null }, - 'uImageIncrement': { value: new Vector2( 0.001953125, 0.0 ) }, + 'uImageIncrement': { value: /* @__PURE__ */ new Vector2( 0.001953125, 0.0 ) }, 'cKernel': { value: [] } }, diff --git a/examples/jsm/shaders/DepthLimitedBlurShader.js b/examples/jsm/shaders/DepthLimitedBlurShader.js index d8a933483c6f8b..799049df552963 100644 --- a/examples/jsm/shaders/DepthLimitedBlurShader.js +++ b/examples/jsm/shaders/DepthLimitedBlurShader.js @@ -14,8 +14,8 @@ const DepthLimitedBlurShader = { }, uniforms: { 'tDiffuse': { value: null }, - 'size': { value: new Vector2( 512, 512 ) }, - 'sampleUvOffsets': { value: [ new Vector2( 0, 0 ) ] }, + 'size': { value: /* @__PURE__ */ new Vector2( 512, 512 ) }, + 'sampleUvOffsets': { value: [ /* @__PURE__ */ new Vector2( 0, 0 ) ] }, 'sampleWeights': { value: [ 1.0 ] }, 'tDepth': { value: null }, 'cameraNear': { value: 10 }, diff --git a/examples/jsm/shaders/DotScreenShader.js b/examples/jsm/shaders/DotScreenShader.js index 6adac2e54ff25a..cbaf5d3b58aa52 100644 --- a/examples/jsm/shaders/DotScreenShader.js +++ b/examples/jsm/shaders/DotScreenShader.js @@ -15,8 +15,8 @@ const DotScreenShader = { uniforms: { 'tDiffuse': { value: null }, - 'tSize': { value: new Vector2( 256, 256 ) }, - 'center': { value: new Vector2( 0.5, 0.5 ) }, + 'tSize': { value: /* @__PURE__ */ new Vector2( 256, 256 ) }, + 'center': { value: /* @__PURE__ */ new Vector2( 0.5, 0.5 ) }, 'angle': { value: 1.57 }, 'scale': { value: 1.0 } diff --git a/examples/jsm/shaders/FXAAShader.js b/examples/jsm/shaders/FXAAShader.js index 299a792e7340e7..1683ea0aeab493 100644 --- a/examples/jsm/shaders/FXAAShader.js +++ b/examples/jsm/shaders/FXAAShader.js @@ -15,7 +15,7 @@ const FXAAShader = { uniforms: { 'tDiffuse': { value: null }, - 'resolution': { value: new Vector2( 1 / 1024, 1 / 512 ) } + 'resolution': { value: /* @__PURE__ */ new Vector2( 1 / 1024, 1 / 512 ) } }, diff --git a/examples/jsm/shaders/FreiChenShader.js b/examples/jsm/shaders/FreiChenShader.js index 2a85f2f938c224..a39eced85e059b 100644 --- a/examples/jsm/shaders/FreiChenShader.js +++ b/examples/jsm/shaders/FreiChenShader.js @@ -14,7 +14,7 @@ const FreiChenShader = { uniforms: { 'tDiffuse': { value: null }, - 'aspect': { value: new Vector2( 512, 512 ) } + 'aspect': { value: /* @__PURE__ */ new Vector2( 512, 512 ) } }, vertexShader: /* glsl */` diff --git a/examples/jsm/shaders/GodRaysShader.js b/examples/jsm/shaders/GodRaysShader.js index 65afbb135e7104..dd8f25865ac3ee 100644 --- a/examples/jsm/shaders/GodRaysShader.js +++ b/examples/jsm/shaders/GodRaysShader.js @@ -83,7 +83,7 @@ const GodRaysGenerateShader = { value: 1.0 }, vSunPositionScreenSpace: { - value: new Vector3() + value: /* @__PURE__ */ new Vector3() } }, @@ -254,7 +254,7 @@ const GodRaysFakeSunShader = { uniforms: { vSunPositionScreenSpace: { - value: new Vector3() + value: /* @__PURE__ */ new Vector3() }, fAspect: { @@ -262,11 +262,11 @@ const GodRaysFakeSunShader = { }, sunColor: { - value: new Color( 0xffee00 ) + value: /* @__PURE__ */ new Color( 0xffee00 ) }, bgColor: { - value: new Color( 0x000000 ) + value: /* @__PURE__ */ new Color( 0x000000 ) } }, diff --git a/examples/jsm/shaders/LuminosityHighPassShader.js b/examples/jsm/shaders/LuminosityHighPassShader.js index 38937db7ad6b39..dcf6750b93db57 100644 --- a/examples/jsm/shaders/LuminosityHighPassShader.js +++ b/examples/jsm/shaders/LuminosityHighPassShader.js @@ -16,7 +16,7 @@ const LuminosityHighPassShader = { 'tDiffuse': { value: null }, 'luminosityThreshold': { value: 1.0 }, 'smoothWidth': { value: 1.0 }, - 'defaultColor': { value: new Color( 0x000000 ) }, + 'defaultColor': { value: /* @__PURE__ */ new Color( 0x000000 ) }, 'defaultOpacity': { value: 0.0 } }, diff --git a/examples/jsm/shaders/MMDToonShader.js b/examples/jsm/shaders/MMDToonShader.js index 7c8a3cff0dd2f9..9cfbab05499df8 100644 --- a/examples/jsm/shaders/MMDToonShader.js +++ b/examples/jsm/shaders/MMDToonShader.js @@ -69,7 +69,7 @@ const mmd_toon_matcap_fragment = /* glsl */` #endif `; -const MMDToonShader = { +const MMDToonShader = /* @__PURE__ */ ( () => ( { defines: { TOON: true, @@ -77,7 +77,7 @@ const MMDToonShader = { MATCAP_BLENDING_ADD: true, }, - uniforms: UniformsUtils.merge( [ + uniforms: /* @__PURE__ */ UniformsUtils.merge( [ ShaderLib.toon.uniforms, ShaderLib.phong.uniforms, ShaderLib.matcap.uniforms, @@ -127,6 +127,6 @@ const MMDToonShader = { ` ) -}; +} ) )(); export { MMDToonShader }; diff --git a/examples/jsm/shaders/NormalMapShader.js b/examples/jsm/shaders/NormalMapShader.js index ecc88da6eefdc6..fba74c5e3b4bf9 100644 --- a/examples/jsm/shaders/NormalMapShader.js +++ b/examples/jsm/shaders/NormalMapShader.js @@ -12,8 +12,8 @@ const NormalMapShader = { uniforms: { 'heightMap': { value: null }, - 'resolution': { value: new Vector2( 512, 512 ) }, - 'scale': { value: new Vector2( 1, 1 ) }, + 'resolution': { value: /* @__PURE__ */ new Vector2( 512, 512 ) }, + 'scale': { value: /* @__PURE__ */ new Vector2( 1, 1 ) }, 'height': { value: 0.05 } }, diff --git a/examples/jsm/shaders/OutputShader.js b/examples/jsm/shaders/OutputShader.js index cf7a18ae7f9de8..03c5479bf54a7e 100644 --- a/examples/jsm/shaders/OutputShader.js +++ b/examples/jsm/shaders/OutputShader.js @@ -1,7 +1,3 @@ -import { - ShaderChunk -} from 'three'; - const OutputShader = { uniforms: { @@ -35,7 +31,8 @@ const OutputShader = { uniform sampler2D tDiffuse; - ` + ShaderChunk[ 'tonemapping_pars_fragment' ] + ShaderChunk[ 'colorspace_pars_fragment' ] + ` + #include + #include varying vec2 vUv; diff --git a/examples/jsm/shaders/SAOShader.js b/examples/jsm/shaders/SAOShader.js index 751865308dcfb4..51248b64e4a8d3 100644 --- a/examples/jsm/shaders/SAOShader.js +++ b/examples/jsm/shaders/SAOShader.js @@ -19,12 +19,12 @@ const SAOShader = { 'tDepth': { value: null }, 'tDiffuse': { value: null }, 'tNormal': { value: null }, - 'size': { value: new Vector2( 512, 512 ) }, + 'size': { value: /* @__PURE__ */ new Vector2( 512, 512 ) }, 'cameraNear': { value: 1 }, 'cameraFar': { value: 100 }, - 'cameraProjectionMatrix': { value: new Matrix4() }, - 'cameraInverseProjectionMatrix': { value: new Matrix4() }, + 'cameraProjectionMatrix': { value: /* @__PURE__ */ new Matrix4() }, + 'cameraInverseProjectionMatrix': { value: /* @__PURE__ */ new Matrix4() }, 'scale': { value: 1.0 }, 'intensity': { value: 0.1 }, diff --git a/examples/jsm/shaders/SMAAShader.js b/examples/jsm/shaders/SMAAShader.js index d1bfb47e213df5..8441560e0db16f 100644 --- a/examples/jsm/shaders/SMAAShader.js +++ b/examples/jsm/shaders/SMAAShader.js @@ -19,7 +19,7 @@ const SMAAEdgesShader = { uniforms: { 'tDiffuse': { value: null }, - 'resolution': { value: new Vector2( 1 / 1024, 1 / 512 ) } + 'resolution': { value: /* @__PURE__ */ new Vector2( 1 / 1024, 1 / 512 ) } }, @@ -129,7 +129,7 @@ const SMAAWeightsShader = { 'tDiffuse': { value: null }, 'tArea': { value: null }, 'tSearch': { value: null }, - 'resolution': { value: new Vector2( 1 / 1024, 1 / 512 ) } + 'resolution': { value: /* @__PURE__ */ new Vector2( 1 / 1024, 1 / 512 ) } }, @@ -373,7 +373,7 @@ const SMAABlendShader = { 'tDiffuse': { value: null }, 'tColor': { value: null }, - 'resolution': { value: new Vector2( 1 / 1024, 1 / 512 ) } + 'resolution': { value: /* @__PURE__ */ new Vector2( 1 / 1024, 1 / 512 ) } }, diff --git a/examples/jsm/shaders/SSAOShader.js b/examples/jsm/shaders/SSAOShader.js index 0f8c1e08efdff6..24a002d61d4160 100644 --- a/examples/jsm/shaders/SSAOShader.js +++ b/examples/jsm/shaders/SSAOShader.js @@ -25,9 +25,9 @@ const SSAOShader = { 'kernel': { value: null }, 'cameraNear': { value: null }, 'cameraFar': { value: null }, - 'resolution': { value: new Vector2() }, - 'cameraProjectionMatrix': { value: new Matrix4() }, - 'cameraInverseProjectionMatrix': { value: new Matrix4() }, + 'resolution': { value: /* @__PURE__ */ new Vector2() }, + 'cameraProjectionMatrix': { value: /* @__PURE__ */ new Matrix4() }, + 'cameraInverseProjectionMatrix': { value: /* @__PURE__ */ new Matrix4() }, 'kernelRadius': { value: 8 }, 'minDistance': { value: 0.005 }, 'maxDistance': { value: 0.05 }, @@ -247,7 +247,7 @@ const SSAOBlurShader = { uniforms: { 'tDiffuse': { value: null }, - 'resolution': { value: new Vector2() } + 'resolution': { value: /* @__PURE__ */ new Vector2() } }, diff --git a/examples/jsm/shaders/SSRShader.js b/examples/jsm/shaders/SSRShader.js index 54455f6743d0d8..844e60b81d9301 100644 --- a/examples/jsm/shaders/SSRShader.js +++ b/examples/jsm/shaders/SSRShader.js @@ -26,9 +26,9 @@ const SSRShader = { 'tDepth': { value: null }, 'cameraNear': { value: null }, 'cameraFar': { value: null }, - 'resolution': { value: new Vector2() }, - 'cameraProjectionMatrix': { value: new Matrix4() }, - 'cameraInverseProjectionMatrix': { value: new Matrix4() }, + 'resolution': { value: /* @__PURE__ */ new Vector2() }, + 'cameraProjectionMatrix': { value: /* @__PURE__ */ new Matrix4() }, + 'cameraInverseProjectionMatrix': { value: /* @__PURE__ */ new Matrix4() }, 'opacity': { value: .5 }, 'maxDistance': { value: 180 }, 'cameraRange': { value: 0 }, @@ -303,7 +303,7 @@ const SSRBlurShader = { uniforms: { 'tDiffuse': { value: null }, - 'resolution': { value: new Vector2() }, + 'resolution': { value: /* @__PURE__ */ new Vector2() }, 'opacity': { value: .5 }, }, diff --git a/examples/jsm/shaders/SobelOperatorShader.js b/examples/jsm/shaders/SobelOperatorShader.js index cebcbd2691d96a..a28e2063f5a509 100644 --- a/examples/jsm/shaders/SobelOperatorShader.js +++ b/examples/jsm/shaders/SobelOperatorShader.js @@ -14,7 +14,7 @@ const SobelOperatorShader = { uniforms: { 'tDiffuse': { value: null }, - 'resolution': { value: new Vector2() } + 'resolution': { value: /* @__PURE__ */ new Vector2() } }, diff --git a/examples/jsm/shaders/SubsurfaceScatteringShader.js b/examples/jsm/shaders/SubsurfaceScatteringShader.js index 9f41f316efbafd..884a31dcc75ac0 100644 --- a/examples/jsm/shaders/SubsurfaceScatteringShader.js +++ b/examples/jsm/shaders/SubsurfaceScatteringShader.js @@ -13,6 +13,8 @@ import { *------------------------------------------------------------------------------------------ */ +const SubsurfaceScatteringShader = /* @__PURE__ */ ( () => { + function replaceAll( string, find, replace ) { return string.split( find ).join( replace ); @@ -85,4 +87,8 @@ const SubsurfaceScatteringShader = { }; +return SubsurfaceScatteringShader; + +} )(); + export { SubsurfaceScatteringShader }; diff --git a/examples/jsm/shaders/ToonShader.js b/examples/jsm/shaders/ToonShader.js index 29c85338d72f99..61d1ebecfebd9e 100644 --- a/examples/jsm/shaders/ToonShader.js +++ b/examples/jsm/shaders/ToonShader.js @@ -16,12 +16,12 @@ const ToonShader1 = { uniforms: { - 'uDirLightPos': { value: new Vector3() }, - 'uDirLightColor': { value: new Color( 0xeeeeee ) }, + 'uDirLightPos': { value: /* @__PURE__ */ new Vector3() }, + 'uDirLightColor': { value: /* @__PURE__ */ new Color( 0xeeeeee ) }, - 'uAmbientLightColor': { value: new Color( 0x050505 ) }, + 'uAmbientLightColor': { value: /* @__PURE__ */ new Color( 0x050505 ) }, - 'uBaseColor': { value: new Color( 0xffffff ) } + 'uBaseColor': { value: /* @__PURE__ */ new Color( 0xffffff ) } }, @@ -90,16 +90,16 @@ const ToonShader2 = { uniforms: { - 'uDirLightPos': { value: new Vector3() }, - 'uDirLightColor': { value: new Color( 0xeeeeee ) }, + 'uDirLightPos': { value: /* @__PURE__ */ new Vector3() }, + 'uDirLightColor': { value: /* @__PURE__ */ new Color( 0xeeeeee ) }, - 'uAmbientLightColor': { value: new Color( 0x050505 ) }, + 'uAmbientLightColor': { value: /* @__PURE__ */ new Color( 0x050505 ) }, - 'uBaseColor': { value: new Color( 0xeeeeee ) }, - 'uLineColor1': { value: new Color( 0x808080 ) }, - 'uLineColor2': { value: new Color( 0x000000 ) }, - 'uLineColor3': { value: new Color( 0x000000 ) }, - 'uLineColor4': { value: new Color( 0x000000 ) } + 'uBaseColor': { value: /* @__PURE__ */ new Color( 0xeeeeee ) }, + 'uLineColor1': { value: /* @__PURE__ */ new Color( 0x808080 ) }, + 'uLineColor2': { value: /* @__PURE__ */ new Color( 0x000000 ) }, + 'uLineColor3': { value: /* @__PURE__ */ new Color( 0x000000 ) }, + 'uLineColor4': { value: /* @__PURE__ */ new Color( 0x000000 ) } }, @@ -158,16 +158,16 @@ const ToonShaderHatching = { uniforms: { - 'uDirLightPos': { value: new Vector3() }, - 'uDirLightColor': { value: new Color( 0xeeeeee ) }, + 'uDirLightPos': { value: /* @__PURE__ */ new Vector3() }, + 'uDirLightColor': { value: /* @__PURE__ */ new Color( 0xeeeeee ) }, - 'uAmbientLightColor': { value: new Color( 0x050505 ) }, + 'uAmbientLightColor': { value: /* @__PURE__ */ new Color( 0x050505 ) }, - 'uBaseColor': { value: new Color( 0xffffff ) }, - 'uLineColor1': { value: new Color( 0x000000 ) }, - 'uLineColor2': { value: new Color( 0x000000 ) }, - 'uLineColor3': { value: new Color( 0x000000 ) }, - 'uLineColor4': { value: new Color( 0x000000 ) } + 'uBaseColor': { value: /* @__PURE__ */ new Color( 0xffffff ) }, + 'uLineColor1': { value: /* @__PURE__ */ new Color( 0x000000 ) }, + 'uLineColor2': { value: /* @__PURE__ */ new Color( 0x000000 ) }, + 'uLineColor3': { value: /* @__PURE__ */ new Color( 0x000000 ) }, + 'uLineColor4': { value: /* @__PURE__ */ new Color( 0x000000 ) } }, @@ -254,13 +254,13 @@ const ToonShaderDotted = { uniforms: { - 'uDirLightPos': { value: new Vector3() }, - 'uDirLightColor': { value: new Color( 0xeeeeee ) }, + 'uDirLightPos': { value: /* @__PURE__ */ new Vector3() }, + 'uDirLightColor': { value: /* @__PURE__ */ new Color( 0xeeeeee ) }, - 'uAmbientLightColor': { value: new Color( 0x050505 ) }, + 'uAmbientLightColor': { value: /* @__PURE__ */ new Color( 0x050505 ) }, - 'uBaseColor': { value: new Color( 0xffffff ) }, - 'uLineColor1': { value: new Color( 0x000000 ) } + 'uBaseColor': { value: /* @__PURE__ */ new Color( 0xffffff ) }, + 'uLineColor1': { value: /* @__PURE__ */ new Color( 0x000000 ) } }, diff --git a/examples/jsm/shaders/TriangleBlurShader.js b/examples/jsm/shaders/TriangleBlurShader.js index 50147751f791a6..73dd2fca6d3b53 100644 --- a/examples/jsm/shaders/TriangleBlurShader.js +++ b/examples/jsm/shaders/TriangleBlurShader.js @@ -17,7 +17,7 @@ const TriangleBlurShader = { uniforms: { 'texture': { value: null }, - 'delta': { value: new Vector2( 1, 1 ) } + 'delta': { value: /* @__PURE__ */ new Vector2( 1, 1 ) } }, diff --git a/examples/jsm/shaders/VelocityShader.js b/examples/jsm/shaders/VelocityShader.js index a053d927f6ff53..61cecc577be26e 100644 --- a/examples/jsm/shaders/VelocityShader.js +++ b/examples/jsm/shaders/VelocityShader.js @@ -4,19 +4,21 @@ import { Matrix4 } from 'three'; +const { common, displacementmap } = UniformsLib; + /** * Mesh Velocity Shader @bhouston */ const VelocityShader = { - uniforms: UniformsUtils.merge( [ - UniformsLib.common, - UniformsLib.displacementmap, + uniforms: /* @__PURE__ */ UniformsUtils.merge( [ + common, + displacementmap, { - modelMatrixPrev: { value: new Matrix4() }, - currentProjectionViewMatrix: { value: new Matrix4() }, - previousProjectionViewMatrix: { value: new Matrix4() } + modelMatrixPrev: { value: /* @__PURE__ */ new Matrix4() }, + currentProjectionViewMatrix: { value: /* @__PURE__ */ new Matrix4() }, + previousProjectionViewMatrix: { value: /* @__PURE__ */ new Matrix4() } } ] ), diff --git a/examples/jsm/shaders/VolumeShader.js b/examples/jsm/shaders/VolumeShader.js index 1ef52c56a651ae..27d391584dada9 100644 --- a/examples/jsm/shaders/VolumeShader.js +++ b/examples/jsm/shaders/VolumeShader.js @@ -12,10 +12,10 @@ import { const VolumeRenderShader1 = { uniforms: { - 'u_size': { value: new Vector3( 1, 1, 1 ) }, + 'u_size': { value: /* @__PURE__ */ new Vector3( 1, 1, 1 ) }, 'u_renderstyle': { value: 0 }, 'u_renderthreshold': { value: 0.5 }, - 'u_clim': { value: new Vector2( 1, 1 ) }, + 'u_clim': { value: /* @__PURE__ */ new Vector2( 1, 1 ) }, 'u_data': { value: null }, 'u_cmdata': { value: null } }, diff --git a/examples/jsm/webxr/VRButton.js b/examples/jsm/webxr/VRButton.js index 81a67f06d172ed..28447868677f6c 100644 --- a/examples/jsm/webxr/VRButton.js +++ b/examples/jsm/webxr/VRButton.js @@ -1,3 +1,5 @@ +const VRButton = /* @__PURE__ */ ( () => { + class VRButton { static createButton( renderer ) { @@ -197,4 +199,8 @@ class VRButton { VRButton.xrSessionIsGranted = false; VRButton.registerSessionGrantedListener(); +return VRButton; + +} )(); + export { VRButton }; diff --git a/examples/jsm/webxr/XRHandPrimitiveModel.js b/examples/jsm/webxr/XRHandPrimitiveModel.js index 0cb3fdcad78fb8..91c6cd38148f62 100644 --- a/examples/jsm/webxr/XRHandPrimitiveModel.js +++ b/examples/jsm/webxr/XRHandPrimitiveModel.js @@ -8,8 +8,8 @@ import { Vector3 } from 'three'; -const _matrix = new Matrix4(); -const _vector = new Vector3(); +const _matrix = /* @__PURE__ */ new Matrix4(); +const _vector = /* @__PURE__ */ new Vector3(); class XRHandPrimitiveModel {