@quick-threejs/reactive 0.1.8 → 0.1.9

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 (2) hide show
  1. package/README.md +12 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -40,7 +40,16 @@ import { launchApp } from "@quick-threejs/reactive/worker";
40
40
 
41
41
  launchApp({
42
42
  onReady: (app) => {
43
- const torus = new Mesh(new TorusKnotGeometry(), new MeshNormalMaterial());
43
+ const ambientLight = new AmbientLight(0xffffff, 0.1);
44
+ const directionalLight = new DirectionalLight(0xffffff, 0.8);
45
+ directionalLight.position.set(0, 0, 1);
46
+
47
+ const torus = new Mesh(
48
+ new TorusKnotGeometry(0.8, 0.35, 100, 16),
49
+ new MeshToonMaterial({
50
+ color: 0x454545
51
+ })
52
+ );
44
53
 
45
54
  self.onmessage = (event: MessageEvent) => {
46
55
  if (event.data?.type === "torus-x-gui-event") {
@@ -49,8 +58,7 @@ launchApp({
49
58
  };
50
59
 
51
60
  app.world.scene().background = new Color("#211d20");
52
-
53
- app.world.scene().add(torus);
61
+ app.world.scene().add(ambientLight, directionalLight, torus);
54
62
 
55
63
  app.resize$?.().subscribe((event) => {
56
64
  console.log(event.type);
@@ -69,7 +77,7 @@ launchApp({
69
77
  ```
70
78
 
71
79
  After the configuration of the main part and the worker part, you should have the following screen:
72
- ![Screenshot 2024-07-08 at 1 55 27 AM](https://github.com/Neosoulink/quick-threejs/assets/44310540/098ef016-ea15-471e-b049-7d7b4505bcaf)
80
+ ![Screenshot 2024-07-08 at 2 55 59 AM](https://github.com/Neosoulink/quick-threejs/assets/44310540/ccf3f871-8ff9-45af-8fd3-bdff0ac98bfa)
73
81
 
74
82
  **See the complete [Example folder](../../samples/with-reactive/).**
75
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quick-threejs/reactive",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Reactively quick start a three.js app ⚡️",
5
5
  "repository": {
6
6
  "type": "git",