three-base 2.0.14 → 2.0.16

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.
@@ -1,4 +1,4 @@
1
- import { MeshBasicMaterial, Mesh, CanvasTexture, PlaneGeometry } from "three";
1
+ import { Mesh, MeshBasicMaterial, PlaneGeometry } from "three";
2
2
  export type PlaneModal1Config = {
3
3
  size?: number;
4
4
  title?: string;
@@ -16,7 +16,7 @@ export default class PlaneModal1 extends Mesh {
16
16
  static img: HTMLImageElement;
17
17
  canvas: HTMLCanvasElement;
18
18
  context: CanvasRenderingContext2D;
19
- texture: CanvasTexture | import("three").Texture;
19
+ texture: import("three").CanvasTexture | import("three").Texture;
20
20
  _config: {
21
21
  size: number;
22
22
  title: string;
@@ -4,9 +4,9 @@
4
4
  * @Last Modified by: xiaosihan
5
5
  * @Last Modified time: 2023-03-09 19:15:35
6
6
  */
7
- import { MeshBasicMaterial, Mesh, DoubleSide, Vector2, PlaneGeometry } from "three";
8
- import planeModalPNG from "./planeModal.png";
7
+ import { DoubleSide, Mesh, MeshBasicMaterial, PlaneGeometry, Vector2 } from "three";
9
8
  import threeLoader from "../threeLoader";
9
+ import planeModalPNG from "./planeModal.png";
10
10
  // 平面模型弹窗
11
11
  export default class PlaneModal1 extends Mesh {
12
12
  constructor(config = {}) {
@@ -5,9 +5,9 @@
5
5
  * @Last Modified time: 2023-03-09 19:15:35
6
6
  */
7
7
 
8
- import { MeshBasicMaterial, Mesh, DoubleSide, CanvasTexture, Vector2, BufferGeometry, PlaneGeometry, SRGBColorSpace } from "three";
9
- import planeModalPNG from "./planeModal.png";
8
+ import { DoubleSide, Mesh, MeshBasicMaterial, PlaneGeometry, Vector2 } from "three";
10
9
  import threeLoader from "../threeLoader";
10
+ import planeModalPNG from "./planeModal.png";
11
11
 
12
12
 
13
13
  export type PlaneModal1Config = {
package/ThreeBase.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * @Last Modified time: 2023-05-23 23:54:13
6
6
  */
7
7
  import { round } from "lodash";
8
- import { AxesHelper, DepthFormat, DepthTexture, EventDispatcher, GridHelper, LinearFilter, Mesh, MOUSE, NoBlending, NormalBlending, PerspectiveCamera, RGBAFormat, Scene, SRGBColorSpace, sRGBEncoding, TOUCH, UnsignedShortType, Vector2, Vector3, WebGLRenderer, WebGLRenderTarget } from "three";
8
+ import { AxesHelper, DepthFormat, DepthTexture, EventDispatcher, GridHelper, LinearFilter, Mesh, MOUSE, NoBlending, NormalBlending, PerspectiveCamera, RGBAFormat, Scene, SRGBColorSpace, TOUCH, UnsignedShortType, Vector2, Vector3, WebGLRenderer, WebGLRenderTarget } from "three";
9
9
  import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
10
10
  import { generateUUID } from "three/src/math/MathUtils";
11
11
  import { clearShader, coptyShader, fullScreenMesh, gaussBlurShader, strokeShader } from "./shaders";
@@ -29,6 +29,7 @@ export default class ThreeBase extends EventDispatcher {
29
29
  baseDepthTexture.anisotropy = 16;
30
30
  return baseDepthTexture;
31
31
  })();
32
+ // TODO 渲染目标的颜色空间问题 还没有处理好
32
33
  // 基础纹理渲染对象
33
34
  baseRenderTarget = new WebGLRenderTarget(128, 128, {
34
35
  minFilter: LinearFilter,
@@ -42,7 +43,7 @@ export default class ThreeBase extends EventDispatcher {
42
43
  // | typeof SRGBColorSpace
43
44
  // | typeof LinearSRGBColorSpace
44
45
  // | typeof DisplayP3ColorSpace;
45
- encoding: sRGBEncoding
46
+ // encoding: sRGBEncoding
46
47
  // LinearEncoding | typeof sRGBEncoding;
47
48
  });
48
49
  // 公用渲染目标1
package/ThreeBase.ts CHANGED
@@ -34,6 +34,7 @@ export default class ThreeBase extends EventDispatcher {
34
34
  return baseDepthTexture;
35
35
  })();
36
36
 
37
+ // TODO 渲染目标的颜色空间问题 还没有处理好
37
38
  // 基础纹理渲染对象
38
39
  baseRenderTarget = new WebGLRenderTarget(128, 128, {
39
40
  minFilter: LinearFilter,
@@ -47,7 +48,7 @@ export default class ThreeBase extends EventDispatcher {
47
48
  // | typeof SRGBColorSpace
48
49
  // | typeof LinearSRGBColorSpace
49
50
  // | typeof DisplayP3ColorSpace;
50
- encoding: sRGBEncoding
51
+ // encoding: sRGBEncoding
51
52
  // LinearEncoding | typeof sRGBEncoding;
52
53
  });
53
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-base",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "three 3d three-base",
5
5
  "repository": {
6
6
  "type": "git",
package/tsconfig.json CHANGED
@@ -10,9 +10,6 @@
10
10
  "vite/client",
11
11
  "node"
12
12
  ],
13
- "typeRoots": [
14
- "./",
15
- ],
16
13
  "sourceMap": false,
17
14
  "declaration": true,
18
15
  "declarationDir": "./",
@@ -28,7 +25,6 @@
28
25
  "isolatedModules": false,
29
26
  "noEmit": false,
30
27
  "noImplicitAny": false,
31
- "locale": "zh-cn",
32
28
  },
33
29
  "include": [
34
30
  "./",