@needle-tools/three-mesh-effects 0.1.0-alpha → 0.1.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/LICENSE +21 -21
- package/README.md +94 -88
- package/build/deformation-runtime.js.map +1 -1
- package/build/impostor-runtime-needle-engine.js.map +1 -1
- package/build/impostor-runtime.js.map +1 -1
- package/build/internal/deformation/cloth-surface.js.map +1 -1
- package/build/internal/deformation/fur-surface.js.map +1 -1
- package/build/internal/deformation/ik-constraints.js.map +1 -1
- package/build/internal/deformation/joints-json.js.map +1 -1
- package/build/internal/deformation/limits.js.map +1 -1
- package/build/internal/deformation/motion-settings.js.map +1 -1
- package/build/internal/deformation/pin-cloth.js.map +1 -1
- package/build/internal/deformation/pin-ik.js.map +1 -1
- package/build/internal/deformation/pin-types.js.map +1 -1
- package/build/internal/deformation/pin-wiggle.js.map +1 -1
- package/build/internal/deformation/pose-slots.js.map +1 -1
- package/build/internal/deformation/pose-timeline.js.map +1 -1
- package/build/internal/deformation/rig-drivers.js.map +1 -1
- package/build/internal/deformation/rig-extension.js.map +1 -1
- package/build/internal/deformation/rig-runtime.js.map +1 -1
- package/build/internal/deformation/wind.js.map +1 -1
- package/build/internal/impostor/impostor-metadata.js.map +1 -1
- package/build/internal/impostor/impostor-node-material.js.map +1 -1
- package/build/internal/impostor/impostor-runtime-support.js.map +1 -1
- package/build/internal/impostor/octahedral.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-display.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-metadata.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-runtime.js.map +1 -1
- package/build/internal/rendering/skin-projection.js +52 -52
- package/build/internal/rendering/skin-projection.js.map +2 -2
- package/build/internal/rendering/surface-query.js +52 -52
- package/build/internal/rendering/surface-query.js.map +2 -2
- package/build/internal/rendering/wireframe.js.map +1 -1
- package/build/internal/rendering/wrap-preview-settings.js.map +1 -1
- package/build/internal/rendering/wrap-preview.js +52 -52
- package/build/internal/rendering/wrap-preview.js.map +2 -2
- package/build/internal/rendering/wrap-skin.js +52 -52
- package/build/internal/rendering/wrap-skin.js.map +2 -2
- package/build/pixel-impostor-runtime.js.map +1 -1
- package/build/wrap-effects.js +52 -52
- package/build/wrap-effects.js.map +2 -2
- package/package.json +107 -94
- package/src/deformation/cloth-surface.ts +223 -223
- package/src/deformation/fur-surface.ts +129 -129
- package/src/deformation/ik-constraints.ts +37 -37
- package/src/deformation/joints-json.ts +94 -94
- package/src/deformation/limits.ts +25 -25
- package/src/deformation/motion-settings.ts +9 -9
- package/src/deformation/pin-cloth.ts +149 -149
- package/src/deformation/pin-ik.ts +582 -582
- package/src/deformation/pin-types.ts +22 -22
- package/src/deformation/pin-wiggle.ts +119 -119
- package/src/deformation/pose-slots.ts +106 -106
- package/src/deformation/pose-timeline.ts +242 -242
- package/src/deformation/rig-drivers.ts +32 -32
- package/src/deformation/rig-extension.ts +87 -87
- package/src/deformation/rig-runtime.ts +416 -416
- package/src/deformation/wind.ts +36 -36
- package/src/impostor/impostor-metadata.js +137 -137
- package/src/impostor/impostor-node-material.js +1581 -1581
- package/src/impostor/impostor-runtime-support.js +139 -139
- package/src/impostor/octahedral.js +280 -280
- package/src/pixel-impostor/pixel-impostor-display.js +794 -794
- package/src/pixel-impostor/pixel-impostor-metadata.js +74 -74
- package/src/pixel-impostor/pixel-impostor-runtime.js +78 -78
- package/src/public/deformation-runtime.ts +3 -3
- package/src/public/impostor-runtime-needle-engine.js +56 -56
- package/src/public/impostor-runtime.js +21 -21
- package/src/public/pixel-impostor-runtime.js +5 -5
- package/src/public/wrap-effects.js +21 -21
- package/src/rendering/skin-projection.js +113 -113
- package/src/rendering/surface-query.js +88 -88
- package/src/rendering/wireframe.js +115 -115
- package/src/rendering/wrap-preview-settings.js +123 -123
- package/src/rendering/wrap-preview.js +645 -645
- package/src/rendering/wrap-skin.js +109 -109
- package/build/internal/public/deformation-runtime.js +0 -2143
- package/build/internal/public/deformation-runtime.js.map +0 -7
- package/build/internal/public/impostor-runtime-needle-engine.js +0 -42
- package/build/internal/public/impostor-runtime-needle-engine.js.map +0 -7
- package/build/internal/public/impostor-runtime.js +0 -1333
- package/build/internal/public/impostor-runtime.js.map +0 -7
- package/build/internal/public/pixel-impostor-runtime.js +0 -876
- package/build/internal/public/pixel-impostor-runtime.js.map +0 -7
- package/build/internal/public/wrap-effects.js +0 -5640
- package/build/internal/public/wrap-effects.js.map +0 -7
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
// src/public/impostor-runtime-needle-engine.js
|
|
4
|
-
import {
|
|
5
|
-
addCustomExtensionPlugin,
|
|
6
|
-
removeCustomImportExtensionType
|
|
7
|
-
} from "@needle-tools/engine";
|
|
8
|
-
import { registerNeedleImpostorLoader } from "@needle-tools/three-mesh-effects/impostor-runtime";
|
|
9
|
-
var NeedleEngineImpostorLoaderPlugin = class {
|
|
10
|
-
name = "NeedleEngineImpostorLoaderPlugin";
|
|
11
|
-
/** @type {Parameters<typeof registerNeedleImpostorLoader>[1]} */
|
|
12
|
-
options;
|
|
13
|
-
/** @param {Parameters<typeof registerNeedleImpostorLoader>[1]=} options */
|
|
14
|
-
constructor(options = {}) {
|
|
15
|
-
this.options = options;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @param {import('three/addons/loaders/GLTFLoader.js').GLTFLoader} loader
|
|
19
|
-
* @param {string} _url
|
|
20
|
-
* @param {import('@needle-tools/engine').Context} context
|
|
21
|
-
*/
|
|
22
|
-
onImport = (loader, _url, context) => {
|
|
23
|
-
registerNeedleImpostorLoader(loader, {
|
|
24
|
-
...this.options,
|
|
25
|
-
renderer: context.renderer
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
function registerNeedleEngineImpostorLoader(options = {}) {
|
|
30
|
-
const plugin = new NeedleEngineImpostorLoaderPlugin(options);
|
|
31
|
-
addCustomExtensionPlugin(plugin);
|
|
32
|
-
return plugin;
|
|
33
|
-
}
|
|
34
|
-
function unregisterNeedleEngineImpostorLoader(plugin) {
|
|
35
|
-
removeCustomImportExtensionType(plugin);
|
|
36
|
-
}
|
|
37
|
-
export {
|
|
38
|
-
NeedleEngineImpostorLoaderPlugin,
|
|
39
|
-
registerNeedleEngineImpostorLoader,
|
|
40
|
-
unregisterNeedleEngineImpostorLoader
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=impostor-runtime-needle-engine.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/public/impostor-runtime-needle-engine.js"],
|
|
4
|
-
"sourcesContent": ["// @ts-check\r\n\r\nimport {\r\n addCustomExtensionPlugin,\r\n removeCustomImportExtensionType,\r\n} from '@needle-tools/engine';\r\nimport { registerNeedleImpostorLoader } from '@needle-tools/three-mesh-effects/impostor-runtime';\r\n\r\n/** @typedef {import('@needle-tools/engine').INeedleGLTFExtensionPlugin} INeedleGLTFExtensionPlugin */\r\n\r\n/**\r\n * Needle Engine adapter that installs the impostor Three.js loader plugin on\r\n * every GLTFLoader created by the engine.\r\n *\r\n * @implements {INeedleGLTFExtensionPlugin}\r\n */\r\nexport class NeedleEngineImpostorLoaderPlugin {\r\n name = 'NeedleEngineImpostorLoaderPlugin';\r\n\r\n /** @type {Parameters<typeof registerNeedleImpostorLoader>[1]} */\r\n options;\r\n\r\n /** @param {Parameters<typeof registerNeedleImpostorLoader>[1]=} options */\r\n constructor(options = {}) {\r\n this.options = options;\r\n }\r\n\r\n /**\r\n * @param {import('three/addons/loaders/GLTFLoader.js').GLTFLoader} loader\r\n * @param {string} _url\r\n * @param {import('@needle-tools/engine').Context} context\r\n */\r\n onImport = (loader, _url, context) => {\r\n registerNeedleImpostorLoader(loader, {\r\n ...this.options,\r\n renderer: context.renderer,\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Registers impostor loading for all subsequent Needle Engine glTF imports.\r\n * Keep the returned plugin if it needs to be unregistered later.\r\n *\r\n * @param {ConstructorParameters<typeof NeedleEngineImpostorLoaderPlugin>[0]=} options\r\n */\r\nexport function registerNeedleEngineImpostorLoader(options = {}) {\r\n const plugin = new NeedleEngineImpostorLoaderPlugin(options);\r\n addCustomExtensionPlugin(plugin);\r\n return plugin;\r\n}\r\n\r\n/** @param {NeedleEngineImpostorLoaderPlugin} plugin */\r\nexport function unregisterNeedleEngineImpostorLoader(plugin) {\r\n removeCustomImportExtensionType(plugin);\r\n}\r\n"],
|
|
5
|
-
"mappings": ";;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,oCAAoC;AAUtC,IAAM,mCAAN,MAAuC;AAAA,EAC5C,OAAO;AAAA;AAAA,EAGP;AAAA;AAAA,EAGA,YAAY,UAAU,CAAC,GAAG;AACxB,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAW,CAAC,QAAQ,MAAM,YAAY;AACpC,iCAA6B,QAAQ;AAAA,MACnC,GAAG,KAAK;AAAA,MACR,UAAU,QAAQ;AAAA,IACpB,CAAC;AAAA,EACH;AACF;AAQO,SAAS,mCAAmC,UAAU,CAAC,GAAG;AAC/D,QAAM,SAAS,IAAI,iCAAiC,OAAO;AAC3D,2BAAyB,MAAM;AAC/B,SAAO;AACT;AAGO,SAAS,qCAAqC,QAAQ;AAC3D,kCAAgC,MAAM;AACxC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|