@needle-tools/engine 3.3.0-alpha → 3.4.0-alpha
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/CHANGELOG.md +10 -0
- package/dist/needle-engine.js +26116 -24881
- package/dist/needle-engine.min.js +384 -383
- package/dist/needle-engine.umd.cjs +372 -371
- package/lib/engine/codegen/register_types.js +50 -2
- package/lib/engine/codegen/register_types.js.map +1 -1
- package/lib/engine/engine_gameobject.d.ts +1 -1
- package/lib/engine/engine_gameobject.js +4 -2
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/lib/engine/engine_three_utils.js +2 -2
- package/lib/engine/engine_three_utils.js.map +1 -1
- package/lib/engine-components/Animation.js +4 -0
- package/lib/engine-components/Animation.js.map +1 -1
- package/lib/engine-components/codegen/components.d.ts +25 -1
- package/lib/engine-components/codegen/components.js +25 -1
- package/lib/engine-components/codegen/components.js.map +1 -1
- package/lib/engine-components/export/usdz/Extension.d.ts +4 -4
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.d.ts +86 -0
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.js +830 -0
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.js.map +1 -0
- package/lib/engine-components/export/usdz/USDZExporter.d.ts +6 -3
- package/lib/engine-components/export/usdz/USDZExporter.js +34 -11
- package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
- package/lib/engine-components/export/usdz/extensions/Animation.d.ts +15 -15
- package/lib/engine-components/export/usdz/extensions/Animation.js +24 -29
- package/lib/engine-components/export/usdz/extensions/Animation.js.map +1 -1
- package/lib/engine-components/export/usdz/extensions/DocumentExtension.d.ts +5 -0
- package/lib/engine-components/export/usdz/extensions/DocumentExtension.js +7 -0
- package/lib/engine-components/export/usdz/extensions/DocumentExtension.js.map +1 -0
- package/lib/engine-components/export/usdz/extensions/USDZText.d.ts +47 -0
- package/lib/engine-components/export/usdz/extensions/USDZText.js +114 -0
- package/lib/engine-components/export/usdz/extensions/USDZText.js.map +1 -0
- package/lib/engine-components/export/usdz/extensions/behavior/Actions.d.ts +30 -0
- package/lib/engine-components/export/usdz/extensions/behavior/Actions.js +89 -0
- package/lib/engine-components/export/usdz/extensions/behavior/Actions.js.map +1 -0
- package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.d.ts +23 -0
- package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.js +114 -0
- package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.js.map +1 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.d.ts +96 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js +421 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js.map +1 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.d.ts +111 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.js +409 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.js.map +1 -0
- package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -1
- package/lib/engine-components/ui/BaseUIComponent.d.ts +2 -0
- package/lib/engine-components/ui/BaseUIComponent.js +6 -0
- package/lib/engine-components/ui/BaseUIComponent.js.map +1 -1
- package/lib/engine-components/ui/Canvas.d.ts +11 -1
- package/lib/engine-components/ui/Canvas.js +72 -3
- package/lib/engine-components/ui/Canvas.js.map +1 -1
- package/lib/engine-components/ui/Graphic.js.map +1 -1
- package/lib/engine-components/ui/Image.js +4 -4
- package/lib/engine-components/ui/Image.js.map +1 -1
- package/lib/engine-components/ui/Interfaces.d.ts +11 -0
- package/lib/engine-components/ui/Interfaces.js +11 -0
- package/lib/engine-components/ui/Interfaces.js.map +1 -1
- package/lib/engine-components/ui/Layout.d.ts +65 -3
- package/lib/engine-components/ui/Layout.js +304 -3
- package/lib/engine-components/ui/Layout.js.map +1 -1
- package/lib/engine-components/ui/RectTransform.d.ts +8 -7
- package/lib/engine-components/ui/RectTransform.js +63 -35
- package/lib/engine-components/ui/RectTransform.js.map +1 -1
- package/lib/engine-components/utils/LookAt.d.ts +7 -1
- package/lib/engine-components/utils/LookAt.js +43 -6
- package/lib/engine-components/utils/LookAt.js.map +1 -1
- package/lib/engine-components/webxr/WebXRImageTracking.d.ts +4 -3
- package/lib/engine-components/webxr/WebXRImageTracking.js +81 -25
- package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/plugins/vite/reload.js +13 -2
- package/src/engine/codegen/register_types.js +52 -4
- package/src/engine/engine_gameobject.ts +3 -2
- package/src/engine/engine_three_utils.ts +2 -2
- package/src/engine-components/Animation.ts +4 -0
- package/src/engine-components/codegen/components.ts +25 -1
- package/src/engine-components/export/usdz/Extension.ts +4 -5
- package/src/engine-components/export/usdz/ThreeUSDZExporter.ts +1280 -0
- package/src/engine-components/export/usdz/USDZExporter.ts +39 -17
- package/src/engine-components/export/usdz/extensions/Animation.ts +37 -45
- package/src/engine-components/export/usdz/extensions/DocumentExtension.ts +10 -0
- package/src/engine-components/export/usdz/extensions/USDZText.ts +142 -0
- package/src/engine-components/export/usdz/extensions/behavior/Actions.ts +99 -0
- package/src/engine-components/export/usdz/extensions/behavior/Behaviour.ts +181 -0
- package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +503 -0
- package/src/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.ts +459 -0
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +1 -1
- package/src/engine-components/ui/BaseUIComponent.ts +7 -1
- package/src/engine-components/ui/Canvas.ts +80 -5
- package/src/engine-components/ui/Graphic.ts +2 -0
- package/src/engine-components/ui/Image.ts +3 -3
- package/src/engine-components/ui/Interfaces.ts +30 -6
- package/src/engine-components/ui/Layout.ts +303 -4
- package/src/engine-components/ui/RectTransform.ts +65 -40
- package/src/engine-components/utils/LookAt.ts +60 -7
- package/src/engine-components/webxr/WebXRImageTracking.ts +100 -27
- package/lib/engine-components/export/usdz/types.d.ts +0 -34
- package/lib/engine-components/export/usdz/types.js +0 -2
- package/lib/engine-components/export/usdz/types.js.map +0 -1
- package/src/engine-components/export/usdz/types.ts +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/engine",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-alpha",
|
|
4
4
|
"description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in",
|
|
5
5
|
"main": "dist/needle-engine.umd.cjs",
|
|
6
6
|
"type": "module",
|
package/plugins/vite/reload.js
CHANGED
|
@@ -9,6 +9,7 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
9
9
|
const __dirname = path.dirname(__filename);
|
|
10
10
|
|
|
11
11
|
const filesUsingHotReload = new Set();
|
|
12
|
+
let assetsDirectory = "";
|
|
12
13
|
|
|
13
14
|
export const needleReload = (command, config, userSettings) => {
|
|
14
15
|
if (command === "build") return;
|
|
@@ -23,8 +24,9 @@ export const needleReload = (command, config, userSettings) => {
|
|
|
23
24
|
if (res) config = res;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
|
|
27
27
|
const projectConfig = tryLoadProjectConfig();
|
|
28
|
+
assetsDirectory = path.resolve(projectConfig?.assetsDirectory || "assets");
|
|
29
|
+
|
|
28
30
|
const buildDirectory = projectConfig?.buildDirectory?.length ? process.cwd().replaceAll("\\", "/") + "/" + projectConfig?.buildDirectory : "";
|
|
29
31
|
if (buildDirectory?.length) {
|
|
30
32
|
setTimeout(() => console.log("Build directory: ", buildDirectory), 100);
|
|
@@ -153,7 +155,16 @@ async function handleReload({ file, server, modules, read, buildDirectory }) {
|
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
// these are known file types we export from integrations
|
|
159
|
+
const knownExportFileTypes = [ ".glb", ".gltf", ".bin", "exr", ".ktx2", ".mp3", ".ogg", ".mp4", ".webm" ];
|
|
160
|
+
if (!knownExportFileTypes.some((type) => file.endsWith(type)))
|
|
161
|
+
return;
|
|
162
|
+
|
|
163
|
+
// we only care about exports into "assets"
|
|
164
|
+
if (!path.resolve(file).startsWith(assetsDirectory))
|
|
165
|
+
return;
|
|
166
|
+
|
|
167
|
+
if (file.endsWith(".svelte") || file.endsWith(".vue") || file.endsWith(".ts") || file.endsWith(".js") || file.endsWith(".jsx") || file.endsWith(".tsx"))
|
|
157
168
|
return;
|
|
158
169
|
|
|
159
170
|
if (file.endsWith(lockFileName)) return;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { TypeStore } from "./../engine_typestore"
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
// Import types
|
|
4
4
|
import { __Ignore } from "../../engine-components/codegen/components";
|
|
5
|
+
import { ActionBuilder } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
|
|
6
|
+
import { ActionCollection } from "../../engine-components/export/usdz/extensions/behavior/Actions";
|
|
7
|
+
import { ActionModel } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
|
|
5
8
|
import { AlignmentConstraint } from "../../engine-components/AlignmentConstraint";
|
|
6
9
|
import { Animation } from "../../engine-components/Animation";
|
|
7
10
|
import { AnimationCurve } from "../../engine-components/AnimationCurve";
|
|
@@ -26,6 +29,8 @@ import { AvatarModel } from "../../engine-components/AvatarLoader";
|
|
|
26
29
|
import { AxesHelper } from "../../engine-components/AxesHelper";
|
|
27
30
|
import { BaseUIComponent } from "../../engine-components/ui/BaseUIComponent";
|
|
28
31
|
import { BasicIKConstraint } from "../../engine-components/BasicIKConstraint";
|
|
32
|
+
import { BehaviorExtension } from "../../engine-components/export/usdz/extensions/behavior/Behaviour";
|
|
33
|
+
import { BehaviorModel } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
|
|
29
34
|
import { Behaviour } from "../../engine-components/Component";
|
|
30
35
|
import { Bloom } from "../../engine-components/postprocessing/Effects/Bloom";
|
|
31
36
|
import { BoxCollider } from "../../engine-components/Collider";
|
|
@@ -37,6 +42,8 @@ import { Camera } from "../../engine-components/Camera";
|
|
|
37
42
|
import { Canvas } from "../../engine-components/ui/Canvas";
|
|
38
43
|
import { CanvasGroup } from "../../engine-components/ui/CanvasGroup";
|
|
39
44
|
import { CapsuleCollider } from "../../engine-components/Collider";
|
|
45
|
+
import { ChangeMaterialOnClick } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
46
|
+
import { ChangeTransformOnClick } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
40
47
|
import { CharacterController } from "../../engine-components/CharacterController";
|
|
41
48
|
import { CharacterControllerInput } from "../../engine-components/CharacterController";
|
|
42
49
|
import { ChromaticAberration } from "../../engine-components/postprocessing/Effects/ChromaticAberration";
|
|
@@ -50,10 +57,12 @@ import { Deletable } from "../../engine-components/DeleteBox";
|
|
|
50
57
|
import { DeleteBox } from "../../engine-components/DeleteBox";
|
|
51
58
|
import { DepthOfField } from "../../engine-components/postprocessing/Effects/DepthOfField";
|
|
52
59
|
import { DeviceFlag } from "../../engine-components/DeviceFlag";
|
|
60
|
+
import { DocumentExtension } from "../../engine-components/export/usdz/extensions/DocumentExtension";
|
|
53
61
|
import { DragControls } from "../../engine-components/DragControls";
|
|
54
62
|
import { DropListener } from "../../engine-components/DropListener";
|
|
55
63
|
import { Duplicatable } from "../../engine-components/Duplicatable";
|
|
56
64
|
import { EmissionModule } from "../../engine-components/ParticleSystemModules";
|
|
65
|
+
import { EmphasizeOnClick } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
57
66
|
import { EventList } from "../../engine-components/EventList";
|
|
58
67
|
import { EventListEvent } from "../../engine-components/EventList";
|
|
59
68
|
import { EventSystem } from "../../engine-components/ui/EventSystem";
|
|
@@ -70,13 +79,14 @@ import { GraphicRaycaster } from "../../engine-components/ui/Raycaster";
|
|
|
70
79
|
import { GridHelper } from "../../engine-components/GridHelper";
|
|
71
80
|
import { GridLayoutGroup } from "../../engine-components/ui/Layout";
|
|
72
81
|
import { GroundProjectedEnv } from "../../engine-components/GroundProjection";
|
|
82
|
+
import { GroupActionModel } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
|
|
83
|
+
import { HideOnStart } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
73
84
|
import { HingeJoint } from "../../engine-components/Joints";
|
|
74
85
|
import { HorizontalLayoutGroup } from "../../engine-components/ui/Layout";
|
|
75
86
|
import { Image } from "../../engine-components/ui/Image";
|
|
76
87
|
import { InheritVelocityModule } from "../../engine-components/ParticleSystemModules";
|
|
77
88
|
import { InputField } from "../../engine-components/ui/InputField";
|
|
78
89
|
import { Interactable } from "../../engine-components/Interactable";
|
|
79
|
-
import { LayoutGroup } from "../../engine-components/ui/Layout";
|
|
80
90
|
import { Light } from "../../engine-components/Light";
|
|
81
91
|
import { LimitVelocityOverLifetimeModule } from "../../engine-components/ParticleSystemModules";
|
|
82
92
|
import { LODGroup } from "../../engine-components/LODGroup";
|
|
@@ -98,17 +108,21 @@ import { OffsetConstraint } from "../../engine-components/OffsetConstraint";
|
|
|
98
108
|
import { OpenURL } from "../../engine-components/utils/OpenURL";
|
|
99
109
|
import { OrbitControls } from "../../engine-components/OrbitControls";
|
|
100
110
|
import { Outline } from "../../engine-components/ui/Outline";
|
|
111
|
+
import { Padding } from "../../engine-components/ui/Layout";
|
|
101
112
|
import { ParticleBurst } from "../../engine-components/ParticleSystemModules";
|
|
102
113
|
import { ParticleSubEmitter } from "../../engine-components/ParticleSystemSubEmitter";
|
|
103
114
|
import { ParticleSystem } from "../../engine-components/ParticleSystem";
|
|
104
115
|
import { ParticleSystemRenderer } from "../../engine-components/ParticleSystem";
|
|
105
116
|
import { PixelationEffect } from "../../engine-components/postprocessing/Effects/Pixelation";
|
|
106
117
|
import { PlayableDirector } from "../../engine-components/timeline/PlayableDirector";
|
|
118
|
+
import { PlayAnimationOnClick } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
107
119
|
import { PlayerColor } from "../../engine-components/PlayerColor";
|
|
108
120
|
import { PlayerState } from "../../engine-components-experimental/networking/PlayerSync";
|
|
109
121
|
import { PlayerSync } from "../../engine-components-experimental/networking/PlayerSync";
|
|
110
122
|
import { PointerEventData } from "../../engine-components/ui/PointerEvents";
|
|
111
123
|
import { PostProcessingHandler } from "../../engine-components/postprocessing/PostProcessingHandler";
|
|
124
|
+
import { PreliminaryAction } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
125
|
+
import { PreliminaryTrigger } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
112
126
|
import { PresentationMode } from "../../engine-components-experimental/Presentation";
|
|
113
127
|
import { QuickLookOverlay } from "../../engine-components/export/usdz/USDZExporter";
|
|
114
128
|
import { RawImage } from "../../engine-components/ui/Image";
|
|
@@ -127,6 +141,7 @@ import { RotationOverLifetimeModule } from "../../engine-components/ParticleSyst
|
|
|
127
141
|
import { SceneSwitcher } from "../../engine-components/SceneSwitcher";
|
|
128
142
|
import { ScreenCapture } from "../../engine-components/ScreenCapture";
|
|
129
143
|
import { ScreenSpaceAmbientOcclusion } from "../../engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion";
|
|
144
|
+
import { SetActiveOnClick } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
130
145
|
import { ShadowCatcher } from "../../engine-components/ShadowCatcher";
|
|
131
146
|
import { ShapeModule } from "../../engine-components/ParticleSystemModules";
|
|
132
147
|
import { SignalAsset } from "../../engine-components/timeline/SignalAsset";
|
|
@@ -151,24 +166,33 @@ import { SubEmitterSystem } from "../../engine-components/ParticleSystem";
|
|
|
151
166
|
import { SyncedCamera } from "../../engine-components/SyncedCamera";
|
|
152
167
|
import { SyncedRoom } from "../../engine-components/SyncedRoom";
|
|
153
168
|
import { SyncedTransform } from "../../engine-components/SyncedTransform";
|
|
169
|
+
import { TapGestureTrigger } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
154
170
|
import { TeleportTarget } from "../../engine-components/webxr/WebXRController";
|
|
155
171
|
import { TestRunner } from "../../engine-components/TestRunner";
|
|
156
172
|
import { TestSimulateUserData } from "../../engine-components/TestRunner";
|
|
157
173
|
import { Text } from "../../engine-components/ui/Text";
|
|
174
|
+
import { TextBuilder } from "../../engine-components/export/usdz/extensions/USDZText";
|
|
175
|
+
import { TextExtension } from "../../engine-components/export/usdz/extensions/USDZText";
|
|
158
176
|
import { TextureSheetAnimationModule } from "../../engine-components/ParticleSystemModules";
|
|
159
177
|
import { TiltShiftEffect } from "../../engine-components/postprocessing/Effects/TiltShiftEffect";
|
|
160
178
|
import { ToneMapping } from "../../engine-components/postprocessing/Effects/Tonemapping";
|
|
161
179
|
import { TrailModule } from "../../engine-components/ParticleSystemModules";
|
|
162
180
|
import { TransformData } from "../../engine-components/export/usdz/extensions/Animation";
|
|
163
181
|
import { TransformGizmo } from "../../engine-components/TransformGizmo";
|
|
182
|
+
import { TriggerBuilder } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
|
|
183
|
+
import { TriggerModel } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
|
|
164
184
|
import { UIRaycastUtils } from "../../engine-components/ui/RaycastUtils";
|
|
165
185
|
import { UIRootComponent } from "../../engine-components/ui/BaseUIComponent";
|
|
166
186
|
import { UsageMarker } from "../../engine-components/Interactable";
|
|
187
|
+
import { USDZBehaviours } from "../../engine-components/export/usdz/extensions/behavior/Behaviour";
|
|
167
188
|
import { USDZExporter } from "../../engine-components/export/usdz/USDZExporter";
|
|
189
|
+
import { USDZText } from "../../engine-components/export/usdz/extensions/USDZText";
|
|
190
|
+
import { VariantAction } from "../../engine-components/export/usdz/extensions/behavior/Actions";
|
|
168
191
|
import { VelocityOverLifetimeModule } from "../../engine-components/ParticleSystemModules";
|
|
169
192
|
import { VerticalLayoutGroup } from "../../engine-components/ui/Layout";
|
|
170
193
|
import { VideoPlayer } from "../../engine-components/VideoPlayer";
|
|
171
194
|
import { Vignette } from "../../engine-components/postprocessing/Effects/Vignette";
|
|
195
|
+
import { VisibilityAction } from "../../engine-components/export/usdz/extensions/behavior/BehaviourComponents";
|
|
172
196
|
import { Voip } from "../../engine-components/Voip";
|
|
173
197
|
import { Volume } from "../../engine-components/postprocessing/Volume";
|
|
174
198
|
import { VolumeParameter } from "../../engine-components/postprocessing/VolumeParameter";
|
|
@@ -190,9 +214,12 @@ import { XRGrabModel } from "../../engine-components/webxr/WebXRGrabRendering";
|
|
|
190
214
|
import { XRGrabRendering } from "../../engine-components/webxr/WebXRGrabRendering";
|
|
191
215
|
import { XRRig } from "../../engine-components/webxr/WebXRRig";
|
|
192
216
|
import { XRState } from "../../engine-components/XRFlag";
|
|
193
|
-
|
|
217
|
+
|
|
194
218
|
// Register types
|
|
195
219
|
TypeStore.add("__Ignore", __Ignore);
|
|
220
|
+
TypeStore.add("ActionBuilder", ActionBuilder);
|
|
221
|
+
TypeStore.add("ActionCollection", ActionCollection);
|
|
222
|
+
TypeStore.add("ActionModel", ActionModel);
|
|
196
223
|
TypeStore.add("AlignmentConstraint", AlignmentConstraint);
|
|
197
224
|
TypeStore.add("Animation", Animation);
|
|
198
225
|
TypeStore.add("AnimationCurve", AnimationCurve);
|
|
@@ -217,6 +244,8 @@ TypeStore.add("AvatarModel", AvatarModel);
|
|
|
217
244
|
TypeStore.add("AxesHelper", AxesHelper);
|
|
218
245
|
TypeStore.add("BaseUIComponent", BaseUIComponent);
|
|
219
246
|
TypeStore.add("BasicIKConstraint", BasicIKConstraint);
|
|
247
|
+
TypeStore.add("BehaviorExtension", BehaviorExtension);
|
|
248
|
+
TypeStore.add("BehaviorModel", BehaviorModel);
|
|
220
249
|
TypeStore.add("Behaviour", Behaviour);
|
|
221
250
|
TypeStore.add("Bloom", Bloom);
|
|
222
251
|
TypeStore.add("BoxCollider", BoxCollider);
|
|
@@ -228,6 +257,8 @@ TypeStore.add("Camera", Camera);
|
|
|
228
257
|
TypeStore.add("Canvas", Canvas);
|
|
229
258
|
TypeStore.add("CanvasGroup", CanvasGroup);
|
|
230
259
|
TypeStore.add("CapsuleCollider", CapsuleCollider);
|
|
260
|
+
TypeStore.add("ChangeMaterialOnClick", ChangeMaterialOnClick);
|
|
261
|
+
TypeStore.add("ChangeTransformOnClick", ChangeTransformOnClick);
|
|
231
262
|
TypeStore.add("CharacterController", CharacterController);
|
|
232
263
|
TypeStore.add("CharacterControllerInput", CharacterControllerInput);
|
|
233
264
|
TypeStore.add("ChromaticAberration", ChromaticAberration);
|
|
@@ -241,10 +272,12 @@ TypeStore.add("Deletable", Deletable);
|
|
|
241
272
|
TypeStore.add("DeleteBox", DeleteBox);
|
|
242
273
|
TypeStore.add("DepthOfField", DepthOfField);
|
|
243
274
|
TypeStore.add("DeviceFlag", DeviceFlag);
|
|
275
|
+
TypeStore.add("DocumentExtension", DocumentExtension);
|
|
244
276
|
TypeStore.add("DragControls", DragControls);
|
|
245
277
|
TypeStore.add("DropListener", DropListener);
|
|
246
278
|
TypeStore.add("Duplicatable", Duplicatable);
|
|
247
279
|
TypeStore.add("EmissionModule", EmissionModule);
|
|
280
|
+
TypeStore.add("EmphasizeOnClick", EmphasizeOnClick);
|
|
248
281
|
TypeStore.add("EventList", EventList);
|
|
249
282
|
TypeStore.add("EventListEvent", EventListEvent);
|
|
250
283
|
TypeStore.add("EventSystem", EventSystem);
|
|
@@ -261,13 +294,14 @@ TypeStore.add("GraphicRaycaster", GraphicRaycaster);
|
|
|
261
294
|
TypeStore.add("GridHelper", GridHelper);
|
|
262
295
|
TypeStore.add("GridLayoutGroup", GridLayoutGroup);
|
|
263
296
|
TypeStore.add("GroundProjectedEnv", GroundProjectedEnv);
|
|
297
|
+
TypeStore.add("GroupActionModel", GroupActionModel);
|
|
298
|
+
TypeStore.add("HideOnStart", HideOnStart);
|
|
264
299
|
TypeStore.add("HingeJoint", HingeJoint);
|
|
265
300
|
TypeStore.add("HorizontalLayoutGroup", HorizontalLayoutGroup);
|
|
266
301
|
TypeStore.add("Image", Image);
|
|
267
302
|
TypeStore.add("InheritVelocityModule", InheritVelocityModule);
|
|
268
303
|
TypeStore.add("InputField", InputField);
|
|
269
304
|
TypeStore.add("Interactable", Interactable);
|
|
270
|
-
TypeStore.add("LayoutGroup", LayoutGroup);
|
|
271
305
|
TypeStore.add("Light", Light);
|
|
272
306
|
TypeStore.add("LimitVelocityOverLifetimeModule", LimitVelocityOverLifetimeModule);
|
|
273
307
|
TypeStore.add("LODGroup", LODGroup);
|
|
@@ -289,17 +323,21 @@ TypeStore.add("OffsetConstraint", OffsetConstraint);
|
|
|
289
323
|
TypeStore.add("OpenURL", OpenURL);
|
|
290
324
|
TypeStore.add("OrbitControls", OrbitControls);
|
|
291
325
|
TypeStore.add("Outline", Outline);
|
|
326
|
+
TypeStore.add("Padding", Padding);
|
|
292
327
|
TypeStore.add("ParticleBurst", ParticleBurst);
|
|
293
328
|
TypeStore.add("ParticleSubEmitter", ParticleSubEmitter);
|
|
294
329
|
TypeStore.add("ParticleSystem", ParticleSystem);
|
|
295
330
|
TypeStore.add("ParticleSystemRenderer", ParticleSystemRenderer);
|
|
296
331
|
TypeStore.add("PixelationEffect", PixelationEffect);
|
|
297
332
|
TypeStore.add("PlayableDirector", PlayableDirector);
|
|
333
|
+
TypeStore.add("PlayAnimationOnClick", PlayAnimationOnClick);
|
|
298
334
|
TypeStore.add("PlayerColor", PlayerColor);
|
|
299
335
|
TypeStore.add("PlayerState", PlayerState);
|
|
300
336
|
TypeStore.add("PlayerSync", PlayerSync);
|
|
301
337
|
TypeStore.add("PointerEventData", PointerEventData);
|
|
302
338
|
TypeStore.add("PostProcessingHandler", PostProcessingHandler);
|
|
339
|
+
TypeStore.add("PreliminaryAction", PreliminaryAction);
|
|
340
|
+
TypeStore.add("PreliminaryTrigger", PreliminaryTrigger);
|
|
303
341
|
TypeStore.add("PresentationMode", PresentationMode);
|
|
304
342
|
TypeStore.add("QuickLookOverlay", QuickLookOverlay);
|
|
305
343
|
TypeStore.add("RawImage", RawImage);
|
|
@@ -318,6 +356,7 @@ TypeStore.add("RotationOverLifetimeModule", RotationOverLifetimeModule);
|
|
|
318
356
|
TypeStore.add("SceneSwitcher", SceneSwitcher);
|
|
319
357
|
TypeStore.add("ScreenCapture", ScreenCapture);
|
|
320
358
|
TypeStore.add("ScreenSpaceAmbientOcclusion", ScreenSpaceAmbientOcclusion);
|
|
359
|
+
TypeStore.add("SetActiveOnClick", SetActiveOnClick);
|
|
321
360
|
TypeStore.add("ShadowCatcher", ShadowCatcher);
|
|
322
361
|
TypeStore.add("ShapeModule", ShapeModule);
|
|
323
362
|
TypeStore.add("SignalAsset", SignalAsset);
|
|
@@ -342,24 +381,33 @@ TypeStore.add("SubEmitterSystem", SubEmitterSystem);
|
|
|
342
381
|
TypeStore.add("SyncedCamera", SyncedCamera);
|
|
343
382
|
TypeStore.add("SyncedRoom", SyncedRoom);
|
|
344
383
|
TypeStore.add("SyncedTransform", SyncedTransform);
|
|
384
|
+
TypeStore.add("TapGestureTrigger", TapGestureTrigger);
|
|
345
385
|
TypeStore.add("TeleportTarget", TeleportTarget);
|
|
346
386
|
TypeStore.add("TestRunner", TestRunner);
|
|
347
387
|
TypeStore.add("TestSimulateUserData", TestSimulateUserData);
|
|
348
388
|
TypeStore.add("Text", Text);
|
|
389
|
+
TypeStore.add("TextBuilder", TextBuilder);
|
|
390
|
+
TypeStore.add("TextExtension", TextExtension);
|
|
349
391
|
TypeStore.add("TextureSheetAnimationModule", TextureSheetAnimationModule);
|
|
350
392
|
TypeStore.add("TiltShiftEffect", TiltShiftEffect);
|
|
351
393
|
TypeStore.add("ToneMapping", ToneMapping);
|
|
352
394
|
TypeStore.add("TrailModule", TrailModule);
|
|
353
395
|
TypeStore.add("TransformData", TransformData);
|
|
354
396
|
TypeStore.add("TransformGizmo", TransformGizmo);
|
|
397
|
+
TypeStore.add("TriggerBuilder", TriggerBuilder);
|
|
398
|
+
TypeStore.add("TriggerModel", TriggerModel);
|
|
355
399
|
TypeStore.add("UIRaycastUtils", UIRaycastUtils);
|
|
356
400
|
TypeStore.add("UIRootComponent", UIRootComponent);
|
|
357
401
|
TypeStore.add("UsageMarker", UsageMarker);
|
|
402
|
+
TypeStore.add("USDZBehaviours", USDZBehaviours);
|
|
358
403
|
TypeStore.add("USDZExporter", USDZExporter);
|
|
404
|
+
TypeStore.add("USDZText", USDZText);
|
|
405
|
+
TypeStore.add("VariantAction", VariantAction);
|
|
359
406
|
TypeStore.add("VelocityOverLifetimeModule", VelocityOverLifetimeModule);
|
|
360
407
|
TypeStore.add("VerticalLayoutGroup", VerticalLayoutGroup);
|
|
361
408
|
TypeStore.add("VideoPlayer", VideoPlayer);
|
|
362
409
|
TypeStore.add("Vignette", Vignette);
|
|
410
|
+
TypeStore.add("VisibilityAction", VisibilityAction);
|
|
363
411
|
TypeStore.add("Voip", Voip);
|
|
364
412
|
TypeStore.add("Volume", Volume);
|
|
365
413
|
TypeStore.add("VolumeParameter", VolumeParameter);
|
|
@@ -163,8 +163,9 @@ export function foreachComponent(instance: Object3D, cb: ForEachComponentCallbac
|
|
|
163
163
|
return internalForEachComponent(instance, cb, recursive);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
export function* foreachComponentEnumerator<T extends IComponent>(instance: Object3D, type?: Constructor<T>, includeChildren: boolean = false): Generator<T> {
|
|
166
|
+
export function* foreachComponentEnumerator<T extends IComponent>(instance: Object3D, type?: Constructor<T>, includeChildren: boolean = false, maxLevel: number = 999, _currentLevel: number = 0): Generator<T> {
|
|
167
167
|
if (!instance?.userData.components) return;
|
|
168
|
+
if (_currentLevel > maxLevel) return;
|
|
168
169
|
for (const comp of instance.userData.components) {
|
|
169
170
|
if (type && comp?.isComponent === true && comp instanceof type) {
|
|
170
171
|
yield comp;
|
|
@@ -175,7 +176,7 @@ export function* foreachComponentEnumerator<T extends IComponent>(instance: Obje
|
|
|
175
176
|
}
|
|
176
177
|
if (includeChildren === true) {
|
|
177
178
|
for (const ch of instance.children) {
|
|
178
|
-
yield* foreachComponentEnumerator(ch, type, true);
|
|
179
|
+
yield* foreachComponentEnumerator(ch, type, true, maxLevel, _currentLevel + 1);
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
}
|
|
@@ -98,8 +98,8 @@ export function setWorldScale(obj: Object3D, vec: Vector3) {
|
|
|
98
98
|
const tempVec = _worldScale2;
|
|
99
99
|
const obj2 = obj.parent;
|
|
100
100
|
obj2.getWorldScale(tempVec);
|
|
101
|
-
|
|
102
|
-
obj.scale.
|
|
101
|
+
obj.scale.copy(vec);
|
|
102
|
+
obj.scale.divide(tempVec);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
const _forward = new Vector3();
|
|
@@ -176,6 +176,10 @@ export class Animation extends Behaviour {
|
|
|
176
176
|
return this.internalOnPlay(act, options);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
+
if (!(clip instanceof AnimationClip)) {
|
|
180
|
+
console.warn("Clip is no AnimationClip", clip, "on object: " + this.name)
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
179
183
|
const act = this.mixer.clipAction(clip);
|
|
180
184
|
this.actions.push(act);
|
|
181
185
|
return this.internalOnPlay(act, options);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Export types
|
|
2
2
|
export class __Ignore {}
|
|
3
|
+
export { ActionBuilder } from "../export/usdz/extensions/behavior/BehavioursBuilder";
|
|
4
|
+
export { ActionCollection } from "../export/usdz/extensions/behavior/Actions";
|
|
5
|
+
export { ActionModel } from "../export/usdz/extensions/behavior/BehavioursBuilder";
|
|
3
6
|
export { AlignmentConstraint } from "../AlignmentConstraint";
|
|
4
7
|
export { Animation } from "../Animation";
|
|
5
8
|
export { AnimationCurve } from "../AnimationCurve";
|
|
@@ -24,6 +27,8 @@ export { AvatarModel } from "../AvatarLoader";
|
|
|
24
27
|
export { AxesHelper } from "../AxesHelper";
|
|
25
28
|
export { BaseUIComponent } from "../ui/BaseUIComponent";
|
|
26
29
|
export { BasicIKConstraint } from "../BasicIKConstraint";
|
|
30
|
+
export { BehaviorExtension } from "../export/usdz/extensions/behavior/Behaviour";
|
|
31
|
+
export { BehaviorModel } from "../export/usdz/extensions/behavior/BehavioursBuilder";
|
|
27
32
|
export { Behaviour } from "../Component";
|
|
28
33
|
export { Bloom } from "../postprocessing/Effects/Bloom";
|
|
29
34
|
export { BoxCollider } from "../Collider";
|
|
@@ -35,6 +40,8 @@ export { Camera } from "../Camera";
|
|
|
35
40
|
export { Canvas } from "../ui/Canvas";
|
|
36
41
|
export { CanvasGroup } from "../ui/CanvasGroup";
|
|
37
42
|
export { CapsuleCollider } from "../Collider";
|
|
43
|
+
export { ChangeMaterialOnClick } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
44
|
+
export { ChangeTransformOnClick } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
38
45
|
export { CharacterController } from "../CharacterController";
|
|
39
46
|
export { CharacterControllerInput } from "../CharacterController";
|
|
40
47
|
export { ChromaticAberration } from "../postprocessing/Effects/ChromaticAberration";
|
|
@@ -48,10 +55,12 @@ export { Deletable } from "../DeleteBox";
|
|
|
48
55
|
export { DeleteBox } from "../DeleteBox";
|
|
49
56
|
export { DepthOfField } from "../postprocessing/Effects/DepthOfField";
|
|
50
57
|
export { DeviceFlag } from "../DeviceFlag";
|
|
58
|
+
export { DocumentExtension } from "../export/usdz/extensions/DocumentExtension";
|
|
51
59
|
export { DragControls } from "../DragControls";
|
|
52
60
|
export { DropListener } from "../DropListener";
|
|
53
61
|
export { Duplicatable } from "../Duplicatable";
|
|
54
62
|
export { EmissionModule } from "../ParticleSystemModules";
|
|
63
|
+
export { EmphasizeOnClick } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
55
64
|
export { EventList } from "../EventList";
|
|
56
65
|
export { EventListEvent } from "../EventList";
|
|
57
66
|
export { EventSystem } from "../ui/EventSystem";
|
|
@@ -68,13 +77,14 @@ export { GraphicRaycaster } from "../ui/Raycaster";
|
|
|
68
77
|
export { GridHelper } from "../GridHelper";
|
|
69
78
|
export { GridLayoutGroup } from "../ui/Layout";
|
|
70
79
|
export { GroundProjectedEnv } from "../GroundProjection";
|
|
80
|
+
export { GroupActionModel } from "../export/usdz/extensions/behavior/BehavioursBuilder";
|
|
81
|
+
export { HideOnStart } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
71
82
|
export { HingeJoint } from "../Joints";
|
|
72
83
|
export { HorizontalLayoutGroup } from "../ui/Layout";
|
|
73
84
|
export { Image } from "../ui/Image";
|
|
74
85
|
export { InheritVelocityModule } from "../ParticleSystemModules";
|
|
75
86
|
export { InputField } from "../ui/InputField";
|
|
76
87
|
export { Interactable } from "../Interactable";
|
|
77
|
-
export { LayoutGroup } from "../ui/Layout";
|
|
78
88
|
export { Light } from "../Light";
|
|
79
89
|
export { LimitVelocityOverLifetimeModule } from "../ParticleSystemModules";
|
|
80
90
|
export { LODGroup } from "../LODGroup";
|
|
@@ -96,15 +106,19 @@ export { OffsetConstraint } from "../OffsetConstraint";
|
|
|
96
106
|
export { OpenURL } from "../utils/OpenURL";
|
|
97
107
|
export { OrbitControls } from "../OrbitControls";
|
|
98
108
|
export { Outline } from "../ui/Outline";
|
|
109
|
+
export { Padding } from "../ui/Layout";
|
|
99
110
|
export { ParticleBurst } from "../ParticleSystemModules";
|
|
100
111
|
export { ParticleSubEmitter } from "../ParticleSystemSubEmitter";
|
|
101
112
|
export { ParticleSystem } from "../ParticleSystem";
|
|
102
113
|
export { ParticleSystemRenderer } from "../ParticleSystem";
|
|
103
114
|
export { PixelationEffect } from "../postprocessing/Effects/Pixelation";
|
|
104
115
|
export { PlayableDirector } from "../timeline/PlayableDirector";
|
|
116
|
+
export { PlayAnimationOnClick } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
105
117
|
export { PlayerColor } from "../PlayerColor";
|
|
106
118
|
export { PointerEventData } from "../ui/PointerEvents";
|
|
107
119
|
export { PostProcessingHandler } from "../postprocessing/PostProcessingHandler";
|
|
120
|
+
export { PreliminaryAction } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
121
|
+
export { PreliminaryTrigger } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
108
122
|
export { QuickLookOverlay } from "../export/usdz/USDZExporter";
|
|
109
123
|
export { RawImage } from "../ui/Image";
|
|
110
124
|
export { Raycaster } from "../ui/Raycaster";
|
|
@@ -122,6 +136,7 @@ export { RotationOverLifetimeModule } from "../ParticleSystemModules";
|
|
|
122
136
|
export { SceneSwitcher } from "../SceneSwitcher";
|
|
123
137
|
export { ScreenCapture } from "../ScreenCapture";
|
|
124
138
|
export { ScreenSpaceAmbientOcclusion } from "../postprocessing/Effects/ScreenspaceAmbientOcclusion";
|
|
139
|
+
export { SetActiveOnClick } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
125
140
|
export { ShadowCatcher } from "../ShadowCatcher";
|
|
126
141
|
export { ShapeModule } from "../ParticleSystemModules";
|
|
127
142
|
export { SignalAsset } from "../timeline/SignalAsset";
|
|
@@ -146,24 +161,33 @@ export { SubEmitterSystem } from "../ParticleSystem";
|
|
|
146
161
|
export { SyncedCamera } from "../SyncedCamera";
|
|
147
162
|
export { SyncedRoom } from "../SyncedRoom";
|
|
148
163
|
export { SyncedTransform } from "../SyncedTransform";
|
|
164
|
+
export { TapGestureTrigger } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
149
165
|
export { TeleportTarget } from "../webxr/WebXRController";
|
|
150
166
|
export { TestRunner } from "../TestRunner";
|
|
151
167
|
export { TestSimulateUserData } from "../TestRunner";
|
|
152
168
|
export { Text } from "../ui/Text";
|
|
169
|
+
export { TextBuilder } from "../export/usdz/extensions/USDZText";
|
|
170
|
+
export { TextExtension } from "../export/usdz/extensions/USDZText";
|
|
153
171
|
export { TextureSheetAnimationModule } from "../ParticleSystemModules";
|
|
154
172
|
export { TiltShiftEffect } from "../postprocessing/Effects/TiltShiftEffect";
|
|
155
173
|
export { ToneMapping } from "../postprocessing/Effects/Tonemapping";
|
|
156
174
|
export { TrailModule } from "../ParticleSystemModules";
|
|
157
175
|
export { TransformData } from "../export/usdz/extensions/Animation";
|
|
158
176
|
export { TransformGizmo } from "../TransformGizmo";
|
|
177
|
+
export { TriggerBuilder } from "../export/usdz/extensions/behavior/BehavioursBuilder";
|
|
178
|
+
export { TriggerModel } from "../export/usdz/extensions/behavior/BehavioursBuilder";
|
|
159
179
|
export { UIRaycastUtils } from "../ui/RaycastUtils";
|
|
160
180
|
export { UIRootComponent } from "../ui/BaseUIComponent";
|
|
161
181
|
export { UsageMarker } from "../Interactable";
|
|
182
|
+
export { USDZBehaviours } from "../export/usdz/extensions/behavior/Behaviour";
|
|
162
183
|
export { USDZExporter } from "../export/usdz/USDZExporter";
|
|
184
|
+
export { USDZText } from "../export/usdz/extensions/USDZText";
|
|
185
|
+
export { VariantAction } from "../export/usdz/extensions/behavior/Actions";
|
|
163
186
|
export { VelocityOverLifetimeModule } from "../ParticleSystemModules";
|
|
164
187
|
export { VerticalLayoutGroup } from "../ui/Layout";
|
|
165
188
|
export { VideoPlayer } from "../VideoPlayer";
|
|
166
189
|
export { Vignette } from "../postprocessing/Effects/Vignette";
|
|
190
|
+
export { VisibilityAction } from "../export/usdz/extensions/behavior/BehaviourComponents";
|
|
167
191
|
export { Voip } from "../Voip";
|
|
168
192
|
export { Volume } from "../postprocessing/Volume";
|
|
169
193
|
export { VolumeParameter } from "../postprocessing/VolumeParameter";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { USDObject } from "./ThreeUSDZExporter";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export interface IUSDZExporterExtension {
|
|
3
|
+
export interface IUSDExporterExtension {
|
|
5
4
|
|
|
6
5
|
get extensionName(): string;
|
|
7
6
|
onBeforeBuildDocument?(context);
|
|
8
7
|
onAfterBuildDocument?(context);
|
|
9
|
-
onExportObject?(object, model :
|
|
8
|
+
onExportObject?(object, model : USDObject, context);
|
|
10
9
|
onAfterSerialize?(context);
|
|
11
|
-
onAfterHierarchy?(context);
|
|
10
|
+
onAfterHierarchy?(context, writer : any);
|
|
12
11
|
}
|