@xviewer.js/all 1.0.0-alpha.0

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/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # xviewer.js
2
+
3
+ <a href="https://www.npmjs.com/package/@xviewer/all"><img src="https://img.shields.io/npm/v/@xviewer/all"/></a>
4
+ ![npm-size](https://img.shields.io/bundlephobia/minzip/@xviewer/all)
5
+ ![npm-download](https://img.shields.io/npm/dm/@xviewer/all)
6
+
7
+ xviewer.js 诞生的目的是为了更简单地使用 Three.js。
8
+
9
+ Three.js 是一个非常强大的前端三维渲染库,它有许多令人惊叹的案例,并且非常灵活和易于扩展。然而,使用 Three.js 时需要理解 3D 图形编程原理以及各个模块的功能,这对于新手来说学习曲线较陡,而对于有经验的开发者来说,使用它可能不够简洁。
10
+
11
+ 幸运的是,React-three-fiber 很好地解决了 Three.js 中的复杂性问题,并且拥有强大的生态系统,有大量的贡献者。React-three-fiber 的代码编写非常优雅简洁,只需几行代码就可以实现令人惊叹的效果。然而,当你想要修改或改进某个组件时,可能会变得异常困难。首先,你需要了解 React,熟悉各种钩子函数以及 React 的数据传递方式。由于 React 组件是函数式的,无法继承,所以必须复制整个组件的代码才能进行修改。此外,这些第三方组件的封装结合了 React 和 Three.js 的特性,变得更加复杂,一般用户很难下手。最令人沮丧的是,Three.js 对象的生命周期受到 React 虚拟 DOM 的影响,会被重复加载和卸载。随着场景和功能的复杂性增加,内存管理开始变得棘手,很容易出现内存泄漏的问题。
12
+
13
+ 因此,我们需要一个解决方案,既能简单地使用 Three.js,又能保持灵活性并易于扩展。xviewer.js 就是在这样的背景下诞生的。它旨在简化 Three.js 的使用,并提供了一种更好的方式来管理和扩展 Three.js 的功能。xviewer.js 在保持易用性的同时,尽可能地减少了内存泄漏等问题的发生,为开发者提供了更好的开发体验。
package/dist/main.js ADDED
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var core = require('@xviewer/core');
4
+ var debug = require('@xviewer/debug');
5
+ var postprocessing = require('@xviewer/postprocessing');
6
+
7
+
8
+
9
+ Object.keys(core).forEach(function (k) {
10
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: function () { return core[k]; }
13
+ });
14
+ });
15
+ Object.keys(debug).forEach(function (k) {
16
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
17
+ enumerable: true,
18
+ get: function () { return debug[k]; }
19
+ });
20
+ });
21
+ Object.keys(postprocessing).forEach(function (k) {
22
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
23
+ enumerable: true,
24
+ get: function () { return postprocessing[k]; }
25
+ });
26
+ });
27
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/module.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from '@xviewer/core';
2
+ export * from '@xviewer/debug';
3
+ export * from '@xviewer/postprocessing';
4
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@xviewer.js/all",
3
+ "version": "1.0.0-alpha.0",
4
+ "publishConfig": {
5
+ "access": "public",
6
+ "registry": "https://registry.npmjs.org"
7
+ },
8
+ "license": "MIT",
9
+ "scripts": {
10
+ "b:types": "tsc"
11
+ },
12
+ "types": "types/index.d.ts",
13
+ "main": "dist/main.js",
14
+ "module": "dist/module.js",
15
+ "browser": "dist/browser.js",
16
+ "files": [
17
+ "dist/**/*",
18
+ "types/**/*"
19
+ ],
20
+ "dependencies": {
21
+ "@xviewer.js/core": "1.0.0-alpha.0",
22
+ "@xviewer.js/debug": "1.0.0-alpha.0",
23
+ "@xviewer.js/postprocessing": "1.0.0-alpha.0"
24
+ }
25
+ }
@@ -0,0 +1,3 @@
1
+ export * from "@xviewer/core";
2
+ export * from "@xviewer/debug";
3
+ export * from "@xviewer/postprocessing";