@renderlayer/textures 0.0.11 → 0.0.12
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 +15 -0
- package/dist/textures.esm-bundler.js +3 -6
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# @renderlayer/textures
|
|
2
2
|
|
|
3
|
+
Texture abstractions used by `@renderlayer` packages.
|
|
4
|
+
|
|
3
5
|
[![NPM version][npm-badge]][npm-url]
|
|
6
|
+
[![License][license-badge]][license-url]
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm i @renderlayer/textures
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## License
|
|
15
|
+
|
|
16
|
+
This package is released under the [MIT License][license-url]
|
|
4
17
|
|
|
5
18
|
[npm-badge]: https://img.shields.io/npm/v/@renderlayer/textures
|
|
6
19
|
[npm-url]: https://www.npmjs.com/package/@renderlayer/textures
|
|
20
|
+
[license-badge]: https://img.shields.io/npm/l/renderlayer.svg?cacheSeconds=2592000
|
|
21
|
+
[license-url]: https://github.com/epreston/renderlayer/blob/main/LICENSE
|
|
@@ -12,8 +12,7 @@ class Source {
|
|
|
12
12
|
this.version = 0;
|
|
13
13
|
}
|
|
14
14
|
set needsUpdate(value) {
|
|
15
|
-
if (value === true)
|
|
16
|
-
this.version++;
|
|
15
|
+
if (value === true) this.version++;
|
|
17
16
|
}
|
|
18
17
|
toJSON(meta) {
|
|
19
18
|
const isRootObject = meta === void 0 || typeof meta === "string";
|
|
@@ -186,8 +185,7 @@ class Texture extends EventDispatcher {
|
|
|
186
185
|
premultiplyAlpha: this.premultiplyAlpha,
|
|
187
186
|
unpackAlignment: this.unpackAlignment
|
|
188
187
|
};
|
|
189
|
-
if (Object.keys(this.userData).length > 0)
|
|
190
|
-
output.userData = this.userData;
|
|
188
|
+
if (Object.keys(this.userData).length > 0) output.userData = this.userData;
|
|
191
189
|
if (!isRootObject) {
|
|
192
190
|
meta.textures[this.uuid] = output;
|
|
193
191
|
}
|
|
@@ -198,8 +196,7 @@ class Texture extends EventDispatcher {
|
|
|
198
196
|
}
|
|
199
197
|
/** @param {Vector2} uv */
|
|
200
198
|
transformUv(uv) {
|
|
201
|
-
if (this.mapping !== UVMapping)
|
|
202
|
-
return uv;
|
|
199
|
+
if (this.mapping !== UVMapping) return uv;
|
|
203
200
|
uv.applyMatrix3(this.matrix);
|
|
204
201
|
if (uv.x < 0 || uv.x > 1) {
|
|
205
202
|
switch (this.wrapS) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@renderlayer/textures",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"description": "@renderlayer/textures",
|
|
6
6
|
"module": "./dist/textures.esm-bundler.js",
|
|
7
7
|
"exports": "./dist/textures.esm-bundler.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/epreston/renderlayer/blob/main/packages/textures#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@renderlayer/core": "~0.0.
|
|
33
|
-
"@renderlayer/math": "~0.0.
|
|
34
|
-
"@renderlayer/shared": "~0.0.
|
|
32
|
+
"@renderlayer/core": "~0.0.8",
|
|
33
|
+
"@renderlayer/math": "~0.0.14",
|
|
34
|
+
"@renderlayer/shared": "~0.0.8"
|
|
35
35
|
}
|
|
36
36
|
}
|