Skip to content

Commit

Permalink
Merge pull request #910 from pixiv/bump-three-r137
Browse files Browse the repository at this point in the history
Bump three.js to r137
  • Loading branch information
0b5vr authored Jan 28, 2022
2 parents cedd633 + 54daf04 commit 5ab93c5
Show file tree
Hide file tree
Showing 34 changed files with 80 additions and 139 deletions.
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/animations.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/blendshapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/bones.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/dnd.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/encoding.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/envmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/firstperson.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/lookat-advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
const _v3A = new THREE.Vector3();
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/lookat.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/materials-debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<body>
<span id="meta"></span>
<img id="thumbnail" alt="thumbnail" />
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
6 changes: 3 additions & 3 deletions packages/three-vrm/examples/mouse.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</head>

<body>
<script src="https://unpkg.com/three@0.136.0/build/three.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.136.0/examples/js/controls/OrbitControls.js"></script>
<script src="https://unpkg.com/three@0.137.4/build/three.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.137.4/examples/js/controls/OrbitControls.js"></script>
<script src="../lib/three-vrm.js"></script>
<script>
// renderer
Expand Down
8 changes: 4 additions & 4 deletions packages/three-vrm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
]
},
"devDependencies": {
"@types/three": "^0.136.1",
"@types/three": "^0.137.0",
"lint-staged": "10.5.4",
"quicktype": "^15.0.258",
"three": "^0.136.0"
"three": "^0.137.4"
},
"peerDependencies": {
"@types/three": "^0.136.1",
"three": "^0.136.0"
"@types/three": "^0.137.0",
"three": "^0.137.4"
}
}
2 changes: 1 addition & 1 deletion packages/three-vrm/src/VRM.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMBlendShapeProxy } from './blendshape';
import { VRMFirstPerson } from './firstperson';
import { VRMHumanoid } from './humanoid';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/VRMImporter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMBlendShapeImporter } from './blendshape';
import { VRMFirstPersonImporter } from './firstperson';
import { VRMHumanoidImporter } from './humanoid/VRMHumanoidImporter';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/blendshape/VRMBlendShapeImporter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { GLTFSchema, VRMSchema } from '../types';
import { gltfExtractPrimitivesFromNode } from '../utils/gltfExtractPrimitivesFromNode';
import { renameMaterialProperty } from '../utils/renameMaterialProperty';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/debug/VRMDebug.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRM, VRMParameters } from '../VRM';
import { VRMImporterOptions } from '../VRMImporter';
import { VRMDebugOptions } from './VRMDebugOptions';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/debug/VRMImporterDebug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMImporter, VRMImporterOptions } from '../VRMImporter';
import { VRMDebug } from './VRMDebug';
import { VRMDebugOptions } from './VRMDebugOptions';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/debug/VRMLookAtImporterDebug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMBlendShapeProxy } from '../blendshape';
import { VRMFirstPerson } from '../firstperson';
import { VRMHumanoid } from '../humanoid';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/debug/VRMSpringBoneImporterDebug.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMSpringBoneImporter } from '../springbone/VRMSpringBoneImporter';
import { VRMSpringBoneManagerDebug } from './VRMSpringBoneManagerDebug';
import { VRMSchema } from '../types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMHumanoid } from '../humanoid';
import { GLTFNode, GLTFSchema, VRMSchema } from '../types';
import { gltfExtractPrimitivesFromNodes } from '../utils/gltfExtractPrimitivesFromNode';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/humanoid/VRMHumanoidImporter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMSchema } from '../types';
import { VRMHumanBone } from './VRMHumanBone';
import { VRMHumanBoneArray } from './VRMHumanBoneArray';
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/lookat/VRMLookAtImporter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { VRMBlendShapeProxy } from '../blendshape';
import { VRMFirstPerson } from '../firstperson';
import { VRMHumanoid } from '../humanoid';
Expand Down
15 changes: 1 addition & 14 deletions packages/three-vrm/src/material/MToonMaterial.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* tslint:disable:member-ordering */

import * as THREE from 'three';
import { getTexelDecodingFunction } from './getTexelDecodingFunction';
import vertexShader from './shaders/mtoon.vert';
import fragmentShader from './shaders/mtoon.frag';

Expand Down Expand Up @@ -575,21 +574,9 @@ export class MToonMaterial extends THREE.ShaderMaterial {
OUTLINE_COLOR_MIXED: this._outlineColorMode === MToonMaterialOutlineColorMode.MixedLighting,
};

// == texture encodings ====================================================
const encodings =
(this.shadeTexture !== null
? getTexelDecodingFunction('shadeTextureTexelToLinear', this.shadeTexture.encoding) + '\n'
: '') +
(this.sphereAdd !== null
? getTexelDecodingFunction('sphereAddTexelToLinear', this.sphereAdd.encoding) + '\n'
: '') +
(this.rimTexture !== null
? getTexelDecodingFunction('rimTextureTexelToLinear', this.rimTexture.encoding) + '\n'
: '');

// == generate shader code =================================================
this.vertexShader = vertexShader;
this.fragmentShader = encodings + fragmentShader;
this.fragmentShader = fragmentShader;

// == set needsUpdate flag =================================================
this.needsUpdate = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/src/material/VRMMaterialImporter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as THREE from 'three';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { GLTFSchema, VRMSchema } from '../types';
import { gltfExtractPrimitivesFromNodes } from '../utils/gltfExtractPrimitivesFromNode';
import { MToonMaterial, MToonMaterialOutlineWidthMode } from './MToonMaterial';
Expand Down
46 changes: 0 additions & 46 deletions packages/three-vrm/src/material/getTexelDecodingFunction.ts

This file was deleted.

Loading

0 comments on commit 5ab93c5

Please sign in to comment.