Create new
Bindings
Transitions
Animations
Easing
Component composition
Context API
Special elements
Module context
Debugging
Miscellaneous
App.svelte
LittleCity.svelte
ReusableGLTF.svelte
stores.js
Loading.svelte
runes
This component is not in runes mode.
To enable runes mode, either start using runes in your code, or add the following to the top of your component:
<svelte:options runes />
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
<script>
import * as THREE from "three";
import * as SC from "svelte-cubed";
import LittleCity from "./LittleCity.svelte";
import ReusableGLTF from "./ReusableGLTF.svelte";
import Loading from "./Loading.svelte";
import { statusOfModels, modelURL, modelsLoading, updateModelStatus } from "./stores";
function handleStatusChange(evt) {
updateModelStatus(evt.detail.name, evt.detail.status);
}
</script>
<SC.Canvas
background={new THREE.Color("skyblue")}
antialias
>
<SC.PerspectiveCamera
position={[-10, 36, 20]}
near={0.1}
far={500}
fov={40}
/>
<SC.OrbitControls
enabled={true}
enableZoom={true}
autoRotate={false}
autoRotateSpeed={2}
enableDamping={true}
dampingFactor={0.1}
target={[-6, 17, 0]}
/>
fetching https://unpkg.com/svelte@5.20.5/src/store/index-client.js
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/legacy';
import * as $ from 'svelte/internal/client';
import * as THREE from "three";
import * as SC from "svelte-cubed";
import LittleCity from "./LittleCity.svelte";
import ReusableGLTF from "./ReusableGLTF.svelte";
import Loading from "./Loading.svelte";
import {
statusOfModels,
modelURL,
modelsLoading,
updateModelStatus
} from "./stores";
var root_1 = $.template(`<!> <!> <!> <!> <!> <!> <!> <!>`, 1);
var root = $.template(`<!> <!>`, 1);
export default function App($$anchor, $$props) {
$.push($$props, false);
const [$$stores, $$cleanup] = $.setup_stores();
const $modelsLoading = () => $.store_get(modelsLoading, '$modelsLoading', $$stores);
function handleStatusChange(evt) {
updateModelStatus(evt.detail.name, evt.detail.status);
}
$.init();
var fragment = root();
var node = $.first_child(fragment);
const expression = $.derived_safe_equal(() => new THREE.Color("skyblue"));
SC.Canvas(node, {
result = svelte.compile(source, {
generate: ,
});9
1
›
/* Add a <style> tag to see the CSS output */
Root {
- css: null
- js: []
- start: 1
- end: 1749
- type: "Root"
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 0
- end: 1
- raw: "\n"
- data: "\n"
} Text {...}
- type: "Text"
- start: 416
- end: 418
- raw: "\n\n"
- data: "\n\n"
} Component {...}
- type: "Component"
- start: 418
- end: 1708
- name: "SC.Canvas"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 431
- end: 470
- name: "background"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 442
- end: 470
expression: NewExpression {...}
- type: "NewExpression"
- start: 443
- end: 469
loc: {...}
start: {...}
- line: 17
- column: 14
}end: {...}
- line: 17
- column: 40
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 447
- end: 458
loc: {...}
start: {...}
- line: 17
- column: 18
}end: {...}
- line: 17
- column: 29
}
}object: Identifier {...}
- type: "Identifier"
- start: 447
- end: 452
loc: {...}
start: {...}
- line: 17
- column: 18
}end: {...}
- line: 17
- column: 23
}
}- name: "THREE"
}property: Identifier {...}
- type: "Identifier"
- start: 453
- end: 458
loc: {...}
start: {...}
- line: 17
- column: 24
}end: {...}
- line: 17
- column: 29
}
}- name: "Color"
}- computed: false
- optional: false
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 459
- end: 468
loc: {...}
start: {...}
- line: 17
- column: 30
}end: {...}
- line: 17
- column: 39
}
}- value: "skyblue"
- raw: "\"skyblue\""
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 473
- end: 482
- name: "antialias"
- value: true
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (21)
Text {...}
- type: "Text"
- start: 484
- end: 488
- raw: "\n\n "
- data: "\n\n "
} Component {...}
- type: "Component"
- start: 488
- end: 586
- name: "SC.PerspectiveCamera"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 515
- end: 539
- name: "position"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 524
- end: 539
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 525
- end: 538
loc: {...}
start: {...}
- line: 22
- column: 14
}end: {...}
- line: 22
- column: 27
}
}elements: [...] (3)
UnaryExpression {...}
- type: "UnaryExpression"
- start: 526
- end: 529
loc: {...}
start: {...}
- line: 22
- column: 15
}end: {...}
- line: 22
- column: 18
}
}- operator: "-"
- prefix: true
argument: Literal {...}
- type: "Literal"
- start: 527
- end: 529
loc: {...}
start: {...}
- line: 22
- column: 16
}end: {...}
- line: 22
- column: 18
}
}- value: 10
- raw: "10"
}
} Literal {...}
- type: "Literal"
- start: 531
- end: 533
loc: {...}
start: {...}
- line: 22
- column: 20
}end: {...}
- line: 22
- column: 22
}
}- value: 36
- raw: "36"
} Literal {...}
- type: "Literal"
- start: 535
- end: 537
loc: {...}
start: {...}
- line: 22
- column: 24
}end: {...}
- line: 22
- column: 26
}
}- value: 20
- raw: "20"
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 544
- end: 554
- name: "near"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 549
- end: 554
expression: Literal {...}
- type: "Literal"
- start: 550
- end: 553
loc: {...}
start: {...}
- line: 23
- column: 10
}end: {...}
- line: 23
- column: 13
}
}- value: 0.1
- raw: "0.1"
}
}
} Attribute {...}
- type: "Attribute"
- start: 559
- end: 568
- name: "far"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 563
- end: 568
expression: Literal {...}
- type: "Literal"
- start: 564
- end: 567
loc: {...}
start: {...}
- line: 24
- column: 9
}end: {...}
- line: 24
- column: 12
}
}- value: 500
- raw: "500"
}
}
} Attribute {...}
- type: "Attribute"
- start: 573
- end: 581
- name: "fov"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 577
- end: 581
expression: Literal {...}
- type: "Literal"
- start: 578
- end: 580
loc: {...}
start: {...}
- line: 25
- column: 9
}end: {...}
- line: 25
- column: 11
}
}- value: 40
- raw: "40"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 586
- end: 590
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 590
- end: 773
- name: "SC.OrbitControls"
attributes: [...] (7)
Attribute {...}
- type: "Attribute"
- start: 613
- end: 627
- name: "enabled"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 621
- end: 627
expression: Literal {...}
- type: "Literal"
- start: 622
- end: 626
loc: {...}
start: {...}
- line: 29
- column: 13
}end: {...}
- line: 29
- column: 17
}
}- value: true
- raw: "true"
}
}
} Attribute {...}
- type: "Attribute"
- start: 632
- end: 649
- name: "enableZoom"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 643
- end: 649
expression: Literal {...}
- type: "Literal"
- start: 644
- end: 648
loc: {...}
start: {...}
- line: 30
- column: 16
}end: {...}
- line: 30
- column: 20
}
}- value: true
- raw: "true"
}
}
} Attribute {...}
- type: "Attribute"
- start: 654
- end: 672
- name: "autoRotate"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 665
- end: 672
expression: Literal {...}
- type: "Literal"
- start: 666
- end: 671
loc: {...}
start: {...}
- line: 31
- column: 16
}end: {...}
- line: 31
- column: 21
}
}- value: false
- raw: "false"
}
}
} Attribute {...}
- type: "Attribute"
- start: 677
- end: 696
- name: "autoRotateSpeed"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 693
- end: 696
expression: Literal {...}
- type: "Literal"
- start: 694
- end: 695
loc: {...}
start: {...}
- line: 32
- column: 21
}end: {...}
- line: 32
- column: 22
}
}- value: 2
- raw: "2"
}
}
} Attribute {...}
- type: "Attribute"
- start: 701
- end: 721
- name: "enableDamping"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 715
- end: 721
expression: Literal {...}
- type: "Literal"
- start: 716
- end: 720
loc: {...}
start: {...}
- line: 33
- column: 19
}end: {...}
- line: 33
- column: 23
}
}- value: true
- raw: "true"
}
}
} Attribute {...}
- type: "Attribute"
- start: 726
- end: 745
- name: "dampingFactor"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 740
- end: 745
expression: Literal {...}
- type: "Literal"
- start: 741
- end: 744
loc: {...}
start: {...}
- line: 34
- column: 19
}end: {...}
- line: 34
- column: 22
}
}- value: 0.1
- raw: "0.1"
}
}
} Attribute {...}
- type: "Attribute"
- start: 748
- end: 768
- name: "target"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 755
- end: 768
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 756
- end: 767
loc: {...}
start: {...}
- line: 35
- column: 10
}end: {...}
- line: 35
- column: 21
}
}elements: [...] (3)
UnaryExpression {...}
- type: "UnaryExpression"
- start: 757
- end: 759
loc: {...}
start: {...}
- line: 35
- column: 11
}end: {...}
- line: 35
- column: 13
}
}- operator: "-"
- prefix: true
argument: Literal {...}
- type: "Literal"
- start: 758
- end: 759
loc: {...}
start: {...}
- line: 35
- column: 12
}end: {...}
- line: 35
- column: 13
}
}- value: 6
- raw: "6"
}
} Literal {...}
- type: "Literal"
- start: 761
- end: 763
loc: {...}
start: {...}
- line: 35
- column: 15
}end: {...}
- line: 35
- column: 17
}
}- value: 17
- raw: "17"
} Literal {...}
- type: "Literal"
- start: 765
- end: 766
loc: {...}
start: {...}
- line: 35
- column: 19
}end: {...}
- line: 35
- column: 20
}
}- value: 0
- raw: "0"
}
]
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 773
- end: 777
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 777
- end: 905
- name: "SC.DirectionalLight"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 802
- end: 835
- name: "color"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 808
- end: 835
expression: NewExpression {...}
- type: "NewExpression"
- start: 809
- end: 834
loc: {...}
start: {...}
- line: 39
- column: 11
}end: {...}
- line: 39
- column: 36
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 813
- end: 824
loc: {...}
start: {...}
- line: 39
- column: 15
}end: {...}
- line: 39
- column: 26
}
}object: Identifier {...}
- type: "Identifier"
- start: 813
- end: 818
loc: {...}
start: {...}
- line: 39
- column: 15
}end: {...}
- line: 39
- column: 20
}
}- name: "THREE"
}property: Identifier {...}
- type: "Identifier"
- start: 819
- end: 824
loc: {...}
start: {...}
- line: 39
- column: 21
}end: {...}
- line: 39
- column: 26
}
}- name: "Color"
}- computed: false
- optional: false
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 825
- end: 833
loc: {...}
start: {...}
- line: 39
- column: 27
}end: {...}
- line: 39
- column: 35
}
}- value: 16777215
- raw: "0xffffff"
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 840
- end: 860
- name: "position"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 849
- end: 860
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 850
- end: 859
loc: {...}
start: {...}
- line: 40
- column: 14
}end: {...}
- line: 40
- column: 23
}
}elements: [...] (3)
Literal {...}
- type: "Literal"
- start: 851
- end: 852
loc: {...}
start: {...}
- line: 40
- column: 15
}end: {...}
- line: 40
- column: 16
}
}- value: 0
- raw: "0"
} Literal {...}
- type: "Literal"
- start: 853
- end: 855
loc: {...}
start: {...}
- line: 40
- column: 17
}end: {...}
- line: 40
- column: 19
}
}- value: 10
- raw: "10"
} Literal {...}
- type: "Literal"
- start: 856
- end: 858
loc: {...}
start: {...}
- line: 40
- column: 20
}end: {...}
- line: 40
- column: 22
}
}- value: 10
- raw: "10"
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 865
- end: 881
- name: "intensity"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 875
- end: 881
expression: Literal {...}
- type: "Literal"
- start: 876
- end: 880
loc: {...}
start: {...}
- line: 41
- column: 15
}end: {...}
- line: 41
- column: 19
}
}- value: 0.75
- raw: "0.75"
}
}
} Attribute {...}
- type: "Attribute"
- start: 886
- end: 900
- name: "shadow"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 893
- end: 900
expression: Literal {...}
- type: "Literal"
- start: 894
- end: 899
loc: {...}
start: {...}
- line: 42
- column: 12
}end: {...}
- line: 42
- column: 17
}
}- value: false
- raw: "false"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 905
- end: 908
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 908
- end: 988
- name: "SC.AmbientLight"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 929
- end: 962
- name: "color"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 935
- end: 962
expression: NewExpression {...}
- type: "NewExpression"
- start: 936
- end: 961
loc: {...}
start: {...}
- line: 45
- column: 11
}end: {...}
- line: 45
- column: 36
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 940
- end: 951
loc: {...}
start: {...}
- line: 45
- column: 15
}end: {...}
- line: 45
- column: 26
}
}object: Identifier {...}
- type: "Identifier"
- start: 940
- end: 945
loc: {...}
start: {...}
- line: 45
- column: 15
}end: {...}
- line: 45
- column: 20
}
}- name: "THREE"
}property: Identifier {...}
- type: "Identifier"
- start: 946
- end: 951
loc: {...}
start: {...}
- line: 45
- column: 21
}end: {...}
- line: 45
- column: 26
}
}- name: "Color"
}- computed: false
- optional: false
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 952
- end: 960
loc: {...}
start: {...}
- line: 45
- column: 27
}end: {...}
- line: 45
- column: 35
}
}- value: 16777215
- raw: "0xffffff"
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 967
- end: 983
- name: "intensity"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 977
- end: 983
expression: Literal {...}
- type: "Literal"
- start: 978
- end: 982
loc: {...}
start: {...}
- line: 46
- column: 15
}end: {...}
- line: 46
- column: 19
}
}- value: 0.75
- raw: "0.75"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 988
- end: 992
- raw: " "
- data: " "
} Comment {...}
- type: "Comment"
- start: 992
- end: 1051
- data: " Don't need this once we have a reusable component! "
} Text {...}
- type: "Text"
- start: 1051
- end: 1052
- raw: ""
- data: ""
} Comment {...}
- type: "Comment"
- start: 1052
- end: 1077
- data: " \t\t<LittleCity /> "
} Text {...}
- type: "Text"
- start: 1077
- end: 1081
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 1081
- end: 1222
- name: "ReusableGLTF"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 1098
- end: 1131
- name: "modelURL"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1107
- end: 1131
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 1108
- end: 1130
loc: {...}
start: {...}
- line: 53
- column: 12
}end: {...}
- line: 53
- column: 34
}
}object: Identifier {...}
- type: "Identifier"
- start: 1108
- end: 1116
loc: {...}
start: {...}
- line: 53
- column: 12
}end: {...}
- line: 53
- column: 20
}
}- name: "modelURL"
}property: Literal {...}
- type: "Literal"
- start: 1117
- end: 1129
loc: {...}
start: {...}
- line: 53
- column: 21
}end: {...}
- line: 53
- column: 33
}
}- value: "littleCity"
- raw: "'littleCity'"
}- computed: true
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 1135
- end: 1152
- name: "name"
value: [...] (1)
Text {...}
- start: 1141
- end: 1151
- type: "Text"
- raw: "littleCity"
- data: "littleCity"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1156
- end: 1177
- name: "scale"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1162
- end: 1177
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 1163
- end: 1176
loc: {...}
start: {...}
- line: 55
- column: 9
}end: {...}
- line: 55
- column: 22
}
}elements: [...] (3)
Literal {...}
- type: "Literal"
- start: 1164
- end: 1167
loc: {...}
start: {...}
- line: 55
- column: 10
}end: {...}
- line: 55
- column: 13
}
}- value: 0.05
- raw: ".05"
} Literal {...}
- type: "Literal"
- start: 1168
- end: 1171
loc: {...}
start: {...}
- line: 55
- column: 14
}end: {...}
- line: 55
- column: 17
}
}- value: 0.05
- raw: ".05"
} Literal {...}
- type: "Literal"
- start: 1172
- end: 1175
loc: {...}
start: {...}
- line: 55
- column: 18
}end: {...}
- line: 55
- column: 21
}
}- value: 0.05
- raw: ".05"
}
]
}
}
} OnDirective {...}
- start: 1181
- end: 1217
- type: "OnDirective"
- name: "statusChange"
expression: Identifier {...}
- type: "Identifier"
- start: 1198
- end: 1216
loc: {...}
start: {...}
- line: 56
- column: 19
}end: {...}
- line: 56
- column: 37
}
}- name: "handleStatusChange"
}- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1222
- end: 1224
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 1224
- end: 1393
- name: "ReusableGLTF"
attributes: [...] (5)
Attribute {...}
- type: "Attribute"
- start: 1241
- end: 1269
- name: "modelURL"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1250
- end: 1269
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 1251
- end: 1268
loc: {...}
start: {...}
- line: 59
- column: 12
}end: {...}
- line: 59
- column: 29
}
}object: Identifier {...}
- type: "Identifier"
- start: 1251
- end: 1259
loc: {...}
start: {...}
- line: 59
- column: 12
}end: {...}
- line: 59
- column: 20
}
}- name: "modelURL"
}property: Literal {...}
- type: "Literal"
- start: 1260
- end: 1267
loc: {...}
start: {...}
- line: 59
- column: 21
}end: {...}
- line: 59
- column: 28
}
}- value: "llama"
- raw: "'llama'"
}- computed: true
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 1273
- end: 1285
- name: "name"
value: [...] (1)
Text {...}
- start: 1279
- end: 1284
- type: "Text"
- raw: "llama"
- data: "llama"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1289
- end: 1311
- name: "position"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1298
- end: 1311
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 1299
- end: 1310
loc: {...}
start: {...}
- line: 61
- column: 12
}end: {...}
- line: 61
- column: 23
}
}elements: [...] (3)
UnaryExpression {...}
- type: "UnaryExpression"
- start: 1300
- end: 1302
loc: {...}
start: {...}
- line: 61
- column: 13
}end: {...}
- line: 61
- column: 15
}
}- operator: "-"
- prefix: true
argument: Literal {...}
- type: "Literal"
- start: 1301
- end: 1302
loc: {...}
start: {...}
- line: 61
- column: 14
}end: {...}
- line: 61
- column: 15
}
}- value: 6
- raw: "6"
}
} Literal {...}
- type: "Literal"
- start: 1304
- end: 1306
loc: {...}
start: {...}
- line: 61
- column: 17
}end: {...}
- line: 61
- column: 19
}
}- value: 17
- raw: "17"
} Literal {...}
- type: "Literal"
- start: 1308
- end: 1309
loc: {...}
start: {...}
- line: 61
- column: 21
}end: {...}
- line: 61
- column: 22
}
}- value: 0
- raw: "0"
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 1315
- end: 1348
- name: "rotation"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1324
- end: 1348
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 1325
- end: 1347
loc: {...}
start: {...}
- line: 62
- column: 12
}end: {...}
- line: 62
- column: 34
}
}elements: [...] (3)
Literal {...}
- type: "Literal"
- start: 1326
- end: 1327
loc: {...}
start: {...}
- line: 62
- column: 13
}end: {...}
- line: 62
- column: 14
}
}- value: 0
- raw: "0"
} BinaryExpression {...}
- type: "BinaryExpression"
- start: 1329
- end: 1343
loc: {...}
start: {...}
- line: 62
- column: 16
}end: {...}
- line: 62
- column: 30
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 1329
- end: 1336
loc: {...}
start: {...}
- line: 62
- column: 16
}end: {...}
- line: 62
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 1329
- end: 1333
loc: {...}
start: {...}
- line: 62
- column: 16
}end: {...}
- line: 62
- column: 20
}
}- name: "Math"
}property: Identifier {...}
- type: "Identifier"
- start: 1334
- end: 1336
loc: {...}
start: {...}
- line: 62
- column: 21
}end: {...}
- line: 62
- column: 23
}
}- name: "PI"
}- computed: false
- optional: false
}- operator: "*"
right: Literal {...}
- type: "Literal"
- start: 1339
- end: 1343
loc: {...}
start: {...}
- line: 62
- column: 26
}end: {...}
- line: 62
- column: 30
}
}- value: 1.25
- raw: "1.25"
}
} Literal {...}
- type: "Literal"
- start: 1345
- end: 1346
loc: {...}
start: {...}
- line: 62
- column: 32
}end: {...}
- line: 62
- column: 33
}
}- value: 0
- raw: "0"
}
]
}
}
} OnDirective {...}
- start: 1352
- end: 1388
- type: "OnDirective"
- name: "statusChange"
expression: Identifier {...}
- type: "Identifier"
- start: 1369
- end: 1387
loc: {...}
start: {...}
- line: 63
- column: 19
}end: {...}
- line: 63
- column: 37
}
}- name: "handleStatusChange"
}- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1393
- end: 1395
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 1395
- end: 1522
- name: "ReusableGLTF"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 1412
- end: 1438
- name: "modelURL"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1421
- end: 1438
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 1422
- end: 1437
loc: {...}
start: {...}
- line: 66
- column: 12
}end: {...}
- line: 66
- column: 27
}
}object: Identifier {...}
- type: "Identifier"
- start: 1422
- end: 1430
loc: {...}
start: {...}
- line: 66
- column: 12
}end: {...}
- line: 66
- column: 20
}
}- name: "modelURL"
}property: Literal {...}
- type: "Literal"
- start: 1431
- end: 1436
loc: {...}
start: {...}
- line: 66
- column: 21
}end: {...}
- line: 66
- column: 26
}
}- value: "pug"
- raw: "'pug'"
}- computed: true
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 1442
- end: 1452
- name: "name"
value: [...] (1)
Text {...}
- start: 1448
- end: 1451
- type: "Text"
- raw: "pug"
- data: "pug"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1456
- end: 1477
- name: "position"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1465
- end: 1477
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 1466
- end: 1476
loc: {...}
start: {...}
- line: 68
- column: 12
}end: {...}
- line: 68
- column: 22
}
}elements: [...] (3)
Literal {...}
- type: "Literal"
- start: 1467
- end: 1468
loc: {...}
start: {...}
- line: 68
- column: 13
}end: {...}
- line: 68
- column: 14
}
}- value: 0
- raw: "0"
} Literal {...}
- type: "Literal"
- start: 1470
- end: 1472
loc: {...}
start: {...}
- line: 68
- column: 16
}end: {...}
- line: 68
- column: 18
}
}- value: 17
- raw: "17"
} Literal {...}
- type: "Literal"
- start: 1474
- end: 1475
loc: {...}
start: {...}
- line: 68
- column: 20
}end: {...}
- line: 68
- column: 21
}
}- value: 0
- raw: "0"
}
]
}
}
} OnDirective {...}
- start: 1481
- end: 1517
- type: "OnDirective"
- name: "statusChange"
expression: Identifier {...}
- type: "Identifier"
- start: 1498
- end: 1516
loc: {...}
start: {...}
- line: 69
- column: 19
}end: {...}
- line: 69
- column: 37
}
}- name: "handleStatusChange"
}- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1522
- end: 1524
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 1524
- end: 1693
- name: "ReusableGLTF"
attributes: [...] (5)
Attribute {...}
- type: "Attribute"
- start: 1541
- end: 1569
- name: "modelURL"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1550
- end: 1569
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 1551
- end: 1568
loc: {...}
start: {...}
- line: 72
- column: 12
}end: {...}
- line: 72
- column: 29
}
}object: Identifier {...}
- type: "Identifier"
- start: 1551
- end: 1559
loc: {...}
start: {...}
- line: 72
- column: 12
}end: {...}
- line: 72
- column: 20
}
}- name: "modelURL"
}property: Literal {...}
- type: "Literal"
- start: 1560
- end: 1567
loc: {...}
start: {...}
- line: 72
- column: 21
}end: {...}
- line: 72
- column: 28
}
}- value: "sheep"
- raw: "'sheep'"
}- computed: true
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 1573
- end: 1585
- name: "name"
value: [...] (1)
Text {...}
- start: 1579
- end: 1584
- type: "Text"
- raw: "sheep"
- data: "sheep"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1589
- end: 1611
- name: "position"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1598
- end: 1611
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 1599
- end: 1610
loc: {...}
start: {...}
- line: 74
- column: 12
}end: {...}
- line: 74
- column: 23
}
}elements: [...] (3)
UnaryExpression {...}
- type: "UnaryExpression"
- start: 1600
- end: 1602
loc: {...}
start: {...}
- line: 74
- column: 13
}end: {...}
- line: 74
- column: 15
}
}- operator: "-"
- prefix: true
argument: Literal {...}
- type: "Literal"
- start: 1601
- end: 1602
loc: {...}
start: {...}
- line: 74
- column: 14
}end: {...}
- line: 74
- column: 15
}
}- value: 6
- raw: "6"
}
} Literal {...}
- type: "Literal"
- start: 1604
- end: 1606
loc: {...}
start: {...}
- line: 74
- column: 17
}end: {...}
- line: 74
- column: 19
}
}- value: 17
- raw: "17"
} Literal {...}
- type: "Literal"
- start: 1608
- end: 1609
loc: {...}
start: {...}
- line: 74
- column: 21
}end: {...}
- line: 74
- column: 22
}
}- value: 4
- raw: "4"
}
]
}
}
} Attribute {...}
- type: "Attribute"
- start: 1615
- end: 1648
- name: "rotation"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1624
- end: 1648
expression: ArrayExpression {...}
- type: "ArrayExpression"
- start: 1625
- end: 1647
loc: {...}
start: {...}
- line: 75
- column: 12
}end: {...}
- line: 75
- column: 34
}
}elements: [...] (3)
Literal {...}
- type: "Literal"
- start: 1626
- end: 1627
loc: {...}
start: {...}
- line: 75
- column: 13
}end: {...}
- line: 75
- column: 14
}
}- value: 0
- raw: "0"
} BinaryExpression {...}
- type: "BinaryExpression"
- start: 1629
- end: 1643
loc: {...}
start: {...}
- line: 75
- column: 16
}end: {...}
- line: 75
- column: 30
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 1629
- end: 1636
loc: {...}
start: {...}
- line: 75
- column: 16
}end: {...}
- line: 75
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 1629
- end: 1633
loc: {...}
start: {...}
- line: 75
- column: 16
}end: {...}
- line: 75
- column: 20
}
}- name: "Math"
}property: Identifier {...}
- type: "Identifier"
- start: 1634
- end: 1636
loc: {...}
start: {...}
- line: 75
- column: 21
}end: {...}
- line: 75
- column: 23
}
}- name: "PI"
}- computed: false
- optional: false
}- operator: "*"
right: Literal {...}
- type: "Literal"
- start: 1639
- end: 1643
loc: {...}
start: {...}
- line: 75
- column: 26
}end: {...}
- line: 75
- column: 30
}
}- value: 1.25
- raw: "1.25"
}
} Literal {...}
- type: "Literal"
- start: 1645
- end: 1646
loc: {...}
start: {...}
- line: 75
- column: 32
}end: {...}
- line: 75
- column: 33
}
}- value: 0
- raw: "0"
}
]
}
}
} OnDirective {...}
- start: 1652
- end: 1688
- type: "OnDirective"
- name: "statusChange"
expression: Identifier {...}
- type: "Identifier"
- start: 1669
- end: 1687
loc: {...}
start: {...}
- line: 76
- column: 19
}end: {...}
- line: 76
- column: 37
}
}- name: "handleStatusChange"
}- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1693
- end: 1696
- raw: "\n\t\n"
- data: "\n\t\n"
}
]
}
} Text {...}
- type: "Text"
- start: 1708
- end: 1709
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 1709
- end: 1749
- name: "Loading"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 1718
- end: 1746
- name: "showLoading"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1730
- end: 1746
expression: Identifier {...}
- type: "Identifier"
- start: 1731
- end: 1745
loc: {...}
start: {...}
- line: 80
- column: 22
}end: {...}
- line: 80
- column: 36
}
}- name: "$modelsLoading"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
}
]
}- options: null
instance: Script {...}
- type: "Script"
- start: 1
- end: 416
- context: "default"
content: Program {...}
- type: "Program"
- start: 9
- end: 407
loc: {...}
start: {...}
- line: 1
- column: 0
}end: {...}
- line: 14
- column: 0
}
}body: [...] (7)
ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 11
- end: 42
loc: {...}
start: {...}
- line: 3
- column: 1
}end: {...}
- line: 3
- column: 32
}
}specifiers: [...] (1)
ImportNamespaceSpecifier {...}
- type: "ImportNamespaceSpecifier"
- start: 18
- end: 28
loc: {...}
start: {...}
- line: 3
- column: 8
}end: {...}
- line: 3
- column: 18
}
}local: Identifier {...}
- type: "Identifier"
- start: 23
- end: 28
loc: {...}
start: {...}
- line: 3
- column: 13
}end: {...}
- line: 3
- column: 18
}
}- name: "THREE"
}
}
]source: Literal {...}
- type: "Literal"
- start: 34
- end: 41
loc: {...}
start: {...}
- line: 3
- column: 24
}end: {...}
- line: 3
- column: 31
}
}- value: "three"
- raw: "\"three\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 44
- end: 79
loc: {...}
start: {...}
- line: 4
- column: 1
}end: {...}
- line: 4
- column: 36
}
}specifiers: [...] (1)
ImportNamespaceSpecifier {...}
- type: "ImportNamespaceSpecifier"
- start: 51
- end: 58
loc: {...}
start: {...}
- line: 4
- column: 8
}end: {...}
- line: 4
- column: 15
}
}local: Identifier {...}
- type: "Identifier"
- start: 56
- end: 58
loc: {...}
start: {...}
- line: 4
- column: 13
}end: {...}
- line: 4
- column: 15
}
}- name: "SC"
}
}
]source: Literal {...}
- type: "Literal"
- start: 64
- end: 78
loc: {...}
start: {...}
- line: 4
- column: 21
}end: {...}
- line: 4
- column: 35
}
}- value: "svelte-cubed"
- raw: "\"svelte-cubed\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 81
- end: 126
loc: {...}
start: {...}
- line: 5
- column: 1
}end: {...}
- line: 5
- column: 46
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 88
- end: 98
loc: {...}
start: {...}
- line: 5
- column: 8
}end: {...}
- line: 5
- column: 18
}
}local: Identifier {...}
- type: "Identifier"
- start: 88
- end: 98
loc: {...}
start: {...}
- line: 5
- column: 8
}end: {...}
- line: 5
- column: 18
}
}- name: "LittleCity"
}
}
]source: Literal {...}
- type: "Literal"
- start: 104
- end: 125
loc: {...}
start: {...}
- line: 5
- column: 24
}end: {...}
- line: 5
- column: 45
}
}- value: "./LittleCity.svelte"
- raw: "\"./LittleCity.svelte\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 128
- end: 177
loc: {...}
start: {...}
- line: 6
- column: 1
}end: {...}
- line: 6
- column: 50
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 135
- end: 147
loc: {...}
start: {...}
- line: 6
- column: 8
}end: {...}
- line: 6
- column: 20
}
}local: Identifier {...}
- type: "Identifier"
- start: 135
- end: 147
loc: {...}
start: {...}
- line: 6
- column: 8
}end: {...}
- line: 6
- column: 20
}
}- name: "ReusableGLTF"
}
}
]source: Literal {...}
- type: "Literal"
- start: 153
- end: 176
loc: {...}
start: {...}
- line: 6
- column: 26
}end: {...}
- line: 6
- column: 49
}
}- value: "./ReusableGLTF.svelte"
- raw: "\"./ReusableGLTF.svelte\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 179
- end: 218
loc: {...}
start: {...}
- line: 7
- column: 1
}end: {...}
- line: 7
- column: 40
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 186
- end: 193
loc: {...}
start: {...}
- line: 7
- column: 8
}end: {...}
- line: 7
- column: 15
}
}local: Identifier {...}
- type: "Identifier"
- start: 186
- end: 193
loc: {...}
start: {...}
- line: 7
- column: 8
}end: {...}
- line: 7
- column: 15
}
}- name: "Loading"
}
}
]source: Literal {...}
- type: "Literal"
- start: 199
- end: 217
loc: {...}
start: {...}
- line: 7
- column: 21
}end: {...}
- line: 7
- column: 39
}
}- value: "./Loading.svelte"
- raw: "\"./Loading.svelte\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 220
- end: 306
loc: {...}
start: {...}
- line: 8
- column: 1
}end: {...}
- line: 8
- column: 87
}
}specifiers: [...] (4)
ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 229
- end: 243
loc: {...}
start: {...}
- line: 8
- column: 10
}end: {...}
- line: 8
- column: 24
}
}imported: Identifier {...}
- type: "Identifier"
- start: 229
- end: 243
loc: {...}
start: {...}
- line: 8
- column: 10
}end: {...}
- line: 8
- column: 24
}
}- name: "statusOfModels"
}local: Identifier {...}
- type: "Identifier"
- start: 229
- end: 243
loc: {...}
start: {...}
- line: 8
- column: 10
}end: {...}
- line: 8
- column: 24
}
}- name: "statusOfModels"
}
} ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 245
- end: 253
loc: {...}
start: {...}
- line: 8
- column: 26
}end: {...}
- line: 8
- column: 34
}
}imported: Identifier {...}
- type: "Identifier"
- start: 245
- end: 253
loc: {...}
start: {...}
- line: 8
- column: 26
}end: {...}
- line: 8
- column: 34
}
}- name: "modelURL"
}local: Identifier {...}
- type: "Identifier"
- start: 245
- end: 253
loc: {...}
start: {...}
- line: 8
- column: 26
}end: {...}
- line: 8
- column: 34
}
}- name: "modelURL"
}
} ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 255
- end: 268
loc: {...}
start: {...}
- line: 8
- column: 36
}end: {...}
- line: 8
- column: 49
}
}imported: Identifier {...}
- type: "Identifier"
- start: 255
- end: 268
loc: {...}
start: {...}
- line: 8
- column: 36
}end: {...}
- line: 8
- column: 49
}
}- name: "modelsLoading"
}local: Identifier {...}
- type: "Identifier"
- start: 255
- end: 268
loc: {...}
start: {...}
- line: 8
- column: 36
}end: {...}
- line: 8
- column: 49
}
}- name: "modelsLoading"
}
} ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 270
- end: 287
loc: {...}
start: {...}
- line: 8
- column: 51
}end: {...}
- line: 8
- column: 68
}
}imported: Identifier {...}
- type: "Identifier"
- start: 270
- end: 287
loc: {...}
start: {...}
- line: 8
- column: 51
}end: {...}
- line: 8
- column: 68
}
}- name: "updateModelStatus"
}local: Identifier {...}
- type: "Identifier"
- start: 270
- end: 287
loc: {...}
start: {...}
- line: 8
- column: 51
}end: {...}
- line: 8
- column: 68
}
}- name: "updateModelStatus"
}
}
]source: Literal {...}
- type: "Literal"
- start: 295
- end: 305
loc: {...}
start: {...}
- line: 8
- column: 76
}end: {...}
- line: 8
- column: 86
}
}- value: "./stores"
- raw: "\"./stores\""
}
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 310
- end: 404
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 12
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 319
- end: 337
loc: {...}
start: {...}
- line: 10
- column: 10
}end: {...}
- line: 10
- column: 28
}
}- name: "handleStatusChange"
}- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 338
- end: 341
loc: {...}
start: {...}
- line: 10
- column: 29
}end: {...}
- line: 10
- column: 32
}
}- name: "evt"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 343
- end: 404
loc: {...}
start: {...}
- line: 10
- column: 34
}end: {...}
- line: 12
- column: 2
}
}body: [...] (1)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 347
- end: 401
loc: {...}
start: {...}
- line: 11
- column: 2
}end: {...}
- line: 11
- column: 56
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 347
- end: 400
loc: {...}
start: {...}
- line: 11
- column: 2
}end: {...}
- line: 11
- column: 55
}
}callee: Identifier {...}
- type: "Identifier"
- start: 347
- end: 364
loc: {...}
start: {...}
- line: 11
- column: 2
}end: {...}
- line: 11
- column: 19
}
}- name: "updateModelStatus"
}arguments: [...] (2)
MemberExpression {...}
- type: "MemberExpression"
- start: 365
- end: 380
loc: {...}
start: {...}
- line: 11
- column: 20
}end: {...}
- line: 11
- column: 35
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 365
- end: 375
loc: {...}
start: {...}
- line: 11
- column: 20
}end: {...}
- line: 11
- column: 30
}
}object: Identifier {...}
- type: "Identifier"
- start: 365
- end: 368
loc: {...}
start: {...}
- line: 11
- column: 20
}end: {...}
- line: 11
- column: 23
}
}- name: "evt"
}property: Identifier {...}
- type: "Identifier"
- start: 369
- end: 375
loc: {...}
start: {...}
- line: 11
- column: 24
}end: {...}
- line: 11
- column: 30
}
}- name: "detail"
}- computed: false
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 376
- end: 380
loc: {...}
start: {...}
- line: 11
- column: 31
}end: {...}
- line: 11
- column: 35
}
}- name: "name"
}- computed: false
- optional: false
} MemberExpression {...}
- type: "MemberExpression"
- start: 382
- end: 399
loc: {...}
start: {...}
- line: 11
- column: 37
}end: {...}
- line: 11
- column: 54
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 382
- end: 392
loc: {...}
start: {...}
- line: 11
- column: 37
}end: {...}
- line: 11
- column: 47
}
}object: Identifier {...}
- type: "Identifier"
- start: 382
- end: 385
loc: {...}
start: {...}
- line: 11
- column: 37
}end: {...}
- line: 11
- column: 40
}
}- name: "evt"
}property: Identifier {...}
- type: "Identifier"
- start: 386
- end: 392
loc: {...}
start: {...}
- line: 11
- column: 41
}end: {...}
- line: 11
- column: 47
}
}- name: "detail"
}- computed: false
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 393
- end: 399
loc: {...}
start: {...}
- line: 11
- column: 48
}end: {...}
- line: 11
- column: 54
}
}- name: "status"
}- computed: false
- optional: false
}
]- optional: false
}
}
]
}
}
]- sourceType: "module"
}- attributes: []
}
}
The AST is not public API and may change at any point in time