three-edit-cores 0.0.18 → 0.0.20
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/dist/index.js +14783 -12445
- package/index.d.ts +86 -0
- package/package.json +7 -8
package/index.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as THREE from 'three'
|
|
2
|
+
import gsap from 'gsap'
|
|
3
|
+
|
|
4
|
+
export { THREE, gsap }
|
|
5
|
+
|
|
6
|
+
export function getObjectBox3(object: THREE.Object3D): THREE.Box3
|
|
7
|
+
|
|
8
|
+
export function cloneObjectMaterial(mesh: THREE.Mesh, material: THREE.Material): THREE.Material
|
|
9
|
+
|
|
10
|
+
export function objectChangeMaterial(mesh: THREE.Mesh, material: THREE.Material): void
|
|
11
|
+
|
|
12
|
+
export function getMaterials(object: THREE.Object3D): THREE.Material[]
|
|
13
|
+
|
|
14
|
+
export function getDistanceScalePoint(point: THREE.Vector3, distance: number, camera: THREE.Camera): THREE.Vector3
|
|
15
|
+
|
|
16
|
+
export function syncVectorTransform(source: THREE.Object3D, target: THREE.Object3D): void
|
|
17
|
+
|
|
18
|
+
export function getDirectionQuaternion(direction: THREE.Vector3): THREE.Quaternion
|
|
19
|
+
|
|
20
|
+
export function setGsapMeshAction(mesh: THREE.Object3D, action: gsap.TweenVars): void
|
|
21
|
+
|
|
22
|
+
export function objectChangeTransform(mesh: THREE.Object3D, transform: Record<string, unknown>): void
|
|
23
|
+
|
|
24
|
+
export function getObjectViews(object: THREE.Object3D, camera: THREE.Camera): Record<string, unknown>
|
|
25
|
+
|
|
26
|
+
export function createGsapAnimation(target: object, vars: gsap.TweenVars): gsap.core.Tween
|
|
27
|
+
|
|
28
|
+
export function createSpriteText(text: string, parameters?: Record<string, unknown>): THREE.Sprite
|
|
29
|
+
|
|
30
|
+
export function createCanvasText(text: string, parameters?: Record<string, unknown>): THREE.Sprite
|
|
31
|
+
|
|
32
|
+
export function restoreHistoryHandler(handler: Record<string, unknown>, storage: Record<string, unknown>): void
|
|
33
|
+
|
|
34
|
+
export const CORES_LIST: Record<string, unknown>[]
|
|
35
|
+
|
|
36
|
+
export class ThreeEditor {
|
|
37
|
+
|
|
38
|
+
constructor(DOM: HTMLElement, parameters?: Record<string, unknown>)
|
|
39
|
+
|
|
40
|
+
static dracoPath: string
|
|
41
|
+
|
|
42
|
+
static styleOverrides: Record<string, unknown>
|
|
43
|
+
|
|
44
|
+
static __DESIGNS__: Record<string, unknown>[]
|
|
45
|
+
|
|
46
|
+
static __EFFECTS__: Record<string, unknown>[]
|
|
47
|
+
|
|
48
|
+
static __GLSLLIB__: Record<string, unknown>[]
|
|
49
|
+
|
|
50
|
+
scene: THREE.Scene
|
|
51
|
+
|
|
52
|
+
camera: THREE.Camera
|
|
53
|
+
|
|
54
|
+
renderer: THREE.WebGLRenderer
|
|
55
|
+
|
|
56
|
+
controls: Record<string, unknown>
|
|
57
|
+
|
|
58
|
+
transformControls: Record<string, unknown>
|
|
59
|
+
|
|
60
|
+
effectComposer: Record<string, unknown>
|
|
61
|
+
|
|
62
|
+
renderSceneResize(): void
|
|
63
|
+
|
|
64
|
+
destroySceneRender(): void
|
|
65
|
+
|
|
66
|
+
saveSceneEdit(): Record<string, unknown>
|
|
67
|
+
|
|
68
|
+
resetEditorStorage(sceneParams: Record<string, unknown>): void
|
|
69
|
+
|
|
70
|
+
openControlPanel(): void
|
|
71
|
+
|
|
72
|
+
getSceneEvent(event: MouseEvent, callback?: (info: Record<string, unknown>) => void): void
|
|
73
|
+
|
|
74
|
+
getRawSceneEvent(): Record<string, unknown>
|
|
75
|
+
|
|
76
|
+
setOutlinePass(meshList?: THREE.Object3D[]): THREE.Object3D[]
|
|
77
|
+
|
|
78
|
+
getSceneEditorImage(params?: [string, string], scale?: number): string
|
|
79
|
+
|
|
80
|
+
setCss2dDOM(DOM: HTMLElement, position: THREE.Vector3): Record<string, unknown>
|
|
81
|
+
|
|
82
|
+
setCss3dDOM(DOM: HTMLElement, position: THREE.Vector3): Record<string, unknown>
|
|
83
|
+
|
|
84
|
+
[key: string]: unknown
|
|
85
|
+
|
|
86
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-edit-cores",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
"dist",
|
|
18
18
|
"index.d.ts"
|
|
19
19
|
],
|
|
20
|
-
"main": "./dist/index.
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
21
|
"module": "./dist/index.js",
|
|
22
22
|
"types": "./index.d.ts",
|
|
23
23
|
"exports": {
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
|
-
"import": "./dist/index.js"
|
|
26
|
-
"require": "./dist/index.umd.cjs"
|
|
25
|
+
"import": "./dist/index.js"
|
|
27
26
|
},
|
|
28
27
|
"scripts": {
|
|
29
28
|
"start": "vite",
|
|
@@ -32,13 +31,13 @@
|
|
|
32
31
|
"dependencies": {
|
|
33
32
|
"@theatre/core": "^0.7.2",
|
|
34
33
|
"@theatre/studio": "^0.7.2",
|
|
35
|
-
"gsap": "^3.
|
|
34
|
+
"gsap": "^3.15.0",
|
|
36
35
|
"lil-gui": "^0.21.0",
|
|
37
|
-
"three": "^0.
|
|
36
|
+
"three": "^0.184.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@rollup/plugin-terser": "^0.
|
|
41
|
-
"vite": "^
|
|
39
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
40
|
+
"vite": "^8.0.14",
|
|
42
41
|
"vite-plugin-javascript-obfuscator": "^3.1.0"
|
|
43
42
|
}
|
|
44
43
|
}
|