@p100-web/core-three 100.2.15 → 100.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/package.json +2 -2
  2. package/dist/App.d.ts +0 -42
  3. package/dist/App.d.ts.map +0 -1
  4. package/dist/App.js +0 -182
  5. package/dist/App.js.map +0 -1
  6. package/dist/ComponentFactory.d.ts +0 -5
  7. package/dist/ComponentFactory.d.ts.map +0 -1
  8. package/dist/ComponentFactory.js +0 -13
  9. package/dist/ComponentFactory.js.map +0 -1
  10. package/dist/ThreeCanvas.d.ts +0 -56
  11. package/dist/ThreeCanvas.d.ts.map +0 -1
  12. package/dist/ThreeCanvas.js +0 -410
  13. package/dist/ThreeCanvas.js.map +0 -1
  14. package/dist/ThreeEngine.d.ts +0 -24
  15. package/dist/ThreeEngine.d.ts.map +0 -1
  16. package/dist/ThreeEngine.js +0 -102
  17. package/dist/ThreeEngine.js.map +0 -1
  18. package/dist/ThreeNodeRenderer.d.ts +0 -41
  19. package/dist/ThreeNodeRenderer.d.ts.map +0 -1
  20. package/dist/ThreeNodeRenderer.js +0 -116
  21. package/dist/ThreeNodeRenderer.js.map +0 -1
  22. package/dist/animations/ModelAnimation.d.ts +0 -23
  23. package/dist/animations/ModelAnimation.d.ts.map +0 -1
  24. package/dist/animations/ModelAnimation.js +0 -55
  25. package/dist/animations/ModelAnimation.js.map +0 -1
  26. package/dist/assets/ThreeAssetLoader.d.ts +0 -98
  27. package/dist/assets/ThreeAssetLoader.d.ts.map +0 -1
  28. package/dist/assets/ThreeAssetLoader.js +0 -489
  29. package/dist/assets/ThreeAssetLoader.js.map +0 -1
  30. package/dist/index.d.ts +0 -7
  31. package/dist/index.d.ts.map +0 -1
  32. package/dist/index.js +0 -8
  33. package/dist/index.js.map +0 -1
  34. package/dist/pcomponents/PAnimator.d.ts +0 -25
  35. package/dist/pcomponents/PAnimator.d.ts.map +0 -1
  36. package/dist/pcomponents/PAnimator.js +0 -151
  37. package/dist/pcomponents/PAnimator.js.map +0 -1
  38. package/dist/pcomponents/PBackground.d.ts +0 -17
  39. package/dist/pcomponents/PBackground.d.ts.map +0 -1
  40. package/dist/pcomponents/PBackground.js +0 -114
  41. package/dist/pcomponents/PBackground.js.map +0 -1
  42. package/dist/pcomponents/PBasicMaterial.d.ts +0 -22
  43. package/dist/pcomponents/PBasicMaterial.d.ts.map +0 -1
  44. package/dist/pcomponents/PBasicMaterial.js +0 -171
  45. package/dist/pcomponents/PBasicMaterial.js.map +0 -1
  46. package/dist/pcomponents/PCollider.d.ts +0 -18
  47. package/dist/pcomponents/PCollider.d.ts.map +0 -1
  48. package/dist/pcomponents/PCollider.js +0 -59
  49. package/dist/pcomponents/PCollider.js.map +0 -1
  50. package/dist/pcomponents/PCubeGeometry.d.ts +0 -8
  51. package/dist/pcomponents/PCubeGeometry.d.ts.map +0 -1
  52. package/dist/pcomponents/PCubeGeometry.js +0 -23
  53. package/dist/pcomponents/PCubeGeometry.js.map +0 -1
  54. package/dist/pcomponents/PEnvironment.d.ts +0 -12
  55. package/dist/pcomponents/PEnvironment.d.ts.map +0 -1
  56. package/dist/pcomponents/PEnvironment.js +0 -41
  57. package/dist/pcomponents/PEnvironment.js.map +0 -1
  58. package/dist/pcomponents/PImageCache.d.ts +0 -11
  59. package/dist/pcomponents/PImageCache.d.ts.map +0 -1
  60. package/dist/pcomponents/PImageCache.js +0 -38
  61. package/dist/pcomponents/PImageCache.js.map +0 -1
  62. package/dist/pcomponents/PLight.d.ts +0 -8
  63. package/dist/pcomponents/PLight.d.ts.map +0 -1
  64. package/dist/pcomponents/PLight.js +0 -45
  65. package/dist/pcomponents/PLight.js.map +0 -1
  66. package/dist/pcomponents/PLightDirectional.d.ts +0 -8
  67. package/dist/pcomponents/PLightDirectional.d.ts.map +0 -1
  68. package/dist/pcomponents/PLightDirectional.js +0 -36
  69. package/dist/pcomponents/PLightDirectional.js.map +0 -1
  70. package/dist/pcomponents/PMaskedMaterial.d.ts +0 -18
  71. package/dist/pcomponents/PMaskedMaterial.d.ts.map +0 -1
  72. package/dist/pcomponents/PMaskedMaterial.js +0 -200
  73. package/dist/pcomponents/PMaskedMaterial.js.map +0 -1
  74. package/dist/pcomponents/PMaterialModifier.d.ts +0 -12
  75. package/dist/pcomponents/PMaterialModifier.d.ts.map +0 -1
  76. package/dist/pcomponents/PMaterialModifier.js +0 -78
  77. package/dist/pcomponents/PMaterialModifier.js.map +0 -1
  78. package/dist/pcomponents/PModelAnnotation.d.ts +0 -11
  79. package/dist/pcomponents/PModelAnnotation.d.ts.map +0 -1
  80. package/dist/pcomponents/PModelAnnotation.js +0 -21
  81. package/dist/pcomponents/PModelAnnotation.js.map +0 -1
  82. package/dist/pcomponents/PModelAnnotations.d.ts +0 -10
  83. package/dist/pcomponents/PModelAnnotations.d.ts.map +0 -1
  84. package/dist/pcomponents/PModelAnnotations.js +0 -25
  85. package/dist/pcomponents/PModelAnnotations.js.map +0 -1
  86. package/dist/pcomponents/PModelGLTF.d.ts +0 -15
  87. package/dist/pcomponents/PModelGLTF.d.ts.map +0 -1
  88. package/dist/pcomponents/PModelGLTF.js +0 -111
  89. package/dist/pcomponents/PModelGLTF.js.map +0 -1
  90. package/dist/pcomponents/PModelNode.d.ts +0 -14
  91. package/dist/pcomponents/PModelNode.d.ts.map +0 -1
  92. package/dist/pcomponents/PModelNode.js +0 -82
  93. package/dist/pcomponents/PModelNode.js.map +0 -1
  94. package/dist/pcomponents/PPhysicalMaterial.d.ts +0 -15
  95. package/dist/pcomponents/PPhysicalMaterial.d.ts.map +0 -1
  96. package/dist/pcomponents/PPhysicalMaterial.js +0 -110
  97. package/dist/pcomponents/PPhysicalMaterial.js.map +0 -1
  98. package/dist/pcomponents/PPlaneGeometry.d.ts +0 -8
  99. package/dist/pcomponents/PPlaneGeometry.d.ts.map +0 -1
  100. package/dist/pcomponents/PPlaneGeometry.js +0 -23
  101. package/dist/pcomponents/PPlaneGeometry.js.map +0 -1
  102. package/dist/pcomponents/PProjectRoot.d.ts +0 -8
  103. package/dist/pcomponents/PProjectRoot.d.ts.map +0 -1
  104. package/dist/pcomponents/PProjectRoot.js +0 -24
  105. package/dist/pcomponents/PProjectRoot.js.map +0 -1
  106. package/dist/pcomponents/PSlider.d.ts +0 -18
  107. package/dist/pcomponents/PSlider.d.ts.map +0 -1
  108. package/dist/pcomponents/PSlider.js +0 -62
  109. package/dist/pcomponents/PSlider.js.map +0 -1
  110. package/dist/pcomponents/PSound.d.ts +0 -17
  111. package/dist/pcomponents/PSound.d.ts.map +0 -1
  112. package/dist/pcomponents/PSound.js +0 -119
  113. package/dist/pcomponents/PSound.js.map +0 -1
  114. package/dist/pcomponents/PSphereGeometry.d.ts +0 -9
  115. package/dist/pcomponents/PSphereGeometry.d.ts.map +0 -1
  116. package/dist/pcomponents/PSphereGeometry.js +0 -24
  117. package/dist/pcomponents/PSphereGeometry.js.map +0 -1
  118. package/dist/pcomponents/PSprite.d.ts +0 -13
  119. package/dist/pcomponents/PSprite.d.ts.map +0 -1
  120. package/dist/pcomponents/PSprite.js +0 -73
  121. package/dist/pcomponents/PSprite.js.map +0 -1
  122. package/dist/pcomponents/PSpriteSheet.d.ts +0 -13
  123. package/dist/pcomponents/PSpriteSheet.d.ts.map +0 -1
  124. package/dist/pcomponents/PSpriteSheet.js +0 -49
  125. package/dist/pcomponents/PSpriteSheet.js.map +0 -1
  126. package/dist/pcomponents/PText.d.ts +0 -9
  127. package/dist/pcomponents/PText.d.ts.map +0 -1
  128. package/dist/pcomponents/PText.js +0 -42
  129. package/dist/pcomponents/PText.js.map +0 -1
  130. package/dist/pcomponents/PVideoPlayer.d.ts +0 -5
  131. package/dist/pcomponents/PVideoPlayer.d.ts.map +0 -1
  132. package/dist/pcomponents/PVideoPlayer.js +0 -12
  133. package/dist/pcomponents/PVideoPlayer.js.map +0 -1
  134. package/dist/pcomponents.d.ts +0 -27
  135. package/dist/pcomponents.d.ts.map +0 -1
  136. package/dist/pcomponents.js +0 -33
  137. package/dist/pcomponents.js.map +0 -1
  138. package/dist/postprocessing/PSSRPass.d.ts +0 -19
  139. package/dist/postprocessing/PSSRPass.d.ts.map +0 -1
  140. package/dist/postprocessing/PSSRPass.js +0 -69
  141. package/dist/postprocessing/PSSRPass.js.map +0 -1
  142. package/dist/postprocessing/ThreeJsPostProcessor.d.ts +0 -32
  143. package/dist/postprocessing/ThreeJsPostProcessor.d.ts.map +0 -1
  144. package/dist/postprocessing/ThreeJsPostProcessor.js +0 -264
  145. package/dist/postprocessing/ThreeJsPostProcessor.js.map +0 -1
  146. package/dist/three/ColliderObject3D.d.ts +0 -19
  147. package/dist/three/ColliderObject3D.d.ts.map +0 -1
  148. package/dist/three/ColliderObject3D.js +0 -96
  149. package/dist/three/ColliderObject3D.js.map +0 -1
  150. package/dist/three/FreeCameraControls.d.ts +0 -32
  151. package/dist/three/FreeCameraControls.d.ts.map +0 -1
  152. package/dist/three/FreeCameraControls.js +0 -173
  153. package/dist/three/FreeCameraControls.js.map +0 -1
  154. package/dist/three/OrbitCameraControls.d.ts +0 -36
  155. package/dist/three/OrbitCameraControls.d.ts.map +0 -1
  156. package/dist/three/OrbitCameraControls.js +0 -306
  157. package/dist/three/OrbitCameraControls.js.map +0 -1
  158. package/dist/three/VrCameraControls.d.ts +0 -30
  159. package/dist/three/VrCameraControls.d.ts.map +0 -1
  160. package/dist/three/VrCameraControls.js +0 -142
  161. package/dist/three/VrCameraControls.js.map +0 -1
@@ -1,151 +0,0 @@
1
- import { NodeEvents, PAnimator as PAnimatorBase, } from "@p100-web/core";
2
- export default class PAnimator extends PAnimatorBase {
3
- constructor() {
4
- super(...arguments);
5
- this._animation = null;
6
- this._playedDuration = 0;
7
- this._segmentDuration = 0;
8
- this._playing = false;
9
- //
10
- // INodeEventListener
11
- //
12
- this.onNodeEvent = (component, type, model) => {
13
- if (!(type & NodeEvents.ModelLoaded))
14
- return;
15
- this._animation = null;
16
- this.loaded = false;
17
- this.validAnimation = false;
18
- // We are updating the model
19
- if (component !== null && model !== null) {
20
- this._animation = component.getAnimation(this.clip);
21
- this.validAnimation = this._animation !== null;
22
- this.loaded = true;
23
- }
24
- };
25
- this.onFinished = () => {
26
- this._playedDuration = 0;
27
- this._stop(true);
28
- this.outport_onFinished?.emit(null);
29
- };
30
- this.updateSegment = (dt) => {
31
- this._playedDuration += dt;
32
- if (this._playedDuration >= this._segmentDuration) {
33
- if (this.loop) {
34
- this._playedDuration = 0;
35
- this._animation.setTime(this.from);
36
- }
37
- else {
38
- if (this.resetOnStop) {
39
- this._animation.reset(this.from);
40
- }
41
- else {
42
- this._animation.reset(this.to);
43
- }
44
- // Remove events and callbacks
45
- this.onFinished();
46
- return;
47
- }
48
- }
49
- this._animation?.update(dt);
50
- };
51
- this.update = (dt) => {
52
- this._animation.update(dt);
53
- };
54
- }
55
- getModelComponent() {
56
- return this.findComponent("PModelGLTF");
57
- }
58
- render() {
59
- // Find model
60
- const model = this.getModelComponent();
61
- if (model === null) {
62
- this.context.error("Animator did not find model");
63
- return;
64
- }
65
- model.node.addNodeEventListener(this);
66
- }
67
- unrender() {
68
- if (this._playing) {
69
- this._stop(false);
70
- }
71
- this._animation = null;
72
- const model = this.getModelComponent();
73
- model?.node.removeNodeEventListener(this);
74
- this.loaded = false;
75
- this.validAnimation = false;
76
- }
77
- getAnimationClips() {
78
- const model = this.getModelComponent();
79
- return model?.getAnimationNames() || [];
80
- }
81
- /**
82
- * Stop playback and remove event listeners
83
- */
84
- _stop(emitOnStopped) {
85
- if (this.segment) {
86
- this.context.getCanvas().unregisterUpdate(this.updateSegment);
87
- }
88
- else {
89
- this.context.getCanvas().unregisterUpdate(this.update);
90
- this._animation?.removeFinishedListener(this.onFinished);
91
- }
92
- this._playing = false;
93
- // Always call on stop
94
- if (emitOnStopped)
95
- this.outport_onStopped?.emit(null);
96
- }
97
- callback_onPlay() {
98
- if (this.clip === "")
99
- return;
100
- if (this._playing) {
101
- console.log("this._playing: ", this._playing);
102
- }
103
- if (this._animation !== null) {
104
- // if (this._animation.isRunning()) {
105
- // this.context.error("Animation was already running");
106
- // return;
107
- // }
108
- this._playedDuration = 0;
109
- this._segmentDuration = this.to - this.from;
110
- this._animation.setPaused(false);
111
- if (this.segment) {
112
- // Stay at stop time
113
- this._animation.setLoop(false);
114
- this._animation.setClamp(true);
115
- this._animation.setTime(this.from);
116
- this.context.getCanvas().registerUpdate(this.updateSegment);
117
- }
118
- else {
119
- this._animation.setLoop(this.loop);
120
- this._animation.setClamp(!this.resetOnStop);
121
- this._animation.setTime(0);
122
- this._animation.addFinishedListener(this.onFinished);
123
- this.context.getCanvas().registerUpdate(this.update);
124
- }
125
- this._playing = true;
126
- this._animation.play();
127
- this.outport_onPlay?.emit("");
128
- }
129
- else {
130
- this.context.error("Animation not found: " + this.clip);
131
- }
132
- }
133
- callback_onStop() {
134
- if (this.clip === "")
135
- return;
136
- this._playedDuration = 0;
137
- // This will reset animation
138
- if (this.resetOnStop)
139
- this._animation?.stop();
140
- this._stop(true);
141
- }
142
- callback_onReset(value) {
143
- const second = value ? parseFloat(value) : 0;
144
- if (this.clip === "" || !this._animation)
145
- return;
146
- this._playedDuration = second;
147
- this._stop(false);
148
- this._animation.reset(second);
149
- }
150
- }
151
- //# sourceMappingURL=PAnimator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PAnimator.js","sourceRoot":"","sources":["../../src/pcomponents/PAnimator.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,UAAU,EACV,SAAS,IAAI,aAAa,GAE3B,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,OAAO,OAAO,SACnB,SAAQ,aAAa;IADvB;;QAIY,eAAU,GAA2B,IAAI,CAAC;QAE5C,oBAAe,GAAG,CAAC,CAAC;QACpB,qBAAgB,GAAG,CAAC,CAAC;QACrB,aAAQ,GAAG,KAAK,CAAC;QA2BzB,EAAE;QACF,sBAAsB;QACtB,EAAE;QAEF,gBAAW,GAAG,CACZ,SAA2B,EAC3B,IAAgB,EAChB,KAAY,EAC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AC7C,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO;QACjD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CA0BF"}
@@ -1,17 +0,0 @@
1
- import { MeshBasicMaterial, SphereGeometry, Texture } from "three";
2
- import { PBackground as PBackgroundBase } from "@p100-web/core";
3
- import { TextureTask, VideoTextureTask, ITextureTaskLoader, IVideoTextureTaskLoader } from "../assets/ThreeAssetLoader";
4
- export default class PBackground extends PBackgroundBase implements ITextureTaskLoader, IVideoTextureTaskLoader {
5
- protected _material: MeshBasicMaterial | null;
6
- protected _geometry: SphereGeometry | null;
7
- protected _texture: Texture | null;
8
- _dispose(unrender: boolean): void;
9
- unrender(): void;
10
- render(): void;
11
- getOpacity(): number;
12
- setOpacity(value: number): void;
13
- getTexture<T>(): T | null;
14
- onVideoTextureTaskLoaded: (task: VideoTextureTask) => void;
15
- onTextureTaskLoaded: (task: TextureTask) => void;
16
- }
17
- //# sourceMappingURL=PBackground.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PBackground.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PBackground.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,cAAc,EACd,OAAO,EACR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAY,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAyB,EACvB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,WACnB,SAAQ,eACR,YAAW,kBAAkB,EAAE,uBAAuB;IAEtD,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IACrD,SAAS,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAAQ;IAClD,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAQ;IAE1C,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAuB1B,QAAQ;IAIR,MAAM;IA6CN,UAAU,IAAI,MAAM;IAIpB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/B,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI;IAQzB,wBAAwB,GAAI,MAAM,gBAAgB,KAAG,IAAI,CAcvD;IAMF,mBAAmB,GAAI,MAAM,WAAW,KAAG,IAAI,CAc7C;CACH"}
@@ -1,114 +0,0 @@
1
- import { BackSide, MathUtils, Mesh, MeshBasicMaterial, SphereGeometry, } from "three";
2
- import { FileType, PBackground as PBackgroundBase } from "@p100-web/core";
3
- export default class PBackground extends PBackgroundBase {
4
- constructor() {
5
- super(...arguments);
6
- this._material = null;
7
- this._geometry = null;
8
- this._texture = null;
9
- //
10
- // VideoTextureTask
11
- //
12
- this.onVideoTextureTaskLoaded = (task) => {
13
- if (this._material === null) {
14
- this.context.error("onVideoTextureLoaded and material was null");
15
- return;
16
- }
17
- if (task.texture === null) {
18
- this.context.error("onVideoTextureLoaded and texture was null");
19
- return;
20
- }
21
- const texture = task.texture;
22
- this._material.map = texture;
23
- this._material.needsUpdate = true;
24
- this._texture = texture;
25
- };
26
- //
27
- // TextureTask
28
- //
29
- this.onTextureTaskLoaded = (task) => {
30
- if (this._material === null) {
31
- this.context.error("onTextureLoaded and material was null");
32
- return;
33
- }
34
- if (task.texture === null) {
35
- this.context.error("onTextureLoaded and texture was null");
36
- return;
37
- }
38
- const texture = task.texture;
39
- this._material.map = texture;
40
- this._material.needsUpdate = true;
41
- this._texture = texture;
42
- };
43
- }
44
- _dispose(unrender) {
45
- // AssetLoader will take care of cleaning up the html elements
46
- this._texture?.dispose();
47
- this._texture = null;
48
- // Check if we should dispose Material
49
- if (this._material) {
50
- this._material.map = null;
51
- this._material.needsUpdate = true;
52
- // Dispose material
53
- if (unrender) {
54
- this._material.dispose();
55
- this._material = null;
56
- }
57
- }
58
- if (unrender && this._geometry !== null) {
59
- this._geometry.dispose();
60
- this._geometry = null;
61
- }
62
- }
63
- unrender() {
64
- this._dispose(true);
65
- }
66
- render() {
67
- const geometry = new SphereGeometry(this.radius, 32, 32);
68
- this._geometry = geometry;
69
- const mesh = new Mesh(geometry);
70
- mesh.castShadow = false;
71
- mesh.receiveShadow = false;
72
- this.node.set_el(mesh);
73
- mesh.rotation.y = MathUtils.degToRad(this.rotation);
74
- const material = new MeshBasicMaterial({
75
- color: 0xffffff,
76
- map: null,
77
- side: BackSide,
78
- transparent: false,
79
- fog: false,
80
- // shadowSide: DoubleSide,
81
- depthTest: true, // ?? maybe
82
- depthWrite: true,
83
- });
84
- this._material = material;
85
- mesh.material = material;
86
- mesh.scale.x = mesh.scale.x * -1;
87
- if (this.file_texture.file !== null) {
88
- if (this.file_texture.file.type === FileType.Image) {
89
- this.context
90
- .assetLoader()
91
- .addTextureTask(this, this.file_texture.file);
92
- }
93
- else if (this.file_texture.file.type === FileType.Video) {
94
- this.context
95
- .assetLoader()
96
- .addVideoTextureTask(this, this.file_texture.file);
97
- }
98
- }
99
- }
100
- //
101
- // IPMaterial
102
- //
103
- getOpacity() {
104
- return this._material?.opacity || 0;
105
- }
106
- setOpacity(value) {
107
- if (this._material)
108
- this._material.opacity = value;
109
- }
110
- getTexture() {
111
- return this._texture;
112
- }
113
- }
114
- //# sourceMappingURL=PBackground.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PBackground.js","sourceRoot":"","sources":["../../src/pcomponents/PBackground.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,iBAAiB,EACjB,cAAc,GAEf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,QAAQ,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAA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AAS,CAAC,OAAO,GAAG,KAAK,CAAC;IACrD,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,QAAa,CAAC;IAC5B,CAAC;CAyCF"}
@@ -1,22 +0,0 @@
1
- import { MeshBasicMaterial, Texture } from "three";
2
- import { INodeEventListener, INodeEventSender, PBasicMaterial as PBasicMaterialBase } from "@p100-web/core";
3
- import { TextureTask, VideoTextureTask, ITextureTaskLoader, IVideoTextureTaskLoader } from "../assets/ThreeAssetLoader";
4
- export default class PBasicMaterial extends PBasicMaterialBase implements ITextureTaskLoader, IVideoTextureTaskLoader, INodeEventSender {
5
- protected _material: MeshBasicMaterial | null;
6
- protected _texture: Texture | null;
7
- _dispose(unrender: boolean): void;
8
- unrender(): void;
9
- render(): void;
10
- getOpacity(): number;
11
- setOpacity(value: number): void;
12
- getTexture<T>(): T | null;
13
- onAddNodeEventListener: (listener: INodeEventListener) => void;
14
- callback_setOpacity(payloadValue: string | null): void;
15
- onVideoTextureTaskLoaded: (task: VideoTextureTask) => void;
16
- onTextureTaskLoaded: (task: TextureTask) => void;
17
- /**
18
- * Called by this component.
19
- */
20
- setTextureRepeat(): void;
21
- }
22
- //# sourceMappingURL=PBasicMaterial.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PBasicMaterial.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PBasicMaterial.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EAEjB,OAAO,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAEhB,cAAc,IAAI,kBAAkB,EACrC,MAAM,gBAAgB,CAAC;AAIxB,OAAyB,EACvB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,cACnB,SAAQ,kBACR,YAAW,kBAAkB,EAAE,uBAAuB,EAAE,gBAAgB;IAExE,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IACrD,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAQ;IAM1C,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAqB1B,QAAQ;IAKR,MAAM;IAoDN,UAAU,IAAI,MAAM;IAIpB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/B,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI;IAQzB,sBAAsB,GAAI,UAAU,kBAAkB,UAgBpD;IAMF,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAWtD,wBAAwB,GAAI,MAAM,gBAAgB,KAAG,IAAI,CAmBvD;IAMF,mBAAmB,GAAI,MAAM,WAAW,KAAG,IAAI,CAmB7C;IAMF;;OAEG;IACH,gBAAgB;CAajB"}
@@ -1,171 +0,0 @@
1
- import { BackSide, ClampToEdgeWrapping, FrontSide, MeshBasicMaterial, RepeatWrapping, Vector2, } from "three";
2
- import { NodeEvents, PBasicMaterial as PBasicMaterialBase, } from "@p100-web/core";
3
- import { FileSubType, FileType } from "@p100-web/core";
4
- export default class PBasicMaterial extends PBasicMaterialBase {
5
- constructor() {
6
- super(...arguments);
7
- this._material = null;
8
- this._texture = null;
9
- //
10
- // INodeEventSender
11
- //
12
- this.onAddNodeEventListener = (listener) => {
13
- if (this.file_texture.file !== null && this._texture) {
14
- if (this.file_texture.file.type === FileType.Image) {
15
- listener.onNodeEvent(this, NodeEvents.ImageTextureLoaded, this._texture);
16
- }
17
- else if (this.file_texture.file.type === FileType.Video) {
18
- listener.onNodeEvent(this, NodeEvents.VideoTextureLoaded, this._texture);
19
- }
20
- }
21
- };
22
- //
23
- // VideoTextureTask
24
- //
25
- this.onVideoTextureTaskLoaded = (task) => {
26
- if (this._material === null) {
27
- this.context.error("onVideoTextureLoaded and material was null");
28
- return;
29
- }
30
- if (task.texture === null) {
31
- this.context.error("onVideoTextureLoaded and texture was null");
32
- return;
33
- }
34
- this._texture = task.texture;
35
- const texture = task.texture;
36
- this._material.map = texture;
37
- this._material.needsUpdate = true;
38
- this.setTextureRepeat();
39
- // Notify other components
40
- this.node.emitNodeEvent(this, NodeEvents.VideoTextureLoaded, texture);
41
- };
42
- //
43
- // TextureTask
44
- //
45
- this.onTextureTaskLoaded = (task) => {
46
- if (this._material === null) {
47
- this.context.error("onTextureLoaded and material was null");
48
- return;
49
- }
50
- if (task.texture === null) {
51
- this.context.error("onTextureLoaded and texture was null");
52
- return;
53
- }
54
- this._texture = task.texture;
55
- const texture = task.texture;
56
- this._material.map = texture;
57
- this._material.needsUpdate = true;
58
- this.setTextureRepeat();
59
- // Notify other components
60
- this.node.emitNodeEvent(this, NodeEvents.ImageTextureLoaded, texture);
61
- };
62
- }
63
- //
64
- // PComponent
65
- //
66
- _dispose(unrender) {
67
- if (this._texture !== null) {
68
- // AssetLoader will take care of cleaning up the html elements
69
- this._texture.dispose();
70
- this._texture = null;
71
- }
72
- // Check if we should dispose Material
73
- if (this._material) {
74
- // Do we have a texture as well?
75
- this._material.map = null;
76
- this._material.needsUpdate = true;
77
- // Dispose material
78
- if (unrender) {
79
- this._material.dispose();
80
- this._material = null;
81
- }
82
- }
83
- }
84
- unrender() {
85
- this.node.unregisterNodeEventSender(this);
86
- this._dispose(true);
87
- }
88
- render() {
89
- this.node.registerNodeEventSender(this);
90
- if (!this.node.hasEl()) {
91
- this.context.error("Material is missing Mesh");
92
- return;
93
- }
94
- let inverted = this.inverted;
95
- if (this.context.isInverted()) {
96
- inverted = !inverted;
97
- }
98
- const material = new MeshBasicMaterial({
99
- color: this.color,
100
- map: null,
101
- side: inverted ? BackSide : FrontSide,
102
- opacity: this.opacity,
103
- transparent: this.transparent,
104
- fog: false,
105
- // shadowSide: DoubleSide,
106
- wireframe: false,
107
- alphaTest: this.alphaTest,
108
- depthWrite: this.depthWrite,
109
- });
110
- this._material = material;
111
- const mesh = this.node.getEl();
112
- mesh.material = material;
113
- mesh.renderOrder = this.renderOrder;
114
- if (this.file_texture.file !== null) {
115
- // Check which loader to use
116
- if (this.file_texture.file.type === FileType.Image) {
117
- this.context
118
- .assetLoader()
119
- .addTextureTask(this, this.file_texture.file);
120
- }
121
- else if (this.file_texture.file.type === FileType.Video) {
122
- this.context
123
- .assetLoader()
124
- .addVideoTextureTask(this, this.file_texture.file);
125
- }
126
- }
127
- material.needsUpdate = true;
128
- }
129
- //
130
- // IPMaterial
131
- //
132
- getOpacity() {
133
- return this._material?.opacity || 0;
134
- }
135
- setOpacity(value) {
136
- if (this._material)
137
- this._material.opacity = value;
138
- }
139
- getTexture() {
140
- return this._texture;
141
- }
142
- //
143
- // Event Callbacks
144
- //
145
- callback_setOpacity(payloadValue) {
146
- if (this._material && payloadValue) {
147
- const opacity = parseFloat(payloadValue);
148
- this._material.opacity = opacity;
149
- }
150
- }
151
- //
152
- // Tools
153
- //
154
- /**
155
- * Called by this component.
156
- */
157
- setTextureRepeat() {
158
- const texture = this._texture;
159
- if (texture !== null) {
160
- texture.wrapS = this.repeat.x > 1 ? RepeatWrapping : ClampToEdgeWrapping;
161
- texture.wrapT = this.repeat.y > 1 ? RepeatWrapping : ClampToEdgeWrapping;
162
- const repeatY = this.file_texture.file.subType === FileSubType.Stereo ? 0.5 : 1;
163
- texture.repeat = new Vector2(this.repeat.x, this.repeat.y * repeatY);
164
- texture.offset = new Vector2(this.offset.x, this.offset.y);
165
- if (this._material)
166
- this._material.needsUpdate = true;
167
- texture.needsUpdate = true;
168
- }
169
- }
170
- }
171
- //# sourceMappingURL=PBasicMaterial.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PBasicMaterial.js","sourceRoot":"","sources":["../../src/pcomponents/PBasicMaterial.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,SAAS,EAET,iBAAiB,EACjB,cAAc,EAEd,OAAO,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EAGL,UAAU,EACV,cAAc,IAAI,kBAAkB,G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W,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;CACF"}
@@ -1,18 +0,0 @@
1
- import ColliderObject3D from "../three/ColliderObject3D";
2
- import { PCollider as PColliderBase } from "@p100-web/core";
3
- export default class PCollider extends PColliderBase {
4
- protected _el: ColliderObject3D | null;
5
- protected _unrender(): void;
6
- dispose(): void;
7
- render(): void;
8
- unrender(): void;
9
- protected computeBounds(): void;
10
- show(): void;
11
- hide(): void;
12
- /**
13
- * This is called by PNode->set_el
14
- */
15
- addColliderObject(): void;
16
- removeColliderObject(): void;
17
- }
18
- //# sourceMappingURL=PCollider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PCollider.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCollider.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI5D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAClD,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAE9C,SAAS,CAAC,SAAS;IAUnB,OAAO,IAAI,IAAI;IAMf,MAAM;IAGN,QAAQ;IAIR,SAAS,CAAC,aAAa;IAIvB,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,iBAAiB,IAAI,IAAI;IAqBzB,oBAAoB,IAAI,IAAI;CAG7B"}
@@ -1,59 +0,0 @@
1
- import ColliderObject3D from "../three/ColliderObject3D";
2
- import { PCollider as PColliderBase } from "@p100-web/core";
3
- export default class PCollider extends PColliderBase {
4
- constructor() {
5
- super(...arguments);
6
- this._el = null;
7
- }
8
- _unrender() {
9
- if (this._el !== null) {
10
- // Add me to the raycaster
11
- this.context.getPCanvas().removeCollider(this._el);
12
- this._el.dispose();
13
- this._el.removeFromParent();
14
- this._el = null;
15
- }
16
- }
17
- dispose() {
18
- if (this.node.collider === this) {
19
- this.node.collider = null;
20
- }
21
- }
22
- render() {
23
- }
24
- unrender() {
25
- this._unrender();
26
- }
27
- computeBounds() {
28
- this._el?.computeBounds(this);
29
- }
30
- show() {
31
- this._el?.show(this);
32
- }
33
- hide() {
34
- this._el?.hide();
35
- }
36
- /**
37
- * This is called by PNode->set_el
38
- */
39
- addColliderObject() {
40
- if (!this.node.hasEl()) {
41
- this.context.error("PCollider had no el");
42
- return;
43
- }
44
- if (this._el) {
45
- this.context.error("PCollider already had ColliderObject3D");
46
- return;
47
- }
48
- this._el = new ColliderObject3D(this);
49
- const nodeEl = this.node.getEl();
50
- nodeEl.add(this._el);
51
- this.computeBounds();
52
- // Add me to the raycaster
53
- this.context.getPCanvas().addCollider(this._el);
54
- }
55
- removeColliderObject() {
56
- this._unrender();
57
- }
58
- }
59
- //# sourceMappingURL=PCollider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PCollider.js","sourceRoot":"","sources":["../../src/pcomponents/PCollider.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI5D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAApD;;QACY,QAAG,GAA4B,IAAI,CAAC;IAgEhD,CAAC;IA9DW,SAAS;QACjB,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;YACtB,0BAA0B;YAC1B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAe,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAChE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;YAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAClB,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,MAAM;IACN,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAES,aAAa;QACrB,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,IAAI;QACF,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,IAAI;QACF,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;YACvB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC7D,OAAO;QACT,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAEtC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAY,CAAC;QAE3C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,0BAA0B;QAC1B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAe,CAAC,WAAW,CAAC,IAAI,CAAC,GAAI,CAAC,CAAC;IAChE,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;CACF"}
@@ -1,8 +0,0 @@
1
- import { Mesh } from "three";
2
- import { PCubeGeometry as PCubeGeometryBase } from "@p100-web/core";
3
- export default class PCubeGeometry extends PCubeGeometryBase {
4
- protected _mesh: Mesh | null;
5
- unrender(): void;
6
- render(): void;
7
- }
8
- //# sourceMappingURL=PCubeGeometry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PCubeGeometry.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCubeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,iBAAiB;IAC1D,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEpC,QAAQ;IAOR,MAAM;CAQP"}
@@ -1,23 +0,0 @@
1
- import { Mesh, BoxGeometry } from "three";
2
- import { PCubeGeometry as PCubeGeometryBase } from "@p100-web/core";
3
- export default class PCubeGeometry extends PCubeGeometryBase {
4
- constructor() {
5
- super(...arguments);
6
- this._mesh = null;
7
- }
8
- unrender() {
9
- if (this._mesh) {
10
- this._mesh.geometry.dispose();
11
- this._mesh = null;
12
- }
13
- }
14
- render() {
15
- const geometry = new BoxGeometry(this.size.x, this.size.y, this.size.z);
16
- const mesh = new Mesh(geometry);
17
- mesh.castShadow = this.castShadow;
18
- mesh.receiveShadow = this.receiveShadow;
19
- this.node.set_el(mesh);
20
- this._mesh = mesh;
21
- }
22
- }
23
- //# sourceMappingURL=PCubeGeometry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PCubeGeometry.js","sourceRoot":"","sources":["../../src/pcomponents/PCubeGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,iBAAiB;IAA5D;;QACY,UAAK,GAAgB,IAAI,CAAC;IAiBtC,CAAC;IAfC,QAAQ;QACN,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;CACF"}
@@ -1,12 +0,0 @@
1
- import { Texture } from "three";
2
- import { PEnvironment as PEnvironmentBase } from "@p100-web/core";
3
- import { HDRTextureTask, type IHDRTextureTaskLoader } from "../assets/ThreeAssetLoader";
4
- export default class PEnvironment extends PEnvironmentBase implements IHDRTextureTaskLoader {
5
- _texture: Texture | null;
6
- getTexture<T>(): T | null;
7
- _dispose(): void;
8
- unrender(): void;
9
- render(): void;
10
- onHDRTextureTaskLoaded: (task: HDRTextureTask) => void;
11
- }
12
- //# sourceMappingURL=PEnvironment.d.ts.map