@@ -1,6 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { BufferGeometry,Material, Matrix4, Object3D } from "three";
|
2
|
+
|
3
|
+
import { USDDocument,USDObject } from "../../ThreeUSDZExporter.js";
|
2
4
|
import { ActionBuilder, ActionModel } from "./BehavioursBuilder.js";
|
3
|
-
import { USDObject, USDDocument } from "../../ThreeUSDZExporter.js";
|
4
5
|
|
5
6
|
export abstract class DocumentAction {
|
6
7
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { Behaviour, GameObject } from "./Component.js";
|
2
|
-
import * as utils from "./../engine/engine_three_utils.js";
|
3
1
|
import { Vector3 } from "three";
|
2
|
+
|
4
3
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
|
+
import * as utils from "./../engine/engine_three_utils.js";
|
5
|
+
import { Behaviour, GameObject } from "./Component.js";
|
5
6
|
|
6
7
|
export class AlignmentConstraint extends Behaviour {
|
7
8
|
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Behaviour } from "./Component.js";
|
2
1
|
import { AnimationAction, AnimationClip, AnimationMixer, LoopOnce, LoopRepeat } from "three";
|
3
|
-
|
2
|
+
|
3
|
+
import { Mathf } from "../engine/engine_math.js";
|
4
4
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
5
|
-
import { Mathf } from "../engine/engine_math.js";
|
6
5
|
import type { Vec2 } from "../engine/engine_types.js";
|
7
6
|
import { getParam } from "../engine/engine_utils.js";
|
7
|
+
import { MixerEvent } from "./Animator.js";
|
8
|
+
import { Behaviour } from "./Component.js";
|
8
9
|
|
9
10
|
const debug = getParam("debuganimation");
|
10
11
|
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { AnimationClip, Bone,Interpolant, KeyframeTrack, Matrix4, Object3D, PropertyBinding, Quaternion, Vector3 } from "three";
|
2
|
+
|
3
|
+
import { getParam } from "../../../../engine/engine_utils.js";
|
4
|
+
import { Animator } from "../../../Animator.js";
|
1
5
|
import { GameObject } from "../../../Component.js";
|
2
|
-
import { getParam } from "../../../../engine/engine_utils.js";
|
3
|
-
import { USDObject, buildMatrix, findStructuralNodesInBoneHierarchy, usdNumberFormatting as fn, getPathToSkeleton } from "../ThreeUSDZExporter.js";
|
4
6
|
import type { IUSDExporterExtension } from "../Extension.js";
|
5
|
-
import {
|
6
|
-
import { Animator } from "../../../Animator.js";
|
7
|
+
import { buildMatrix, findStructuralNodesInBoneHierarchy, getPathToSkeleton,usdNumberFormatting as fn, USDObject } from "../ThreeUSDZExporter.js";
|
7
8
|
|
8
9
|
const debug = getParam("debugusdzanimation");
|
9
10
|
const debugSerialization = getParam("debugusdzanimationserialization");
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { Object3D } from "three";
|
1
2
|
import type { GLTF } from "three/examples/jsm/loaders/GLTFLoader.js";
|
3
|
+
|
4
|
+
import { addNewComponent } from "../engine/engine_components.js";
|
2
5
|
import { ContextEvent, ContextRegistry } from "../engine/engine_context_registry.js";
|
3
|
-
import {
|
6
|
+
import { Animation } from "./Animation.js";
|
4
7
|
import { Animator } from "./Animator.js";
|
5
|
-
import { Animation } from "./Animation.js";
|
6
8
|
import { GameObject } from "./Component.js";
|
7
9
|
import { PlayableDirector } from "./timeline/PlayableDirector.js";
|
8
|
-
import { Object3D } from "three";
|
9
10
|
|
10
11
|
|
11
12
|
const $objectAnimationKey = Symbol("objectIsAnimatedData");
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { AnimationClip,Object3D } from "three";
|
2
|
+
|
3
|
+
import { getParam } from "../../../../engine/engine_utils.js";
|
4
|
+
import { Animation } from "../../../Animation.js";
|
1
5
|
import { Animator } from "../../../Animator.js";
|
2
|
-
import {
|
3
|
-
import { Object3D, AnimationClip } from "three";
|
6
|
+
import { Behaviour, GameObject } from "../../../Component.js";
|
4
7
|
import { AnimationExtension } from "../extensions/Animation.js";
|
5
|
-
import { Behaviour, GameObject } from "../../../Component.js";
|
6
|
-
import { getParam } from "../../../../engine/engine_utils.js";
|
7
8
|
import { PlayAnimationOnClick } from "../extensions/behavior/BehaviourComponents.js";
|
8
9
|
|
9
10
|
const debug = getParam("debugusdz");
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import type { AnimationAction, AnimationActionLoopStyles, AnimationMixer } from "three";
|
2
|
+
|
3
|
+
import { Mathf } from "../engine/engine_math.js";
|
4
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
3
5
|
import { getParam } from "../engine/engine_utils.js";
|
4
6
|
import type { AnimatorControllerModel } from "../engine/extensions/NEEDLE_animator_controller_model.js";
|
7
|
+
import { getObjectAnimated } from "./AnimationUtils.js";
|
5
8
|
import { AnimatorController } from "./AnimatorController.js";
|
6
|
-
import {
|
7
|
-
import { Mathf } from "../engine/engine_math.js";
|
8
|
-
import { getObjectAnimated } from "./AnimationUtils.js";
|
9
|
+
import { Behaviour } from "./Component.js";
|
9
10
|
|
10
11
|
const debug = getParam("debuganimator");
|
11
12
|
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import { Animator } from "./Animator.js";
|
2
|
-
import type { AnimatorControllerModel, Condition, State, Transition } from "../engine/extensions/NEEDLE_animator_controller_model.js";
|
3
|
-
import { AnimatorConditionMode, AnimatorControllerParameterType, AnimatorStateInfo, createMotion, StateMachineBehaviour } from "../engine/extensions/NEEDLE_animator_controller_model.js";
|
4
1
|
import { AnimationAction, AnimationClip, AnimationMixer, AxesHelper, Euler, KeyframeTrack, LoopOnce, Object3D, Quaternion, Vector3 } from "three";
|
5
|
-
|
2
|
+
|
3
|
+
import { isDevEnvironment } from "../engine/debug/index.js";
|
4
|
+
import { Mathf } from "../engine/engine_math.js";
|
5
|
+
import { InstantiateIdProvider } from "../engine/engine_networking_instantiate.js";
|
6
|
+
import { assign,SerializationContext, TypeSerializer } from "../engine/engine_serialization_core.js";
|
6
7
|
import { Context } from "../engine/engine_setup.js";
|
8
|
+
import { isAnimationAction } from "../engine/engine_three_utils.js";
|
7
9
|
import { TypeStore } from "../engine/engine_typestore.js";
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import { InstantiateIdProvider } from "../engine/engine_networking_instantiate.js";
|
10
|
+
import { deepClone, getParam } from "../engine/engine_utils.js";
|
11
|
+
import type { AnimatorControllerModel, Condition, State, Transition } from "../engine/extensions/NEEDLE_animator_controller_model.js";
|
12
|
+
import { AnimatorConditionMode, AnimatorControllerParameterType, AnimatorStateInfo, createMotion, StateMachineBehaviour } from "../engine/extensions/NEEDLE_animator_controller_model.js";
|
13
|
+
import { Animator } from "./Animator.js";
|
13
14
|
|
14
15
|
const debug = getParam("debuganimatorcontroller");
|
15
16
|
const debugRootMotion = getParam("debugrootmotion");
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { EdgeDetectionMode, SMAAEffect, SMAAPreset } from "postprocessing";
|
2
|
+
|
2
3
|
import { serializable } from "../../../engine/engine_serialization.js";
|
3
4
|
import { type EffectProviderResult, PostProcessingEffect } from "../PostProcessingEffect.js";
|
4
5
|
import { VolumeParameter } from "../VolumeParameter.js";
|
@@ -1,20 +1,18 @@
|
|
1
|
+
export * from "./codegen/components.js";
|
1
2
|
export { Behaviour, Component, GameObject } from "./Component.js"
|
2
|
-
export * from "./codegen/components.js";
|
3
3
|
|
4
4
|
// We dont want to export everything in the extensions
|
5
|
+
export { ClearFlags } from "./Camera.js"
|
6
|
+
export * from "./export/index.js"
|
7
|
+
export * from "./js-extensions/Object3D.js";
|
5
8
|
export * from "./js-extensions/RGBAColor.js";
|
6
|
-
export * from "./js-extensions/Object3D.js";
|
7
|
-
export * from "./webxr/XRFlag.js"
|
8
|
-
|
9
|
-
export * from "./export/index.js"
|
10
9
|
export * from "./postprocessing/index.js"
|
10
|
+
export { type ISceneEventListener } from "./SceneSwitcher.js";
|
11
11
|
export * from "./timeline/index.js"
|
12
12
|
export * from "./ui/index.js"
|
13
13
|
export * from "./webxr/index.js"
|
14
|
+
export * from "./webxr/XRFlag.js"
|
14
15
|
|
15
|
-
export { ClearFlags } from "./Camera.js"
|
16
|
-
export { type ISceneEventListener } from "./SceneSwitcher.js";
|
17
|
-
|
18
16
|
import "./CameraUtils.js"
|
19
17
|
import "./AnimationUtils.js"
|
20
18
|
|
@@ -1,42 +1,42 @@
|
|
1
1
|
|
2
|
-
export * from "./
|
2
|
+
export * from "./debug/index.js";
|
3
3
|
export * from "./engine_addressables.js";
|
4
4
|
export * from "./engine_application.js";
|
5
5
|
export * from "./engine_assetdatabase.js";
|
6
|
-
export * from "./engine_create_objects.js";
|
7
|
-
export * from "./engine_components_internal.js";
|
8
6
|
export * from "./engine_components.js";
|
9
7
|
export * from "./engine_components_internal.js";
|
8
|
+
export * from "./engine_components_internal.js";
|
9
|
+
export * from "./engine_constants.js";
|
10
|
+
export * from "./engine_context.js";
|
10
11
|
export * from "./engine_context_registry.js";
|
11
|
-
export * from "./engine_context.js";
|
12
12
|
export * from "./engine_coroutine.js"
|
13
|
-
export * from "./
|
14
|
-
export * from "./debug/index.js";
|
13
|
+
export * from "./engine_create_objects.js";
|
15
14
|
export * from "./engine_element.js";
|
15
|
+
export * from "./engine_element_attributes.js";
|
16
16
|
export * from "./engine_element_loading.js";
|
17
|
-
export * from "./
|
17
|
+
export * from "./engine_gameobject.js";
|
18
18
|
export { Gizmos } from "./engine_gizmos.js"
|
19
19
|
export * from "./engine_gltf.js";
|
20
20
|
export * from "./engine_hot_reload.js";
|
21
|
-
export * from "./
|
21
|
+
export * from "./engine_input.js";
|
22
|
+
export { InstancingUtil } from "./engine_instancing.js";
|
23
|
+
export { hasIndieLicense,hasProLicense } from "./engine_license.js";
|
24
|
+
export * from "./engine_lifecycle_api.js";
|
25
|
+
export * from "./engine_math.js";
|
22
26
|
export * from "./engine_networking.js";
|
23
|
-
export * from "./engine_networking_types.js";
|
24
27
|
export { syncField } from "./engine_networking_auto.js";
|
25
28
|
export * from "./engine_networking_files.js";
|
26
29
|
export * from "./engine_networking_instantiate.js";
|
30
|
+
export * from "./engine_networking_peer.js";
|
27
31
|
export * from "./engine_networking_streams.js";
|
32
|
+
export * from "./engine_networking_types.js";
|
28
33
|
export * from "./engine_networking_utils.js";
|
29
|
-
export * from "./engine_networking_peer.js";
|
30
34
|
export * from "./engine_patcher.js";
|
31
|
-
export * from "./engine_playerview.js";
|
32
35
|
export * from "./engine_physics.js";
|
33
36
|
export * from "./engine_physics.types.js";
|
34
37
|
export * from "./engine_physics_rapier.js";
|
38
|
+
export * from "./engine_playerview.js";
|
35
39
|
export * from "./engine_scenelighting.js";
|
36
|
-
export * from "./engine_input.js";
|
37
|
-
export * from "./engine_lifecycle_api.js";
|
38
|
-
export * from "./engine_math.js";
|
39
|
-
export * from "./js-extensions/index.js";
|
40
40
|
export * from "./engine_scenetools.js";
|
41
41
|
export * from "./engine_serialization.js";
|
42
42
|
export { type ISerializable } from "./engine_serialization_core.js";
|
@@ -44,13 +44,11 @@
|
|
44
44
|
export * from "./engine_three_utils.js";
|
45
45
|
export * from "./engine_time.js";
|
46
46
|
export * from "./engine_types.js";
|
47
|
+
export { registerType,TypeStore } from "./engine_typestore.js";
|
48
|
+
export { prefix,validate } from "./engine_util_decorator.js";
|
49
|
+
export * from "./engine_utils.js";
|
47
50
|
export * from "./engine_utils_screenshot.js";
|
48
51
|
export * from "./engine_web_api.js";
|
49
|
-
export * from "./engine_utils.js";
|
50
52
|
export * from "./engine_xr.js";
|
51
|
-
|
52
|
-
export
|
53
|
-
|
54
|
-
export { InstancingUtil } from "./engine_instancing.js";
|
55
|
-
export { validate, prefix } from "./engine_util_decorator.js";
|
56
|
-
export { hasProLicense, hasIndieLicense } from "./engine_license.js";
|
53
|
+
export * from "./extensions/index.js";
|
54
|
+
export * from "./js-extensions/index.js";
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import { Object3D } from "three";
|
2
|
+
|
3
|
+
import { AudioSource } from "../../../../AudioSource.js";
|
1
4
|
import { GameObject } from "../../../../Component.js";
|
2
5
|
import type { IUSDExporterExtension } from "../../Extension.js";
|
3
6
|
import { USDObject, USDWriter, USDZExporterContext } from "../../ThreeUSDZExporter.js";
|
4
|
-
import { Object3D } from "three";
|
5
|
-
import { AudioSource } from "../../../../AudioSource.js";
|
6
7
|
|
7
8
|
export class AudioExtension implements IUSDExporterExtension {
|
8
9
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { Behaviour, GameObject } from "./Component.js";
|
2
1
|
import { AudioListener as ThreeAudioListener } from "three";
|
2
|
+
|
3
3
|
import { AudioSource } from "./AudioSource.js";
|
4
4
|
import { Camera } from "./Camera.js";
|
5
|
+
import { Behaviour, GameObject } from "./Component.js";
|
5
6
|
|
6
7
|
|
7
8
|
export class AudioListener extends Behaviour {
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import {
|
1
|
+
import { Audio, AudioContext, AudioLoader, PositionalAudio } from "three";
|
2
2
|
import { PositionalAudioHelper } from 'three/examples/jsm/helpers/PositionalAudioHelper.js';
|
3
|
+
|
4
|
+
import { isDevEnvironment } from "../engine/debug/index.js";
|
5
|
+
import { ApplicationEvents } from "../engine/engine_application.js";
|
6
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
7
|
+
import * as utils from "../engine/engine_utils.js";
|
3
8
|
import { AudioListener } from "./AudioListener.js";
|
4
|
-
import
|
5
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
6
|
-
import { ApplicationEvents } from "../engine/engine_application.js";
|
7
|
-
import { Audio, AudioContext, AudioLoader, PositionalAudio } from "three";
|
8
|
-
import { isDevEnvironment } from "../engine/debug/index.js";
|
9
|
+
import { Behaviour, GameObject } from "./Component.js";
|
9
10
|
|
10
11
|
|
11
12
|
const debug = utils.getParam("debugaudio");
|
@@ -140,7 +141,7 @@
|
|
140
141
|
if (!listener && this.context.mainCamera) listener = GameObject.addNewComponent(this.context.mainCamera, AudioListener);
|
141
142
|
if (listener?.listener) {
|
142
143
|
this.sound = new PositionalAudio(listener.listener);
|
143
|
-
this.gameObject
|
144
|
+
this.gameObject?.add(this.sound);
|
144
145
|
}
|
145
146
|
else if (debug) console.warn("No audio listener found in scene - can not play audio");
|
146
147
|
}
|
@@ -157,6 +158,9 @@
|
|
157
158
|
}
|
158
159
|
|
159
160
|
onEnable(): void {
|
161
|
+
if (this.sound)
|
162
|
+
this.gameObject.add(this.sound);
|
163
|
+
|
160
164
|
if (!AudioSource.userInteractionRegistered) {
|
161
165
|
AudioSource.registerWaitForAllowAudio(() => {
|
162
166
|
if (this.enabled && !this.destroyed && this.shouldPlay)
|
@@ -328,6 +332,7 @@
|
|
328
332
|
if (this.sound && !this.sound.isPlaying) {
|
329
333
|
const muted = this.context.application.muted;
|
330
334
|
if (muted) this.sound.setVolume(0);
|
335
|
+
this.gameObject?.add(this.sound);
|
331
336
|
|
332
337
|
if (this.clip instanceof MediaStream) {
|
333
338
|
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import * as THREE from "three";
|
2
|
+
|
3
|
+
import { OwnershipModel } from "../../engine/engine_networking.js";
|
4
|
+
import type { IModel } from "../../engine/engine_networking_types.js";
|
5
|
+
import { Context } from "../../engine/engine_setup.js";
|
6
|
+
import * as utils from "../../engine/engine_three_utils.js";
|
2
7
|
import { TypeStore } from "../../engine/engine_typestore.js";
|
3
8
|
import { Behaviour, GameObject } from "../Component.js";
|
4
9
|
import { AvatarMarker } from "../webxr/WebXRAvatar.js";
|
5
|
-
import * as utils from "../../engine/engine_three_utils.js";
|
6
|
-
import { OwnershipModel } from "../../engine/engine_networking.js";
|
7
|
-
import { Context } from "../../engine/engine_setup.js";
|
8
|
-
import type { IModel } from "../../engine/engine_networking_types.js";
|
9
10
|
|
10
11
|
export class Avatar_POI {
|
11
12
|
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { Object3D } from "three";
|
2
|
+
|
3
|
+
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
4
|
+
import * as utils from "../../engine/engine_utils.js";
|
1
5
|
import { Behaviour, GameObject } from "../Component.js";
|
2
6
|
import { Voip } from "../Voip.js";
|
3
7
|
import { AvatarMarker } from "../webxr/WebXRAvatar.js";
|
4
|
-
import * as utils from "../../engine/engine_utils.js";
|
5
|
-
import { Object3D } from "three";
|
6
|
-
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
7
8
|
|
8
9
|
const debug = utils.getParam("debugmouth");
|
9
10
|
|
@@ -1,15 +1,16 @@
|
|
1
|
+
import { Object3D, Quaternion, Vector3 } from "three";
|
2
|
+
|
1
3
|
import { AssetReference } from "../../engine/engine_addressables.js";
|
4
|
+
import { ObjectUtils, PrimitiveType } from "../../engine/engine_create_objects.js";
|
2
5
|
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
3
|
-
import {
|
6
|
+
import { IGameObject } from "../../engine/engine_types.js";
|
7
|
+
import { getParam,PromiseAllWithErrors } from "../../engine/engine_utils.js";
|
4
8
|
import { NeedleXREventArgs, NeedleXRSession, NeedleXRUtils } from "../../engine/xr/index.js";
|
9
|
+
import { PlayerState } from "../../engine-components-experimental/networking/PlayerSync.js";
|
5
10
|
import { Behaviour, GameObject } from "../Component.js";
|
6
|
-
import { Object3D, Quaternion, Vector3 } from "three";
|
7
|
-
import { ObjectUtils, PrimitiveType } from "../../engine/engine_create_objects.js";
|
8
11
|
import { SyncedTransform } from "../SyncedTransform.js";
|
9
|
-
import {
|
10
|
-
import { IGameObject } from "../../engine/engine_types.js";
|
12
|
+
import { AvatarMarker } from "./WebXRAvatar.js";
|
11
13
|
import { XRFlag } from "./XRFlag.js";
|
12
|
-
import { AvatarMarker } from "./WebXRAvatar.js";
|
13
14
|
|
14
15
|
const debug = getParam("debugwebxr");
|
15
16
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Object3D } from "three";
|
2
|
+
|
3
|
+
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
2
4
|
import { Behaviour, GameObject } from "../Component.js";
|
3
5
|
import { XRFlag, XRState } from "../webxr/XRFlag.js";
|
4
|
-
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
5
6
|
|
6
7
|
|
7
8
|
export class AvatarBlink_Simple extends Behaviour {
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Behaviour, GameObject } from "../Component.js";
|
2
|
-
import * as utils from "../../engine/engine_three_utils.js"
|
3
1
|
import * as THREE from "three";
|
4
|
-
import { Avatar_Brain_LookAt } from "./Avatar_Brain_LookAt.js";
|
5
|
-
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
6
2
|
import { Object3D } from "three";
|
7
3
|
|
4
|
+
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
5
|
+
import * as utils from "../../engine/engine_three_utils.js"
|
6
|
+
import { Behaviour, GameObject } from "../Component.js";
|
7
|
+
import { Avatar_Brain_LookAt } from "./Avatar_Brain_LookAt.js";
|
8
|
+
|
8
9
|
export class AvatarEyeLook_Rotation extends Behaviour {
|
9
10
|
|
10
11
|
@serializable(Object3D)
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import { Box3, Object3D, Vector3 } from "three";
|
1
2
|
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
|
2
|
-
|
3
|
+
|
4
|
+
import { InstantiateOptions } from "../engine/engine_gameobject.js";
|
5
|
+
import { getLoader } from "../engine/engine_gltf.js";
|
3
6
|
import * as loaders from "../engine/engine_loaders.js"
|
4
7
|
import { Context } from "../engine/engine_setup.js";
|
8
|
+
import * as utils from "../engine/engine_utils.js"
|
9
|
+
import { download_file } from "../engine/engine_web_api.js";
|
5
10
|
import { GameObject } from "./Component.js";
|
6
|
-
import { download_file } from "../engine/engine_web_api.js";
|
7
|
-
import { getLoader } from "../engine/engine_gltf.js";
|
8
|
-
import { InstantiateOptions } from "../engine/engine_gameobject.js";
|
9
|
-
import { Box3, Object3D, Vector3 } from "three";
|
10
11
|
|
11
12
|
const debug = utils.getParam("debugavatar");
|
12
13
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { AxesHelper as _AxesHelper } from "three";
|
2
|
+
|
2
3
|
import * as params from "../engine/engine_default_parameters.js";
|
3
4
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
|
-
import {
|
5
|
+
import { Behaviour } from "./Component.js";
|
5
6
|
|
6
7
|
export class AxesHelper extends Behaviour {
|
7
8
|
@serializable()
|
@@ -1,11 +1,12 @@
|
|
1
1
|
// import { Canvas } from './Canvas.js';
|
2
|
+
import { AxesHelper, Object3D } from 'three';
|
2
3
|
import * as ThreeMeshUI from 'three-mesh-ui';
|
4
|
+
|
5
|
+
import { showGizmos } from '../../engine/engine_default_parameters.js';
|
6
|
+
import { getParam } from '../../engine/engine_utils.js';
|
3
7
|
import { Behaviour, GameObject } from "../Component.js";
|
4
8
|
import { EventSystem } from "./EventSystem.js";
|
5
|
-
import { showGizmos } from '../../engine/engine_default_parameters.js';
|
6
|
-
import { AxesHelper, Object3D } from 'three';
|
7
9
|
import type { ICanvas } from './Interfaces.js';
|
8
|
-
import { getParam } from '../../engine/engine_utils.js';
|
9
10
|
export const includesDir = "./include";
|
10
11
|
|
11
12
|
const debug = getParam("debugshadowcomponents");
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { Behaviour, GameObject } from "./Component.js";
|
2
|
-
import * as utils from "./../engine/engine_three_utils.js";
|
3
1
|
import { Vector3 } from "three";
|
4
2
|
|
3
|
+
import * as utils from "./../engine/engine_three_utils.js";
|
4
|
+
import { Behaviour, GameObject } from "./Component.js";
|
5
|
+
|
5
6
|
export class BasicIKConstraint extends Behaviour {
|
6
7
|
|
7
8
|
private from!: GameObject;
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { getParam } from "../../../../../engine/engine_utils.js";
|
1
2
|
import { GameObject } from "../../../../Component.js";
|
2
3
|
import type { IUSDExporterExtension } from "../../Extension.js";
|
3
4
|
import { USDObject, USDWriter, USDZExporterContext } from "../../ThreeUSDZExporter.js";
|
4
5
|
import { BehaviorModel } from "./BehavioursBuilder.js";
|
5
|
-
import { getParam } from "../../../../../engine/engine_utils.js";
|
6
6
|
|
7
7
|
const debug = getParam("debugusdz");
|
8
8
|
|
@@ -1,21 +1,20 @@
|
|
1
|
+
import { Group,Material, Mesh, Object3D, Quaternion, Vector3 } from "three";
|
2
|
+
|
3
|
+
import { isDevEnvironment, showBalloonWarning } from "../../../../../engine/debug/index.js";
|
4
|
+
import { serializable } from "../../../../../engine/engine_serialization_decorator.js";
|
5
|
+
import { getWorldPosition, getWorldQuaternion, getWorldScale, setWorldPosition, setWorldQuaternion, setWorldScale } from "../../../../../engine/engine_three_utils.js";
|
6
|
+
import type { State } from "../../../../../engine/extensions/NEEDLE_animator_controller_model.js";
|
7
|
+
import { NEEDLE_progressive } from "../../../../../engine/extensions/NEEDLE_progressive.js";
|
8
|
+
import { Animator } from "../../../../Animator.js";
|
9
|
+
import { AudioSource } from "../../../../AudioSource.js";
|
1
10
|
import { Behaviour, GameObject } from "../../../../Component.js";
|
2
|
-
import { Animator } from "../../../../Animator.js";
|
3
11
|
import { Renderer } from "../../../../Renderer.js";
|
4
|
-
import { serializable } from "../../../../../engine/engine_serialization_decorator.js";
|
5
12
|
import type { IPointerClickHandler, PointerEventData } from "../../../../ui/PointerEvents.js";
|
13
|
+
import { ObjectRaycaster,Raycaster } from "../../../../ui/Raycaster.js";
|
14
|
+
import { USDDocument, USDObject, USDZExporterContext } from "../../ThreeUSDZExporter.js";
|
6
15
|
import { AnimationExtension, RegisteredAnimationInfo, type UsdzAnimation } from "../Animation.js";
|
7
|
-
import { getWorldPosition, getWorldQuaternion, getWorldScale, setWorldPosition, setWorldQuaternion, setWorldScale } from "../../../../../engine/engine_three_utils.js";
|
8
|
-
|
9
|
-
import { Object3D, Material, Vector3, Quaternion, Mesh, Group } from "three";
|
10
|
-
import { USDDocument, USDObject, USDZExporterContext } from "../../ThreeUSDZExporter.js";
|
11
|
-
|
12
16
|
import type { BehaviorExtension, UsdzBehaviour } from "./Behaviour.js";
|
13
|
-
import { ActionBuilder, ActionModel, AuralMode, BehaviorModel, type IBehaviorElement, MotionType, PlayAction, Space, TriggerBuilder
|
14
|
-
import { AudioSource } from "../../../../AudioSource.js";
|
15
|
-
import { NEEDLE_progressive } from "../../../../../engine/extensions/NEEDLE_progressive.js";
|
16
|
-
import { isDevEnvironment, showBalloonWarning } from "../../../../../engine/debug/index.js";
|
17
|
-
import { Raycaster, ObjectRaycaster } from "../../../../ui/Raycaster.js";
|
18
|
-
import type { State } from "../../../../../engine/extensions/NEEDLE_animator_controller_model.js";
|
17
|
+
import { ActionBuilder, ActionModel, AuralMode, BehaviorModel, GroupActionModel, type IBehaviorElement, MotionType, MultiplePerformOperation,PlayAction, Space, TriggerBuilder } from "./BehavioursBuilder.js";
|
19
18
|
|
20
19
|
function ensureRaycaster(obj: GameObject) {
|
21
20
|
if (!obj) return;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Object3D } from "three";
|
2
|
-
import { USDDocument, USDObject, USDWriter, makeNameSafeForUSD } from "../../ThreeUSDZExporter.js";
|
3
2
|
|
3
|
+
import { getParam } from "../../../../../engine/engine_utils.js";
|
4
|
+
import { makeNameSafeForUSD,USDDocument, USDObject, USDWriter } from "../../ThreeUSDZExporter.js";
|
4
5
|
import { BehaviorExtension } from "./Behaviour.js";
|
5
|
-
import { getParam } from "../../../../../engine/engine_utils.js";
|
6
6
|
|
7
7
|
const debug = getParam("debugusdz");
|
8
8
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { BlendFunction, BloomEffect, SelectiveBloomEffect } from "postprocessing";
|
2
|
+
|
2
3
|
import { serializable } from "../../../engine/engine_serialization.js";
|
3
4
|
import { PostProcessingEffect } from "../PostProcessingEffect.js";
|
4
5
|
import { VolumeParameter } from "../VolumeParameter.js";
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { Box3, Color, type ColorRepresentation, LineSegments, Object3D, Vector3 } from "three";
|
2
|
+
|
3
3
|
import { CreateWireCube, Gizmos } from "../engine/engine_gizmos.js";
|
4
4
|
import { getWorldPosition, getWorldScale } from "../engine/engine_three_utils.js";
|
5
|
-
import {
|
5
|
+
import { getParam } from "../engine/engine_utils.js";
|
6
|
+
import { Behaviour } from "./Component.js";
|
6
7
|
|
7
8
|
const gizmos = getParam("gizmos");
|
8
9
|
const debug = getParam("debugboxhelper");
|
@@ -1,15 +1,15 @@
|
|
1
|
+
import { showBalloonMessage } from "../../engine/debug/index.js";
|
2
|
+
import { Gizmos } from "../../engine/engine_gizmos.js";
|
3
|
+
import { PointerType } from "../../engine/engine_input.js";
|
4
|
+
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
5
|
+
import { getParam } from "../../engine/engine_utils.js";
|
6
|
+
import { Animator } from "../Animator.js";
|
1
7
|
import { Behaviour, GameObject } from "../Component.js";
|
2
8
|
import { EventList } from "../EventList.js";
|
9
|
+
import { RGBAColor } from "../js-extensions/RGBAColor.js";
|
10
|
+
import { Image } from "./Image.js";
|
3
11
|
import type { IPointerClickHandler, IPointerEnterHandler, IPointerEventHandler, IPointerExitHandler, PointerEventData } from "./PointerEvents.js";
|
4
|
-
import { Image } from "./Image.js";
|
5
|
-
import { RGBAColor } from "../js-extensions/RGBAColor.js";
|
6
|
-
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
7
|
-
import { Animator } from "../Animator.js";
|
8
|
-
import { getParam } from "../../engine/engine_utils.js";
|
9
|
-
import { showBalloonMessage } from "../../engine/debug/index.js";
|
10
12
|
import { GraphicRaycaster, ObjectRaycaster, Raycaster } from "./Raycaster.js";
|
11
|
-
import { PointerType } from "../../engine/engine_input.js";
|
12
|
-
import { Gizmos } from "../../engine/engine_gizmos.js";
|
13
13
|
|
14
14
|
const debug = getParam("debugbutton");
|
15
15
|
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { EquirectangularReflectionMapping, OrthographicCamera, PerspectiveCamera, Ray, SRGBColorSpace, Vector3 } from "three";
|
2
|
+
import { Texture } from "three";
|
3
|
+
|
4
|
+
import { isDevEnvironment, showBalloonMessage, showBalloonWarning } from "../engine/debug/index.js";
|
5
|
+
import { Gizmos } from "../engine/engine_gizmos.js";
|
3
6
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
|
-
import { RGBAColor } from "./js-extensions/RGBAColor.js";
|
5
7
|
import { Context } from "../engine/engine_setup.js";
|
8
|
+
import { RenderTexture } from "../engine/engine_texture.js";
|
9
|
+
import { getWorldPosition } from "../engine/engine_three_utils.js";
|
6
10
|
import type { ICamera } from "../engine/engine_types.js"
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
|
11
|
-
import { EquirectangularReflectionMapping, OrthographicCamera, PerspectiveCamera, Ray, SRGBColorSpace, Vector3 } from "three";
|
11
|
+
import { getParam } from "../engine/engine_utils.js";
|
12
|
+
import { Behaviour, GameObject } from "./Component.js";
|
13
|
+
import { RGBAColor } from "./js-extensions/RGBAColor.js";
|
12
14
|
import { OrbitControls } from "./OrbitControls.js";
|
13
|
-
import { RenderTexture } from "../engine/engine_texture.js";
|
14
|
-
import { Texture } from "three";
|
15
15
|
|
16
16
|
export enum ClearFlags {
|
17
17
|
Skybox = 1,
|
@@ -1,14 +1,15 @@
|
|
1
|
-
import {
|
1
|
+
import { Object3D } from "three";
|
2
|
+
|
3
|
+
import { getCameraController } from "../engine/engine_camera.js";
|
2
4
|
import { addNewComponent, getOrAddComponent } from "../engine/engine_components.js";
|
3
|
-
import {
|
4
|
-
import type { ICamera, IContext } from "../engine/engine_types.js";
|
5
|
-
import { RGBAColor } from "./js-extensions/RGBAColor.js";
|
5
|
+
import { Context } from "../engine/engine_context.js";
|
6
6
|
import { ContextEvent, ContextRegistry } from "../engine/engine_context_registry.js";
|
7
|
-
import { getCameraController } from "../engine/engine_camera.js";
|
8
|
-
import { Camera, ClearFlags } from "./Camera.js";
|
9
7
|
import { NeedleEngineHTMLElement } from "../engine/engine_element.js";
|
8
|
+
import type { ICamera, IContext } from "../engine/engine_types.js";
|
10
9
|
import { getParam } from "../engine/engine_utils.js";
|
11
|
-
import {
|
10
|
+
import { Camera, ClearFlags } from "./Camera.js";
|
11
|
+
import { RGBAColor } from "./js-extensions/RGBAColor.js";
|
12
|
+
import { OrbitControls } from "./OrbitControls.js";
|
12
13
|
|
13
14
|
const debug = getParam("debugmissingcamera");
|
14
15
|
|
@@ -1,18 +1,19 @@
|
|
1
|
-
import {
|
1
|
+
import { Matrix4, Object3D } from "three";
|
2
|
+
import * as ThreeMeshUI from 'three-mesh-ui'
|
3
|
+
|
4
|
+
import { Mathf } from "../../engine/engine_math.js";
|
2
5
|
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
3
6
|
import { FrameEvent } from "../../engine/engine_setup.js";
|
7
|
+
import { getParam } from "../../engine/engine_utils.js";
|
8
|
+
import { NeedleXREventArgs } from "../../engine/xr/index.js";
|
9
|
+
import { Camera } from "../Camera.js";
|
10
|
+
import { GameObject } from "../Component.js";
|
4
11
|
import { BaseUIComponent, UIRootComponent } from "./BaseUIComponent.js";
|
5
|
-
import {
|
6
|
-
import { Matrix4, Object3D } from "three";
|
7
|
-
import { RectTransform } from "./RectTransform.js";
|
12
|
+
import { EventSystem } from "./EventSystem.js";
|
8
13
|
import type { ICanvas, ICanvasEventReceiver, ILayoutGroup, IRectTransform } from "./Interfaces.js";
|
9
|
-
import { Camera } from "../Camera.js";
|
10
|
-
import { EventSystem } from "./EventSystem.js";
|
11
|
-
import * as ThreeMeshUI from 'three-mesh-ui'
|
12
|
-
import { getParam } from "../../engine/engine_utils.js";
|
13
14
|
import { LayoutGroup } from "./Layout.js";
|
14
|
-
import {
|
15
|
-
import {
|
15
|
+
import { RectTransform } from "./RectTransform.js";
|
16
|
+
import { updateRenderSettings as updateRenderSettingsRecursive } from "./Utils.js";
|
16
17
|
|
17
18
|
export enum RenderMode {
|
18
19
|
ScreenSpaceOverlay = 0,
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
2
2
|
import { FrameEvent } from "../../engine/engine_setup.js";
|
3
3
|
import { Behaviour, GameObject } from "../Component.js";
|
4
|
+
import { BaseUIComponent } from "./BaseUIComponent.js";
|
5
|
+
import { Graphic } from "./Graphic.js";
|
4
6
|
import { type ICanvasGroup, type IHasAlphaFactor } from "./Interfaces.js";
|
5
|
-
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
6
|
-
import { BaseUIComponent } from "./BaseUIComponent.js";
|
7
7
|
|
8
8
|
|
9
9
|
export class CanvasGroup extends Behaviour implements ICanvasGroup {
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import { Quaternion, Ray, Vector2, Vector3 } from "three";
|
2
|
+
|
2
3
|
import { Mathf } from "../engine/engine_math.js";
|
4
|
+
import { RaycastOptions } from "../engine/engine_physics.js";
|
3
5
|
import { serializable } from "../engine/engine_serialization.js";
|
6
|
+
import { getWorldPosition } from "../engine/engine_three_utils.js";
|
4
7
|
import { Collision } from "../engine/engine_types.js";
|
8
|
+
import { getParam } from "../engine/engine_utils.js";
|
9
|
+
import { Animator } from "./Animator.js"
|
5
10
|
import { CapsuleCollider } from "./Collider.js";
|
6
11
|
import { Behaviour, GameObject } from "./Component.js";
|
7
12
|
import { Rigidbody } from "./RigidBody.js";
|
8
|
-
import { Animator } from "./Animator.js"
|
9
|
-
import { RaycastOptions } from "../engine/engine_physics.js";
|
10
|
-
import { getWorldPosition } from "../engine/engine_three_utils.js";
|
11
|
-
import { getParam } from "../engine/engine_utils.js";
|
12
13
|
|
13
14
|
const debug = getParam("debugcharactercontroller");
|
14
15
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ChromaticAberrationEffect } from "postprocessing";
|
2
2
|
import { Vector2 } from "three";
|
3
|
+
|
3
4
|
import { serializable } from "../../../engine/engine_serialization.js";
|
4
5
|
import { type EffectProviderResult, PostProcessingEffect } from "../PostProcessingEffect.js";
|
5
6
|
import { VolumeParameter } from "../VolumeParameter.js";
|
@@ -1,13 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { Group, Mesh, Vector3 } from "three"
|
2
|
+
|
3
|
+
import type { PhysicsMaterial } from "../engine/engine_physics.types.js";
|
3
4
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
|
-
import {
|
5
|
+
import { getWorldScale } from "../engine/engine_three_utils.js";
|
5
6
|
// import { IColliderProvider, registerColliderProvider } from "../engine/engine_physics.js";
|
6
7
|
import type { IBoxCollider, ICollider, ISphereCollider } from "../engine/engine_types.js";
|
7
|
-
import { getWorldScale } from "../engine/engine_three_utils.js";
|
8
|
-
import type { PhysicsMaterial } from "../engine/engine_physics.types.js";
|
9
8
|
import { validate } from "../engine/engine_util_decorator.js";
|
10
9
|
import { unwatchWrite, watchWrite } from "../engine/engine_utils.js";
|
10
|
+
import { Behaviour } from "./Component.js";
|
11
|
+
import { Rigidbody } from "./RigidBody.js";
|
11
12
|
|
12
13
|
|
13
14
|
export class Collider extends Behaviour implements ICollider {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { BrightnessContrastEffect, HueSaturationEffect } from "postprocessing";
|
2
|
+
import { LinearToneMapping, NoToneMapping } from "three";
|
3
|
+
|
2
4
|
import { serializable } from "../../../engine/engine_serialization.js";
|
3
5
|
import { type EffectProviderResult, PostProcessingEffect } from "../PostProcessingEffect.js";
|
4
6
|
import { VolumeParameter } from "../VolumeParameter.js";
|
5
7
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
6
|
-
import { LinearToneMapping, NoToneMapping } from "three";
|
7
8
|
|
8
9
|
|
9
10
|
export class ColorAdjustments extends PostProcessingEffect {
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { Euler, Object3D, Quaternion, Scene, Vector3 } from "three";
|
2
|
+
|
3
|
+
import { isDevEnvironment,showBalloonWarning } from "../engine/debug/index.js";
|
4
|
+
import { addNewComponent, destroyComponentInstance, findObjectOfType, findObjectsOfType, getComponent, getComponentInChildren, getComponentInParent, getComponents, getComponentsInChildren, getComponentsInParent, getOrAddComponent, moveComponentInstance, removeComponent } from "../engine/engine_components.js";
|
3
5
|
import { activeInHierarchyFieldName } from "../engine/engine_constants.js";
|
4
|
-
import {
|
6
|
+
import { destroy, findByGuid, foreachComponent, HideFlags, IInstantiateOptions,instantiate, InstantiateOptions, isActiveInHierarchy, isActiveSelf, isDestroyed, isUsingInstancing, markAsInstancedRendered, setActive } from "../engine/engine_gameobject.js";
|
5
7
|
import * as main from "../engine/engine_mainloop_utils.js";
|
8
|
+
import { Mathf } from "../engine/engine_math.js";
|
6
9
|
import { syncDestroy, syncInstantiate } from "../engine/engine_networking_instantiate.js";
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import {
|
10
|
-
|
11
|
-
import { Euler, Object3D, Quaternion, Scene, Vector3 } from "three";
|
12
|
-
import { showBalloonWarning, isDevEnvironment } from "../engine/debug/index.js";
|
10
|
+
import { Context, FrameEvent } from "../engine/engine_setup.js";
|
11
|
+
import * as threeutils from "../engine/engine_three_utils.js";
|
12
|
+
import type { Collision, Constructor, ConstructorConcrete, GuidsMap, ICollider,IComponent, IGameObject, SourceIdentifier } from "../engine/engine_types.js";
|
13
13
|
import { ControllerChangedEvt, INeedleXRSessionEventReceiver, NeedleXRControllerEventArgs, NeedleXREventArgs, NeedleXRSession } from "../engine/engine_xr.js";
|
14
14
|
import { IPointerEventHandler, PointerEventData } from "./ui/PointerEvents.js";
|
15
15
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/* eslint-disable */
|
1
2
|
// Export types
|
2
3
|
export class __Ignore {}
|
3
4
|
export { ActionBuilder } from "../export/usdz/extensions/behavior/BehavioursBuilder.js";
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { Behaviour } from "./Component.js";
|
2
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
3
|
-
|
4
1
|
import { CustomBlending, DoubleSide, Group, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MinEquation, OrthographicCamera, PlaneGeometry, ShaderMaterial, WebGLRenderTarget } from "three";
|
5
2
|
import { HorizontalBlurShader } from 'three/examples/jsm/shaders/HorizontalBlurShader.js';
|
6
3
|
import { VerticalBlurShader } from 'three/examples/jsm/shaders/VerticalBlurShader.js';
|
4
|
+
|
5
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
7
6
|
import { getParam } from "../engine/engine_utils.js"
|
8
7
|
import { setCustomVisibility } from "../engine/js-extensions/Layers.js";
|
8
|
+
import { Behaviour } from "./Component.js";
|
9
9
|
|
10
10
|
const debug = getParam("debugcontactshadows");
|
11
11
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { isLocalNetwork } from "../engine_networking_utils.js";
|
2
2
|
import { getParam, isMobileDevice, isQuest } from "../engine_utils.js";
|
3
|
-
import { isLocalNetwork } from "../engine_networking_utils.js";
|
4
3
|
import { isDevEnvironment } from "./debug.js";
|
4
|
+
import { getErrorCount, makeErrorsVisibleForDevelopment } from "./debug_overlay.js";
|
5
5
|
|
6
6
|
let consoleInstance: any = null;
|
7
7
|
let consoleHtmlElement: HTMLElement | null = null;
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { ContextRegistry } from "../engine_context_registry.js";
|
2
|
+
import { isLocalNetwork } from "../engine_networking_utils.js";
|
1
3
|
import { getParam } from "../engine_utils.js";
|
2
|
-
import { isLocalNetwork } from "../engine_networking_utils.js";
|
3
|
-
import { ContextRegistry } from "../engine_context_registry.js";
|
4
4
|
|
5
5
|
const debug = getParam("debugdebug");
|
6
6
|
let hide = false;
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { isLocalNetwork } from "../engine_networking_utils.js";
|
2
|
+
import { showDebugConsole } from "./debug_console.js";
|
1
3
|
import { addLog, LogType, setAllowOverlayMessages } from "./debug_overlay.js";
|
2
|
-
import { showDebugConsole } from "./debug_console.js";
|
3
|
-
import { isLocalNetwork } from "../engine_networking_utils.js";
|
4
4
|
|
5
5
|
export { showDebugConsole }
|
6
6
|
export { LogType, setAllowOverlayMessages };
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
import * as THREE from "three";
|
3
|
+
|
3
4
|
import { syncDestroy } from "../engine/engine_networking_instantiate.js";
|
4
5
|
import { getParam } from "../engine/engine_utils.js";
|
5
6
|
import { BoxHelperComponent } from "./BoxHelperComponent.js";
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { DepthOfFieldEffect } from "postprocessing";
|
2
|
+
|
3
|
+
import { Mathf } from "../../../engine/engine_math.js";
|
2
4
|
import { serializable } from "../../../engine/engine_serialization.js";
|
3
|
-
import {
|
5
|
+
import { isMobileDevice } from "../../../engine/engine_utils.js";
|
4
6
|
import { PostProcessingEffect } from "../PostProcessingEffect.js";
|
5
7
|
import { VolumeParameter } from "../VolumeParameter.js";
|
6
8
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
7
|
-
import { isMobileDevice } from "../../../engine/engine_utils.js";
|
8
9
|
|
9
10
|
export enum DepthOfFieldMode {
|
10
11
|
Off = 0,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
2
3
|
import { isMobileDevice } from "../engine/engine_utils.js";
|
3
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
4
|
import { Behaviour, GameObject } from "./Component.js";
|
5
5
|
|
6
6
|
|
@@ -1,22 +1,23 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
import
|
1
|
+
import { AxesHelper, Box3, BufferGeometry, Camera, Color, Event, Line, LineBasicMaterial, Matrix3, Matrix4, Mesh, MeshBasicMaterial, Object3D, Plane, PlaneHelper, Quaternion, Ray, Raycaster, SphereGeometry, Vector3 } from "three";
|
2
|
+
|
3
|
+
import { Gizmos } from "../engine/engine_gizmos.js";
|
4
|
+
import { InstancingUtil } from "../engine/engine_instancing.js";
|
5
|
+
import { Mathf } from "../engine/engine_math.js";
|
6
|
+
import { RaycastOptions } from "../engine/engine_physics.js";
|
7
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
8
|
import { Context } from "../engine/engine_setup.js";
|
5
|
-
import { UsageMarker } from "./Interactable.js";
|
6
|
-
import { Rigidbody } from "./RigidBody.js";
|
7
|
-
import { Avatar_POI } from "./avatar/Avatar_Brain_LookAt.js";
|
8
|
-
import { RaycastOptions } from "../engine/engine_physics.js";
|
9
9
|
import { getWorldPosition, setWorldPosition } from "../engine/engine_three_utils.js";
|
10
|
-
import { InstancingUtil } from "../engine/engine_instancing.js";
|
11
|
-
import { OrbitControls } from "./OrbitControls.js";
|
12
|
-
import { AxesHelper, Box3, BufferGeometry, Camera, Color, Event, Line, LineBasicMaterial, Matrix3, Matrix4, Mesh, MeshBasicMaterial, Object3D, Plane, PlaneHelper, Quaternion, Ray, Raycaster, SphereGeometry, Vector3 } from "three";
|
13
|
-
import { ObjectRaycaster } from "./ui/Raycaster.js";
|
14
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
15
10
|
import { IGameObject } from "../engine/engine_types.js";
|
16
|
-
import { Mathf } from "../engine/engine_math.js";
|
17
11
|
import { getParam } from "../engine/engine_utils.js";
|
18
|
-
import { Gizmos } from "../engine/engine_gizmos.js";
|
19
12
|
import { NeedleXRSession } from "../engine/engine_xr.js";
|
13
|
+
import { Avatar_POI } from "./avatar/Avatar_Brain_LookAt.js";
|
14
|
+
import { Behaviour, GameObject } from "./Component.js";
|
15
|
+
import { UsageMarker } from "./Interactable.js";
|
16
|
+
import { OrbitControls } from "./OrbitControls.js";
|
17
|
+
import { Rigidbody } from "./RigidBody.js";
|
18
|
+
import { SyncedTransform } from "./SyncedTransform.js";
|
19
|
+
import type { IPointerEventHandler, PointerEventData } from "./ui/PointerEvents.js";
|
20
|
+
import { ObjectRaycaster } from "./ui/Raycaster.js";
|
20
21
|
|
21
22
|
const debug = getParam("debugdrag");
|
22
23
|
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import type { GLTF } from "three/examples/jsm/loaders/GLTFLoader.js";
|
2
|
+
|
3
|
+
import * as files from "../engine/engine_networking_files.js";
|
2
4
|
import { RaycastOptions } from "../engine/engine_physics.js";
|
3
|
-
import * as files from "../engine/engine_networking_files.js";
|
4
5
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
6
|
+
import { getParam } from "../engine/engine_utils.js";
|
5
7
|
import { Networking } from "../engine-components/Networking.js";
|
6
|
-
import
|
7
|
-
import { getParam } from "../engine/engine_utils.js";
|
8
|
+
import { Behaviour, GameObject } from "./Component.js";
|
8
9
|
|
9
10
|
const debug = getParam("debugdroplistener");
|
10
11
|
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import { Object3D,Quaternion, Vector3 } from "three";
|
2
|
+
|
3
|
+
import { InstantiateOptions } from "../engine/engine_gameobject.js";
|
4
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
1
5
|
import { Behaviour, GameObject } from "./Component.js";
|
2
6
|
import { DragControls } from "./DragControls.js";
|
3
|
-
import { Vector3, Quaternion, Object3D } from "three";
|
4
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
5
|
-
import { InstantiateOptions } from "../engine/engine_gameobject.js";
|
6
7
|
import { IPointerEventHandler, PointerEventData } from "./ui/PointerEvents.js";
|
7
8
|
import { ObjectRaycaster } from "./ui/Raycaster.js";
|
8
9
|
|
@@ -1,13 +1,14 @@
|
|
1
|
+
import { Group, Object3D, Texture, TextureLoader } from "three";
|
2
|
+
|
1
3
|
import { deepClone, getParam, resolveUrl } from "../engine/engine_utils.js";
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { Group, Object3D, Texture, TextureLoader } from "three";
|
4
|
+
import { destroy, IInstantiateOptions, instantiate, InstantiateOptions, isDestroyed } from "./engine_gameobject.js";
|
5
|
+
import { getLoader } from "./engine_gltf.js";
|
5
6
|
import { processNewScripts } from "./engine_mainloop_utils.js";
|
6
7
|
import { registerPrefabProvider, syncInstantiate } from "./engine_networking_instantiate.js";
|
8
|
+
import { assign,SerializationContext, TypeSerializer } from "./engine_serialization_core.js";
|
9
|
+
import { Context } from "./engine_setup.js";
|
10
|
+
import type { IComponent, IGameObject, SourceIdentifier } from "./engine_types.js";
|
7
11
|
import { download } from "./engine_web_api.js";
|
8
|
-
import { getLoader } from "./engine_gltf.js";
|
9
|
-
import type { IComponent, IGameObject, SourceIdentifier } from "./engine_types.js";
|
10
|
-
import { destroy, IInstantiateOptions, instantiate, InstantiateOptions, isDestroyed } from "./engine_gameobject.js";
|
11
12
|
|
12
13
|
const debug = getParam("debugaddressables");
|
13
14
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { InternalUsageTrackerPlugin } from "./extensions/usage_tracker.js";
|
2
1
|
import { Bone, BufferAttribute, BufferGeometry, InterleavedBuffer, InterleavedBufferAttribute, Material, Mesh, NeverCompare, Object3D, Scene, Skeleton, SkinnedMesh, Source, Texture, Uniform, WebGLRenderer } from "three";
|
2
|
+
|
3
3
|
import { addPatch } from "./engine_patcher.js";
|
4
4
|
import { getParam } from "./engine_utils.js";
|
5
|
+
import { InternalUsageTrackerPlugin } from "./extensions/usage_tracker.js";
|
5
6
|
|
6
7
|
|
7
8
|
export class AssetDatabase {
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import type { ICameraController } from "./engine_types.js";
|
2
1
|
import { Camera, Object3D } from "three";
|
3
2
|
|
3
|
+
import type { ICameraController } from "./engine_types.js";
|
4
4
|
|
5
|
+
|
5
6
|
const $cameraController = Symbol("cameraController");
|
6
7
|
|
7
8
|
export function getCameraController(cam: Camera): ICameraController | null {
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { Object3D, Scene } from "three";
|
2
|
+
|
3
|
+
import { apply } from "../engine-components/js-extensions/Object3D.js";
|
4
|
+
import { ComponentEvents, ComponentLifecycleEvents } from "./engine_components_internal.js";
|
5
|
+
import { activeInHierarchyFieldName } from "./engine_constants.js";
|
6
|
+
import { removeScriptFromContext, updateActiveInHierarchyWithoutEventCall } from "./engine_mainloop_utils.js";
|
7
|
+
import { InstantiateIdProvider } from "./engine_networking_instantiate.js";
|
8
|
+
import { Context, registerComponent } from "./engine_setup.js";
|
2
9
|
import type { Constructor, ConstructorConcrete, IComponent, IGameObject } from "./engine_types.js";
|
3
|
-
import { Context, registerComponent } from "./engine_setup.js";
|
4
10
|
import { getParam } from "./engine_utils.js";
|
5
|
-
import { removeScriptFromContext, updateActiveInHierarchyWithoutEventCall } from "./engine_mainloop_utils.js";
|
6
|
-
import { activeInHierarchyFieldName } from "./engine_constants.js";
|
7
|
-
import { apply } from "../engine-components/js-extensions/Object3D.js";
|
8
|
-
import { InstantiateIdProvider } from "./engine_networking_instantiate.js";
|
9
|
-
import { ComponentEvents, ComponentLifecycleEvents } from "./engine_components_internal.js";
|
10
11
|
|
11
12
|
const debug = getParam("debuggetcomponent");
|
12
13
|
|
@@ -1,41 +1,35 @@
|
|
1
|
+
import { EffectComposer, RenderPass } from "postprocessing";
|
1
2
|
import {
|
2
3
|
BufferGeometry, Cache, Camera, Clock, Color, DepthTexture, Group,
|
3
4
|
Material, NearestFilter, NoToneMapping, Object3D, PCFSoftShadowMap,
|
4
5
|
PerspectiveCamera, RGBAFormat, Scene, SRGBColorSpace,
|
5
6
|
Texture, WebGLRenderer, type WebGLRendererParameters, WebGLRenderTarget, type WebXRArrayCamera
|
6
7
|
} from 'three';
|
8
|
+
import * as Stats from 'three/examples/jsm/libs/stats.module.js';
|
7
9
|
|
10
|
+
import { isDevEnvironment, LogType, showBalloonError, showBalloonMessage, showBalloonWarning } from './debug/index.js';
|
11
|
+
import { Addressables } from './engine_addressables.js';
|
12
|
+
import { Application } from './engine_application.js';
|
13
|
+
import { AssetDatabase } from './engine_assetdatabase.js';
|
14
|
+
import { VERSION } from './engine_constants.js';
|
15
|
+
import { ContextEvent, ContextRegistry } from './engine_context_registry.js';
|
16
|
+
import { WaitForPromise } from './engine_coroutine.js';
|
17
|
+
import { destroy, foreachComponent } from './engine_gameobject.js';
|
18
|
+
import { getLoader } from './engine_gltf.js';
|
8
19
|
import { Input } from './engine_input.js';
|
20
|
+
import { invokeLifecycleFunctions } from './engine_lifecycle_functions_internal.js';
|
21
|
+
import { type ILightDataRegistry,LightDataRegistry } from './engine_lightdata.js';
|
22
|
+
import * as looputils from './engine_mainloop_utils.js';
|
23
|
+
import { NetworkConnection } from './engine_networking.js';
|
24
|
+
import { isLocalNetwork } from './engine_networking_utils.js';
|
9
25
|
import { Physics } from './engine_physics.js';
|
26
|
+
import { PlayerViewManager } from './engine_playerview.js';
|
27
|
+
import { RendererData as SceneLighting } from './engine_scenelighting.js';
|
28
|
+
import { logHierarchy } from './engine_three_utils.js';
|
10
29
|
import { Time } from './engine_time.js';
|
11
|
-
import {
|
12
|
-
|
13
|
-
import * as looputils from './engine_mainloop_utils.js';
|
30
|
+
import { type CoroutineData, type GLTF, type ICamera, type IComponent, type IContext, type ILight, INeedleXRSession, type LoadedGLTF } from "./engine_types.js";
|
14
31
|
import * as utils from "./engine_utils.js";
|
15
|
-
|
16
|
-
import { EffectComposer, RenderPass } from "postprocessing";
|
17
|
-
|
18
|
-
import { AssetDatabase } from './engine_assetdatabase.js';
|
19
|
-
|
20
|
-
import { logHierarchy } from './engine_three_utils.js';
|
21
|
-
|
22
|
-
import * as Stats from 'three/examples/jsm/libs/stats.module.js';
|
23
|
-
import { RendererData as SceneLighting } from './engine_scenelighting.js';
|
24
|
-
import { Addressables } from './engine_addressables.js';
|
25
|
-
import { Application } from './engine_application.js';
|
26
|
-
import { LightDataRegistry, type ILightDataRegistry } from './engine_lightdata.js';
|
27
|
-
import { PlayerViewManager } from './engine_playerview.js';
|
28
|
-
|
29
|
-
import { INeedleXRSession, type CoroutineData, type GLTF, type ICamera, type IComponent, type IContext, type ILight, type LoadedGLTF } from "./engine_types.js";
|
30
|
-
import { destroy, foreachComponent } from './engine_gameobject.js';
|
31
|
-
import { ContextEvent, ContextRegistry } from './engine_context_registry.js';
|
32
32
|
import { delay, getParam } from './engine_utils.js';
|
33
|
-
import { VERSION } from './engine_constants.js';
|
34
|
-
import { isDevEnvironment, LogType, showBalloonError, showBalloonMessage, showBalloonWarning } from './debug/index.js';
|
35
|
-
import { getLoader } from './engine_gltf.js';
|
36
|
-
import { isLocalNetwork } from './engine_networking_utils.js';
|
37
|
-
import { WaitForPromise } from './engine_coroutine.js';
|
38
|
-
import { invokeLifecycleFunctions } from './engine_lifecycle_functions_internal.js';
|
39
33
|
import type { INeedleXRSessionEventReceiver } from './engine_xr.js';
|
40
34
|
|
41
35
|
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { BoxGeometry, ColorRepresentation,DoubleSide, Material, Mesh, MeshBasicMaterial, MeshStandardMaterial, PlaneGeometry, SphereGeometry } from "three"
|
2
|
+
|
2
3
|
import { Vec3 } from "./engine_types.js";
|
3
4
|
|
4
5
|
export enum PrimitiveType {
|
@@ -1,9 +1,9 @@
|
|
1
|
+
import { logoSVG } from "./assets/index.js"
|
1
2
|
import { showBalloonWarning } from "./debug/index.js";
|
3
|
+
import { hasCommercialLicense, hasProLicense, runtimeLicenseCheckPromise } from "./engine_license.js";
|
2
4
|
import { Mathf } from "./engine_math.js";
|
3
5
|
import { LoadingProgressArgs } from "./engine_setup.js";
|
4
6
|
import { getParam } from "./engine_utils.js";
|
5
|
-
import { logoSVG } from "./assets/index.js"
|
6
|
-
import { hasCommercialLicense, hasProLicense, runtimeLicenseCheckPromise } from "./engine_license.js";
|
7
7
|
|
8
8
|
const debug = getParam("debugloading");
|
9
9
|
const debugRendering = getParam("debugloadingrendering");
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
import { AROverlayHandler, arContainerClassName } from "./engine_element_overlay.js";
|
1
|
+
import { getLoader, registerLoader } from "../engine/engine_gltf.js";
|
3
2
|
import { GameObject } from "../engine-components/Component.js";
|
3
|
+
import { isDevEnvironment, showBalloonWarning } from "./debug/index.js";
|
4
|
+
import { VERSION } from "./engine_constants.js";
|
4
5
|
import { calculateProgress01, EngineLoadingView, type ILoadingViewHandler } from "./engine_element_loading.js";
|
5
|
-
import {
|
6
|
+
import { arContainerClassName,AROverlayHandler } from "./engine_element_overlay.js";
|
7
|
+
import { hasCommercialLicense } from "./engine_license.js";
|
6
8
|
import { setDracoDecoderPath, setDracoDecoderType, setKtx2TranscoderPath } from "./engine_loaders.js";
|
7
|
-
import { getLoader, registerLoader } from "../engine/engine_gltf.js";
|
8
9
|
import { NeedleGltfLoader } from "./engine_scenetools.js";
|
10
|
+
import { Context, ContextCreateArgs, LoadingProgressArgs } from "./engine_setup.js";
|
9
11
|
import { type INeedleEngineComponent, type LoadedGLTF } from "./engine_types.js";
|
10
|
-
import {
|
11
|
-
import { hasCommercialLicense } from "./engine_license.js";
|
12
|
-
import { VERSION } from "./engine_constants.js";
|
12
|
+
import { getParam } from "./engine_utils.js";
|
13
13
|
|
14
14
|
//
|
15
15
|
// registering loader here too to make sure it's imported when using engine via vanilla js
|
@@ -1,17 +1,18 @@
|
|
1
1
|
import { Bone, Object3D, Quaternion, SkinnedMesh, Vector3 } from "three";
|
2
|
+
|
3
|
+
import { apply } from "../engine-components/js-extensions/Object3D.js";
|
4
|
+
import { __internalNotifyObjectDestroyed as __internalRemoveReferences,disposeObjectResources } from "./engine_assetdatabase.js";
|
5
|
+
import { ComponentEvents,ComponentLifecycleEvents } from "./engine_components_internal.js";
|
6
|
+
import { activeInHierarchyFieldName } from "./engine_constants.js";
|
7
|
+
import { editorGuidKeyName } from "./engine_constants.js";
|
8
|
+
import { $isUsingInstancing, InstancingUtil } from "./engine_instancing.js";
|
2
9
|
import { processNewScripts } from "./engine_mainloop_utils.js";
|
3
10
|
import { InstantiateIdProvider } from "./engine_networking_instantiate.js";
|
11
|
+
import { assign } from "./engine_serialization_core.js";
|
4
12
|
import { Context, registerComponent } from "./engine_setup.js";
|
5
13
|
import { logHierarchy, setWorldPosition, setWorldQuaternion } from "./engine_three_utils.js";
|
6
|
-
import { type GuidsMap, type IComponent as Component, type IComponent, type IGameObject as GameObject, type UIDProvider
|
14
|
+
import { type Constructor,type GuidsMap, type IComponent as Component, type IComponent, type IGameObject as GameObject, type UIDProvider } from "./engine_types.js";
|
7
15
|
import { getParam, tryFindObject } from "./engine_utils.js";
|
8
|
-
import { apply } from "../engine-components/js-extensions/Object3D.js";
|
9
|
-
import { $isUsingInstancing, InstancingUtil } from "./engine_instancing.js";
|
10
|
-
import { activeInHierarchyFieldName } from "./engine_constants.js";
|
11
|
-
import { assign } from "./engine_serialization_core.js";
|
12
|
-
import { disposeObjectResources, __internalNotifyObjectDestroyed as __internalRemoveReferences } from "./engine_assetdatabase.js";
|
13
|
-
import { editorGuidKeyName } from "./engine_constants.js";
|
14
|
-
import { ComponentLifecycleEvents, ComponentEvents } from "./engine_components_internal.js";
|
15
16
|
|
16
17
|
const debug = getParam("debuggetcomponent");
|
17
18
|
const debugInstantiate = getParam("debuginstantiate");
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import {
|
1
|
+
import { AxesHelper,Box3, BoxGeometry, BufferAttribute, Color, type ColorRepresentation, CylinderGeometry, EdgesGeometry, Line, LineBasicMaterial, LineSegments, Mesh, Object3D, Quaternion, SphereGeometry, Vector3 } from 'three';
|
2
|
+
import ThreeMeshUI, { Inline, Text } from "three-mesh-ui"
|
3
|
+
import { type Options } from 'three-mesh-ui/build/types/core/elements/MeshUIBaseElement.js';
|
4
|
+
|
5
|
+
import { isDestroyed } from './engine_gameobject.js';
|
2
6
|
import { Context } from './engine_setup.js';
|
3
7
|
import { getWorldPosition, lookAtObject, setWorldPositionXYZ } from './engine_three_utils.js';
|
4
8
|
import type { Vec3, Vec4 } from './engine_types.js';
|
5
|
-
import ThreeMeshUI, { Inline, Text } from "three-mesh-ui"
|
6
9
|
import { getParam } from './engine_utils.js';
|
7
|
-
import { type Options } from 'three-mesh-ui/build/types/core/elements/MeshUIBaseElement.js';
|
8
|
-
import { isDestroyed } from './engine_gameobject.js';
|
9
10
|
import { NeedleXRSession } from './engine_xr.js';
|
10
11
|
|
11
12
|
const _tmp = new Vector3();
|
@@ -1,18 +1,20 @@
|
|
1
1
|
import "./codegen/register_types.js";
|
2
|
-
|
2
|
+
|
3
|
+
import { Object3D } from "three";
|
4
|
+
|
5
|
+
import { LogType, showBalloonMessage } from "./debug/index.js";
|
6
|
+
import { addNewComponent } from "./engine_components.js";
|
7
|
+
import { builtinComponentKeyName,editorGuidKeyName } from "./engine_constants.js";
|
8
|
+
import { debugExtension } from "./engine_default_parameters.js";
|
3
9
|
import { InstantiateIdProvider } from "./engine_networking_instantiate.js"
|
4
|
-
import {
|
10
|
+
import { isLocalNetwork } from "./engine_networking_utils.js";
|
5
11
|
import { deserializeObject, serializeObject } from "./engine_serialization.js";
|
6
12
|
import { assign, ImplementationInformation, type ISerializable, SerializationContext } from "./engine_serialization_core.js";
|
7
|
-
import {
|
8
|
-
import { debugExtension } from "./engine_default_parameters.js";
|
9
|
-
import { editorGuidKeyName, builtinComponentKeyName } from "./engine_constants.js";
|
13
|
+
import { Context } from "./engine_setup.js";
|
10
14
|
import type { GuidsMap, ICamera, IComponent, IGameObject, SourceIdentifier, UIDProvider } from "./engine_types.js";
|
11
|
-
import {
|
15
|
+
import { TypeStore } from "./engine_typestore.js";
|
12
16
|
import { getParam } from "./engine_utils.js";
|
13
|
-
import {
|
14
|
-
import { isLocalNetwork } from "./engine_networking_utils.js";
|
15
|
-
import { Object3D } from "three";
|
17
|
+
import { NEEDLE_components } from "./extensions/NEEDLE_components.js";
|
16
18
|
|
17
19
|
|
18
20
|
const debug = debugExtension;
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import type { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js'
|
2
|
+
|
3
|
+
import { SerializationContext } from "./engine_serialization_core.js";
|
4
|
+
import { Context } from "./engine_setup.js";
|
1
5
|
import type { ConstructorConcrete, SourceIdentifier, UIDProvider } from "./engine_types.js";
|
2
|
-
import { Context } from "./engine_setup.js";
|
3
6
|
import { NEEDLE_components } from "./extensions/NEEDLE_components.js";
|
4
|
-
import { SerializationContext } from "./engine_serialization_core.js";
|
5
|
-
import type { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js'
|
6
7
|
|
7
8
|
|
8
9
|
export interface INeedleGltfLoader {
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { addLog, LogType } from "./debug/debug_overlay.js";
|
2
|
+
import { addScriptToArrays, removeScriptFromContext } from "./engine_mainloop_utils.js"
|
1
3
|
import type { IComponent } from "./engine_types.js";
|
2
4
|
import { TypeStore } from "./engine_typestore.js";
|
3
|
-
import { addScriptToArrays, removeScriptFromContext } from "./engine_mainloop_utils.js"
|
4
5
|
import { getParam } from "./engine_utils.js";
|
5
|
-
import { addLog, LogType } from "./debug/debug_overlay.js";
|
6
6
|
|
7
7
|
const debug = getParam("debughotreload");
|
8
8
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Matrix4, Object3D, Ray, Vector2, Vector3 } from 'three';
|
2
|
+
|
2
3
|
import { showBalloonMessage, showBalloonWarning } from './debug/debug.js';
|
3
4
|
import { Context } from './engine_setup.js';
|
4
5
|
import type { ButtonName, IGameObject, IInput, MouseButtonName, Vec2 } from './engine_types.js';
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { logoSVG } from "./assets/index.js";
|
2
|
+
import { GENERATOR, VERSION } from "./engine_constants.js";
|
2
3
|
import { ContextEvent, ContextRegistry } from "./engine_context_registry.js";
|
3
4
|
import type { IContext } from "./engine_types.js";
|
4
|
-
import {
|
5
|
-
import { GENERATOR, VERSION } from "./engine_constants.js";
|
5
|
+
import { getParam, isMobileDevice } from "./engine_utils.js";
|
6
6
|
|
7
7
|
const debug = getParam("debuglicense");
|
8
8
|
|
@@ -50,18 +50,21 @@
|
|
50
50
|
const licenseUrl = "https://engine.needle.tools/licensing/check?location=" + encodeURIComponent(window.location.href) + "&version=" + VERSION + "&generator=" + encodeURIComponent(GENERATOR);
|
51
51
|
const res = await fetch(licenseUrl, {
|
52
52
|
method: "GET",
|
53
|
-
}).catch(
|
53
|
+
}).catch(_err => {
|
54
|
+
if (debug) console.error("License check failed", _err);
|
55
|
+
return undefined;
|
56
|
+
});
|
54
57
|
if (res?.status === 200) {
|
55
58
|
applicationIsForbidden = false;
|
56
59
|
if (debug) console.log("License check succeeded");
|
57
60
|
NEEDLE_ENGINE_LICENSE_TYPE = "pro";
|
58
61
|
}
|
59
|
-
else if (res
|
62
|
+
else if (res?.status === 403) {
|
60
63
|
applicationIsForbidden = true;
|
61
64
|
applicationForbiddenText = await res.text();
|
62
65
|
}
|
63
66
|
else {
|
64
|
-
if (debug) console.log("License check failed with status " + res
|
67
|
+
if (debug) console.log("License check failed with status " + res?.status);
|
65
68
|
}
|
66
69
|
}
|
67
70
|
catch (err) {
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import { FrameEvent } from "./engine_context.js";
|
1
2
|
import { ContextEvent } from "./engine_context_registry.js";
|
2
|
-
import { FrameEvent } from "./engine_context.js";
|
3
3
|
import { LifecycleMethod, registerFrameEventCallback } from "./engine_lifecycle_functions_internal.js";
|
4
4
|
|
5
5
|
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { type Context,FrameEvent } from "./engine_context.js";
|
2
|
+
import type { ContextEvent } from "./engine_context_registry.js";
|
1
3
|
import { safeInvoke } from "./engine_generic_utils.js";
|
2
|
-
import { FrameEvent, type Context } from "./engine_context.js";
|
3
|
-
import type { ContextEvent } from "./engine_context_registry.js";
|
4
4
|
|
5
5
|
export declare type LifecycleMethod = (ctx: Context) => void;
|
6
6
|
export declare type Event = ContextEvent | FrameEvent;
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { ShaderChunk, Texture, UniformsLib, Vector4 } from "three";
|
2
|
+
|
3
3
|
import { Context } from "./engine_setup.js";
|
4
|
+
import type { SourceIdentifier } from "./engine_types.js";
|
4
5
|
import { getParam } from "./engine_utils.js";
|
5
|
-
import
|
6
|
+
import { LightmapType } from "./extensions/NEEDLE_lightmaps.js";
|
6
7
|
|
7
8
|
const debugLightmap = getParam("debuglightmaps") ? true : false;
|
8
9
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
import {
|
2
|
+
import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.js';
|
3
|
+
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
3
4
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'
|
4
|
-
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
5
5
|
import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
|
6
|
-
import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.js';
|
7
6
|
|
7
|
+
import { Context } from "./engine_setup.js"
|
8
8
|
import { getParam } from "./engine_utils.js";
|
9
9
|
|
10
10
|
const debug = getParam("debugdecoders");
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { CubeCamera, Object3D, Scene, WebGLCubeRenderTarget } from 'three';
|
2
|
+
|
3
|
+
import { isDevEnvironment } from "./debug/index.js";
|
4
|
+
import * as constants from "./engine_constants.js";
|
5
|
+
import { ContextRegistry } from "./engine_context_registry.js";
|
6
|
+
import { isActiveSelf } from './engine_gameobject.js';
|
1
7
|
import { safeInvoke } from "./engine_generic_utils.js";
|
2
|
-
import
|
8
|
+
import type { IComponent, IContext } from './engine_types.js';
|
3
9
|
import { getParam } from './engine_utils.js';
|
4
|
-
import { CubeCamera, Object3D, Scene, WebGLCubeRenderTarget } from 'three';
|
5
|
-
import type { IComponent, IContext } from './engine_types.js';
|
6
|
-
import { isActiveSelf } from './engine_gameobject.js';
|
7
|
-
import { ContextRegistry } from "./engine_context_registry.js";
|
8
|
-
import { isDevEnvironment } from "./debug/index.js";
|
9
10
|
import type { INeedleXRSessionEventReceiver } from "./engine_xr.js";
|
10
11
|
|
11
12
|
const debug = getParam("debugnewscripts");
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { getParam } from "./engine_utils.js";
|
2
1
|
import { isDevEnvironment } from "./debug/index.js";
|
3
2
|
import type { IComponent } from "./engine_types.js";
|
3
|
+
import { getParam } from "./engine_utils.js";
|
4
4
|
|
5
5
|
const debug = getParam("debugautosync");
|
6
6
|
|
@@ -1,8 +1,9 @@
|
|
1
1
|
// import { SyncedTransform } from "../engine-components/SyncedTransform.js";
|
2
2
|
// import { DragControls } from "../engine-components/DragControls.js"
|
3
3
|
// import { ObjectRaycaster } from "../engine-components/ui/Raycaster.js";
|
4
|
+
import type { GLTF } from "three/examples/jsm/loaders/GLTFLoader.js";
|
5
|
+
|
4
6
|
import type { UIDProvider } from "./engine_types.js";
|
5
|
-
import type { GLTF } from "three/examples/jsm/loaders/GLTFLoader.js";
|
6
7
|
// import { Animation } from "../engine-components/Animation.js";
|
7
8
|
|
8
9
|
|
@@ -1,15 +1,16 @@
|
|
1
|
+
import { BoxGeometry, BoxHelper, Mesh, MeshBasicMaterial, Object3D, Vector3 } from "three";
|
2
|
+
import type { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js'
|
3
|
+
|
4
|
+
import { getLoader } from "../engine/engine_gltf.js";
|
5
|
+
import { NetworkConnection } from "../engine/engine_networking.js";
|
6
|
+
import { generateSeed, InstantiateIdProvider } from "../engine/engine_networking_instantiate.js";
|
1
7
|
import { Context } from "../engine/engine_setup.js";
|
2
8
|
import * as web from "../engine/engine_web_api.js";
|
3
|
-
import {
|
4
|
-
import {
|
9
|
+
import { ContextEvent, ContextRegistry } from "./engine_context_registry.js";
|
10
|
+
import { findByGuid } from "./engine_gameobject.js";
|
5
11
|
import * as def from "./engine_networking_files_default_components.js"
|
6
|
-
import type { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js'
|
7
|
-
import { getLoader } from "../engine/engine_gltf.js";
|
8
12
|
import type { IModel } from "./engine_networking_types.js";
|
9
13
|
import type { IGameObject } from "./engine_types.js";
|
10
|
-
import { findByGuid } from "./engine_gameobject.js";
|
11
|
-
import { ContextEvent, ContextRegistry } from "./engine_context_registry.js";
|
12
|
-
import { BoxGeometry, BoxHelper, Mesh, MeshBasicMaterial, Object3D, Vector3 } from "three";
|
13
14
|
|
14
15
|
export enum File_Event {
|
15
16
|
File_Spawned = "file-spawned",
|
@@ -1,20 +1,20 @@
|
|
1
1
|
// import { IModel, NetworkConnection } from "./engine_networking.js"
|
2
2
|
import * as THREE from "three";
|
3
|
-
import {
|
4
|
-
import * as utils from "./engine_utils.js"
|
5
|
-
import type { INetworkConnection } from "./engine_networking_types.js";
|
6
|
-
import type { IGameObject as GameObject, IComponent as Component } from "./engine_types.js"
|
7
|
-
|
3
|
+
import { Object3D } from "three";
|
8
4
|
// https://github.com/uuidjs/uuid
|
9
5
|
// v5 takes string and namespace
|
10
6
|
import { v5 } from 'uuid';
|
11
|
-
|
7
|
+
|
8
|
+
import { ContextEvent, ContextRegistry } from "../engine/engine_context_registry.js";
|
9
|
+
import { destroy, findByGuid, IInstantiateOptions, instantiate } from "./engine_gameobject.js";
|
10
|
+
import { InstantiateOptions } from "./engine_gameobject.js";
|
11
|
+
import type { INetworkConnection } from "./engine_networking_types.js";
|
12
12
|
import type { IModel } from "./engine_networking_types.js";
|
13
13
|
import { SendQueue } from "./engine_networking_types.js";
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
import {
|
17
|
-
import
|
14
|
+
import { Context } from "./engine_setup.js"
|
15
|
+
import type { IComponent as Component,IGameObject as GameObject } from "./engine_types.js"
|
16
|
+
import type { UIDProvider } from "./engine_types.js";
|
17
|
+
import * as utils from "./engine_utils.js"
|
18
18
|
|
19
19
|
|
20
20
|
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import type { DataConnection, PeerJSOption } from "peerjs";
|
1
2
|
import Peer, { type PeerConnectOption } from "peerjs";
|
2
|
-
|
3
|
+
|
3
4
|
import { type ConstructorConcrete } from "./engine_types.js";
|
4
5
|
|
5
6
|
let peerOptions: PeerJSOption | undefined = undefined;
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import { type Context } from "./engine_context.js";
|
2
1
|
import Peer, { MediaConnection } from "peerjs"
|
2
|
+
import { EventDispatcher } from "three";
|
3
|
+
|
3
4
|
import { RoomEvents } from "../engine/engine_networking.js";
|
4
5
|
import { UserJoinedOrLeftRoomModel } from "../engine/engine_networking.js";
|
6
|
+
import { getPeerjsInstance } from "../engine/engine_networking_peer.js";
|
7
|
+
import { type Context } from "./engine_context.js";
|
5
8
|
import type { IModel } from "./engine_networking_types.js";
|
6
|
-
import {
|
7
|
-
import { EventDispatcher } from "three";
|
9
|
+
import { type IComponent } from "./engine_types.js";
|
8
10
|
import { getParam } from "./engine_utils.js";
|
9
|
-
import { type IComponent } from "./engine_types.js";
|
10
11
|
|
11
12
|
|
12
13
|
|
@@ -1,16 +1,17 @@
|
|
1
1
|
const defaultNetworkingBackendUrlProvider = "https://urls.needle.tools/default-networking-backend/index";
|
2
2
|
let serverUrl: string | undefined = "wss://needle-tiny-starter.glitch.me/socket";
|
3
3
|
|
4
|
+
import * as flatbuffers from 'flatbuffers';
|
4
5
|
import { type Websocket } from 'websocket-ts';
|
5
|
-
|
6
|
-
import { Context } from './engine_setup.js';
|
7
|
-
import * as utils from "./engine_utils.js";
|
8
|
-
import * as flatbuffers from 'flatbuffers';
|
6
|
+
|
9
7
|
import * as schemes from "../engine-schemes/schemes.js";
|
8
|
+
import { isDevEnvironment } from './debug/debug.js';
|
10
9
|
import { PeerNetworking } from './engine_networking_peer.js';
|
11
10
|
import { type IModel, type INetworkConnection, SendQueue } from './engine_networking_types.js';
|
12
11
|
import { isHostedOnGlitch } from './engine_networking_utils.js';
|
13
|
-
import {
|
12
|
+
// import { Networking } from '../engine-components/Networking.js';
|
13
|
+
import { Context } from './engine_setup.js';
|
14
|
+
import * as utils from "./engine_utils.js";
|
14
15
|
|
15
16
|
export const debugNet = utils.getParam("debugnet") ? true : false;
|
16
17
|
export const debugOwner = debugNet || utils.getParam("debugowner") ? true : false;
|
@@ -1,29 +1,29 @@
|
|
1
|
+
import { ActiveCollisionTypes, ActiveEvents, Ball, CoefficientCombineRule, Collider, ColliderDesc, Cuboid, EventQueue, JointData, QueryFilterFlags, Ray, RigidBody, RigidBodyType, ShapeColliderTOI, ShapeType, World } from '@dimforge/rapier3d-compat';
|
1
2
|
import { BufferAttribute, BufferGeometry, LineBasicMaterial, LineSegments, Matrix4, Mesh, Object3D, Quaternion, Vector3 } from 'three'
|
2
3
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js'
|
3
|
-
|
4
|
+
|
5
|
+
import { CollisionDetectionMode, type PhysicsMaterial, PhysicsMaterialCombine } from '../engine/engine_physics.types.js';
|
6
|
+
import { isDevEnvironment } from './debug/debug.js';
|
7
|
+
import { ContextEvent, ContextRegistry } from './engine_context_registry.js';
|
8
|
+
import { foreachComponent } from './engine_gameobject.js';
|
9
|
+
import { Gizmos } from './engine_gizmos.js';
|
10
|
+
import { Mathf } from './engine_math.js';
|
4
11
|
import { getWorldPosition, getWorldQuaternion, getWorldScale, setWorldPositionXYZ, setWorldQuaternionXYZW } from "./engine_three_utils.js"
|
5
12
|
import type {
|
13
|
+
IBoxCollider,
|
14
|
+
ICollider,
|
15
|
+
IComponent,
|
16
|
+
IContext,
|
17
|
+
IGameObject,
|
6
18
|
IPhysicsEngine,
|
7
|
-
IComponent,
|
8
|
-
ICollider,
|
9
19
|
IRigidbody,
|
20
|
+
ISphereCollider,
|
21
|
+
Vec2,
|
10
22
|
Vec3,
|
11
|
-
IGameObject,
|
12
|
-
Vec2,
|
13
|
-
IContext,
|
14
|
-
ISphereCollider,
|
15
|
-
IBoxCollider,
|
16
23
|
} from './engine_types.js';
|
17
|
-
import { ContactPoint
|
18
|
-
import { foreachComponent } from './engine_gameobject.js';
|
19
|
-
|
20
|
-
import { ActiveCollisionTypes, ActiveEvents, CoefficientCombineRule, Ball, Collider, ColliderDesc, EventQueue, JointData, QueryFilterFlags, RigidBody, RigidBodyType, ShapeColliderTOI, World, Ray, ShapeType, Cuboid } from '@dimforge/rapier3d-compat';
|
21
|
-
import { CollisionDetectionMode, type PhysicsMaterial, PhysicsMaterialCombine } from '../engine/engine_physics.types.js';
|
22
|
-
import { Gizmos } from './engine_gizmos.js';
|
23
|
-
import { Mathf } from './engine_math.js';
|
24
|
+
import { Collision,ContactPoint } from './engine_types.js';
|
24
25
|
import { SphereOverlapResult } from './engine_types.js';
|
25
|
-
import {
|
26
|
-
import { isDevEnvironment } from './debug/debug.js';
|
26
|
+
import { CircularBuffer, getParam } from "./engine_utils.js"
|
27
27
|
|
28
28
|
const debugPhysics = getParam("debugphysics");
|
29
29
|
const debugColliderPlacement = getParam("debugcolliderplacement");
|
@@ -994,6 +994,22 @@
|
|
994
994
|
}
|
995
995
|
this.world.step(this.eventQueue);
|
996
996
|
this._isUpdatingPhysicsWorld = false;
|
997
|
+
}
|
998
|
+
|
999
|
+
public postStep() {
|
1000
|
+
if (!this.world) return;
|
1001
|
+
if (!this.enabled) return;
|
1002
|
+
this._isUpdatingPhysicsWorld = true;
|
1003
|
+
this.syncObjects();
|
1004
|
+
this._isUpdatingPhysicsWorld = false;
|
1005
|
+
|
1006
|
+
if (this.eventQueue && !this.collisionHandler) {
|
1007
|
+
this.collisionHandler = new PhysicsCollisionHandler(this.world, this.eventQueue);
|
1008
|
+
}
|
1009
|
+
if (this.collisionHandler) {
|
1010
|
+
this.collisionHandler.handleCollisionEvents();
|
1011
|
+
this.collisionHandler.update();
|
1012
|
+
}
|
997
1013
|
this.updateDebugRendering(this.world);
|
998
1014
|
}
|
999
1015
|
|
@@ -1001,7 +1017,7 @@
|
|
1001
1017
|
if (debugPhysics || debugColliderPlacement || showColliders || this.debugRenderColliders === true) {
|
1002
1018
|
if (!this.lines) {
|
1003
1019
|
const material = new LineBasicMaterial({
|
1004
|
-
color:
|
1020
|
+
color: 0x77dd77,
|
1005
1021
|
fog: false,
|
1006
1022
|
// vertexColors: THREE.VertexColors
|
1007
1023
|
});
|
@@ -1023,22 +1039,6 @@
|
|
1023
1039
|
}
|
1024
1040
|
}
|
1025
1041
|
|
1026
|
-
public postStep() {
|
1027
|
-
if (!this.world) return;
|
1028
|
-
if (!this.enabled) return;
|
1029
|
-
this._isUpdatingPhysicsWorld = true;
|
1030
|
-
this.syncObjects();
|
1031
|
-
this._isUpdatingPhysicsWorld = false;
|
1032
|
-
|
1033
|
-
if (this.eventQueue && !this.collisionHandler) {
|
1034
|
-
this.collisionHandler = new PhysicsCollisionHandler(this.world, this.eventQueue);
|
1035
|
-
}
|
1036
|
-
if (this.collisionHandler) {
|
1037
|
-
this.collisionHandler.handleCollisionEvents();
|
1038
|
-
this.collisionHandler.update();
|
1039
|
-
}
|
1040
|
-
}
|
1041
|
-
|
1042
1042
|
/** sync rendered objects with physics world (except for colliders without rigidbody) */
|
1043
1043
|
private syncObjects() {
|
1044
1044
|
if (debugColliderPlacement) return;
|
@@ -1075,8 +1075,8 @@
|
|
1075
1075
|
if (center && center.isVector3) {
|
1076
1076
|
this._tempQuaternion.set(rot.x, rot.y, rot.z, rot.w);
|
1077
1077
|
const offset = this._tempPosition.copy(center).applyQuaternion(this._tempQuaternion);
|
1078
|
-
|
1079
|
-
|
1078
|
+
const scale = getWorldScale(obj.gameObject);
|
1079
|
+
offset.multiply(scale);
|
1080
1080
|
pos.x -= offset.x;
|
1081
1081
|
pos.y -= offset.y;
|
1082
1082
|
pos.z -= offset.z;
|
@@ -1173,8 +1173,14 @@
|
|
1173
1173
|
this._tempCenterPos.z = center.z;
|
1174
1174
|
getWorldScale(collider.gameObject, this._tempCenterVec);
|
1175
1175
|
this._tempCenterPos.multiply(this._tempCenterVec);
|
1176
|
-
|
1177
|
-
|
1176
|
+
if (!collider.attachedRigidbody)
|
1177
|
+
{
|
1178
|
+
getWorldQuaternion(collider.gameObject, this._tempCenterQuaternion);
|
1179
|
+
this._tempCenterPos.applyQuaternion(this._tempCenterQuaternion);
|
1180
|
+
}
|
1181
|
+
else {
|
1182
|
+
this._tempCenterPos.applyQuaternion(collider.gameObject.quaternion);
|
1183
|
+
}
|
1178
1184
|
targetVector.x += this._tempCenterPos.x;
|
1179
1185
|
targetVector.y += this._tempCenterPos.y;
|
1180
1186
|
targetVector.z += this._tempCenterPos.z;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Box3, Camera, type Intersection, Layers, Mesh, Object3D, Ray, Raycaster, Sphere, Vector2, Vector3
|
1
|
+
import { AxesHelper, Box3, Camera, type Intersection, Layers, Line,Mesh, Object3D, Ray, Raycaster, Sphere, Vector2, Vector3 } from 'three'
|
2
|
+
|
3
|
+
import { Gizmos } from './engine_gizmos.js';
|
2
4
|
import { Context } from './engine_setup.js';
|
3
|
-
import { getParam } from "./engine_utils.js"
|
4
5
|
import { getWorldPosition } from "./engine_three_utils.js"
|
5
6
|
import type { Vec2, Vec3, } from './engine_types.js';
|
6
7
|
import type { IPhysicsEngine } from './engine_types.js';
|
7
|
-
import {
|
8
|
+
import { getParam } from "./engine_utils.js"
|
8
9
|
|
9
10
|
const debugPhysics = getParam("debugphysics");
|
10
11
|
const layerMaskHelper: Layers = new Layers();
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { getParam } from "./engine_utils.js";
|
2
1
|
import { Object3D } from "three";
|
2
|
+
|
3
3
|
import { Context } from "./engine_setup.js";
|
4
|
+
import { getParam } from "./engine_utils.js";
|
4
5
|
|
5
6
|
const debug = getParam("debugplayerview");
|
6
7
|
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { EquirectangularReflectionMapping, LightProbe, SphericalHarmonics3, SRGBColorSpace,Texture, Vector4, WebGLCubeRenderTarget } from "three";
|
2
|
+
|
3
|
+
import { AssetReference } from "./engine_addressables.js";
|
2
4
|
import { Context } from "./engine_setup.js";
|
3
|
-
import { SceneLightSettings } from "./extensions/NEEDLE_lighting_settings.js";
|
4
5
|
import { createFlatTexture, createTrilightTexture } from "./engine_shaders.js";
|
6
|
+
import { type SourceIdentifier } from "./engine_types.js";
|
5
7
|
import { getParam } from "./engine_utils.js";
|
6
|
-
import {
|
7
|
-
import { AssetReference } from "./engine_addressables.js";
|
8
|
+
import { SceneLightSettings } from "./extensions/NEEDLE_lighting_settings.js";
|
8
9
|
// import { LightProbeGenerator } from "three/examples/jsm/lights/LightProbeGenerator.js"
|
9
10
|
|
10
11
|
const debug = getParam("debugenvlight");
|
@@ -1,17 +1,18 @@
|
|
1
|
-
import {
|
1
|
+
import { Object3D } from "three";
|
2
2
|
import { type GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'
|
3
|
+
|
4
|
+
import { showBalloonMessage } from "./debug/index.js";
|
5
|
+
import { getLoader, type INeedleGltfLoader, registerLoader } from "./engine_gltf.js";
|
6
|
+
import { createBuiltinComponents, writeBuiltinComponentData } from "./engine_gltf_builtin_components.js";
|
3
7
|
// import * as object from "./engine_gltf_builtin_components.js";
|
4
8
|
import * as loaders from "./engine_loaders.js"
|
9
|
+
import { registerPrewarmObject } from "./engine_mainloop_utils.js";
|
10
|
+
import { SerializationContext } from "./engine_serialization_core.js";
|
11
|
+
import { Context } from "./engine_setup.js"
|
12
|
+
import { type SourceIdentifier, type UIDProvider } from "./engine_types.js";
|
5
13
|
import * as utils from "./engine_utils.js";
|
6
14
|
import { registerComponentExtension, registerExtensions } from "./extensions/extensions.js";
|
7
|
-
import { getLoader, type INeedleGltfLoader, registerLoader } from "./engine_gltf.js";
|
8
|
-
import { type SourceIdentifier, type UIDProvider } from "./engine_types.js";
|
9
|
-
import { createBuiltinComponents, writeBuiltinComponentData } from "./engine_gltf_builtin_components.js";
|
10
|
-
import { SerializationContext } from "./engine_serialization_core.js";
|
11
15
|
import { NEEDLE_components } from "./extensions/NEEDLE_components.js";
|
12
|
-
import { registerPrewarmObject } from "./engine_mainloop_utils.js";
|
13
|
-
import { Object3D } from "three";
|
14
|
-
import { showBalloonMessage } from "./debug/index.js";
|
15
16
|
|
16
17
|
|
17
18
|
export class NeedleGltfLoader implements INeedleGltfLoader {
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import * as THREE from "three";
|
2
|
+
import { Color, CompressedTexture, Object3D, Texture, WebGLRenderTarget } from "three";
|
3
|
+
|
4
|
+
import { isDevEnvironment, showBalloonMessage, showBalloonWarning } from "../engine/debug/index.js";
|
5
|
+
import { Behaviour, Component, GameObject } from "../engine-components/Component.js";
|
6
|
+
import { CallInfo, EventList } from "../engine-components/EventList.js";
|
2
7
|
import { RGBAColor } from "../engine-components/js-extensions/RGBAColor.js";
|
8
|
+
import { AssetReference } from "./engine_addressables.js";
|
9
|
+
import { debugExtension } from "./engine_default_parameters.js";
|
3
10
|
import { SerializationContext, TypeSerializer } from "./engine_serialization_core.js";
|
4
|
-
import { Behaviour, Component, GameObject } from "../engine-components/Component.js";
|
5
|
-
import { debugExtension } from "./engine_default_parameters.js";
|
6
|
-
import { CallInfo, EventList } from "../engine-components/EventList.js";
|
7
|
-
import { Color, CompressedTexture, Object3D, Texture, WebGLRenderTarget } from "three";
|
8
11
|
import { RenderTexture } from "./engine_texture.js";
|
9
|
-
import { isDevEnvironment, showBalloonMessage, showBalloonWarning } from "../engine/debug/index.js";
|
10
12
|
import { resolveUrl } from "./engine_utils.js";
|
11
|
-
import { AssetReference } from "./engine_addressables.js";
|
12
13
|
|
13
14
|
// export class SourcePath {
|
14
15
|
// src?:string
|
@@ -1,13 +1,14 @@
|
|
1
|
+
import { AnimationClip, Material, Mesh, Object3D, Texture } from "three";
|
1
2
|
import { type GLTF } from "three/examples/jsm/loaders/GLTFLoader.js";
|
2
|
-
|
3
|
-
import {
|
3
|
+
|
4
|
+
import { debugExtension } from "../engine/engine_default_parameters.js";
|
5
|
+
import { addLog,LogType } from "./debug/debug_overlay.js";
|
6
|
+
import { isLocalNetwork } from "./engine_networking_utils.js";
|
4
7
|
import { Context } from "./engine_setup.js";
|
5
|
-
import { isPersistentAsset } from "./extensions/NEEDLE_persistent_assets.js";
|
6
8
|
import { Constructor, type ConstructorConcrete, type SourceIdentifier } from "./engine_types.js";
|
7
|
-
import { debugExtension } from "../engine/engine_default_parameters.js";
|
8
|
-
import { LogType, addLog } from "./debug/debug_overlay.js";
|
9
|
-
import { isLocalNetwork } from "./engine_networking_utils.js";
|
10
9
|
import { $BuiltInTypeFlag } from "./engine_typestore.js";
|
10
|
+
import { getParam } from "./engine_utils.js";
|
11
|
+
import { isPersistentAsset } from "./extensions/NEEDLE_persistent_assets.js";
|
11
12
|
|
12
13
|
const debug = getParam("debugserializer");
|
13
14
|
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import { serializeObject
|
1
|
+
import { deserializeObject,serializeObject } from "./engine_serialization_core.js";
|
2
2
|
|
3
|
-
export { serializeObject
|
3
|
+
export { deserializeObject,serializeObject };
|
4
4
|
|
5
|
-
export
|
6
|
-
|
7
|
-
export * from "./engine_serialization_builtin_serializer.js";
|
5
|
+
export * from "./engine_serialization_builtin_serializer.js";
|
6
|
+
export { serializable, serializeable } from "./engine_serialization_decorator.js"
|
@@ -1,9 +1,10 @@
|
|
1
1
|
|
2
|
+
import { Color,DataTexture, FileLoader, RGBAFormat, Vector4 } from "three";
|
3
|
+
|
4
|
+
import { RGBAColor } from "../engine-components/js-extensions/RGBAColor.js";
|
2
5
|
import * as loader from "./engine_fileloader.js"
|
6
|
+
import { Mathf } from "./engine_math.js";
|
3
7
|
import * as SHADERDATA from "./shaders/shaderData.js"
|
4
|
-
import { Vector4, FileLoader, DataTexture, RGBAFormat, Color } from "three";
|
5
|
-
import { RGBAColor } from "../engine-components/js-extensions/RGBAColor.js";
|
6
|
-
import { Mathf } from "./engine_math.js";
|
7
8
|
|
8
9
|
|
9
10
|
const white = new Uint8Array(4);
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { EffectComposer } from "postprocessing";
|
1
2
|
import { Camera, Mesh, Object3D, Texture, WebGLRenderer, WebGLRenderTarget } from "three";
|
2
|
-
|
3
|
+
|
3
4
|
import { findResourceUsers } from "./engine_assetdatabase.js";
|
4
5
|
|
5
6
|
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import { AnimationAction, Euler, Mesh,Object3D, PerspectiveCamera, PlaneGeometry, Quaternion, Scene, Texture, Uniform, Vector3 } from "three";
|
2
|
+
import { ShaderMaterial,WebGLRenderer } from "three";
|
3
|
+
|
1
4
|
import { Mathf } from "./engine_math.js"
|
2
|
-
import { Vector3, Quaternion, Uniform, Texture, AnimationAction, PerspectiveCamera, Object3D, Euler, PlaneGeometry, Scene, Mesh } from "three";
|
3
|
-
import { WebGLRenderer, ShaderMaterial } from "three";
|
4
5
|
import { CircularBuffer } from "./engine_utils.js";
|
5
6
|
|
6
7
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Clock } from 'three'
|
2
|
+
|
3
|
+
import { type ITime } from './engine_types.js';
|
2
4
|
import { getParam } from './engine_utils.js';
|
3
|
-
import { type ITime } from './engine_types.js';
|
4
5
|
|
5
6
|
const timescaleUrl = getParam("timescale");
|
6
7
|
let timeScale = 1;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
import type { Camera, Color, Material, Object3D, Quaternion, Ray, Scene, WebGLRenderer, Mesh } from "three";
|
1
|
+
import type { Camera, Color, Material, Mesh,Object3D, Quaternion, Ray, Scene, WebGLRenderer } from "three";
|
3
2
|
import { Vector3 } from "three";
|
3
|
+
import { type GLTF as GLTF3 } from "three/examples/jsm/loaders/GLTFLoader.js";
|
4
|
+
|
4
5
|
import { RGBAColor } from "../engine-components/js-extensions/RGBAColor.js";
|
5
6
|
import { CollisionDetectionMode, type PhysicsMaterial, RigidbodyConstraints } from "./engine_physics.types.js";
|
7
|
+
import { RenderTexture } from "./engine_texture.js";
|
6
8
|
import { CircularBuffer } from "./engine_utils.js";
|
7
|
-
import { type GLTF as GLTF3 } from "three/examples/jsm/loaders/GLTFLoader.js";
|
8
9
|
import { type INeedleXRSessionEventReceiver } from "./engine_xr.js";
|
9
10
|
|
10
11
|
export type GLTF = GLTF3 & {
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { Quaternion, Vector2, Vector3, Vector4 } from "three";
|
2
|
+
|
3
|
+
import { isDevEnvironment, LogType, showBalloonMessage } from "./debug/index.js";
|
1
4
|
import { $isAssigningProperties } from "./engine_serialization_core.js";
|
2
|
-
import { LogType, isDevEnvironment, showBalloonMessage } from "./debug/index.js";
|
3
5
|
import { type Constructor, type IComponent } from "./engine_types.js";
|
4
|
-
import { Quaternion, Vector2, Vector3, Vector4 } from "three";
|
5
6
|
import { watchWrite } from "./engine_utils.js";
|
6
7
|
|
7
8
|
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import { Camera,PerspectiveCamera } from "three";
|
2
|
+
|
1
3
|
import { ContextRegistry } from "./engine_context_registry.js";
|
2
4
|
import { Context } from "./engine_setup.js";
|
3
|
-
import { PerspectiveCamera, Camera } from "three";
|
4
5
|
|
5
6
|
declare type ImageMimeType = "image/webp" | "image/png";
|
6
7
|
|
@@ -1,8 +1,9 @@
|
|
1
1
|
// use for typesafe interface method calls
|
2
2
|
import { Quaternion, type Vector, Vector2, Vector3, Vector4 } from "three";
|
3
|
+
|
4
|
+
import { type Context } from "./engine_context.js";
|
5
|
+
import { ContextRegistry } from "./engine_context_registry.js";
|
3
6
|
import { type SourceIdentifier } from "./engine_types.js";
|
4
|
-
import { ContextRegistry } from "./engine_context_registry.js";
|
5
|
-
import { type Context } from "./engine_context.js";
|
6
7
|
|
7
8
|
// https://schneidenbach.gitbooks.io/typescript-cookbook/content/nameof-operator.html
|
8
9
|
export const nameofFactory = <T>() => (name: keyof T) => name;
|
@@ -215,8 +216,8 @@
|
|
215
216
|
* e.g. `await delay(1000)` will wait for 1 second
|
216
217
|
*/
|
217
218
|
export function delay(milliseconds: number): Promise<void> {
|
218
|
-
return new Promise((
|
219
|
-
setTimeout(
|
219
|
+
return new Promise((resolve, _reject) => {
|
220
|
+
setTimeout(resolve, milliseconds);
|
220
221
|
});
|
221
222
|
}
|
222
223
|
|
@@ -230,12 +231,12 @@
|
|
230
231
|
if (!context) return Promise.reject("No context");
|
231
232
|
|
232
233
|
const endFrame = context.time.frameCount + frameCount;
|
233
|
-
return new Promise((
|
234
|
-
if (!context) return
|
234
|
+
return new Promise((resolve, reject) => {
|
235
|
+
if (!context) return reject("No context");
|
235
236
|
const cb = () => {
|
236
237
|
if (context!.time.frameCount >= endFrame) {
|
237
238
|
context!.pre_update_callbacks.splice(context!.pre_update_callbacks.indexOf(cb), 1);
|
238
|
-
|
239
|
+
resolve();
|
239
240
|
}
|
240
241
|
}
|
241
242
|
context!.pre_update_callbacks.push(cb);
|
@@ -656,9 +657,9 @@
|
|
656
657
|
document.head.appendChild(script);
|
657
658
|
}
|
658
659
|
|
659
|
-
await new Promise((
|
660
|
+
await new Promise((resolve, _reject) => {
|
660
661
|
script.addEventListener("load", () => {
|
661
|
-
|
662
|
+
resolve(true);
|
662
663
|
});
|
663
664
|
});
|
664
665
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "./engine_hot_reload.js";
|
2
|
+
import "./tests/test_utils.js";
|
2
3
|
|
4
|
+
import { RGBAColor } from "../engine-components/js-extensions/RGBAColor.js";
|
5
|
+
import * as engine_scenetools from "./engine_scenetools.js";
|
3
6
|
import * as engine_setup from "./engine_setup.js";
|
4
|
-
import * as engine_scenetools from "./engine_scenetools.js";
|
5
|
-
import "./tests/test_utils.js";
|
6
|
-
import { RGBAColor } from "../engine-components/js-extensions/RGBAColor.js";
|
7
7
|
|
8
8
|
const engine : any = {
|
9
9
|
...engine_setup,
|
@@ -1,18 +1,19 @@
|
|
1
|
+
import { Intersection, Object3D } from "three";
|
2
|
+
|
3
|
+
import { isDevEnvironment, showBalloonMessage } from "../../engine/debug/index.js";
|
4
|
+
import { InputEvents, NEPointerEvent, PointerType } from "../../engine/engine_input.js";
|
5
|
+
import { Mathf } from "../../engine/engine_math.js";
|
1
6
|
import { RaycastOptions, RaycastTestObjectReturnType } from "../../engine/engine_physics.js";
|
7
|
+
import { Context } from "../../engine/engine_setup.js";
|
8
|
+
import { IComponent } from "../../engine/engine_types.js";
|
9
|
+
import { getParam } from "../../engine/engine_utils.js";
|
2
10
|
import { Behaviour, GameObject } from "../Component.js";
|
3
|
-
import {
|
4
|
-
import
|
11
|
+
import { $shadowDomOwner } from "./BaseUIComponent.js";
|
12
|
+
import type { ICanvasGroup } from "./Interfaces.js";
|
13
|
+
import { hasPointerEventComponent, type IPointerEventHandler, IPointerUpHandler,PointerEventData } from "./PointerEvents.js";
|
5
14
|
import { ObjectRaycaster, Raycaster } from "./Raycaster.js";
|
6
|
-
import { InputEvents, NEPointerEvent, PointerType } from "../../engine/engine_input.js";
|
7
|
-
import { Intersection, Object3D } from "three";
|
8
|
-
import type { ICanvasGroup } from "./Interfaces.js";
|
9
|
-
import { getParam } from "../../engine/engine_utils.js";
|
10
15
|
import { UIRaycastUtils } from "./RaycastUtils.js";
|
11
|
-
import { $shadowDomOwner } from "./BaseUIComponent.js";
|
12
|
-
import { isDevEnvironment, showBalloonMessage } from "../../engine/debug/index.js";
|
13
|
-
import { Mathf } from "../../engine/engine_math.js";
|
14
16
|
import { isUIObject } from "./Utils.js";
|
15
|
-
import { IComponent } from "../../engine/engine_types.js";
|
16
17
|
|
17
18
|
const debug = getParam("debugeventsystem");
|
18
19
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { serializable } from "../engine/engine_serialization.js";
|
2
|
+
import { Behaviour } from "./Component.js"
|
2
3
|
import { EventList } from "./EventList.js";
|
4
|
+
import { EventType } from "./EventType.js"
|
3
5
|
import type { IPointerEventHandler, PointerEventData } from "./ui/PointerEvents.js"
|
4
|
-
import { Behaviour } from "./Component.js"
|
5
|
-
import { EventType } from "./EventType.js"
|
6
6
|
|
7
7
|
class TriggerEvent {
|
8
8
|
@serializable()
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { Texture } from "three";
|
2
2
|
import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
|
3
|
-
import { Texture } from "three";
|
4
3
|
import { type GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader.js";
|
5
4
|
|
5
|
+
import { getParam } from "../engine_utils.js";
|
6
6
|
|
7
|
+
|
7
8
|
const debug = getParam("debugexr");
|
8
9
|
|
9
10
|
export class EXT_texture_exr implements GLTFLoaderPlugin {
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { type IExtensionReferenceResolver } from "./extension_resolver.js";
|
2
1
|
import { GLTFParser } from "three/examples/jsm/loaders/GLTFLoader.js";
|
2
|
+
|
3
3
|
import { debugExtension } from "../engine_default_parameters.js";
|
4
4
|
import { getParam } from "../engine_utils.js";
|
5
|
+
import { type IExtensionReferenceResolver } from "./extension_resolver.js";
|
5
6
|
|
6
7
|
const debug = getParam("debugresolvedependencies");
|
7
8
|
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { USDObject, USDZExporterContext } from "./ThreeUSDZExporter.js";
|
2
1
|
import { Object3D } from "three";
|
3
2
|
|
3
|
+
import { USDObject, USDZExporterContext } from "./ThreeUSDZExporter.js";
|
4
|
+
|
4
5
|
export interface IUSDExporterExtension {
|
5
6
|
|
6
7
|
get extensionName(): string;
|
@@ -1,20 +1,21 @@
|
|
1
|
-
import {
|
1
|
+
import { GLTFExporter, GLTFExporterPlugin, GLTFWriter } from "three/examples/jsm/exporters/GLTFExporter.js";
|
2
2
|
import { GLTFLoader, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader.js";
|
3
|
+
|
4
|
+
import { isDevEnvironment } from "../debug/index.js";
|
5
|
+
import { isResourceTrackingEnabled } from "../engine_assetdatabase.js";
|
6
|
+
import { Context } from "../engine_setup.js";
|
7
|
+
import { type ConstructorConcrete, type SourceIdentifier } from "../engine_types.js";
|
8
|
+
import { getParam } from "../engine_utils.js";
|
9
|
+
import { NEEDLE_lightmaps } from "../extensions/NEEDLE_lightmaps.js";
|
10
|
+
import { EXT_texture_exr } from "./EXT_texture_exr.js";
|
3
11
|
import { NEEDLE_components } from "./NEEDLE_components.js";
|
4
|
-
import { EXT_texture_exr } from "./EXT_texture_exr.js";
|
5
12
|
import { NEEDLE_gameobject_data } from "./NEEDLE_gameobject_data.js";
|
13
|
+
import { NEEDLE_lighting_settings } from "./NEEDLE_lighting_settings.js";
|
6
14
|
import { NEEDLE_persistent_assets } from "./NEEDLE_persistent_assets.js";
|
7
|
-
import {
|
8
|
-
import { type ConstructorConcrete, type SourceIdentifier } from "../engine_types.js";
|
9
|
-
import { Context } from "../engine_setup.js";
|
10
|
-
import { NEEDLE_lighting_settings } from "./NEEDLE_lighting_settings.js";
|
15
|
+
import { NEEDLE_progressive } from "./NEEDLE_progressive.js";
|
11
16
|
import { NEEDLE_render_objects } from "./NEEDLE_render_objects.js";
|
12
|
-
import {
|
17
|
+
import { NEEDLE_techniques_webgl } from "./NEEDLE_techniques_webgl.js";
|
13
18
|
import { InternalUsageTrackerPlugin } from "./usage_tracker.js";
|
14
|
-
import { isResourceTrackingEnabled } from "../engine_assetdatabase.js";
|
15
|
-
import { getParam } from "../engine_utils.js";
|
16
|
-
import { isDevEnvironment } from "../debug/index.js";
|
17
|
-
import { GLTFExporter, GLTFExporterPlugin, GLTFWriter } from "three/examples/jsm/exporters/GLTFExporter.js";
|
18
19
|
|
19
20
|
const debug = getParam("debugextensions");
|
20
21
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Object3D } from "three";
|
2
|
+
|
2
3
|
import type { Constructor } from "../../engine/engine_types.js";
|
3
4
|
|
4
5
|
const handlers: Map<any, ApplyPrototypeExtension> = new Map();
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { Behaviour, GameObject } from "./Component.js";
|
2
1
|
import { FlyControls as ThreeFlyControls } from "three/examples/jsm/controls/FlyControls.js";
|
2
|
+
|
3
3
|
import { Camera } from "./Camera.js";
|
4
|
+
import { Behaviour, GameObject } from "./Component.js";
|
4
5
|
|
5
6
|
export class FlyControls extends Behaviour {
|
6
7
|
private _controls: ThreeFlyControls | null = null;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { Behaviour } from "./Component.js";
|
2
1
|
import { Color, Fog as Fog3 } from "three";
|
2
|
+
|
3
3
|
import { serializable } from "../engine/engine_serialization.js";
|
4
|
+
import { Behaviour } from "./Component.js";
|
4
5
|
|
5
6
|
|
6
7
|
export enum FogMode {
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Behaviour } from "./Component.js";
|
2
1
|
import * as THREE from "three";
|
2
|
+
import { BoxHelper, Color } from "three";
|
3
|
+
|
4
|
+
import * as params from "../engine/engine_default_parameters.js";
|
3
5
|
import * as Gizmos from "../engine/engine_gizmos.js";
|
4
|
-
import
|
6
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
5
7
|
import { FrameEvent } from "../engine/engine_setup.js";
|
6
|
-
import {
|
7
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
8
|
+
import { Behaviour } from "./Component.js";
|
8
9
|
|
9
10
|
|
10
11
|
export class BoxGizmo extends Behaviour {
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import { Object3D, Vector3 } from "three";
|
2
|
+
import { AnimationClip } from "three";
|
2
3
|
import { GLTFExporter, type GLTFExporterOptions } from 'three/examples/jsm/exporters/GLTFExporter.js';
|
3
4
|
|
4
|
-
import { Behaviour, GameObject } from "../../Component.js";
|
5
|
-
import GLTFMeshGPUInstancingExtension from '../../../include/three/EXT_mesh_gpu_instancing_exporter.js';
|
6
|
-
import { Renderer } from "../../Renderer.js";
|
7
5
|
import { SerializationContext } from "../../../engine/engine_serialization_core.js";
|
8
6
|
import { serializable } from "../../../engine/engine_serialization_decorator.js";
|
9
|
-
import { NEEDLE_components } from "../../../engine/extensions/NEEDLE_components.js";
|
10
7
|
import { getWorldPosition } from "../../../engine/engine_three_utils.js";
|
11
|
-
import { BoxHelperComponent } from "../../BoxHelperComponent.js";
|
12
|
-
import { AnimationClip } from "three";
|
13
8
|
import { getParam } from "../../../engine/engine_utils.js";
|
14
9
|
import { registerExportExtensions } from "../../../engine/extensions/index.js";
|
10
|
+
import { NEEDLE_components } from "../../../engine/extensions/NEEDLE_components.js";
|
11
|
+
import GLTFMeshGPUInstancingExtension from '../../../include/three/EXT_mesh_gpu_instancing_exporter.js';
|
12
|
+
import { BoxHelperComponent } from "../../BoxHelperComponent.js";
|
13
|
+
import { Behaviour, GameObject } from "../../Component.js";
|
14
|
+
import { Renderer } from "../../Renderer.js";
|
15
15
|
|
16
16
|
const debugExport = getParam("debuggltfexport");
|
17
17
|
|
@@ -1,14 +1,15 @@
|
|
1
|
-
import {
|
1
|
+
import { Color, LinearSRGBColorSpace, Object3D, SRGBColorSpace, Texture } from 'three';
|
2
2
|
import * as ThreeMeshUI from 'three-mesh-ui'
|
3
|
+
import SimpleStateBehavior from "three-mesh-ui/examples/behaviors/states/SimpleStateBehavior.js"
|
4
|
+
|
5
|
+
import { serializable } from '../../engine/engine_serialization_decorator.js';
|
6
|
+
import { GameObject } from '../Component.js';
|
3
7
|
import { RGBAColor } from "../js-extensions/RGBAColor.js"
|
4
8
|
import { BaseUIComponent } from "./BaseUIComponent.js";
|
5
|
-
import {
|
6
|
-
import {
|
9
|
+
import { type IGraphic, type IRectTransformChangedReceiver } from './Interfaces.js';
|
10
|
+
import { Outline } from './Outline.js';
|
7
11
|
import { RectTransform } from './RectTransform.js';
|
8
12
|
import { onChange, scheduleAction } from "./Utils.js"
|
9
|
-
import { GameObject } from '../Component.js';
|
10
|
-
import SimpleStateBehavior from "three-mesh-ui/examples/behaviors/states/SimpleStateBehavior.js"
|
11
|
-
import { Outline } from './Outline.js';
|
12
13
|
|
13
14
|
const _colorStateObject: { backgroundColor: Color, backgroundOpacity: number, borderColor: Color, borderOpacity: number } = {
|
14
15
|
backgroundColor: new Color(1, 1, 1),
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { Behaviour } from "./Component.js";
|
2
|
-
import { serializable } from "../engine/engine_serialization_decorator.js";
|
3
|
-
import * as params from "../engine/engine_default_parameters.js";
|
4
1
|
import { Color, GridHelper as _GridHelper } from "three";
|
5
2
|
|
3
|
+
import * as params from "../engine/engine_default_parameters.js";
|
4
|
+
import { serializable } from "../engine/engine_serialization_decorator.js";
|
5
|
+
import { Behaviour } from "./Component.js";
|
6
|
+
|
6
7
|
export class GridHelper extends Behaviour {
|
7
8
|
|
8
9
|
@serializable()
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { Texture } from "three";
|
2
2
|
import { GroundedSkybox as GroundProjection } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
3
|
+
|
3
4
|
import { serializable } from "../engine/engine_serialization_decorator.js";
|
4
|
-
import { Watch as Watch
|
5
|
-
import {
|
5
|
+
import { getParam,Watch as Watch } from "../engine/engine_utils.js";
|
6
|
+
import { Behaviour, GameObject } from "./Component.js";
|
6
7
|
|
7
8
|
const debug = getParam("debuggroundprojection");
|
8
9
|
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { Color, Texture } from 'three';
|
2
|
+
|
1
3
|
import { serializable } from '../../engine/engine_serialization_decorator.js';
|
2
|
-
import { Color, Texture } from 'three';
|
3
4
|
import { MaskableGraphic } from './Graphic.js';
|
4
5
|
|
5
6
|
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export {
|
2
|
-
export { USDObject
|
3
|
-
export {
|
1
|
+
export { type UsdzBehaviour } from "./extensions/behavior/Behaviour.js";
|
2
|
+
export { imageToCanvas,USDObject } from "./ThreeUSDZExporter.js";
|
3
|
+
export { USDZExporter } from "./USDZExporter.js";
|
@@ -1,4 +1,4 @@
|
|
1
|
+
export * from "./PostProcessingEffect.js";
|
2
|
+
export * from "./PostProcessingHandler.js"
|
1
3
|
export * from "./VolumeParameter.js"
|
2
|
-
export * from "./PostProcessingHandler.js"
|
3
|
-
export * from "./PostProcessingEffect.js";
|
4
4
|
export * from "./VolumeProfile.js";
|
@@ -1,4 +1,4 @@
|
|
1
|
+
export { type ITimelineAnimationCallbacks as ITimelineAnimationOverride } from "./PlayableDirector.js"
|
1
2
|
export * from "./SignalAsset.js"
|
2
|
-
export * from "./TimelineTracks.js"
|
3
3
|
export * from "./TimelineModels.js"
|
4
|
-
export
|
4
|
+
export * from "./TimelineTracks.js"
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export
|
1
|
+
export { WebXR as WebXR } from "./WebXR.js";
|
2
2
|
export * from "./WebXRImageTracking.js";
|
3
|
-
export
|
3
|
+
export * from "./WebXRPlaneTracking.js";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export * from "./extensions.js"
|
2
2
|
export * from "./NEEDLE_animator_controller_model.js"
|
3
|
+
export { SceneLightSettings } from "./NEEDLE_lighting_settings.js"
|
3
4
|
export * from "./NEEDLE_progressive.js"
|
4
|
-
export { CustomShader } from "./NEEDLE_techniques_webgl.js"
|
5
|
-
export { SceneLightSettings } from "./NEEDLE_lighting_settings.js"
|
5
|
+
export { CustomShader } from "./NEEDLE_techniques_webgl.js"
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * from "./
|
1
|
+
export * from "./NeedleXRController.js";
|
2
2
|
export * from "./NeedleXRSession.js";
|
3
|
-
export * from "./NeedleXRController.js";
|
4
3
|
export * from "./NeedleXRSync.js"
|
5
4
|
export * from "./utils.js"
|
5
|
+
export * from "./XRRig.js";
|
@@ -1,10 +1,10 @@
|
|
1
|
+
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
2
|
+
import { FrameEvent } from "../../engine/engine_setup.js";
|
3
|
+
import { getParam, isiOS } from "../../engine/engine_utils.js";
|
1
4
|
import { Behaviour, GameObject } from "../Component.js";
|
5
|
+
import { EventList } from "../EventList.js";
|
2
6
|
import { type IPointerEventHandler } from "./PointerEvents.js";
|
3
|
-
import { FrameEvent } from "../../engine/engine_setup.js";
|
4
|
-
import { serializable } from "../../engine/engine_serialization_decorator.js";
|
5
7
|
import { Text } from "./Text.js";
|
6
|
-
import { getParam, isiOS } from "../../engine/engine_utils.js";
|
7
|
-
import { EventList } from "../EventList.js";
|
8
8
|
import { tryGetUIComponent } from "./Utils.js";
|
9
9
|
|
10
10
|
const debug = getParam("debuginputfield");
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Matrix4, Object3D, Quaternion, Scene, Vector3 } from 'three';
|
2
|
-
|
2
|
+
|
3
|
+
import { CreateWireCube, Gizmos } from '../engine_gizmos.js';
|
3
4
|
import { IGameObject } from '../engine_types.js';
|
4
5
|
import { getParam } from '../engine_utils.js';
|