Skip to content

Commit b00e5ee

Browse files
authored
Merge pull request #38 from trenc/updateThree
Support three.js r158
2 parents 35960e6 + 6928176 commit b00e5ee

17 files changed

+2133
-50579
lines changed

dist/klee.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// src/modules/constants.js
2-
var KLEEVERSION = "0.8.1";
2+
var KLEEVERSION = "0.8.2";
33

44
// src/default.options.js
55
function getDefaultOptions(THREE) {
@@ -434,7 +434,7 @@ var Object3d = function() {
434434
for (const prop in options) {
435435
if (options[prop] instanceof Object) {
436436
if (typeof object[prop] !== "undefined" && "copy" in object[prop]) {
437-
if ("toVector3" in object[prop] && "setFromVector3" in object[prop]) {
437+
if ("setFromVector3" in object[prop]) {
438438
const toVector3 = new THREE.Vector3();
439439
toVector3.setFromEuler(object[prop]);
440440
const mergedVector3 = {...toVector3, ...options[prop]};

dist/klee.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/klee.min.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/basic-cube-and-sphere.html

+14-5
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
</head>
99
<body>
1010

11-
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
12-
1311
<script type="importmap">
1412
{
1513
"imports": {
16-
"three": "./libs/three.module.js",
14+
"three": "./libs/three.module.155.js",
1715
"klee": "./../dist/klee.js"
1816
}
1917
}
@@ -65,6 +63,7 @@
6563
type: 'AmbientLight',
6664
properties: {
6765
name: 'light-1',
66+
intensity: 2,
6867
color: '#404040'
6968
}
7069
},
@@ -73,10 +72,20 @@
7372
properties: {
7473
name: 'light-2',
7574
color: '#ffffff',
75+
intensity: 3,
7676
castShadow: true,
7777
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
7878
position: { x: 30, y: 30, z: 30 }
7979
}
80+
},
81+
{
82+
type: 'DirectionalLight',
83+
properties: {
84+
name: 'light-3',
85+
color: '#ffffff',
86+
intensity: 1,
87+
position: { x: -30, y: 30, z: -30 }
88+
}
8089
}
8190
];
8291

@@ -87,7 +96,7 @@
8796
args: [1, 1, 1]
8897
},
8998
material: {
90-
type: 'MeshPhongMaterial',
99+
type: 'MeshStandardMaterial',
91100
properties: {
92101
color: '#dbb32d'
93102
}
@@ -106,7 +115,7 @@
106115
args: [0.5, 32, 32]
107116
},
108117
material: {
109-
type: 'MeshPhongMaterial',
118+
type: 'MeshStandardMaterial',
110119
properties: {
111120
color: '#69ad21'
112121
}

example/callbacks.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
</head>
99
<body>
1010

11-
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
12-
1311
<script type="importmap">
1412
{
1513
"imports": {
16-
"three": "./libs/three.module.js",
14+
"three": "./libs/three.module.min.js",
1715
"klee": "./../dist/klee.js"
1816
}
1917
}
@@ -90,26 +88,28 @@
9088
type: 'AmbientLight',
9189
properties: {
9290
name: 'light-1',
93-
color: '#103c48'
91+
intensity: 2,
92+
color: '#404040'
9493
}
9594
},
9695
{
97-
type: 'SpotLight',
96+
type: 'DirectionalLight',
9897
properties: {
9998
name: 'light-2',
99+
color: '#ffffff',
100+
intensity: 3,
100101
castShadow: true,
101102
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
102103
position: { x: 30, y: 30, z: 30 }
103104
}
104105
},
105106
{
106-
type: 'SpotLight',
107+
type: 'DirectionalLight',
107108
properties: {
108109
name: 'light-3',
109110
color: '#ffffff',
110-
castShadow: true,
111-
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
112-
position: { x: 0, y: 30, z: 30 }
111+
intensity: 1,
112+
position: { x: -30, y: 30, z: -30 }
113113
}
114114
}
115115
];

example/collision-detection.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
</head>
99
<body>
1010

11-
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
12-
1311
<script type="importmap">
1412
{
1513
"imports": {
16-
"three": "./libs/three.module.js",
14+
"three": "./libs/three.module.min.js",
1715
"klee": "./../dist/klee.js"
1816
}
1917
}
@@ -68,26 +66,28 @@
6866
type: 'AmbientLight',
6967
properties: {
7068
name: 'light-1',
71-
color: '#103c48'
69+
intensity: 2,
70+
color: '#404040'
7271
}
7372
},
7473
{
75-
type: 'SpotLight',
74+
type: 'DirectionalLight',
7675
properties: {
7776
name: 'light-2',
77+
color: '#ffffff',
78+
intensity: 3,
7879
castShadow: true,
7980
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
8081
position: { x: 30, y: 30, z: 30 }
8182
}
8283
},
8384
{
84-
type: 'SpotLight',
85+
type: 'DirectionalLight',
8586
properties: {
8687
name: 'light-3',
8788
color: '#ffffff',
88-
castShadow: true,
89-
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
90-
position: { x: 0, y: 30, z: 30 }
89+
intensity: 1,
90+
position: { x: -30, y: 30, z: -30 }
9191
}
9292
}
9393
];

example/dragging-on-level.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
</head>
99
<body>
1010

11-
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
12-
1311
<script type="importmap">
1412
{
1513
"imports": {
16-
"three": "./libs/three.module.js",
14+
"three": "./libs/three.module.min.js",
1715
"klee": "./../dist/klee.js"
1816
}
1917
}
@@ -68,26 +66,28 @@
6866
type: 'AmbientLight',
6967
properties: {
7068
name: 'light-1',
71-
color: '#103c48'
69+
intensity: 2,
70+
color: '#404040'
7271
}
7372
},
7473
{
75-
type: 'SpotLight',
74+
type: 'DirectionalLight',
7675
properties: {
7776
name: 'light-2',
77+
color: '#ffffff',
78+
intensity: 3,
7879
castShadow: true,
7980
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
8081
position: { x: 30, y: 30, z: 30 }
8182
}
8283
},
8384
{
84-
type: 'SpotLight',
85+
type: 'DirectionalLight',
8586
properties: {
8687
name: 'light-3',
8788
color: '#ffffff',
88-
castShadow: true,
89-
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
90-
position: { x: 0, y: 30, z: 30 }
89+
intensity: 1,
90+
position: { x: -30, y: 30, z: -30 }
9191
}
9292
}
9393
];

example/gltf-loader.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
</head>
99
<body>
1010

11-
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
12-
1311
<script type="importmap">
1412
{
1513
"imports": {
16-
"three": "./libs/three.module.js",
14+
"three": "./libs/three.module.min.js",
1715
"klee": "./../dist/klee.js"
1816
}
1917
}
@@ -69,26 +67,28 @@
6967
type: 'AmbientLight',
7068
properties: {
7169
name: 'light-1',
70+
intensity: 2,
7271
color: '#404040'
7372
}
7473
},
7574
{
76-
type: 'SpotLight',
75+
type: 'DirectionalLight',
7776
properties: {
7877
name: 'light-2',
78+
color: '#ffffff',
79+
intensity: 3,
7980
castShadow: true,
8081
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
8182
position: { x: 30, y: 30, z: 30 }
8283
}
8384
},
8485
{
85-
type: 'SpotLight',
86+
type: 'DirectionalLight',
8687
properties: {
8788
name: 'light-3',
8889
color: '#ffffff',
89-
castShadow: true,
90-
shadow: { mapSize: { x: 2048, y: 2048 } }, // INFO: x,y instead of width, height
91-
position: { x: 0, y: 30, z: 30 }
90+
intensity: 1,
91+
position: { x: -30, y: 30, z: -30 }
9292
}
9393
}
9494
];

0 commit comments

Comments
 (0)