three-stdlib 2.6.3 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Nodes-ec4e1143.js → Nodes-894ac9dc.js} +0 -0
- package/{Nodes-427f68b0.js → Nodes-af575af7.js} +0 -0
- package/controls/ArcballControls.cjs.js +1 -1
- package/controls/ArcballControls.d.ts +161 -0
- package/controls/ArcballControls.js +554 -285
- package/controls/OrbitControls.cjs.js +1 -1
- package/controls/OrbitControls.d.ts +1 -0
- package/controls/OrbitControls.js +13 -2
- package/controls/TransformControls.cjs.js +1 -1
- package/controls/TransformControls.d.ts +2 -1
- package/controls/TransformControls.js +25 -26
- package/geometries/TeapotGeometry.js +2 -2
- package/geometries/TextGeometry.cjs.js +1 -0
- package/geometries/TextGeometry.d.ts +16 -0
- package/geometries/TextGeometry.js +26 -0
- package/index.cjs.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/loaders/AMFLoader.js +1 -3
- package/loaders/ColladaLoader.cjs.js +1 -1
- package/loaders/ColladaLoader.js +58 -35
- package/loaders/EXRLoader.cjs.js +1 -1
- package/loaders/EXRLoader.js +197 -262
- package/loaders/FBXLoader.cjs.js +1 -1
- package/loaders/FBXLoader.js +41 -90
- package/loaders/FontLoader.cjs.js +1 -0
- package/loaders/FontLoader.d.ts +32 -0
- package/loaders/FontLoader.js +139 -0
- package/loaders/GLTFLoader.cjs.js +1 -1
- package/loaders/GLTFLoader.js +161 -75
- package/loaders/HDRCubeTextureLoader.cjs.js +1 -1
- package/loaders/HDRCubeTextureLoader.js +2 -2
- package/loaders/NodeMaterialLoader.cjs.js +1 -1
- package/loaders/RGBELoader.cjs.js +1 -1
- package/loaders/RGBELoader.js +10 -9
- package/loaders/RGBMLoader.cjs.js +1 -1
- package/loaders/RGBMLoader.js +181 -257
- package/loaders/STLLoader.js +7 -7
- package/loaders/SVGLoader.cjs.js +1 -1
- package/loaders/SVGLoader.js +46 -30
- package/loaders/VRMLLoader.cjs.js +1 -1
- package/loaders/VRMLLoader.js +2 -1
- package/nodes/accessors/CameraNode.js +12 -12
- package/nodes/accessors/PositionNode.js +3 -3
- package/nodes/accessors/ReflectNode.js +3 -3
- package/nodes/core/FunctionNode.js +3 -3
- package/nodes/core/InputNode.js +3 -3
- package/nodes/core/Node.js +6 -6
- package/nodes/core/TempNode.js +6 -6
- package/nodes/effects/BlurNode.js +3 -3
- package/nodes/math/MathNode.js +3 -3
- package/nodes/utils/VelocityNode.js +6 -6
- package/package.json +2 -2
- package/renderers/nodes/accessors/UVNode.js +1 -3
- package/renderers/nodes/core/AttributeNode.js +1 -3
- package/renderers/nodes/core/Node.js +4 -12
- package/renderers/nodes/core/NodeBuilder.js +6 -18
- package/webxr/ARButton.js +6 -6
- package/webxr/VRButton.js +6 -6
| @@ -13,9 +13,9 @@ VelocityNode.prototype = Object.create(Vector3Node.prototype); | |
| 13 13 | 
             
            VelocityNode.prototype.constructor = VelocityNode;
         | 
| 14 14 | 
             
            VelocityNode.prototype.nodeType = 'Velocity';
         | 
| 15 15 |  | 
| 16 | 
            -
            VelocityNode.prototype.getReadonly = function | 
| 17 | 
            -
            /*builder*/
         | 
| 18 | 
            -
            {
         | 
| 16 | 
            +
            VelocityNode.prototype.getReadonly = function
         | 
| 17 | 
            +
              /*builder*/
         | 
| 18 | 
            +
            () {
         | 
| 19 19 | 
             
              return false;
         | 
| 20 20 | 
             
            };
         | 
| 21 21 |  | 
| @@ -55,9 +55,9 @@ VelocityNode.prototype.setTarget = function (target) { | |
| 55 55 | 
             
              }
         | 
| 56 56 | 
             
            };
         | 
| 57 57 |  | 
| 58 | 
            -
            VelocityNode.prototype.updateFrameVelocity = function | 
| 59 | 
            -
            /*frame*/
         | 
| 60 | 
            -
            {
         | 
| 58 | 
            +
            VelocityNode.prototype.updateFrameVelocity = function
         | 
| 59 | 
            +
              /*frame*/
         | 
| 60 | 
            +
            () {
         | 
| 61 61 | 
             
              if (this.target) {
         | 
| 62 62 | 
             
                this.position = this.target.getWorldPosition(this.position || new Vector3());
         | 
| 63 63 | 
             
                this.velocity.subVectors(this.position, this.oldPosition);
         | 
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "three-stdlib",
         | 
| 3 | 
            -
              "version": "2. | 
| 3 | 
            +
              "version": "2.7.2",
         | 
| 4 4 | 
             
              "private": false,
         | 
| 5 5 | 
             
              "description": "stand-alone library of threejs examples",
         | 
| 6 6 | 
             
              "main": "index.cjs.js",
         | 
| @@ -20,7 +20,7 @@ | |
| 20 20 | 
             
              },
         | 
| 21 21 | 
             
              "homepage": "https://github.com/pmndrs/three-stdlib#readme",
         | 
| 22 22 | 
             
              "dependencies": {
         | 
| 23 | 
            -
                "@babel/runtime": "^7. | 
| 23 | 
            +
                "@babel/runtime": "^7.16.7",
         | 
| 24 24 | 
             
                "@webgpu/glslang": "^0.0.15",
         | 
| 25 25 | 
             
                "@webxr-input-profiles/motion-controllers": "^1.0.0",
         | 
| 26 26 | 
             
                "chevrotain": "^9.0.2",
         | 
| @@ -9,27 +9,19 @@ class Node { | |
| 9 9 | 
             
                });
         | 
| 10 10 | 
             
              }
         | 
| 11 11 |  | 
| 12 | 
            -
              getUpdateType()
         | 
| 13 | 
            -
              /*builder*/
         | 
| 14 | 
            -
              {
         | 
| 12 | 
            +
              getUpdateType() {
         | 
| 15 13 | 
             
                return this.updateType;
         | 
| 16 14 | 
             
              }
         | 
| 17 15 |  | 
| 18 | 
            -
              getType()
         | 
| 19 | 
            -
              /*builder*/
         | 
| 20 | 
            -
              {
         | 
| 16 | 
            +
              getType() {
         | 
| 21 17 | 
             
                return this.type;
         | 
| 22 18 | 
             
              }
         | 
| 23 19 |  | 
| 24 | 
            -
              update()
         | 
| 25 | 
            -
              /*frame*/
         | 
| 26 | 
            -
              {
         | 
| 20 | 
            +
              update() {
         | 
| 27 21 | 
             
                console.warn('Abstract function.');
         | 
| 28 22 | 
             
              }
         | 
| 29 23 |  | 
| 30 | 
            -
              generate()
         | 
| 31 | 
            -
              /*builder, output*/
         | 
| 32 | 
            -
              {
         | 
| 24 | 
            +
              generate() {
         | 
| 33 25 | 
             
                console.warn('Abstract function.');
         | 
| 34 26 | 
             
              }
         | 
| 35 27 |  | 
| @@ -49,9 +49,7 @@ class NodeBuilder { | |
| 49 49 | 
             
                this.defines[shaderStage][name] = value;
         | 
| 50 50 | 
             
              }
         | 
| 51 51 |  | 
| 52 | 
            -
              getTexture()
         | 
| 53 | 
            -
              /* textureProperty, uvSnippet */
         | 
| 54 | 
            -
              {
         | 
| 52 | 
            +
              getTexture() {
         | 
| 55 53 | 
             
                console.warn('Abstract function.');
         | 
| 56 54 | 
             
              }
         | 
| 57 55 |  | 
| @@ -183,33 +181,23 @@ class NodeBuilder { | |
| 183 181 | 
             
                return code;
         | 
| 184 182 | 
             
              }
         | 
| 185 183 |  | 
| 186 | 
            -
              getAttributesBodySnippet()
         | 
| 187 | 
            -
              /*shaderStage*/
         | 
| 188 | 
            -
              {
         | 
| 184 | 
            +
              getAttributesBodySnippet() {
         | 
| 189 185 | 
             
                console.warn('Abstract function.');
         | 
| 190 186 | 
             
              }
         | 
| 191 187 |  | 
| 192 | 
            -
              getAttributesHeaderSnippet()
         | 
| 193 | 
            -
              /*shaderStage*/
         | 
| 194 | 
            -
              {
         | 
| 188 | 
            +
              getAttributesHeaderSnippet() {
         | 
| 195 189 | 
             
                console.warn('Abstract function.');
         | 
| 196 190 | 
             
              }
         | 
| 197 191 |  | 
| 198 | 
            -
              getVarysHeaderSnippet()
         | 
| 199 | 
            -
              /*shaderStage*/
         | 
| 200 | 
            -
              {
         | 
| 192 | 
            +
              getVarysHeaderSnippet() {
         | 
| 201 193 | 
             
                console.warn('Abstract function.');
         | 
| 202 194 | 
             
              }
         | 
| 203 195 |  | 
| 204 | 
            -
              getVarysBodySnippet()
         | 
| 205 | 
            -
              /*shaderStage*/
         | 
| 206 | 
            -
              {
         | 
| 196 | 
            +
              getVarysBodySnippet() {
         | 
| 207 197 | 
             
                console.warn('Abstract function.');
         | 
| 208 198 | 
             
              }
         | 
| 209 199 |  | 
| 210 | 
            -
              getUniformsHeaderSnippet()
         | 
| 211 | 
            -
              /*shaderStage*/
         | 
| 212 | 
            -
              {
         | 
| 200 | 
            +
              getUniformsHeaderSnippet() {
         | 
| 213 201 | 
             
                console.warn('Abstract function.');
         | 
| 214 202 | 
             
              }
         | 
| 215 203 |  | 
    
        package/webxr/ARButton.js
    CHANGED
    
    | @@ -2,9 +2,9 @@ class ARButton { | |
| 2 2 | 
             
              static createButton(renderer, sessionInit = {}) {
         | 
| 3 3 | 
             
                const button = document.createElement('button');
         | 
| 4 4 |  | 
| 5 | 
            -
                function | 
| 6 | 
            -
             | 
| 7 | 
            -
                {
         | 
| 5 | 
            +
                function
         | 
| 6 | 
            +
                  /*device*/
         | 
| 7 | 
            +
                showStartAR() {
         | 
| 8 8 | 
             
                  if (sessionInit.domOverlay === undefined) {
         | 
| 9 9 | 
             
                    var overlay = document.createElement('div');
         | 
| 10 10 | 
             
                    overlay.style.display = 'none';
         | 
| @@ -47,9 +47,9 @@ class ARButton { | |
| 47 47 | 
             
                    currentSession = session;
         | 
| 48 48 | 
             
                  }
         | 
| 49 49 |  | 
| 50 | 
            -
                  function | 
| 51 | 
            -
             | 
| 52 | 
            -
                  {
         | 
| 50 | 
            +
                  function
         | 
| 51 | 
            +
                    /*event*/
         | 
| 52 | 
            +
                  onSessionEnded() {
         | 
| 53 53 | 
             
                    currentSession.removeEventListener('end', onSessionEnded);
         | 
| 54 54 | 
             
                    button.textContent = 'START AR';
         | 
| 55 55 | 
             
                    sessionInit.domOverlay.root.style.display = 'none';
         | 
    
        package/webxr/VRButton.js
    CHANGED
    
    | @@ -6,9 +6,9 @@ class VRButton { | |
| 6 6 |  | 
| 7 7 | 
             
                const button = document.createElement('button');
         | 
| 8 8 |  | 
| 9 | 
            -
                function | 
| 10 | 
            -
             | 
| 11 | 
            -
                {
         | 
| 9 | 
            +
                function
         | 
| 10 | 
            +
                  /*device*/
         | 
| 11 | 
            +
                showEnterVR() {
         | 
| 12 12 | 
             
                  let currentSession = null;
         | 
| 13 13 |  | 
| 14 14 | 
             
                  async function onSessionStarted(session) {
         | 
| @@ -18,9 +18,9 @@ class VRButton { | |
| 18 18 | 
             
                    currentSession = session;
         | 
| 19 19 | 
             
                  }
         | 
| 20 20 |  | 
| 21 | 
            -
                  function | 
| 22 | 
            -
             | 
| 23 | 
            -
                  {
         | 
| 21 | 
            +
                  function
         | 
| 22 | 
            +
                    /*event*/
         | 
| 23 | 
            +
                  onSessionEnded() {
         | 
| 24 24 | 
             
                    currentSession.removeEventListener('end', onSessionEnded);
         | 
| 25 25 | 
             
                    button.textContent = 'ENTER VR';
         | 
| 26 26 | 
             
                    currentSession = null;
         |