create-playcanvas 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -3
- package/dist/index.mjs +41 -38
- package/package.json +6 -3
- package/templates/_features/physics/assets/public/ammo/SOURCE.md +4 -1
- package/templates/{react/interactive-sphere/src/App.css → _shared/interactive-sphere/src/counter.css} +0 -6
- package/templates/_shared/web-lens/README.md +42 -0
- package/templates/_shared/web-lens/package.json +9 -0
- package/templates/_shared/web-lens/scripts/package-lens.mjs +231 -0
- package/templates/_shared/web-lens/src/dodge-game.ts +271 -0
- package/templates/_shared/web-lens/src/lens.css +155 -0
- package/templates/_shared/web-lens/src/lens.ts +91 -0
- package/templates/engine/base/README.md +1 -1
- package/templates/engine/base/package.json +4 -4
- package/templates/engine/base/vite.config.ts +3 -0
- package/templates/engine/first-person-controller/src/main.ts +2 -3
- package/templates/engine/interactive-sphere/src/App.ts +1 -1
- package/templates/engine/interactive-sphere/src/main.ts +3 -5
- package/templates/engine/model-viewer/src/main.ts +3 -3
- package/templates/engine/physics-playground/src/main.ts +2 -3
- package/templates/engine/spinning-cube/src/main.ts +1 -1
- package/templates/engine/splat-viewer/src/main.ts +1 -1
- package/templates/engine/third-person-controller/src/main.ts +2 -3
- package/templates/engine/web-lens/index.html +26 -0
- package/templates/engine/web-lens/src/main.ts +89 -0
- package/templates/engine/web-lens/vite.config.ts +44 -0
- package/templates/index.ts +6 -0
- package/templates/react/base/README.md +1 -1
- package/templates/react/base/package.json +6 -6
- package/templates/react/base/vite.config.ts +3 -0
- package/templates/react/interactive-sphere/src/App.tsx +5 -6
- package/templates/react/interactive-sphere/src/Scene.tsx +1 -1
- package/templates/react/model-viewer/src/App.tsx +4 -2
- package/templates/react/spinning-cube/src/App.tsx +2 -0
- package/templates/react/splat-viewer/src/App.tsx +2 -0
- package/templates/react/{splat-viewer → web-lens}/index.html +2 -3
- package/templates/react/web-lens/src/App.tsx +85 -0
- package/templates/react/web-lens/vite.config.ts +46 -0
- package/templates/web-components/base/README.md +1 -1
- package/templates/web-components/base/package.json +4 -4
- package/templates/web-components/base/vite.config.ts +3 -0
- package/templates/web-components/first-person-controller/index.html +1 -6
- package/templates/web-components/interactive-sphere/src/main.ts +2 -2
- package/templates/web-components/model-viewer/index.html +2 -2
- package/templates/web-components/model-viewer/src/main.ts +0 -1
- package/templates/web-components/physics-playground/index.html +1 -6
- package/templates/web-components/spinning-cube/src/main.ts +0 -1
- package/templates/web-components/splat-viewer/src/main.ts +0 -1
- package/templates/web-components/third-person-controller/index.html +1 -6
- package/templates/web-components/web-lens/index.html +36 -0
- package/templates/web-components/web-lens/src/main.ts +47 -0
- package/templates/web-components/web-lens/vite.config.ts +44 -0
- package/templates/_features/physics/assets/public/ammo/ammo.js +0 -973
- package/templates/engine/interactive-sphere/index.html +0 -13
- package/templates/engine/interactive-sphere/src/style.css +0 -28
- package/templates/engine/model-viewer/index.html +0 -13
- package/templates/engine/model-viewer/src/style.css +0 -8
- package/templates/engine/spinning-cube/index.html +0 -13
- package/templates/engine/spinning-cube/src/style.css +0 -8
- package/templates/engine/splat-viewer/index.html +0 -13
- package/templates/engine/splat-viewer/src/style.css +0 -8
- package/templates/react/base/.prettierignore +0 -3
- package/templates/react/base/_gitignore +0 -24
- package/templates/react/base/_npmrc +0 -1
- package/templates/react/base/prettier.config.mjs +0 -1
- package/templates/react/base/src/assets/playcanvas.png +0 -0
- package/templates/react/base/src/inspector.css +0 -33
- package/templates/react/base/src/inspector.ts +0 -38
- package/templates/react/base/src/starter.css +0 -104
- package/templates/react/base/src/vite-env.d.ts +0 -19
- package/templates/react/interactive-sphere/index.html +0 -13
- package/templates/react/interactive-sphere/src/index.css +0 -4
- package/templates/react/interactive-sphere/src/main.tsx +0 -11
- package/templates/react/model-viewer/index.html +0 -13
- package/templates/react/model-viewer/src/index.css +0 -9
- package/templates/react/model-viewer/src/main.tsx +0 -11
- package/templates/react/spinning-cube/index.html +0 -13
- package/templates/react/spinning-cube/src/index.css +0 -9
- package/templates/react/spinning-cube/src/main.tsx +0 -11
- package/templates/react/splat-viewer/src/index.css +0 -9
- package/templates/react/splat-viewer/src/main.tsx +0 -11
- package/templates/web-components/base/.prettierignore +0 -3
- package/templates/web-components/base/_gitignore +0 -24
- package/templates/web-components/base/_npmrc +0 -1
- package/templates/web-components/base/prettier.config.mjs +0 -1
- package/templates/web-components/base/src/assets/playcanvas.png +0 -0
- package/templates/web-components/base/src/inspector.css +0 -33
- package/templates/web-components/base/src/inspector.ts +0 -38
- package/templates/web-components/base/src/starter.css +0 -104
- package/templates/web-components/base/src/vite-env.d.ts +0 -19
- package/templates/web-components/interactive-sphere/src/style.css +0 -53
- package/templates/web-components/model-viewer/src/style.css +0 -8
- package/templates/web-components/spinning-cube/src/style.css +0 -8
- package/templates/web-components/splat-viewer/src/style.css +0 -8
- /package/templates/{engine/base → _common}/.prettierignore +0 -0
- /package/templates/{engine/base → _common}/_gitignore +0 -0
- /package/templates/{engine/base → _common}/_npmrc +0 -0
- /package/templates/{engine/base → _common}/prettier.config.mjs +0 -0
- /package/templates/{engine/base → _common}/src/assets/playcanvas.png +0 -0
- /package/templates/{engine/base → _common}/src/inspector.css +0 -0
- /package/templates/{engine/base → _common}/src/inspector.ts +0 -0
- /package/templates/{engine/base → _common}/src/starter.css +0 -0
- /package/templates/{engine/base → _common}/src/vite-env.d.ts +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
* {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
html,
|
|
6
|
-
body,
|
|
7
|
-
#root,
|
|
8
|
-
#application,
|
|
9
|
-
pc-app,
|
|
10
|
-
canvas {
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
margin: 0;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
body {
|
|
18
|
-
background: #11151c;
|
|
19
|
-
color: #f8fafc;
|
|
20
|
-
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
canvas,
|
|
24
|
-
pc-app {
|
|
25
|
-
display: block;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.hud {
|
|
29
|
-
position: fixed;
|
|
30
|
-
inset: 0;
|
|
31
|
-
z-index: 10;
|
|
32
|
-
padding: 20px;
|
|
33
|
-
pointer-events: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.panel {
|
|
37
|
-
width: min(360px, calc(100vw - 40px));
|
|
38
|
-
padding: 16px;
|
|
39
|
-
border: 1px solid #ffffff24;
|
|
40
|
-
border-radius: 14px;
|
|
41
|
-
background: #0b1019d9;
|
|
42
|
-
box-shadow: 0 12px 40px #0008;
|
|
43
|
-
backdrop-filter: blur(12px);
|
|
44
|
-
pointer-events: auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
h1 {
|
|
48
|
-
margin: 0 0 6px;
|
|
49
|
-
font-size: 18px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
p {
|
|
53
|
-
margin: 6px 0 0;
|
|
54
|
-
color: #aeb8c8;
|
|
55
|
-
font-size: 13px;
|
|
56
|
-
line-height: 1.45;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.controls {
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-wrap: wrap;
|
|
62
|
-
gap: 8px;
|
|
63
|
-
margin-top: 14px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
button {
|
|
67
|
-
padding: 8px 11px;
|
|
68
|
-
border: 1px solid #ffffff24;
|
|
69
|
-
border-radius: 9px;
|
|
70
|
-
background: #263247;
|
|
71
|
-
color: inherit;
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
button:hover,
|
|
76
|
-
button[aria-pressed='true'] {
|
|
77
|
-
border-color: #41b6e6;
|
|
78
|
-
background: #334867;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
button:disabled {
|
|
82
|
-
cursor: not-allowed;
|
|
83
|
-
opacity: 0.5;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.swatch {
|
|
87
|
-
width: 32px;
|
|
88
|
-
height: 32px;
|
|
89
|
-
padding: 0;
|
|
90
|
-
border-radius: 50%;
|
|
91
|
-
background: var(--color);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.crosshair {
|
|
95
|
-
position: fixed;
|
|
96
|
-
top: 50%;
|
|
97
|
-
left: 50%;
|
|
98
|
-
width: 16px;
|
|
99
|
-
height: 16px;
|
|
100
|
-
border: 2px solid #fff;
|
|
101
|
-
border-radius: 50%;
|
|
102
|
-
translate: -50% -50%;
|
|
103
|
-
box-shadow: 0 0 4px #000;
|
|
104
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module 'playcanvas/scripts/esm/camera-controls.mjs' {
|
|
4
|
-
import type { Script } from 'playcanvas';
|
|
5
|
-
|
|
6
|
-
export const CameraControls: typeof Script & (new () => Script);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare module 'playcanvas/scripts/esm/grid.mjs' {
|
|
10
|
-
import type { Script } from 'playcanvas';
|
|
11
|
-
|
|
12
|
-
export const Grid: typeof Script & (new () => Script);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare module 'playcanvas/scripts/esm/sky/procedural-sky.mjs' {
|
|
16
|
-
import type { Script } from 'playcanvas';
|
|
17
|
-
|
|
18
|
-
export const ProceduralSky: typeof Script & (new () => Script);
|
|
19
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
body {
|
|
2
|
-
margin: 0;
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
h1 {
|
|
7
|
-
font-size: 2.4em;
|
|
8
|
-
line-height: 1.1;
|
|
9
|
-
opacity: 0.85;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.logo {
|
|
13
|
-
height: 2em;
|
|
14
|
-
padding: 0.5em;
|
|
15
|
-
will-change: filter;
|
|
16
|
-
transition: filter 300ms;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.playcanvas-logo {
|
|
20
|
-
border-radius: 100%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.logo:hover {
|
|
24
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.logo.typescript:hover {
|
|
28
|
-
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
pc-app {
|
|
32
|
-
display: block;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.counter {
|
|
36
|
-
position: fixed;
|
|
37
|
-
bottom: 22px;
|
|
38
|
-
left: 50%;
|
|
39
|
-
z-index: 2;
|
|
40
|
-
margin: 0;
|
|
41
|
-
padding: 9px 13px;
|
|
42
|
-
border: 1px solid #ffffff24;
|
|
43
|
-
border-radius: 999px;
|
|
44
|
-
background: #07101bd9;
|
|
45
|
-
color: #f8fafc;
|
|
46
|
-
font:
|
|
47
|
-
650 12px Inter,
|
|
48
|
-
ui-sans-serif,
|
|
49
|
-
system-ui,
|
|
50
|
-
sans-serif;
|
|
51
|
-
translate: -50% 0;
|
|
52
|
-
backdrop-filter: blur(10px);
|
|
53
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|